# HG changeset patch
# User awilliam@xxxxxxxxxxx
# Node ID 64290e7622d2bd214b3c21f58b3f420a35b4c610
# Parent 6268aa7b91773953580279954d5cb6fed226255f
[IA64] Prevent domains to itc/ptd in shared_info_va.
Signed-off-by: Tristan Gingold <tristan.gingold@xxxxxxxx>
---
xen/arch/ia64/xen/vcpu.c | 11 ++++++++++-
xen/include/public/arch-ia64.h | 1 +
2 files changed, 11 insertions(+), 1 deletion(-)
diff -r 6268aa7b9177 -r 64290e7622d2 xen/arch/ia64/xen/vcpu.c
--- a/xen/arch/ia64/xen/vcpu.c Mon Oct 02 21:27:49 2006 -0600
+++ b/xen/arch/ia64/xen/vcpu.c Mon Oct 02 21:30:51 2006 -0600
@@ -1314,12 +1314,21 @@ static inline void
static inline void
check_xen_space_overlap (const char *func, u64 base, u64 page_size)
{
+ /* Overlaps can occur only in region 7.
+ (This is an optimization to bypass all the checks). */
+ if (REGION_NUMBER(base) != 7)
+ return;
+
/* Mask LSBs of base. */
base &= ~(page_size - 1);
/* FIXME: ideally an MCA should be generated... */
if (range_overlap (HYPERVISOR_VIRT_START, HYPERVISOR_VIRT_END,
- base, base + page_size))
+ base, base + page_size)
+ || range_overlap(current->domain->arch.shared_info_va,
+ current->domain->arch.shared_info_va
+ + XSI_SIZE + XMAPPEDREGS_SIZE,
+ base, base + page_size))
panic_domain (NULL, "%s on Xen virtual space (%lx)\n",
func, base);
}
diff -r 6268aa7b9177 -r 64290e7622d2 xen/include/public/arch-ia64.h
--- a/xen/include/public/arch-ia64.h Mon Oct 02 21:27:49 2006 -0600
+++ b/xen/include/public/arch-ia64.h Mon Oct 02 21:30:51 2006 -0600
@@ -397,6 +397,7 @@ struct xen_ia64_boot_param {
#define XSI_SIZE (1 << XSI_SHIFT)
/* Log size of mapped_regs area (64 KB - only 4KB is used). */
#define XMAPPEDREGS_SHIFT 12
+#define XMAPPEDREGS_SIZE (1 << XMAPPEDREGS_SHIFT)
/* Offset of XASI (Xen arch shared info) wrt XSI_BASE. */
#define XMAPPEDREGS_OFS XSI_SIZE
_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog
|