]> git.baikalelectronics.ru Git - kernel.git/commit
KVM: x86: map/unmap private slots in __x86_set_memory_region
authorPaolo Bonzini <pbonzini@redhat.com>
Mon, 12 Oct 2015 11:56:27 +0000 (13:56 +0200)
committerPaolo Bonzini <pbonzini@redhat.com>
Tue, 13 Oct 2015 16:28:58 +0000 (18:28 +0200)
commit0df6e93513182f63ec79f3c9662df2ca31def1c9
tree8ba9f9080e3c51144df2fe3efdf5eeea1c231b3e
parentdf725b40d98e7a45b02c1197c852923a2f341bcf
KVM: x86: map/unmap private slots in __x86_set_memory_region

Otherwise, two copies (one of them never populated and thus bogus)
are allocated for the regular and SMM address spaces.  This breaks
SMM with EPT but without unrestricted guest support, because the
SMM copy of the identity page map is all zeros.

By moving the allocation to the caller we also remove the last
vestiges of kernel-allocated memory regions (not accessible anymore
in userspace since commit a91be2e5bf82, "KVM: Remove kernel-allocated
memory regions", 2010-06-21); that is a nice bonus.

Reported-by: Alexandre DERUMIER <aderumier@odiso.com>
Cc: stable@vger.kernel.org
Fixes: 2f330673bffae03df38aae92a50abda59e92e8a0
Reviewed-by: Radim Krčmář <rkrcmar@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
arch/x86/kvm/x86.c