diff options
author | Michal Luczaj <mhal@rbox.co> | 2023-07-28 02:12:58 +0200 |
---|---|---|
committer | Sean Christopherson <seanjc@google.com> | 2023-08-02 13:33:17 -0700 |
commit | ae895cbe613a5b193f3953c90c075306bfa4d30b (patch) | |
tree | 980a4f0a631adb15bdadef1903265196646f0de2 /tools/testing/selftests/kvm/lib/sparsebit.c | |
parent | 0d033770d43a7aa36025bcef9a60da7fb750f735 (diff) |
KVM: selftests: Extend x86's sync_regs_test to check for CR4 races
Attempt to modify vcpu->run->s.regs _after_ the sanity checks performed by
KVM_CAP_SYNC_REGS's arch/x86/kvm/x86.c:sync_regs(). This can lead to some
nonsensical vCPU states accompanied by kernel splats, e.g. disabling PAE
while long mode is enabled makes KVM all kinds of confused:
WARNING: CPU: 0 PID: 1142 at arch/x86/kvm/mmu/paging_tmpl.h:358 paging32_walk_addr_generic+0x431/0x8f0 [kvm]
arch/x86/kvm/mmu/paging_tmpl.h:
KVM_BUG_ON(is_long_mode(vcpu) && !is_pae(vcpu), vcpu->kvm)
Signed-off-by: Michal Luczaj <mhal@rbox.co>
Link: https://lore.kernel.org/r/20230728001606.2275586-3-mhal@rbox.co
[sean: see link]
Signed-off-by: Sean Christopherson <seanjc@google.com>
Diffstat (limited to 'tools/testing/selftests/kvm/lib/sparsebit.c')
0 files changed, 0 insertions, 0 deletions