]> git.baikalelectronics.ru Git - kernel.git/commit
kvm: selftests: add cr4_cpuid_sync_test
authorWei Huang <wei@redhat.com>
Tue, 26 Jun 2018 03:41:57 +0000 (23:41 -0400)
committerPaolo Bonzini <pbonzini@redhat.com>
Mon, 6 Aug 2018 15:31:59 +0000 (17:31 +0200)
commit6fdfdd16ab14493ffe96d90d39303f8a713ff8ed
treef701a35b3bfed46ef5bd30c1a1dcb465d9e670d9
parente691c9bfe7cfb721507702c4b25960be39b7812b
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 f390f6055de9 ("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>
tools/testing/selftests/kvm/.gitignore
tools/testing/selftests/kvm/Makefile
tools/testing/selftests/kvm/cr4_cpuid_sync_test.c [new file with mode: 0644]