[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • To: "Tim Deegan" <Tim.Deegan@xxxxxxxxxx>
  • 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
  • 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=
  • List-id: Xen developer discussion <xen-devel.lists.xensource.com>

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

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.