Re: [PATCH 6/6 v5][kvm-unit-test nVMX]: Check "load IA32_PAT" on vmentry of L2 guests

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

 



On 10/04/19 19:17, Sean Christopherson wrote:
>>  	vmcs_write(ctrl_field, ctrl_saved & ~ctrl_bit);
>> -	for (i = 0; i <= PAT_VAL_LIMIT; i++) {
>> +	for (i = 0; i < 256; i = (i < PAT_VAL_LIMIT) ? i + 1 : i * 2) {
>>  		/* Test PAT0..PAT7 fields */
>> -		for (j = 0; j < 8; j++) {
>> +		for (j = 0; j < (i ? 8 : 1); j++) {
> I don't think "j < (i ? 8 : 1)" is what you intended.  As-is only i==0,
> i.e. UC memtype, gets shortcircuited to test PAT0 only.  Did you perhaps
> intend to test only PAT0 for i>8?  E.g.:

No, it is what I intended.  The reason is that i == 0 gives the same "i
<< (j * 8)" for all values of j.  Otherwise, the logs show 8 entries for
GUEST_IA32_PAT = 0. :)

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