diff options
author | Zheng Zhan Liang <zhengzhanliang@huorong.cn> | 2021-02-01 13:53:10 +0800 |
---|---|---|
committer | Paolo Bonzini <pbonzini@redhat.com> | 2021-02-01 12:43:01 -0500 |
commit | b66f9bab1279c281c83dea077c5e808527e3ef69 (patch) | |
tree | b0ca8ded9a3889e5bc1e1a3000581d76df28dd39 | |
parent | 7131636e7ea5b50ca910f8953f6365ef2d1f741c (diff) |
KVM/x86: assign hva with the right value to vm_munmap the pages
Cc: Paolo Bonzini <pbonzini@redhat.com>
Cc: Wanpeng Li <wanpengli@tencent.com>
Cc: kvm@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
Signed-off-by: Zheng Zhan Liang <zhengzhanliang@huorong.cn>
Message-Id: <20210201055310.267029-1-zhengzhanliang@huorong.cn>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
-rw-r--r-- | arch/x86/kvm/x86.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c index b05a1fe9dae9..42b28d0f0311 100644 --- a/arch/x86/kvm/x86.c +++ b/arch/x86/kvm/x86.c @@ -10502,7 +10502,7 @@ void __user * __x86_set_memory_region(struct kvm *kvm, int id, gpa_t gpa, return 0; old_npages = slot->npages; - hva = 0; + hva = slot->userspace_addr; } for (i = 0; i < KVM_ADDRESS_SPACE_NUM; i++) { |