Re: [PATCH v2 03/18] KVM: nVMX: use vm_exit_controls_init() to write exit controls for vmcs02

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

 



On Thu, Sep 20, 2018 at 3:07 PM, Sean Christopherson
<sean.j.christopherson@xxxxxxxxx> wrote:

> vm_exit_controls_shadow, which is written by vm_exit_controls_init(),
> is a shadow of the VM_EXIT_CONTROLS VMCS field.  The shadow is used to
> elide VMREADs and VMWRITEs to VM_EXIT_CONTROLS, i.e. we don't need to
> VMREAD the field when toggling a bit and we can skip VMWRITE if the
> desired value matches the shadow (and therefore matches the VMCS).
> vm_exit_controls_shadow needs to be kept in sync with the VMCS field
> at all times, otherwise we might incorrectly skip a VMWRITE, e.g. if
> VM_EXIT_LOAD_IA32_EFER bit is set in the shadow but not the actual
> VMCS field.  When we switch to vmcs02 we need to re-initialize the
> shadow because the shadow is per-VCPU, not per-VMCS.

Perhaps the shadow should be per-VMCS?



[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