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

[Xen-devel] privileged op emulation


  • To: <xen-devel@xxxxxxxxxxxxxxxxxxx>
  • From: "Altobelli, David" <david.altobelli@xxxxxx>
  • Date: Fri, 2 Jun 2006 10:04:02 -0500
  • Delivery-date: Fri, 02 Jun 2006 08:04:31 -0700
  • List-id: Xen developer discussion <xen-devel.lists.xensource.com>
  • Thread-index: AcaGVcirZkmiH66VSJWdIi8egxxUqQ==
  • Thread-topic: privileged op emulation

I'm new to this list, so please forgive me if this has already been
discussed or I'm way off target.

I am interested in how the XEN hypervisor handles privileged ops,
specifically on x86 platforms.    

Looking at emulate_privileged_op(), called from do_general_protection()
[xen/arch/x86/traps.c], I think there is a problem with how instructions
are emulated. Assuming all permission checks pass, the instruction is
emulated.  But it is emulated with XEN hypervisor context.  I believe it
needs to be emulated with the user's context in place.  I'm not saying
XEN gets the wrong answer for the specific instruction (I'm worried
about "out"), I'm saying that this instruction might have side effects,
and therefore the user's context needs to be restored in registers
before this instruction is executed.  I believe XEN needs to validate
the op, then restore the users context, run the instruction, and iret to
the user, without modifying any registers in between the instruction and
the iret.

Thanks,
dave

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