From: Keir Fraser Date: Mon, 26 Jan 2009 23:36:59 +0000 (+0000) Subject: x86_64: shared_info must be allocated below 4GB as it is advertised to X-Git-Tag: archive/raspbian/4.8.0-1+rpi1~1^2~14014^2~9 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=3cadc0469d5c9a189f346ae04c226f73dc6f382c;p=xen.git x86_64: shared_info must be allocated below 4GB as it is advertised to 32-bit guests via a 32-bit machine address field in start_info. Signed-off-by: Keir Fraser --- diff --git a/xen/arch/x86/domain.c b/xen/arch/x86/domain.c index 6d92e1273f..7e3c82f614 100644 --- a/xen/arch/x86/domain.c +++ b/xen/arch/x86/domain.c @@ -405,8 +405,17 @@ int arch_domain_create(struct domain *d, unsigned int domcr_flags) if ( d->arch.ioport_caps == NULL ) goto fail; +#ifdef __i386__ if ( (d->shared_info = alloc_xenheap_page()) == NULL ) goto fail; +#else + pg = alloc_domheap_page( + NULL, MEMF_node(domain_to_node(d)) | MEMF_bits(32)); + if ( pg == NULL ) + goto fail; + pg->count_info |= PGC_xen_heap; + d->shared_info = page_to_virt(pg); +#endif clear_page(d->shared_info); share_xen_page_with_guest(