Re: [PATCH 4/6] kvm: nVMX: support EPT accessed/dirty bits

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




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



[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux