Re: [PATCH 1/4] kvm: nVMX: Add support for "VMWRITE to any supported field"

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

 



> > 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



[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