This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
Home Products Support Community News


Re: [Xen-devel] [PATCH 3/4] Enable VirtualPC 2007 run on top of XEN: REP

To: "Tim Deegan" <Tim.Deegan@xxxxxxxxxx>, "Disheng Su" <disheng.su@xxxxxxxxx>
Subject: Re: [Xen-devel] [PATCH 3/4] Enable VirtualPC 2007 run on top of XEN: REPS prefix emulation
From: "Bruce Rogers" <BROGERS@xxxxxxxxxx>
Date: Fri, 01 Feb 2008 09:12:57 -0700
Cc: xen-devel@xxxxxxxxxxxxxxxxxxx
Delivery-date: Fri, 01 Feb 2008 08:13:43 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <20080201093659.GB19416@xxxxxxxxxxxxxxxxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
References: <FF386CB4AE0E4648B0A96060EC00F36C759650@xxxxxxxxxxxxxxxxxxxxxxxxxxxx> <20080201093659.GB19416@xxxxxxxxxxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
>>> On 2/1/2008 at 2:36 AM, Tim Deegan <Tim.Deegan@xxxxxxxxxx> wrote:
> 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) & 
>                                             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) ?
>          /* Cross-page writes mean probably not a pagetable */
>          sh_remove_shadows(v, sh_ctxt->mfn2, 0, 0 /* Slow, can fail */ );
> Cheers,
> Tim.

If I could chime in here, I'm all for better support of CR0.WP = 0 guests.  
NetWare has traditionally run in this mode, and although we've recently made it 
capable of running with WP bit set as part of the paravirtualization effort, 
there would be benefit to running older versions as HVM guests.  I haven't had 
the cycles myself to work on that, but with all the other changes to real mode 
support, it looks like we're really close to having NetWare run fully 
virtualized. (Another gottcha is that we write the debug registers in real 
mode, but that should be a fairly simple hypervisor fix.)

Thanks to everyone who has worked on getting HVM support more robust.

- Bruce

Xen-devel mailing list

<Prev in Thread] Current Thread [Next in Thread>