On Thu, Sep 26, 2019 at 04:39:28PM -0700, Jim Mattson wrote: > On Thu, Sep 26, 2019 at 2:43 PM Sean Christopherson > <sean.j.christopher...@intel.com> wrote: > > - vmcs_writel(GUEST_CR3, guest_cr3); > > + if (!skip_cr3) > > + vmcs_writel(GUEST_CR3, guest_cr3); > > Is this part of the change necessary, or is it just an optimization to > save a redundant VMWRITE?
Save the redundant VMWRITE. I also wanted to convey the idea that the nested code is responsible for setting GUEST_CR3 to the correct value. I'd be happy to add a comment to make the latter point explicit. > > } > > > > int vmx_set_cr4(struct kvm_vcpu *vcpu, unsigned long cr4) > > -- > > 2.22.0 > >