All of lore.kernel.org
 help / color / mirror / Atom feed
From: Marcelo Tosatti <mtosatti@redhat.com>
To: Avi Kivity <avi@qumranet.com>
Cc: Guillaume Thouvenin <guillaume.thouvenin@ext.bull.net>,
	kvm@vger.kernel.org, Anthony Liguori <anthony@codemonkey.ws>,
	Mohammed Gamal <m.gamal005@gmail.com>,
	"Kamble, Nitin A" <nitin.a.kamble@intel.com>,
	Alexander Graf <alex@csgraf.de>
Subject: Re: [RFC] Patch - Big real mode emulation
Date: Wed, 21 May 2008 14:19:56 -0300	[thread overview]
Message-ID: <20080521171956.GB9298@dmt> (raw)
In-Reply-To: <48342AD2.40406@qumranet.com>

On Wed, May 21, 2008 at 04:59:46PM +0300, Avi Kivity wrote:
> >Hello,
> >
> > Here is a patch that allows to boot OpenSuse-10.3. The problem with
> >Opensuse 10.3 is it uses a version of gfxboot that reads SS after
> >switching from real to protected mode, where SS contains an invalid
> >value, which VMX does not allow. 
> 
> Good to see progress on this issue.
> 
> >So this patch 
> >
> > 1) removes the code that writes sane value in SS in order to detect VM
> >entry failure due to CS.RPL != SS.RPL
> > 2) adds an handler to catch the VMentry failure
> >
> > The handler calls instruction's emulator and to boot opensuse we need
> >to emulate the following instructions:
> >
> >	ljmp   $0x18,$0x6e18
> >	mov    $0x20,%ax
> >	mov    %eax,%ds
> >	mov    %ss,%eax
> >	and    $0xffff,%esp
> >	shl    $0x4,%eax
> >	add    %eax,%esp
> >	mov    $0x8,%ax
> >	mov    %eax,%ss	
> >	-> At this point CS.RPL == SS.RPL
> >
> > There is an issue with the patch. When removing the SS patching we see
> >other problems. So to be able to still boot distribution that was
> >already able to boot we added a hack that allows to modify SS_SELECTOR
> >(as it was done previously) when emulation failed. The future solution
> >will be to emulate instruction that need to be emulated.
> >  
> 
> Which instructions are still problematic?

FreeDOS HIMEM uses ltr, ldt, loop, nop, does a task switch via jmp. But
that can come in later.

  parent reply	other threads:[~2008-05-21 17:19 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-05-21  9:34 [RFC] Patch - Big real mode emulation Guillaume Thouvenin
2008-05-21 13:59 ` Avi Kivity
2008-05-21 14:10   ` Avi Kivity
2008-05-22  8:55     ` Guillaume Thouvenin
2008-05-21 17:19   ` Marcelo Tosatti [this message]
2008-05-21 15:32 ` Mohammed Gamal
2008-05-21 16:18 ` Marcelo Tosatti
2008-05-22  9:02   ` Guillaume Thouvenin
2008-05-21 23:18 ` Kamble, Nitin A
2008-05-22 22:52   ` Mohammed Gamal

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=20080521171956.GB9298@dmt \
    --to=mtosatti@redhat.com \
    --cc=alex@csgraf.de \
    --cc=anthony@codemonkey.ws \
    --cc=avi@qumranet.com \
    --cc=guillaume.thouvenin@ext.bull.net \
    --cc=kvm@vger.kernel.org \
    --cc=m.gamal005@gmail.com \
    --cc=nitin.a.kamble@intel.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.