lkml.org 
[lkml]   [2020]   [Mar]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH v6 8/8] kvm: vmx: virtualize split lock detection
From
Date
On 3/25/2020 8:40 AM, Thomas Gleixner wrote:
> Xiaoyao Li <xiaoyao.li@intel.com> writes:
>> +static inline bool guest_cpu_split_lock_detect_on(struct vcpu_vmx *vmx)
>> +{
>> + return vmx->msr_test_ctrl & MSR_TEST_CTRL_SPLIT_LOCK_DETECT;
>> +}
>> +
>> static int handle_exception_nmi(struct kvm_vcpu *vcpu)
>> {
>> struct vcpu_vmx *vmx = to_vmx(vcpu);
>> @@ -4725,12 +4746,13 @@ static int handle_exception_nmi(struct kvm_vcpu *vcpu)
>> case AC_VECTOR:
>> /*
>> * Reflect #AC to the guest if it's expecting the #AC, i.e. has
>> - * legacy alignment check enabled. Pre-check host split lock
>> - * support to avoid the VMREADs needed to check legacy #AC,
>> - * i.e. reflect the #AC if the only possible source is legacy
>> - * alignment checks.
>> + * legacy alignment check enabled or split lock detect enabled.
>> + * Pre-check host split lock support to avoid further check of
>> + * guest, i.e. reflect the #AC if host doesn't enable split lock
>> + * detection.
>> */
>> if (!split_lock_detect_on() ||
>> + guest_cpu_split_lock_detect_on(vmx) ||
>> guest_cpu_alignment_check_enabled(vcpu)) {
>
> If the host has split lock detection disabled then how is the guest
> supposed to have it enabled in the first place?
>

It is ||

Thanks,
-Xiaoyao

\
 
 \ /
  Last update: 2020-03-26 07:43    [W:0.077 / U:0.392 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site