diff options
author | Jan Beulich <jbeulich@novell.com> | 2011-04-05 13:03:29 +0100 |
---|---|---|
committer | Jan Beulich <jbeulich@novell.com> | 2011-04-05 13:03:29 +0100 |
commit | 2037f2adbf04d7c6dd2b566045e90ccdd5034ee2 (patch) | |
tree | 3e93b8a218f7ae79872a59829bc9baded30bab64 /xen/common/domctl.c | |
parent | 1dd3a56b4338962b953545ed16f4de1d1a394189 (diff) | |
download | xen-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/domctl.c')
-rw-r--r-- | xen/common/domctl.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/xen/common/domctl.c b/xen/common/domctl.c index 4d4f8ebe2a..5e13094518 100644 --- a/xen/common/domctl.c +++ b/xen/common/domctl.c @@ -295,7 +295,7 @@ long do_domctl(XEN_GUEST_HANDLE(xen_domctl_t) u_domctl) < sizeof(struct compat_vcpu_guest_context)); #endif ret = -ENOMEM; - if ( (c.nat = xmalloc(struct vcpu_guest_context)) == NULL ) + if ( (c.nat = alloc_vcpu_guest_context()) == NULL ) goto svc_out; #ifdef CONFIG_COMPAT @@ -318,7 +318,7 @@ long do_domctl(XEN_GUEST_HANDLE(xen_domctl_t) u_domctl) } svc_out: - xfree(c.nat); + free_vcpu_guest_context(c.nat); rcu_unlock_domain(d); } break; |