kvm: selftests: add cr4_cpuid_sync_test
KVM is supposed to update some guest VM's CPUID bits (e.g. OSXSAVE) when CR4 is changed. A bug was found in KVM recently and it was fixed by Commit c4d21882 ("KVM: x86: Update cpuid properly when CR4.OSXAVE or CR4.PKE is changed"). This patch adds a test to verify the synchronization between guest VM's CR4 and CPUID bits. Signed-off-by:Wei Huang <wei@redhat.com> Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com>
Showing
- tools/testing/selftests/kvm/.gitignore 1 addition, 0 deletionstools/testing/selftests/kvm/.gitignore
- tools/testing/selftests/kvm/Makefile 1 addition, 0 deletionstools/testing/selftests/kvm/Makefile
- tools/testing/selftests/kvm/cr4_cpuid_sync_test.c 129 additions, 0 deletionstools/testing/selftests/kvm/cr4_cpuid_sync_test.c
Loading
Please register or sign in to comment