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] [PATCH] [RFC] More fp instructions for realmode emulatio

To: "Keir Fraser" <keir.fraser@xxxxxxxxxxxxx>
Subject: Re: [Xen-devel] [PATCH] [RFC] More fp instructions for realmode emulation (Enables booting OS/2 as a HVM guest on Intel/VT hardware)
From: "Trolle Selander" <trolle.selander@xxxxxxxxx>
Date: Mon, 3 Mar 2008 13:18:36 +0100
Cc: xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxx>
Delivery-date: Mon, 03 Mar 2008 04:19:02 -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=WQgniXE2CKG1c1WtNoRf1zon9l60++XJiO4CR4szTU0=; b=qWOLL/CDaKveHQmS5CukDuT3IQuHvQsQiNlRwVDWnaqSQBfleoxlYvNqs8eaUSWud9fbKufFcUPpjbO9Z9YsPkADPZdhgzCu97F0KoC+LkV6jMeMldwsZjtaQFZbvDqoDp70t7VlVzuNcAyv6mitytvYrgxPOMlsrh5CbublqlE=
Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:references; b=LrKK1qSm4XlK4dMNtJPhIY0g7EMJWpgg1/8mx3FbmLybADfSk+FHR27zEn9yrPuyEAXJtN+j+42/+vOvG6Pujqa1e39BIpVCpiNrOnDGSU9xSQNB4jsgBv9xabWqW5FloKYGFIHKWsWtyhAXt6e6+uafjxgrTXCQvAsClHpU87Q=
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <C3EECFDB.14954%keir.fraser@xxxxxxxxxxxxx>
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: <C3EEC883.148C1%keir.fraser@xxxxxxxxxxxxx> <C3EECFDB.14954%keir.fraser@xxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
That's what I was worried about. I honestly had zilch experience working with assembler-level x87 stuff before Friday afternoon when I whipped up this patch, mainly to see if the fp instructions were all that was missing to get OS/2 on VT to work. I'll see if I can find time to make an exception-safe version of this sometime this week. I'm not worrying about life being too short, but rather that March 2008 is too dense... ;)

On Sat, Mar 1, 2008 at 10:18 AM, Keir Fraser <keir.fraser@xxxxxxxxxxxxx> wrote:
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
<Prev in Thread] Current Thread [Next in Thread>