direct-io.hg

changeset 11947:64290e7622d2

[IA64] Prevent domains to itc/ptd in shared_info_va.

Signed-off-by: Tristan Gingold <tristan.gingold@bull.net>
author awilliam@xenbuild.aw
date Mon Oct 02 21:30:51 2006 -0600 (2006-10-02)
parents 6268aa7b9177
children a3a079af0e92
files xen/arch/ia64/xen/vcpu.c xen/include/public/arch-ia64.h
line diff
     1.1 --- a/xen/arch/ia64/xen/vcpu.c	Mon Oct 02 21:27:49 2006 -0600
     1.2 +++ b/xen/arch/ia64/xen/vcpu.c	Mon Oct 02 21:30:51 2006 -0600
     1.3 @@ -1314,12 +1314,21 @@ static inline int range_overlap (u64 b1,
     1.4  static inline void
     1.5  check_xen_space_overlap (const char *func, u64 base, u64 page_size)
     1.6  {
     1.7 +	/* Overlaps can occur only in region 7.
     1.8 +	   (This is an optimization to bypass all the checks).  */
     1.9 +	if (REGION_NUMBER(base) != 7)
    1.10 +		return;
    1.11 +
    1.12  	/* Mask LSBs of base.  */
    1.13  	base &= ~(page_size - 1);
    1.14  
    1.15  	/* FIXME: ideally an MCA should be generated...  */
    1.16  	if (range_overlap (HYPERVISOR_VIRT_START, HYPERVISOR_VIRT_END,
    1.17 -			   base, base + page_size))
    1.18 +	                   base, base + page_size)
    1.19 +	    || range_overlap(current->domain->arch.shared_info_va,
    1.20 +	                     current->domain->arch.shared_info_va 
    1.21 +	                     + XSI_SIZE + XMAPPEDREGS_SIZE,
    1.22 +	                     base, base + page_size))
    1.23  		panic_domain (NULL, "%s on Xen virtual space (%lx)\n",
    1.24  			      func, base);
    1.25  }
     2.1 --- a/xen/include/public/arch-ia64.h	Mon Oct 02 21:27:49 2006 -0600
     2.2 +++ b/xen/include/public/arch-ia64.h	Mon Oct 02 21:30:51 2006 -0600
     2.3 @@ -397,6 +397,7 @@ struct xen_ia64_boot_param {
     2.4  #define XSI_SIZE			(1 << XSI_SHIFT)
     2.5  /* Log size of mapped_regs area (64 KB - only 4KB is used).  */
     2.6  #define XMAPPEDREGS_SHIFT		12
     2.7 +#define XMAPPEDREGS_SIZE		(1 << XMAPPEDREGS_SHIFT)
     2.8  /* Offset of XASI (Xen arch shared info) wrt XSI_BASE.  */
     2.9  #define XMAPPEDREGS_OFS			XSI_SIZE
    2.10