KVM: x86: build kvm_userspace_memory_region in x86_set_memory_region
authorPaolo Bonzini <pbonzini@redhat.com>
Mon, 12 Oct 2015 11:38:32 +0000 (13:38 +0200)
committerPaolo Bonzini <pbonzini@redhat.com>
Tue, 13 Oct 2015 16:28:46 +0000 (18:28 +0200)
commit1d8007bdee074fdffcf3539492d8a151a1fb3436
tree282870ab57659afefbddfc32e5e81e7812889c4b
parentd2922422c48df93f3edff7d872ee4f3191fefb08
KVM: x86: build kvm_userspace_memory_region in x86_set_memory_region

The next patch will make x86_set_memory_region fill the
userspace_addr.  Since the struct is not used untouched
anymore, it makes sense to build it in x86_set_memory_region
directly; it also simplifies the callers.

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