# HG changeset patch
# User yamahata@xxxxxxxxxxxxx
# Date 1187942514 -32400
# Node ID 44c9e994cf0da65ba73d50d02e62a04b21b9df6f
# Parent 370225277691127a02ca35ebebf29241263ca707
fix vti domain builder. it should set arch_domain::convmem_end.
PATCHNAME: fix_vti_domain_builder
Signed-off-by: Isaku Yamahata <yamahata@xxxxxxxxxxxxx>
diff -r 370225277691 -r 44c9e994cf0d tools/libxc/ia64/xc_ia64_hvm_build.c
--- a/tools/libxc/ia64/xc_ia64_hvm_build.c Mon Aug 27 11:09:36 2007 +0900
+++ b/tools/libxc/ia64/xc_ia64_hvm_build.c Fri Aug 24 17:01:54 2007 +0900
@@ -1029,7 +1029,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 370225277691 -r 44c9e994cf0d xen/arch/ia64/xen/dom0_ops.c
--- a/xen/arch/ia64/xen/dom0_ops.c Mon Aug 27 11:09:36 2007 +0900
+++ b/xen/arch/ia64/xen/dom0_ops.c Fri Aug 24 17:01:54 2007 +0900
@@ -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 370225277691 -r 44c9e994cf0d xen/arch/ia64/xen/dom_fw_utils.c
--- a/xen/arch/ia64/xen/dom_fw_utils.c Mon Aug 27 11:09:36 2007 +0900
+++ b/xen/arch/ia64/xen/dom_fw_utils.c Fri Aug 24 17:01:54 2007 +0900
@@ -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 370225277691 -r 44c9e994cf0d xen/include/asm-ia64/dom_fw_utils.h
--- a/xen/include/asm-ia64/dom_fw_utils.h Mon Aug 27 11:09:36 2007 +0900
+++ b/xen/include/asm-ia64/dom_fw_utils.h Fri Aug 24 17:01:54 2007 +0900
@@ -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,
15764_44c9e994cf0d_fix_vti_domain_builder.patch
Description: Text Data
_______________________________________________
Xen-ia64-devel mailing list
Xen-ia64-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-ia64-devel
|