[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH 3/4] Enable VirtualPC 2007 run on top of XEN: REPS prefix emulation
Hi, At 14:24 +0800 on 01 Feb (1201875864), Su, Disheng wrote: > REPS prefix emulation for INS and OUTS is already in xen. Can we enable > REPS for "stos" and "movs" in paging mode? Although it doesn't benefit a > lot for normal hvm guest, in virtualpc case, I have to do that. > VirtualPC will call "reps stos"(ecx=0x400, eax=0) a lot, about 1000 > times per second. It seems to clear a L1 page table page, it can't be > fast unshadowed in check_for_early_unshadow and it's even ReadOnly in > guest page table(CR0.wp = 0). So we get 0x400 * 1000 times page faults > per second, so CPU cycle is almost wasted on it. This patch looks fine to me; I'll let Keir decide whether the extra 200 lines or so of shadow/emulate code is worthwhile for running VPC under Xen. Keir, even if we don't take this, please do take this hunk: diff -r 05b3bdb3b7fa xen/arch/x86/mm/shadow/multi.c --- a/xen/arch/x86/mm/shadow/multi.c Wed Jan 30 00:09:03 2008 +0800 +++ b/xen/arch/x86/mm/shadow/multi.c Wed Jan 30 00:09:04 2008 +0800 @@ -4076,8 +4091,8 @@ static void *emulate_map_dest(struct vcp sh_ctxt->mfn2 = emulate_gva_to_mfn(v, (vaddr + bytes - 1) & PAGE_MASK, sh_ctxt); if ( !mfn_valid(sh_ctxt->mfn2) ) - return ((mfn_x(sh_ctxt->mfn1) == BAD_GVA_TO_GFN) ? + return ((mfn_x(sh_ctxt->mfn2) == BAD_GVA_TO_GFN) ? MAPPING_EXCEPTION : MAPPING_UNHANDLEABLE); /* Cross-page writes mean probably not a pagetable */ sh_remove_shadows(v, sh_ctxt->mfn2, 0, 0 /* Slow, can fail */ ); Cheers, Tim. -- Tim Deegan <Tim.Deegan@xxxxxxxxxx> Principal Software Engineer, Citrix Systems (R&D) Ltd. [Company #02300071, SL9 0DZ, UK.] _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxxxxxxxx http://lists.xensource.com/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |