From: Paolo Bonzini <pbonzini@redhat.com>
To: Xiaoyao Li <xiaoyao.li@intel.com>,
Sean Christopherson <seanjc@google.com>
Cc: Vitaly Kuznetsov <vkuznets@redhat.com>,
Wanpeng Li <wanpengli@tencent.com>,
Jim Mattson <jmattson@google.com>, Joerg Roedel <joro@8bytes.org>,
kvm@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] KVM: nVMX: Handle split-lock #AC exceptions that happen in L2
Date: Wed, 23 Jun 2021 14:30:37 +0200 [thread overview]
Message-ID: <e0acbfa6-0f46-1c75-7453-fa604548b3c5@redhat.com> (raw)
In-Reply-To: <5196d26a-abb5-7ec9-70b1-69912a45ecd7@intel.com>
On 23/06/21 04:43, Xiaoyao Li wrote:
>>
>> + else if (is_alignment_check(intr_info) &&
>> + !vmx_guest_inject_ac(vcpu))
>> + return true;
>
> Why choose to check in nested_vmx_l0_wants_exit, not in
> nested_vmx_l1_wants_exit()?
nested_vmx_l0_wants_exit() == true means "this is a vmexit that needs
some transformation before being injected into L1". Instead,
nested_vmx_l1_wants_exit() == true means "this is an event that should
either be processed directly by L0, or cause a vmexit in L1"
Typically, nested_vmx_l1_wants_exit() checks the controls in vmcs12,
while nested_vmx_l0_wants_exit() returns true unconditionally for most
vmexits; for others it checks processor state, or other state set up by
userspace with ioctls such as vcpu->guest_debug.
In this case it's *L0* that wants that vmexit, in order to either
disable split-lock detection or inject a SIGBUS, so
nested_vmx_l0_wants_exit() is the right one to test.
Paolo
next prev parent reply other threads:[~2021-06-23 12:30 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-06-22 17:22 Sean Christopherson
2021-06-23 2:43 ` Xiaoyao Li
2021-06-23 12:30 ` Paolo Bonzini [this message]
2021-06-23 12:32 ` Paolo Bonzini
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=e0acbfa6-0f46-1c75-7453-fa604548b3c5@redhat.com \
--to=pbonzini@redhat.com \
--cc=jmattson@google.com \
--cc=joro@8bytes.org \
--cc=kvm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=seanjc@google.com \
--cc=vkuznets@redhat.com \
--cc=wanpengli@tencent.com \
--cc=xiaoyao.li@intel.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
all inboxes | Powered by JetHome®