aboutsummaryrefslogtreecommitdiffstats
path: root/xen/common/domain.c
diff options
context:
space:
mode:
authorJan Beulich <jbeulich@novell.com>2011-04-05 13:03:29 +0100
committerJan Beulich <jbeulich@novell.com>2011-04-05 13:03:29 +0100
commit2037f2adbf04d7c6dd2b566045e90ccdd5034ee2 (patch)
tree3e93b8a218f7ae79872a59829bc9baded30bab64 /xen/common/domain.c
parent1dd3a56b4338962b953545ed16f4de1d1a394189 (diff)
downloadxen-2037f2adbf04d7c6dd2b566045e90ccdd5034ee2.tar.gz
xen-2037f2adbf04d7c6dd2b566045e90ccdd5034ee2.tar.bz2
xen-2037f2adbf04d7c6dd2b566045e90ccdd5034ee2.zip
x86: introduce alloc_vcpu_guest_context()
This is necessary because on x86-64 struct vcpu_guest_context is larger than PAGE_SIZE, and hence not suitable for a general purpose runtime allocation. On x86-32, FIX_PAE_HIGHMEM_* fixmap entries are being re-used, whiule on x86-64 new per-CPU fixmap entries get introduced. The implication of using per-CPU fixmaps is that these allocations have to happen from non-preemptable hypercall context (which they all do). Signed-off-by: Jan Beulich <jbeulich@novell.com>
Diffstat (limited to 'xen/common/domain.c')
-rw-r--r--xen/common/domain.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/xen/common/domain.c b/xen/common/domain.c
index 1290f655fe..852c968bba 100644
--- a/xen/common/domain.c
+++ b/xen/common/domain.c
@@ -832,12 +832,12 @@ long do_vcpu_op(int cmd, int vcpuid, XEN_GUEST_HANDLE(void) arg)
if ( v->vcpu_info == &dummy_vcpu_info )
return -EINVAL;
- if ( (ctxt = xmalloc(struct vcpu_guest_context)) == NULL )
+ if ( (ctxt = alloc_vcpu_guest_context()) == NULL )
return -ENOMEM;
if ( copy_from_guest(ctxt, arg, 1) )
{
- xfree(ctxt);
+ free_vcpu_guest_context(ctxt);
return -EFAULT;
}
@@ -847,7 +847,7 @@ long do_vcpu_op(int cmd, int vcpuid, XEN_GUEST_HANDLE(void) arg)
rc = boot_vcpu(d, vcpuid, ctxt);
domain_unlock(d);
- xfree(ctxt);
+ free_vcpu_guest_context(ctxt);
break;
case VCPUOP_up: