# HG changeset patch
# User Alex Williamson <alex.williamson@xxxxxx>
# Date 1202401406 25200
# Node ID e3e8bdb5d52d345e46274fb9d07aa5902683b163
# Parent 7823534b28caaf34dfa51cec1503dd5ca6ba0104
[IA64] Fix vcpu_tranlate()
When handling resion7 opt feature, it should check the range.
Signed-off-by: Isaku Yamahata <yamahata@xxxxxxxxxxxxx>
---
xen/arch/ia64/xen/vcpu.c | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
diff -r 7823534b28ca -r e3e8bdb5d52d xen/arch/ia64/xen/vcpu.c
--- a/xen/arch/ia64/xen/vcpu.c Wed Feb 06 11:23:16 2008 -0700
+++ b/xen/arch/ia64/xen/vcpu.c Thu Feb 07 09:23:26 2008 -0700
@@ -1688,7 +1688,7 @@ IA64FAULT vcpu_translate(VCPU * vcpu, u6
IA64FAULT vcpu_translate(VCPU * vcpu, u64 address, BOOLEAN is_data,
u64 * pteval, u64 * itir, u64 * iha)
{
- unsigned long region = address >> 61;
+ unsigned long region = REGION_NUMBER(address);
unsigned long pta, rid, rr, key = 0;
union pte_flags pte;
TR_ENTRY *trp;
@@ -1775,7 +1775,8 @@ IA64FAULT vcpu_translate(VCPU * vcpu, u6
/* Optimization for identity mapped region 7 OS (linux) */
if (optf->mask & XEN_IA64_OPTF_IDENT_MAP_REG7_FLG &&
- region == 7 && ia64_psr(regs)->cpl == CONFIG_CPL0_EMUL) {
+ region == 7 && ia64_psr(regs)->cpl == CONFIG_CPL0_EMUL &&
+ REGION_OFFSET(address) < _PAGE_PPN_MASK) {
pte.val = address & _PAGE_PPN_MASK;
pte.val = pte.val | optf->im_reg7.pgprot;
key = optf->im_reg7.key;
_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog
|