[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] [xen-unstable] [IA64] Foreign p2m: Fix vti domain builder.



# HG changeset patch
# User Alex Williamson <alex.williamson@xxxxxx>
# Date 1189108123 21600
# Node ID c5f735271e2202aa7f86ac2da4588074bf3ae3ba
# Parent  af03eea56697163d3a02cd45372fe4ddf3ec008a
[IA64] Foreign p2m: Fix vti domain builder.

It should set arch_domain::convmem_end.

Signed-off-by: Isaku Yamahata <yamahata@xxxxxxxxxxxxx>
---
 tools/libxc/ia64/xc_ia64_hvm_build.c |    4 +++-
 xen/arch/ia64/xen/dom0_ops.c         |    2 ++
 xen/arch/ia64/xen/dom_fw_utils.c     |   11 ++++++++---
 xen/include/asm-ia64/dom_fw_utils.h  |    1 +
 4 files changed, 14 insertions(+), 4 deletions(-)

diff -r af03eea56697 -r c5f735271e22 tools/libxc/ia64/xc_ia64_hvm_build.c
--- a/tools/libxc/ia64/xc_ia64_hvm_build.c      Thu Sep 06 12:57:13 2007 -0600
+++ b/tools/libxc/ia64/xc_ia64_hvm_build.c      Thu Sep 06 13:48:43 2007 -0600
@@ -1028,7 +1028,9 @@ setup_guest(int xc_handle, uint32_t dom,
 
     domctl.u.arch_setup.flags = XEN_DOMAINSETUP_hvm_guest;
     domctl.u.arch_setup.bp = 0;
-    domctl.u.arch_setup.maxmem = 0;
+    domctl.u.arch_setup.maxmem = GFW_START + GFW_SIZE;
+    if (dom_memsize > MMIO_START)
+        domctl.u.arch_setup.maxmem = dom_memsize + 1 * MEM_G;
     domctl.cmd = XEN_DOMCTL_arch_setup;
     domctl.domain = (domid_t)dom;
     if (xc_domctl(xc_handle, &domctl))
diff -r af03eea56697 -r c5f735271e22 xen/arch/ia64/xen/dom0_ops.c
--- a/xen/arch/ia64/xen/dom0_ops.c      Thu Sep 06 12:57:13 2007 -0600
+++ b/xen/arch/ia64/xen/dom0_ops.c      Thu Sep 06 13:48:43 2007 -0600
@@ -23,6 +23,7 @@
 #include <xen/iocap.h>
 #include <xen/errno.h>
 #include <xen/nodemask.h>
+#include <asm/dom_fw_utils.h>
 
 #define get_xen_guest_handle(val, hnd)  do { val = (hnd).p; } while (0)
 
@@ -104,6 +105,7 @@ long arch_do_domctl(xen_domctl_t *op, XE
                 } else {
                     d->arch.is_vti = 1;
                     vmx_setup_platform(d);
+                    xen_ia64_set_convmem_end(d, ds->maxmem);
                 }
             }
             else {
diff -r af03eea56697 -r c5f735271e22 xen/arch/ia64/xen/dom_fw_utils.c
--- a/xen/arch/ia64/xen/dom_fw_utils.c  Thu Sep 06 12:57:13 2007 -0600
+++ b/xen/arch/ia64/xen/dom_fw_utils.c  Thu Sep 06 13:48:43 2007 -0600
@@ -58,6 +58,11 @@ int xen_ia64_is_dom0(struct domain *d)
 int xen_ia64_is_dom0(struct domain *d)
 {
        return d == dom0;
+}
+
+void xen_ia64_set_convmem_end(struct domain *d, uint64_t convmem_end)
+{
+       d->arch.convmem_end = convmem_end;
 }
 
 static void dom_fw_domain_init(struct domain *d, struct fw_tables *tables)
@@ -107,7 +112,7 @@ static int dom_fw_set_convmem_end(struct
             memmap_info->efi_memdesc_size, efi_mdt_cmp, NULL);
 
        if (d->arch.convmem_end == 0)
-               d->arch.convmem_end = d->max_pages << PAGE_SHIFT;
+               xen_ia64_set_convmem_end(d, d->max_pages << PAGE_SHIFT);
 
        for (p = memmap_start; p < memmap_end;
             p += memmap_info->efi_memdesc_size) {
@@ -119,7 +124,7 @@ static int dom_fw_set_convmem_end(struct
                if (md->attribute == EFI_MEMORY_WB &&
                    md->type == EFI_CONVENTIONAL_MEMORY &&
                    md->num_pages > 0 && d->arch.convmem_end < end)
-                       d->arch.convmem_end = end;
+                       xen_ia64_set_convmem_end(d, end);
        }
 
        dom_fw_copy_to(d, gpaddr, memmap_info, size);
@@ -141,7 +146,7 @@ static void dom_fw_setup_for_domain_rest
 {
        assign_new_domain_page(d, FW_HYPERCALL_BASE_PADDR);
        dom_fw_domain_init(d, domain_mpa_to_imva(d, FW_TABLES_BASE_PADDR));
-       d->arch.convmem_end = maxmem;
+       xen_ia64_set_convmem_end(d, maxmem);
 }
 
 /* copy memory range to domain pseudo physical address space */
diff -r af03eea56697 -r c5f735271e22 xen/include/asm-ia64/dom_fw_utils.h
--- a/xen/include/asm-ia64/dom_fw_utils.h       Thu Sep 06 12:57:13 2007 -0600
+++ b/xen/include/asm-ia64/dom_fw_utils.h       Thu Sep 06 13:48:43 2007 -0600
@@ -26,6 +26,7 @@ int xen_ia64_is_vcpu_allocated(struct do
 int xen_ia64_is_vcpu_allocated(struct domain *d, uint32_t vcpu); 
 int xen_ia64_is_running_on_sim(struct domain *unused);
 int xen_ia64_is_dom0(struct domain *d);
+void xen_ia64_set_convmem_end(struct domain *d, uint64_t convmem_end);
 void dom_fw_copy_to(struct domain *d, unsigned long dest_gpaddr,
                     void *src, size_t size); 
 void dom_fw_copy_from(void* dest, struct domain *d, unsigned long src_gpaddr,

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.