All of lore.kernel.org
 help / color / mirror / Atom feed
From: Avi Kivity <avi@redhat.com>
To: Anthony Liguori <aliguori@us.ibm.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 19:56:57 +0300	[thread overview]
Message-ID: <4A81A2D9.5080703@redhat.com> (raw)
In-Reply-To: <4A81A034.7050603@us.ibm.com>

On 08/11/2009 07:45 PM, Anthony Liguori wrote:
> 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.
>

eflags is already updated at this point, so no need for an additional 
parameter.

> 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.

The other callers are a good reason to do it in 
kvm_load_segment_descriptor(), so they don't have to perform the check 
themselves.  In fact with this change your patch will fix a few more bugs.

-- 
error compiling committee.c: too many arguments to function


      reply	other threads:[~2009-08-11 16:50 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
2009-08-11 16:56     ` Avi Kivity [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=4A81A2D9.5080703@redhat.com \
    --to=avi@redhat.com \
    --cc=aliguori@us.ibm.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.