[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <e0acbfa6-0f46-1c75-7453-fa604548b3c5@redhat.com>
Date: Wed, 23 Jun 2021 14:30:37 +0200
From: Paolo Bonzini <pbonzini@...hat.com>
To: Xiaoyao Li <xiaoyao.li@...el.com>,
Sean Christopherson <seanjc@...gle.com>
Cc: Vitaly Kuznetsov <vkuznets@...hat.com>,
Wanpeng Li <wanpengli@...cent.com>,
Jim Mattson <jmattson@...gle.com>,
Joerg Roedel <joro@...tes.org>, kvm@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH] KVM: nVMX: Handle split-lock #AC exceptions that happen
in L2
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
Powered by blists - more mailing lists