]> 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)
commit43588337be2cd65d1acd712aa4579c962d722a4d
treed84395d669a911da5f222f44478adaafd64d9b54
parentbeea910c93ba64b0088ece83dd03ba0d54c868b7
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