WARNING - OLD ARCHIVES

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/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

Re: [Xen-devel] Question about alignment check in sh_x86_emulate_write

To: "Tim Deegan" <Tim.Deegan@xxxxxxxxxx>
Subject: Re: [Xen-devel] Question about alignment check in sh_x86_emulate_write
From: "Trolle Selander" <trolle.selander@xxxxxxxxx>
Date: Tue, 4 Dec 2007 14:52:41 +0100
Cc: "Su, Disheng" <disheng.su@xxxxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxx
Delivery-date: Tue, 04 Dec 2007 05:53:34 -0800
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:references; bh=Q7Djsdqsf9tjcVsizBXv0fpABqy7HUIud4Ot/C/ElKk=; b=USDPMfhCBIhF34AOBJrTXm4ZuZ5M9dIluRMg318FGWMi6eWfL6wiziqDWVZ+N4MR7uhueYr2SroIIFtsS4ABrHwL8H94FedtUCZWK4u+TdD6KlaTiSPc2bEd9hwqKYHvRdBTnyk/3RDBP+Wkc1UKT1mXRoLnbpt4zhHR28fISRA=
Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:references; b=UE93h9+Llm2cTLBwT1lkC+MsXO1MXU+yAUJ/lFpf/FCw/IZC8/q/vjfVgtIePPyGcD8fsa0uxWDgpMxDDAAIn2vIsJXwDBbELAI5zkigBar0aXANzgdZ/BK00F3kIyaPuwPDQLzClm0Ud4rV21P5b3ezNUrNWUHXqYM17OJVF3M=
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <20071204133319.GC2062@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: <FF386CB4AE0E4648B0A96060EC00F36C5BB8FA@xxxxxxxxxxxxxxxxxxxxxxxxxxxx> <20071204124334.GB2062@xxxxxxxxxxxxxxxxxxxxx> <FF386CB4AE0E4648B0A96060EC00F36C5BB8FB@xxxxxxxxxxxxxxxxxxxxxxxxxxxx> <20071204133319.GC2062@xxxxxxxxxxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
To expand on my hastily posted comment before - OS/2 does get snagged on the check because of unaligned page table writes.

On Dec 4, 2007 2:33 PM, Tim Deegan < Tim.Deegan@xxxxxxxxxx> wrote:
At 21:03 +0800 on 04 Dec (1196802182), Su, Disheng wrote:
> It does not write to pagetable. I am doing CR0.wp emulation(don't let
> guest turn off CR0.wp, but emulate the trapped instructions in shadow).
> Some applications like Anti-virus tools will turn off CR0.wp to change
> guest IDT etc.

Oh, I see.

> >> I am wordering about the reason for this check. Is it safe to get
> >> rid of it?
> >
> > Not really.  Among other things, self-aligned writes never cross page
> > boundaries.
> >
> Is it Ok to add the checking for cross page boundaries instead?

Yes, but you'll probably find you need page-crossing support as well if
you're emulating arbitrary memory writes.  I believe we have a patch
somewhere that does that; I'll dig it out and polish it up for -unstable.

Cheers,

Tim.

--
Tim Deegan <Tim.Deegan@xxxxxxxxxx >
Principal Software Engineer, Citrix Systems.
[Company #5334508: XenSource UK Ltd, reg'd c/o EC2Y 5EB, UK.]

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
<Prev in Thread] Current Thread [Next in Thread>