From: Keir Fraser <keir.fraser@eu.citrix.com>
To: Trolle Selander <trolle.selander@gmail.com>,
xen-devel <xen-devel@lists.xensource.com>
Subject: Re: [PATCH] [RFC] More fp instructions for realmode emulation (Enables booting OS/2 as a HVM guest on Intel/VT hardware)
Date: Tue, 04 Mar 2008 10:13:01 +0000 [thread overview]
Message-ID: <C3F2D12D.1D6F2%keir.fraser@eu.citrix.com> (raw)
In-Reply-To: <515922b50802291414q79cd34c9o36eb103811e7f206@mail.gmail.com>
[-- Attachment #1.1: Type: text/plain, Size: 1881 bytes --]
Annoying fact #2 about the FPU instructions is that the GNU assembler
reverses the operand order of many two-operand FPU instructions. So, for
example, FDIVP becomes DIVRP, and vice versa. Super annoying. So I¹m going
to change our emulated opcodes for most FPU instructions to be ³.byte
xx,yy². Personally I think this is as clear as using the mnemonic opcode, or
perhaps clearer since it is now obvious that we are executing the exact
instruction that we have just decoded.
-- Keir
On 29/2/08 22:14, "Trolle Selander" <trolle.selander@gmail.com> wrote:
> This patch adds a number of fp instructions needed for OS/2 to boot as a HVM
> guest on Intel/VT hardware. It appears to work fine, and OS/2 is now finally
> working on Intel/VT as well as AMD/SVM.
>
> I'm a little concerned about the "correctness" of the FSTSW emulation and the
> use of inline assembly directly using the corresponding ops for emulation. Wrt
> FSTSW, it is really two ops FNSTSW immediately preceeded by an FWAIT. I've
> left FWAIT defined, but a no-op because after looking at realmode.c it seems
> in the emulation, exceptions are always processed if a call to x86_emulate
> returns an exception, so there should be no way for there to be "pending"
> exceptions for FWAIT to wait for. I may have missed something, though, hence
> the RFC.
>
> Secondly, about the inline assembly - i saw that this was how many of the
> other FP instructions were done, so I did it that way as well. However, none
> of the previous instructions done that way referenced the fp registers. Does
> this make a difference, or is it ok the way i've done it here?
>
> Signed-off-by: Trolle Selander <trolle.selander@gmail.com>
>
>
> _______________________________________________
> Xen-devel mailing list
> Xen-devel@lists.xensource.com
> http://lists.xensource.com/xen-devel
[-- Attachment #1.2: Type: text/html, Size: 2636 bytes --]
[-- Attachment #2: Type: text/plain, Size: 138 bytes --]
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xensource.com
http://lists.xensource.com/xen-devel
prev parent reply other threads:[~2008-03-04 10:13 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-02-29 22:14 [PATCH] [RFC] More fp instructions for realmode emulation (Enables booting OS/2 as a HVM guest on Intel/VT hardware) Trolle Selander
2008-03-01 8:46 ` Keir Fraser
2008-03-01 9:18 ` Keir Fraser
2008-03-03 12:18 ` Trolle Selander
2008-03-03 12:21 ` Keir Fraser
2008-03-03 14:52 ` Andi Kleen
2008-03-03 15:00 ` Keir Fraser
2008-03-03 16:59 ` Andi Kleen
2008-03-03 17:30 ` Keir Fraser
2008-03-03 18:11 ` Andi Kleen
2008-03-04 10:13 ` Keir Fraser [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=C3F2D12D.1D6F2%keir.fraser@eu.citrix.com \
--to=keir.fraser@eu.citrix.com \
--cc=trolle.selander@gmail.com \
--cc=xen-devel@lists.xensource.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.