x86_64: shared_info must be allocated below 4GB as it is advertised to
authorKeir Fraser <keir.fraser@citrix.com>
Mon, 26 Jan 2009 23:36:59 +0000 (23:36 +0000)
committerKeir Fraser <keir.fraser@citrix.com>
Mon, 26 Jan 2009 23:36:59 +0000 (23:36 +0000)
32-bit guests via a 32-bit machine address field in start_info.

Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
xen/arch/x86/domain.c

index 6d92e1273fe91ecfe5a782ec43397eb4013e5aa2..7e3c82f614a8b8a0952cb9eec99c4bb2ad90e787 100644 (file)
@@ -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(