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