|
|
|
|
|
|
|
|
|
|
xen-changelog
[Xen-changelog] [xen-unstable] x86: VCPU structure must reside below 4GB
# HG changeset patch
# User Keir Fraser <keir.fraser@xxxxxxxxxx>
# Date 1233162318 0
# Node ID 839bece33989c3cf2caf010b440c6aa26377aa1f
# Parent 696351cde9a42550d713901bdc1908b284435970
x86: VCPU structure must reside below 4GB, since it contains embedded
PAE mode PDPTEs.
Signed-off-by: Keir Fraser <keir.fraser@xxxxxxxxxx>
---
xen/arch/x86/domain.c | 11 +++++++++--
1 files changed, 9 insertions(+), 2 deletions(-)
diff -r 696351cde9a4 -r 839bece33989 xen/arch/x86/domain.c
--- a/xen/arch/x86/domain.c Wed Jan 28 16:58:41 2009 +0000
+++ b/xen/arch/x86/domain.c Wed Jan 28 17:05:18 2009 +0000
@@ -165,14 +165,21 @@ struct vcpu *alloc_vcpu_struct(void)
struct vcpu *alloc_vcpu_struct(void)
{
struct vcpu *v;
- if ( (v = xmalloc(struct vcpu)) != NULL )
+ /*
+ * This structure contains embedded PAE PDPTEs, used when an HVM guest
+ * runs on shadow pagetables outside of 64-bit mode. In this case the CPU
+ * may require that the shadow CR3 points below 4GB, and hence the whole
+ * structure must satisfy this restriction. Thus we specify MEMF_bits(32).
+ */
+ v = alloc_xenheap_pages(get_order_from_bytes(sizeof(*v)), MEMF_bits(32));
+ if ( v != NULL )
memset(v, 0, sizeof(*v));
return v;
}
void free_vcpu_struct(struct vcpu *v)
{
- xfree(v);
+ free_xenheap_pages(v, get_order_from_bytes(sizeof(*v)));
}
#ifdef CONFIG_COMPAT
_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog
|
<Prev in Thread] |
Current Thread |
[Next in Thread> |
- [Xen-changelog] [xen-unstable] x86: VCPU structure must reside below 4GB, since it contains embedded,
Xen patchbot-unstable <=
|
|
|
|
|