Skip to contentSkip to conversation

FAILED: patch "[PATCH] KVM: SVM: Inject #UD for INVLPGA if EFER.SVME=0" failed to apply to 5.10-stable tree

PATCH [email protected] 1 participant 1 message May 3

Subsystems (3)
lore
Share & tools
lore

[email protected]

author maintainer
#0 lore raw

The patch below does not apply to the 5.10-stable tree.
If someone wants it applied there, or to any other stable or longterm tree, then please email the backport, including the original git commit id to <[email protected]>.

To reproduce the conflict and resubmit, you may use the following commands:

git fetch https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/ linux-5.10.y
git checkout FETCH_HEAD
git cherry-pick -x d99df02ff427f461102230f9c5b90a6c64ee8e23
# <resolve conflicts, build, test, etc.>
git commit -s
git send-email --to '<[email protected]>' --in-reply-to '2026050339-pony-probe-1c97@gregkh' --subject-prefix 'PATCH 5.10.y' HEAD^..

Possible dependencies:

thanks,

greg k-h

------------------ original commit in Linus's tree ------------------

From d99df02ff427f461102230f9c5b90a6c64ee8e23 Mon Sep 17 00:00:00 2001
From: Kevin Cheng <[email protected]>
Date: Sat, 28 Feb 2026 03:33:26 +0000
Subject: [PATCH] KVM: SVM: Inject #UD for INVLPGA if EFER.SVME=0

INVLPGA should cause a #UD when EFER.SVME is not set. Add a check to properly inject #UD when EFER.SVME=0.

Fixes ff092385e828 ("KVM: SVM: Implement INVLPGA")
[sean: tag for stable@]
arch/x86/kvm/svm/svm.c +3 -0
index d82e30c40eaa..543f9f3f966e 100644
@@ -2367,6 +2367,9 @@ static int invlpga_interception(struct kvm_vcpu *vcpu)
 	gva_t gva = kvm_rax_read(vcpu);
 	u32 asid = kvm_rcx_read(vcpu);
 
+	if (nested_svm_check_permissions(vcpu))
+		return 1;
+
 	/* FIXME: Handle an address size prefix. */
 	if (!is_long_mode(vcpu))
 		gva = (u32)gva;