public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
From: Anthony Liguori <anthony@codemonkey.ws>
To: Alexander Graf <alex@csgraf.de>
Cc: kvm-devel <kvm-devel@lists.sourceforge.net>
Subject: Re: [PATCH] enable gfxboot on VMX
Date: Fri, 15 Feb 2008 08:56:19 -0600	[thread overview]
Message-ID: <47B5A813.6060008@codemonkey.ws> (raw)
In-Reply-To: <47B53B7D.8050209@csgraf.de>

Alexander Graf wrote:
> Hi,
>
> this issue has already been talked about previously. Gfxboot on VMX is
> broken, because it reads SS after switching from real to protected mode,
> where SS contains an invalid value, which VMX does not allow.
> As far as I know, gfxboot is the only application that suffers from this
> issue.
> The current "fix" is to make gfxboot use a previously stored SS value,
> which works fine for new releases. Already shipped versions of the
> software can not be changed though, so there needs to be another way to
> make kvm work with older versions of gfxboot.
>
> As everything except gfxboot works, we can simply change gfxboot in
> runtime to use a different value. Unfortunately the mov instruction,
> used to read the SS register is only 2 bytes long, so there is no way to
> binary patch the mov to something that would contain an address. So the
> only way I could think of was an invalid instruction. The UD exception
> is intercepted in KVM and is already emulated for VMCALLs. This can be
> extended to an opcode, that is officially unused (0f 0c) and have the
> emulator do a mov realmode_ss, %eax.
>
> This patch implements exactly this idea and fixes openSUSE < 11.0 and
> Ubuntu CD booting on VMX for me. Comments are, as always, welcome.
>   

Have you tried SLES-9 or openSUSE variants of the same age?  The ss 
issue in gfxboot is only something recently introduced.  Prior to that, 
gfxboot used big real mode so your patch wouldn't be sufficient for 
those versions of gfxboot.

One thing I've thought about is converting gfxboot-disable[1] to 
generate a qcow2 that backs to the actual CDROM ISO.  Then in QEMU we 
could take an MD5 of an ISO if trying to boot from it, compare it to a 
white list of known bad CDs, and then generate a qcow2 automatically 
with gfxboot disabled.  When we eventually support big real mode in the 
kernel, we can disable this.

[1] http://hg.codemonkey.ws/gfxboot-disable

Regards,

Anthony Liguori


> Signed-off-by: Alexander Graf <alex@csgraf.de>
>
>
>   
> ------------------------------------------------------------------------
>
> -------------------------------------------------------------------------
> 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/
> ------------------------------------------------------------------------
>
> _______________________________________________
> kvm-devel mailing list
> kvm-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/kvm-devel


-------------------------------------------------------------------------
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-02-15 14:56 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-02-15  7:13 [PATCH] enable gfxboot on VMX Alexander Graf
2008-02-15 13:47 ` Avi Kivity
2008-02-15 13:58   ` Alexander Graf
2008-02-16  9:06     ` Avi Kivity
2008-02-16 13:34       ` Alexander Graf
2008-02-17  8:15         ` Avi Kivity
2008-02-18  9:17         ` Guillaume Thouvenin
2008-02-18  9:34           ` Alexander Graf
2008-02-18  9:39             ` Alexander Graf
2008-02-29 14:34               ` catch vmentry failure (was enable gfxboot on VMX) Guillaume Thouvenin
2008-03-02 17:15                 ` Avi Kivity
2008-02-19  3:37             ` [PATCH] enable gfxboot on VMX Anthony Liguori
2008-02-19  8:26               ` Avi Kivity
2008-02-15 14:56 ` Anthony Liguori [this message]
2008-02-15 15:13   ` Alexander Graf
2008-02-15 15:46     ` Steffen Winterfeldt
2008-02-18 11:46 ` Andi Kleen
2008-02-18 12:04   ` Alexander Graf

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=47B5A813.6060008@codemonkey.ws \
    --to=anthony@codemonkey.ws \
    --cc=alex@csgraf.de \
    --cc=kvm-devel@lists.sourceforge.net \
    /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