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

Re: [Xen-devel] [PATCH] [RFC] More fp instructions for realmode emulation (Enables booting OS/2 as a HVM guest on Intel/VT hardware)


  • To: Trolle Selander <trolle.selander@xxxxxxxxx>, xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxx>
  • From: Keir Fraser <keir.fraser@xxxxxxxxxxxxx>
  • Date: Sat, 01 Mar 2008 09:18:19 +0000
  • Delivery-date: Sat, 01 Mar 2008 01:18:11 -0800
  • List-id: Xen developer discussion <xen-devel.lists.xensource.com>
  • Thread-index: Ach7eM+kDf7pWudsEdybQwAWy6hiGQABGCQV
  • Thread-topic: [Xen-devel] [PATCH] [RFC] More fp instructions for realmode emulation (Enables booting OS/2 as a HVM guest on Intel/VT hardware)

Intel SDM Volume 1 Section 8.6 (“X87 FPU Exception Synchronization”) is very helpful in this regard. It confirms my suspicions, that we will need to wrap the FPU inline asms in some fixup glue. The only exceptions to this rule are the FN* (no-wait) instructions. Properly speaking we should also check for unmasked exceptions becoming pending after any FPU instruction and set the faulting CS:IP in the FPU context block appropriately. But life is perhaps too short. :-)

 -- Keir

On 1/3/08 08:46, "Keir Fraser" <keir.fraser@xxxxxxxxxxxxx> wrote:

Regarding point 1: Don’t FPU instructions that raise an exception only log that in the status word, to be picked up by the next FPU instruction which checks for exceptions? It strikes me that we can have previously loaded up a status word that requires an exception to occur on FWAIT, in which case semantics are broken. More worryingly, if any of the instructions you have added can cause an exception, we will crash Xen because you have not added fixup handling. Unfortunately I’m not really up on exactly how FPU exception handling works: are you?

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