]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commitc5db20358924e9442a9d076a1b28bca53cab4834
treed84395d669a911da5f222f44478adaafd64d9b54
parent92777a48918b817af17f202f19113fcabcfeadeb
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