lkml.org 
[lkml]   [2021]   [Jun]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH] KVM: nVMX: Handle split-lock #AC exceptions that happen in L2
From
Date
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

\
 
 \ /
  Last update: 2021-06-23 14:31    [W:0.054 / U:0.116 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site