]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/commit - arch/x86/kvm/vmx.c
KVM: nVMX: do not pin the VMCS12
authorPaolo Bonzini <pbonzini@redhat.com>
Thu, 27 Jul 2017 13:54:46 +0000 (15:54 +0200)
committerRadim Krčmář <rkrcmar@redhat.com>
Wed, 2 Aug 2017 20:41:03 +0000 (22:41 +0200)
commit9f744c59746078280ef28163aa136ef3f625804e
treed84395d669a911da5f222f44478adaafd64d9b54
parent3898da947bbaf9e7fd5816e825978d360028bba2
KVM: nVMX: do not pin the VMCS12

Since the current implementation of VMCS12 does a memcpy in and out
of guest memory, we do not need current_vmcs12 and current_vmcs12_page
anymore.  current_vmptr is enough to read and write the VMCS12.

And David Matlack noted:

  This patch also fixes dirty tracking (memslot->dirty_bitmap) of the
  VMCS12 page by using kvm_write_guest. nested_release_page() only marks
  the struct page dirty.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Reviewed-by: David Hildenbrand <david@redhat.com>
[Added David Matlack's note and nested_release_page_clean() fix.]
Signed-off-by: Radim Krčmář <rkrcmar@redhat.com>
arch/x86/kvm/vmx.c