[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-ia64-devel] [PATCH] implemented vcpu_ptc_l()
On Wed, Dec 07, 2005 at 12:35:26PM +0800, Dong, Eddie wrote: > vhpt_flush also needs to be metaphysical rr safe. Yes. Sorry that I'm too careless. Signed-off-by Isaku Yamahata <yamahata@xxxxxxxxxxxxx> vcpu_ptc_l() and vcpu_ptc_ga() should be aware of metaphysical mode. --- xen-ia64-unstable.hg/xen/arch/ia64/xen/vcpu.c.orig 2005-12-07 12:08:03.000000000 +0900 +++ xen-ia64-unstable.hg/xen/arch/ia64/xen/vcpu.c 2005-12-07 14:04:39.000000000 +0900 @@ -1828,16 +1828,20 @@ IA64FAULT vcpu_itc_i(VCPU *vcpu, UINT64 IA64FAULT vcpu_ptc_l(VCPU *vcpu, UINT64 vadr, UINT64 addr_range) { extern void ia64_local_tlb_purge (unsigned long start, unsigned long end, unsigned long nbits); + BOOLEAN swap_rr0 = (!(vadr >> VRN_SHIFT) && + PSCB(vcpu, metaphysical_mode)); //XXX FIXME: validate not flushing Xen addresses if (IS_VMM_ADDRESS(vadr)) { return IA64_ILLOP_FAULT; } + if (swap_rr0) set_one_rr(0x0, PSCB(vcpu, rrs[0])); #ifdef VHPT_GLOBAL vhpt_flush_address(vadr, addr_range); #endif ia64_local_tlb_purge(vadr, vadr + addr_range, PAGE_SHIFT); + if (swap_rr0) set_metaphysical_rr0(); vcpu_purge_tr_entry(&PSCBX(vcpu, dtlb)); vcpu_purge_tr_entry(&PSCBX(vcpu, itlb)); return IA64_NO_FAULT; @@ -1891,14 +1895,19 @@ IA64FAULT vcpu_ptc_g(VCPU *vcpu, UINT64 IA64FAULT vcpu_ptc_ga(VCPU *vcpu,UINT64 vadr,UINT64 addr_range) { extern ia64_global_tlb_purge(UINT64 start, UINT64 end, UINT64 nbits); + BOOLEAN swap_rr0 = (!(vadr >> VRN_SHIFT) && + PSCB(vcpu, metaphysical_mode)); + // FIXME: validate not flushing Xen addresses // if (Xen address) return(IA64_ILLOP_FAULT); // FIXME: ??breaks if domain PAGE_SIZE < Xen PAGE_SIZE //printf("######## vcpu_ptc_ga(%p,%p) ##############\n",vadr,addr_range); + if (swap_rr0) set_one_rr(0x0,PSCB(vcpu,rrs[0])); #ifdef VHPT_GLOBAL vhpt_flush_address(vadr,addr_range); #endif ia64_global_tlb_purge(vadr,vadr+addr_range,PAGE_SHIFT); + if (swap_rr0) set_metaphysical_rr0(); vcpu_purge_tr_entry(&PSCBX(vcpu,dtlb)); vcpu_purge_tr_entry(&PSCBX(vcpu,itlb)); return IA64_NO_FAULT; -- yamahata _______________________________________________ Xen-ia64-devel mailing list Xen-ia64-devel@xxxxxxxxxxxxxxxxxxx http://lists.xensource.com/xen-ia64-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |