aboutsummaryrefslogtreecommitdiffstats
path: root/arch/ia64
diff options
context:
space:
mode:
authorMarcelo Tosatti <mtosatti@redhat.com>2009-12-23 11:35:18 -0500
committerMarcelo Tosatti <mtosatti@redhat.com>2010-03-01 10:35:44 -0500
commitf7784b8ec9b6a041fa828cfbe9012fe51933f5ac (patch)
treedc67f35e585bb06492852c01776aea4b737db48b /arch/ia64
parentfef9cce0eb28a67e688a411cc30b73625e49002b (diff)
KVM: split kvm_arch_set_memory_region into prepare and commit
Required for SRCU convertion later. Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
Diffstat (limited to 'arch/ia64')
-rw-r--r--arch/ia64/kvm/kvm-ia64.c16
1 files changed, 12 insertions, 4 deletions
diff --git a/arch/ia64/kvm/kvm-ia64.c b/arch/ia64/kvm/kvm-ia64.c
index 1ca1dbf48117..0757c7027986 100644
--- a/arch/ia64/kvm/kvm-ia64.c
+++ b/arch/ia64/kvm/kvm-ia64.c
@@ -1578,15 +1578,15 @@ out:
1578 return r; 1578 return r;
1579} 1579}
1580 1580
1581int kvm_arch_set_memory_region(struct kvm *kvm, 1581int kvm_arch_prepare_memory_region(struct kvm *kvm,
1582 struct kvm_userspace_memory_region *mem, 1582 struct kvm_memory_slot *memslot,
1583 struct kvm_memory_slot old, 1583 struct kvm_memory_slot old,
1584 struct kvm_userspace_memory_region *mem,
1584 int user_alloc) 1585 int user_alloc)
1585{ 1586{
1586 unsigned long i; 1587 unsigned long i;
1587 unsigned long pfn; 1588 unsigned long pfn;
1588 int npages = mem->memory_size >> PAGE_SHIFT; 1589 int npages = memslot->npages;
1589 struct kvm_memory_slot *memslot = &kvm->memslots[mem->slot];
1590 unsigned long base_gfn = memslot->base_gfn; 1590 unsigned long base_gfn = memslot->base_gfn;
1591 1591
1592 if (base_gfn + npages > (KVM_MAX_MEM_SIZE >> PAGE_SHIFT)) 1592 if (base_gfn + npages > (KVM_MAX_MEM_SIZE >> PAGE_SHIFT))
@@ -1610,6 +1610,14 @@ int kvm_arch_set_memory_region(struct kvm *kvm,
1610 return 0; 1610 return 0;
1611} 1611}
1612 1612
1613void kvm_arch_commit_memory_region(struct kvm *kvm,
1614 struct kvm_userspace_memory_region *mem,
1615 struct kvm_memory_slot old,
1616 int user_alloc)
1617{
1618 return;
1619}
1620
1613void kvm_arch_flush_shadow(struct kvm *kvm) 1621void kvm_arch_flush_shadow(struct kvm *kvm)
1614{ 1622{
1615 kvm_flush_remote_tlbs(kvm); 1623 kvm_flush_remote_tlbs(kvm);