All of lore.kernel.org
 help / color / mirror / Atom feed
From: Anthony Liguori <aliguori@us.ibm.com>
To: Avi Kivity <avi@redhat.com>
Cc: kvm@vger.kernel.org, Gleb Natapov <gleb@redhat.com>
Subject: Re: [PATCH] When switching to a vm8086 task, load segments as 16-bit
Date: Tue, 11 Aug 2009 11:45:40 -0500	[thread overview]
Message-ID: <4A81A034.7050603@us.ibm.com> (raw)
In-Reply-To: <4A819DD3.4060308@redhat.com>

Avi Kivity wrote:
> On 08/11/2009 04:00 AM, Anthony Liguori wrote:
>
> kvm_load_segment_descriptor() can already load plain segments:
>
>     if (!(vcpu->arch.cr0 & X86_CR0_PE))
>         return kvm_load_realmode_segment(vcpu, selector, seg);
>
> so we can simplify the patch a bit by extending the check.

I went down that road but you need to check the to-be-switched-into tss, 
which isn't available directly from vcpu so we would have to either pass 
the tss as a parameter to the function or at least a flag indicating 
that we're going into vm8086 mode.

There are other callers of kvm_load_segment_descriptor that would need 
updating and it already takes a few extra parameters.  That's why I went 
down this road.

Happy to change though if you'd prefer a different approach.

-- 
Regards,

Anthony Liguori


  reply	other threads:[~2009-08-11 16:45 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-08-11  1:00 [PATCH] When switching to a vm8086 task, load segments as 16-bit Anthony Liguori
2009-08-11 16:35 ` Avi Kivity
2009-08-11 16:45   ` Anthony Liguori [this message]
2009-08-11 16:56     ` Avi Kivity

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=4A81A034.7050603@us.ibm.com \
    --to=aliguori@us.ibm.com \
    --cc=avi@redhat.com \
    --cc=gleb@redhat.com \
    --cc=kvm@vger.kernel.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 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.