lkml.org 
[lkml]   [2017]   [Mar]   [31]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH 4/6] kvm: nVMX: support EPT accessed/dirty bits
From
Date


On 31/03/2017 18:24, Radim Krčmář wrote:
>> + if (is_guest_mode(vcpu)
>> + && !(exit_qualification & EPT_VIOLATION_GVA_TRANSLATED)) {
>> + /*
>> + * Fix up exit_qualification according to whether guest
>> + * page table accesses are reads or writes.
>> + */
>> + u64 eptp = nested_ept_get_cr3(vcpu);
>> + exit_qualification &= ~EPT_VIOLATION_ACC_WRITE;
>> + if (eptp & VMX_EPT_AD_ENABLE_BIT)
>> + exit_qualification |= EPT_VIOLATION_ACC_WRITE;
> I think this would be better without unconditional clearing
>
> if (!(eptp & VMX_EPT_AD_ENABLE_BIT))
> exit_qualification &= ~EPT_VIOLATION_ACC_WRITE;

Yeah, this is a remnant of my (failed) attempt at emulating A/D bits
when the processor doesn't support it. Which worked, only it's not
compliant enough to include it in the final series.

As for the two nits you found, shall I repost or are you okay with
fixing it yourself?

Paolo

\
 
 \ /
  Last update: 2017-03-31 18:27    [W:1.019 / U:0.584 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site