debuggers.hg
changeset 17110:e3e8bdb5d52d
[IA64] Fix vcpu_tranlate()
When handling resion7 opt feature, it should check the range.
Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
When handling resion7 opt feature, it should check the range.
Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
author | Alex Williamson <alex.williamson@hp.com> |
---|---|
date | Thu Feb 07 09:23:26 2008 -0700 (2008-02-07) |
parents | 7823534b28ca |
children | 9203ee23e724 |
files | xen/arch/ia64/xen/vcpu.c |
line diff
1.1 --- a/xen/arch/ia64/xen/vcpu.c Wed Feb 06 11:23:16 2008 -0700 1.2 +++ b/xen/arch/ia64/xen/vcpu.c Thu Feb 07 09:23:26 2008 -0700 1.3 @@ -1688,7 +1688,7 @@ vcpu_get_domain_bundle(VCPU * vcpu, REGS 1.4 IA64FAULT vcpu_translate(VCPU * vcpu, u64 address, BOOLEAN is_data, 1.5 u64 * pteval, u64 * itir, u64 * iha) 1.6 { 1.7 - unsigned long region = address >> 61; 1.8 + unsigned long region = REGION_NUMBER(address); 1.9 unsigned long pta, rid, rr, key = 0; 1.10 union pte_flags pte; 1.11 TR_ENTRY *trp; 1.12 @@ -1775,7 +1775,8 @@ IA64FAULT vcpu_translate(VCPU * vcpu, u6 1.13 1.14 /* Optimization for identity mapped region 7 OS (linux) */ 1.15 if (optf->mask & XEN_IA64_OPTF_IDENT_MAP_REG7_FLG && 1.16 - region == 7 && ia64_psr(regs)->cpl == CONFIG_CPL0_EMUL) { 1.17 + region == 7 && ia64_psr(regs)->cpl == CONFIG_CPL0_EMUL && 1.18 + REGION_OFFSET(address) < _PAGE_PPN_MASK) { 1.19 pte.val = address & _PAGE_PPN_MASK; 1.20 pte.val = pte.val | optf->im_reg7.pgprot; 1.21 key = optf->im_reg7.key;