diff options
author | Takuya Yoshikawa <yoshikawa_takuya_b1@lab.ntt.co.jp> | 2013-02-27 05:43:00 -0500 |
---|---|---|
committer | Marcelo Tosatti <mtosatti@redhat.com> | 2013-03-04 18:21:08 -0500 |
commit | 47ae31e257c548abdb199e0d26723139a9a967ba (patch) | |
tree | e2888e7839935423a3afc64c0296eb9e4eed23c4 /arch/x86/kvm/vmx.c | |
parent | 462fce46065ec4b200c08619c047b9e5a8fd154a (diff) |
KVM: set_memory_region: Drop user_alloc from set_memory_region()
Except ia64's stale code, KVM_SET_MEMORY_REGION support, this is only
used for sanity checks in __kvm_set_memory_region() which can easily
be changed to use slot id instead.
Signed-off-by: Takuya Yoshikawa <yoshikawa_takuya_b1@lab.ntt.co.jp>
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
Diffstat (limited to 'arch/x86/kvm/vmx.c')
-rw-r--r-- | arch/x86/kvm/vmx.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/arch/x86/kvm/vmx.c b/arch/x86/kvm/vmx.c index 7cc566b09ff2..58fb7c27e3b5 100644 --- a/arch/x86/kvm/vmx.c +++ b/arch/x86/kvm/vmx.c | |||
@@ -3694,7 +3694,7 @@ static int alloc_apic_access_page(struct kvm *kvm) | |||
3694 | kvm_userspace_mem.flags = 0; | 3694 | kvm_userspace_mem.flags = 0; |
3695 | kvm_userspace_mem.guest_phys_addr = 0xfee00000ULL; | 3695 | kvm_userspace_mem.guest_phys_addr = 0xfee00000ULL; |
3696 | kvm_userspace_mem.memory_size = PAGE_SIZE; | 3696 | kvm_userspace_mem.memory_size = PAGE_SIZE; |
3697 | r = __kvm_set_memory_region(kvm, &kvm_userspace_mem, false); | 3697 | r = __kvm_set_memory_region(kvm, &kvm_userspace_mem); |
3698 | if (r) | 3698 | if (r) |
3699 | goto out; | 3699 | goto out; |
3700 | 3700 | ||
@@ -3724,7 +3724,7 @@ static int alloc_identity_pagetable(struct kvm *kvm) | |||
3724 | kvm_userspace_mem.guest_phys_addr = | 3724 | kvm_userspace_mem.guest_phys_addr = |
3725 | kvm->arch.ept_identity_map_addr; | 3725 | kvm->arch.ept_identity_map_addr; |
3726 | kvm_userspace_mem.memory_size = PAGE_SIZE; | 3726 | kvm_userspace_mem.memory_size = PAGE_SIZE; |
3727 | r = __kvm_set_memory_region(kvm, &kvm_userspace_mem, false); | 3727 | r = __kvm_set_memory_region(kvm, &kvm_userspace_mem); |
3728 | if (r) | 3728 | if (r) |
3729 | goto out; | 3729 | goto out; |
3730 | 3730 | ||
@@ -4364,7 +4364,7 @@ static int vmx_set_tss_addr(struct kvm *kvm, unsigned int addr) | |||
4364 | .flags = 0, | 4364 | .flags = 0, |
4365 | }; | 4365 | }; |
4366 | 4366 | ||
4367 | ret = kvm_set_memory_region(kvm, &tss_mem, false); | 4367 | ret = kvm_set_memory_region(kvm, &tss_mem); |
4368 | if (ret) | 4368 | if (ret) |
4369 | return ret; | 4369 | return ret; |
4370 | kvm->arch.tss_addr = addr; | 4370 | kvm->arch.tss_addr = addr; |