> > After your changes here, vmx_vmread_bitmap and vmx_vmwrite_bitmap have > > always the same content. Instead, it should be possible for the read > > and write bitmap to point to the same address. > > Yes, but copy_shadow_to_vmcs12() also needs to walk the "read-only" fields when > they are read/write. Dealing with the two arrays of indices is awkward. It's just the code that's already in copy_vmcs12_to_shadow. If you first introduce vmcs_read/write_any, the two nested for loops aren't bad. Or, make the "for (i = 0; i < num_fields; i++)" loop its own function, like copy_vmcs12_fields_to_shadow and copy_shadow_fields_to_vmcs12, and call it twice. Paolo