# HG changeset patch
# User awilliam@xxxxxxxxxxxx
# Date 1167949547 25200
# Node ID d9b2dd57fdc4946a0c9b6b1746906b8075df36cf
# Parent 98f48cf14d9842ae5b17266ede0231b88699ffea
[IA64] Add convmem_end
Split the meaning of struct domain::maxmem into struct arch_domain::convmem_end
so that maxmem means the number of pages which domain has and convmem_end means
the highest address of conventional memory (i.e. RAM).
Signed-off-by: Isaku Yamahata <yamahata@xxxxxxxxxxxxx>
---
xen/arch/ia64/xen/dom_fw.c | 2 ++
xen/arch/ia64/xen/domain.c | 5 +++--
xen/arch/ia64/xen/mm.c | 6 +++---
xen/include/asm-ia64/domain.h | 3 +++
4 files changed, 11 insertions(+), 5 deletions(-)
diff -r 98f48cf14d98 -r d9b2dd57fdc4 xen/arch/ia64/xen/dom_fw.c
--- a/xen/arch/ia64/xen/dom_fw.c Thu Jan 04 15:12:05 2007 -0700
+++ b/xen/arch/ia64/xen/dom_fw.c Thu Jan 04 15:25:47 2007 -0700
@@ -582,6 +582,7 @@ complete_dom0_memmap(struct domain *d,
num_mds++;
dom_mem -= dom_md->num_pages << EFI_PAGE_SHIFT;
+ d->arch.convmem_end = end;
break;
case EFI_UNUSABLE_MEMORY:
@@ -804,6 +805,7 @@ dom_fw_init(struct domain *d,
/* Memory. */
MAKE_MD(EFI_CONVENTIONAL_MEMORY, EFI_MEMORY_WB,
FW_END_PADDR, maxmem);
+ d->arch.convmem_end = maxmem;
/* Create an entry for IO ports. */
MAKE_MD(EFI_MEMORY_MAPPED_IO_PORT_SPACE, EFI_MEMORY_UC,
diff -r 98f48cf14d98 -r d9b2dd57fdc4 xen/arch/ia64/xen/domain.c
--- a/xen/arch/ia64/xen/domain.c Thu Jan 04 15:12:05 2007 -0700
+++ b/xen/arch/ia64/xen/domain.c Thu Jan 04 15:25:47 2007 -0700
@@ -760,8 +760,9 @@ int shadow_mode_control(struct domain *d
atomic64_set(&d->arch.shadow_fault_count, 0);
atomic64_set(&d->arch.shadow_dirty_count, 0);
- d->arch.shadow_bitmap_size = (d->max_pages + BITS_PER_LONG-1) &
- ~(BITS_PER_LONG-1);
+ d->arch.shadow_bitmap_size =
+ ((d->arch.convmem_end >> PAGE_SHIFT) +
+ BITS_PER_LONG - 1) & ~(BITS_PER_LONG - 1);
d->arch.shadow_bitmap = xmalloc_array(unsigned long,
d->arch.shadow_bitmap_size / BITS_PER_LONG);
if (d->arch.shadow_bitmap == NULL) {
diff -r 98f48cf14d98 -r d9b2dd57fdc4 xen/arch/ia64/xen/mm.c
--- a/xen/arch/ia64/xen/mm.c Thu Jan 04 15:12:05 2007 -0700
+++ b/xen/arch/ia64/xen/mm.c Thu Jan 04 15:25:47 2007 -0700
@@ -700,12 +700,12 @@ unsigned long lookup_domain_mpa(struct d
printk("%s: d 0x%p id %d current 0x%p id %d\n",
__func__, d, d->domain_id, current, current->vcpu_id);
- if ((mpaddr >> PAGE_SHIFT) < d->max_pages)
+ if (mpaddr < d->arch.convmem_end)
printk("%s: non-allocated mpa 0x%lx (< 0x%lx)\n", __func__,
- mpaddr, (unsigned long)d->max_pages << PAGE_SHIFT);
+ mpaddr, d->arch.convmem_end);
else
printk("%s: bad mpa 0x%lx (=> 0x%lx)\n", __func__,
- mpaddr, (unsigned long)d->max_pages << PAGE_SHIFT);
+ mpaddr, d->arch.convmem_end);
if (entry != NULL)
p2m_entry_set(entry, NULL, __pte(0));
diff -r 98f48cf14d98 -r d9b2dd57fdc4 xen/include/asm-ia64/domain.h
--- a/xen/include/asm-ia64/domain.h Thu Jan 04 15:12:05 2007 -0700
+++ b/xen/include/asm-ia64/domain.h Thu Jan 04 15:25:47 2007 -0700
@@ -77,6 +77,9 @@ struct arch_domain {
#endif
};
};
+
+ /* maximum metaphysical address of conventional memory */
+ u64 convmem_end;
/* Allowed accesses to io ports. */
struct rangeset *ioport_caps;
_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog
|