public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
From: Avi Kivity <avi-atKUWr5tajBWk0Htik3J/w@public.gmane.org>
To: "H. Peter Anvin" <hpa-YMNOUZJC4hwAvxtiuMwx3w@public.gmane.org>
Cc: kvm-devel <kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org>
Subject: Re: KVM and OS/2: #UD in real mode
Date: Thu, 24 Jan 2008 08:33:17 +0200	[thread overview]
Message-ID: <4798312D.9060204@qumranet.com> (raw)
In-Reply-To: <4796AB3F.5070407-YMNOUZJC4hwAvxtiuMwx3w@public.gmane.org>

H. Peter Anvin wrote:
> Just for fun, I tried to boot OS/2 Warp 4.0 under KVM (KVM-59 with the 
> latest git kernel from Linus as of yesterday, slightly post 2.6.24-rc8.) 
>    I found that it crashes very early, apparently because KVM doesn't 
> handle an #UD received in user mode.  It appears that OS/2 actually 
> provokes an #UD deliberately in real mode, from the disassembly it looks 
> like it's trying to probe for the 486 version of cmpxchg (which has a 
> different opcode than the 586+ version.)
>   

Strange, the manual lists 0f b0 and 0f b1 as compatible all the way back 
to the 486.  What opcode are you seeing?

> It looks like the kernel code filters out a very small number of 
> real-mode exceptions, and does a KVM exit for all the other ones; the 
> userspace code then unconditionally barfs.  This is presumably a 
> temporary hack; what is the intended behaviour - for this to be handled 
> in-kernel, or in userspace?
>   

In kernel.  I've never seen a #UD in real mode, that's why it isn't handled.

-- 
Any sufficiently difficult bug is indistinguishable from a feature.


-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/

  parent reply	other threads:[~2008-01-24  6:33 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-01-23  2:49 KVM and OS/2: #UD in real mode H. Peter Anvin
     [not found] ` <4796AB3F.5070407-YMNOUZJC4hwAvxtiuMwx3w@public.gmane.org>
2008-01-24  6:33   ` Avi Kivity [this message]
     [not found]     ` <4798312D.9060204-atKUWr5tajBWk0Htik3J/w@public.gmane.org>
2008-01-24  6:40       ` H. Peter Anvin
2008-03-06 12:40         ` Bjørn Mork

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=4798312D.9060204@qumranet.com \
    --to=avi-atkuwr5tajbwk0htik3j/w@public.gmane.org \
    --cc=hpa-YMNOUZJC4hwAvxtiuMwx3w@public.gmane.org \
    --cc=kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox