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 (v2)
Date: Wed, 12 Aug 2009 08:15:23 -0500 [thread overview]
Message-ID: <4A82C06B.10400@us.ibm.com> (raw)
In-Reply-To: <4A82B769.3060608@redhat.com>
Avi Kivity wrote:
> On 08/12/2009 03:11 PM, Avi Kivity wrote:
>> On 08/11/2009 11:57 PM, Anthony Liguori wrote:
>>> According to 16.2.5 in the SDM, eflags.vm in the tss is consulted
>>> before loading
>>> and new segments. If eflags.vm == 1, then the segments are treated
>>> as 16-bit
>>> segments. The LDTR and TR are not normally available in vm86 mode
>>> so if they
>>> happen to somehow get loaded, they need to be treated as 32-bit
>>> segments.
>>>
>>> This fixes an invalid vmentry failure in a custom OS that was
>>> happening after
>>> a task switch into vm8086 mode. Since the segments were being
>>> mistakenly
>>> treated as 32-bit, we loaded garbage state.
>>
>> I'm getting a Vista x64 installer failure on reboot with this. One
>> possibility is that ->get_rflags() is returning the mangled flags
>> state (we add vm86 for real mode), which confuses the new code.
>>
>
> That's indeed the case, I'm testing a patch now.
While the code looks nicer with the second patch, the fact that
get_rflags() does a vmcs_read() seems 7 times more than before seems
unfortunate.
--
Regards,
Anthony Liguori
next prev parent reply other threads:[~2009-08-12 13:15 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-08-11 20:57 [PATCH] When switching to a vm8086 task, load segments as 16-bit (v2) Anthony Liguori
2009-08-12 7:47 ` Avi Kivity
2009-08-12 12:11 ` Avi Kivity
2009-08-12 12:36 ` Avi Kivity
2009-08-12 13:15 ` Anthony Liguori [this message]
2009-08-12 13:40 ` Avi Kivity
2009-08-12 13:50 ` Anthony Liguori
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=4A82C06B.10400@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.