# HG changeset patch # User yamahata@xxxxxxxxxxxxx # Node ID 6e0a9a5a6a17ed7572cf62a0b77ad5560b7d9501 # Parent a55e5195e5f7fc6a55a147ff3e8d1b94d4667c70 fix domain_flush_vtlb_all(). it should purge software tlb entry of specified vcpu, not current. PATCHNAME: fix_domain_flush_vtlb_all Signed-off-by: Isaku Yamahata diff -r a55e5195e5f7 -r 6e0a9a5a6a17 xen/arch/ia64/xen/vcpu.c --- a/xen/arch/ia64/xen/vcpu.c Tue Jul 04 15:17:26 2006 +0900 +++ b/xen/arch/ia64/xen/vcpu.c Tue Jul 04 15:19:37 2006 +0900 @@ -2065,7 +2065,7 @@ IA64FAULT vcpu_ptc_e(VCPU *vcpu, UINT64 // architected loop to purge the entire TLB, should use // base = stride1 = stride2 = 0, count0 = count 1 = 1 - vcpu_flush_vtlb_all (); + vcpu_flush_vtlb_all(current); return IA64_NO_FAULT; } diff -r a55e5195e5f7 -r 6e0a9a5a6a17 xen/arch/ia64/xen/vhpt.c --- a/xen/arch/ia64/xen/vhpt.c Tue Jul 04 15:17:26 2006 +0900 +++ b/xen/arch/ia64/xen/vhpt.c Tue Jul 04 15:19:37 2006 +0900 @@ -129,10 +129,8 @@ void vhpt_init(void) } -void vcpu_flush_vtlb_all (void) -{ - struct vcpu *v = current; - +void vcpu_flush_vtlb_all(struct vcpu *v) +{ /* First VCPU tlb. */ vcpu_purge_tr_entry(&PSCBX(v,dtlb)); vcpu_purge_tr_entry(&PSCBX(v,itlb)); @@ -148,6 +146,11 @@ void vcpu_flush_vtlb_all (void) check this. */ } +static void __vcpu_flush_vtlb_all(void *vcpu) +{ + vcpu_flush_vtlb_all((struct vcpu*)vcpu); +} + void domain_flush_vtlb_all (void) { int cpu = smp_processor_id (); @@ -158,12 +161,11 @@ void domain_flush_vtlb_all (void) continue; if (v->processor == cpu) - vcpu_flush_vtlb_all (); + vcpu_flush_vtlb_all(v); else - smp_call_function_single - (v->processor, - (void(*)(void *))vcpu_flush_vtlb_all, - NULL,1,1); + smp_call_function_single(v->processor, + __vcpu_flush_vtlb_all, + v, 1, 1); } } diff -r a55e5195e5f7 -r 6e0a9a5a6a17 xen/include/asm-ia64/tlbflush.h --- a/xen/include/asm-ia64/tlbflush.h Tue Jul 04 15:17:26 2006 +0900 +++ b/xen/include/asm-ia64/tlbflush.h Tue Jul 04 15:19:37 2006 +0900 @@ -11,7 +11,7 @@ */ /* Local all flush of vTLB. */ -void vcpu_flush_vtlb_all (void); +void vcpu_flush_vtlb_all(struct vcpu *v); /* Local range flush of machine TLB only (not full VCPU virtual TLB!!!) */ void vcpu_flush_tlb_vhpt_range (u64 vadr, u64 log_range);