Skip to content

Commit 3ac9d42

Browse files
Kevin Chenggregkh
authored andcommitted
KVM: SVM: Inject #UD for INVLPGA if EFER.SVME=0
commit d99df02 upstream. INVLPGA should cause a #UD when EFER.SVME is not set. Add a check to properly inject #UD when EFER.SVME=0. Fixes: ff09238 ("KVM: SVM: Implement INVLPGA") Cc: stable@vger.kernel.org Signed-off-by: Kevin Cheng <chengkev@google.com> Reviewed-by: Yosry Ahmed <yosry.ahmed@linux.dev> Link: https://patch.msgid.link/20260228033328.2285047-3-chengkev@google.com [sean: tag for stable@] Signed-off-by: Sean Christopherson <seanjc@google.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent 1709418 commit 3ac9d42

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

arch/x86/kvm/svm/svm.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2494,6 +2494,9 @@ static int invlpga_interception(struct kvm_vcpu *vcpu)
24942494
gva_t gva = kvm_rax_read(vcpu);
24952495
u32 asid = kvm_rcx_read(vcpu);
24962496

2497+
if (nested_svm_check_permissions(vcpu))
2498+
return 1;
2499+
24972500
/* FIXME: Handle an address size prefix. */
24982501
if (!is_long_mode(vcpu))
24992502
gva = (u32)gva;

0 commit comments

Comments
 (0)