diff mbox series

[2/2] KVM: x86: async_pf: determine x86 user as cpl == 3

Message ID 20241127172654.1024-3-kalyazin@amazon.com (mailing list archive)
State New
Headers show
Series KVM_ASYNC_PF_SEND_ALWAYS | expand

Commit Message

Nikita Kalyazin Nov. 27, 2024, 5:26 p.m. UTC
Suggested-by: Sean Christopherson <seanjc@google.com>
Signed-off-by: Nikita Kalyazin <kalyazin@amazon.com>
---
 arch/x86/kvm/x86.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c
index 8f784f07d423..168dcf1d4625 100644
--- a/arch/x86/kvm/x86.c
+++ b/arch/x86/kvm/x86.c
@@ -13360,7 +13360,7 @@  static bool kvm_can_deliver_async_pf(struct kvm_vcpu *vcpu)
 	if (!kvm_pv_async_pf_enabled(vcpu))
 		return false;
 
-	if (kvm_x86_call(get_cpl)(vcpu) == 0)
+	if (kvm_x86_call(get_cpl)(vcpu) != 3)
 		return false;
 
 	if (is_guest_mode(vcpu)) {