]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
KVM: x86: check for nEPT/nNPT in slow flush hypercalls
authorPaolo Bonzini <pbonzini@redhat.com>
Mon, 27 Apr 2026 12:25:40 +0000 (14:25 +0200)
committerPaolo Bonzini <pbonzini@redhat.com>
Sun, 3 May 2026 20:17:30 +0000 (22:17 +0200)
commit464af6fc2b1dcc74005b7f58ee3812b17777efee
tree7a4011f71d37c3facd0b7b3d116dc4e49e321030
parent39f1c201b93f4ff71631bac72cff6eb155f976a4
KVM: x86: check for nEPT/nNPT in slow flush hypercalls

Checking is_guest_mode(vcpu) is incorrect, because translate_nested_gpa()
is only valid if an L2 guest is running *with nested EPT/NPT enabled*.
Instead use the same condition as translate_nested_gpa() itself.

Cc: stable@vger.kernel.org
Reviewed-by: Sean Christopherson <seanjc@google.com>
Fixes: aee738236dca ("KVM: x86: Prepare kvm_hv_flush_tlb() to handle L2's GPAs", 2022-11-18)
Link: https://patch.msgid.link/20260503200905.106077-1-pbonzini@redhat.com/
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
arch/x86/kvm/hyperv.c