[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: "Su, Disheng" <disheng.su@xxxxxxxxx>
  • Date: Tue, 4 Dec 2007 21:03:02 +0800
  • Cc: xen-devel@xxxxxxxxxxxxxxxxxxx
  • Delivery-date: Tue, 04 Dec 2007 05:52:08 -0800
  • List-id: Xen developer discussion <xen-devel.lists.xensource.com>
  • Thread-index: Acg2c1XpvrL4qYwPRVKIEenj+7LTzQAABvLw
  • Thread-topic: [Xen-devel] Question about alignment check in sh_x86_emulate_write

Tim Deegan wrote:
> At 20:38 +0800 on 04 Dec (1196800681), Su, Disheng wrote:
>> In in sh_x86_emulate_write:
>>      if ( vaddr & (bytes-1) )
>>              return X86EMUL_UNHANDLE;
>> I met a problem the vaddr is not aligned on word or dword, but have
>> to emulate it.
> 
> Have you got an OS that does unaligned writes to its pagetables?
> Exciting!  What is it doing?
> 
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.
>> 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?
> Tim.



Best Regards,
Disheng, Su

_______________________________________________
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®.