From: Gleb Natapov <gleb@redhat.com>
To: Avi Kivity <avi@redhat.com>
Cc: mtosatti@redhat.com, kvm@vger.kernel.org
Subject: Re: [PATCH 2/2] KVM: VMX: Initialize vm86 TSS only once.
Date: Sun, 27 Feb 2011 17:52:19 +0200 [thread overview]
Message-ID: <20110227155219.GA22252@redhat.com> (raw)
In-Reply-To: <4D6A710B.7070705@redhat.com>
On Sun, Feb 27, 2011 at 05:43:07PM +0200, Avi Kivity wrote:
> On 02/21/2011 12:07 PM, Gleb Natapov wrote:
> >Currently vm86 task is initialized on each real mode entry and vcpu
> >reset. Initialization is done by zeroing TSS and updating relevant
> >fields. But since all vcpus are using the same TSS there is a race where
> >one vcpu may use TSS while other vcpu is initializing it, so the vcpu
> >that uses TSS will see wrong TSS content and will behave incorrectly.
> >Fix that by initializing TSS only once.
>
> Applied, thanks.
>
> According to my reading of the code, if KVM_SET_TSS_ADDR is not
> invoked, the guest would fail both before and after the patch, yes?
>
Hmmm. Actually no. Before the patch guest that doesn't use KVM_SET_TSS_ADDR
will use the top of slot zero. Should I fix that (how?), or should we
drop support for those old guests? The problem with using top of slot
zero is that this memory is available for guest use and we do not even
put it into e820 map as far as I see. Also there are patches floating
around that re-arrange memslots or even put them in a tree. They will
break old guests too.
--
Gleb.
next prev parent reply other threads:[~2011-02-27 15:52 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-02-21 10:07 [PATCH 1/2] KVM: VMX: write new TR selector value into vmcs immediately if it changes during vm86 mode Gleb Natapov
2011-02-21 10:07 ` [PATCH 2/2] KVM: VMX: Initialize vm86 TSS only once Gleb Natapov
2011-02-27 15:43 ` Avi Kivity
2011-02-27 15:52 ` Gleb Natapov [this message]
2011-02-27 15:58 ` Avi Kivity
2011-02-27 16:04 ` Avi Kivity
2011-02-27 16:27 ` Gleb Natapov
2011-02-27 16:31 ` Avi Kivity
2011-02-27 16:58 ` Gleb Natapov
2011-02-27 16:12 ` Gleb Natapov
2011-02-27 16:18 ` Avi Kivity
2011-02-27 15:38 ` [PATCH 1/2] KVM: VMX: write new TR selector value into vmcs immediately if it changes during vm86 mode 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=20110227155219.GA22252@redhat.com \
--to=gleb@redhat.com \
--cc=avi@redhat.com \
--cc=kvm@vger.kernel.org \
--cc=mtosatti@redhat.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox