public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
From: Nikita Kalyazin <kalyazin@amazon.com>
To: <pbonzini@redhat.com>, <corbet@lwn.net>, <seanjc@google.com>,
	<tglx@linutronix.de>, <mingo@redhat.com>, <bp@alien8.de>,
	<dave.hansen@linux.intel.com>, <x86@kernel.org>, <hpa@zytor.com>,
	<vkuznets@redhat.com>, <xiaoyao.li@intel.com>,
	<kvm@vger.kernel.org>, <linux-kernel@vger.kernel.org>,
	<linux-doc@vger.kernel.org>
Cc: <roypat@amazon.co.uk>, <xmarcalx@amazon.com>, <kalyazin@amazon.com>
Subject: [PATCH 2/2] KVM: x86: async_pf: determine x86 user as cpl == 3
Date: Wed, 27 Nov 2024 17:26:54 +0000	[thread overview]
Message-ID: <20241127172654.1024-3-kalyazin@amazon.com> (raw)
In-Reply-To: <20241127172654.1024-1-kalyazin@amazon.com>

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 --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)) {
-- 
2.40.1


  parent reply	other threads:[~2024-11-27 17:27 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-11-27 17:26 [PATCH 0/2] KVM_ASYNC_PF_SEND_ALWAYS Nikita Kalyazin
2024-11-27 17:26 ` [PATCH 1/2] KVM: x86: async_pf: remove support for KVM_ASYNC_PF_SEND_ALWAYS Nikita Kalyazin
2025-02-11 18:53   ` Sean Christopherson
2025-02-17 13:05     ` Vitaly Kuznetsov
2025-02-18 15:17       ` Sean Christopherson
2025-02-18 17:07         ` Nikita Kalyazin
2024-11-27 17:26 ` Nikita Kalyazin [this message]
2025-02-11 19:12   ` [PATCH 2/2] KVM: x86: async_pf: determine x86 user as cpl == 3 Sean Christopherson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20241127172654.1024-3-kalyazin@amazon.com \
    --to=kalyazin@amazon.com \
    --cc=bp@alien8.de \
    --cc=corbet@lwn.net \
    --cc=dave.hansen@linux.intel.com \
    --cc=hpa@zytor.com \
    --cc=kvm@vger.kernel.org \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=roypat@amazon.co.uk \
    --cc=seanjc@google.com \
    --cc=tglx@linutronix.de \
    --cc=vkuznets@redhat.com \
    --cc=x86@kernel.org \
    --cc=xiaoyao.li@intel.com \
    --cc=xmarcalx@amazon.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox