From: Gleb Natapov <gleb@redhat.com>
To: Kevin Wolf <kwolf@redhat.com>
Cc: kvm@vger.kernel.org, mtosatti@redhat.com
Subject: Re: [PATCH kvm-unittests v2] x86/taskswitch2: Task switches into/out of VM86
Date: Mon, 15 Apr 2013 18:49:18 +0300 [thread overview]
Message-ID: <20130415154918.GC5807@redhat.com> (raw)
In-Reply-To: <20130415154227.GK3914@dhcp-200-207.str.redhat.com>
On Mon, Apr 15, 2013 at 05:42:27PM +0200, Kevin Wolf wrote:
> Am 15.04.2013 um 17:38 hat Gleb Natapov geschrieben:
> > On Mon, Apr 15, 2013 at 10:56:42AM +0200, Kevin Wolf wrote:
> > > Am 14.04.2013 um 14:42 hat Gleb Natapov geschrieben:
> > > > On Fri, Apr 12, 2013 at 01:14:47PM +0200, Kevin Wolf wrote:
> > > > > This adds a test case that jumps into VM86 by iret-ing to a TSS and back
> > > > > to Protected Mode using a task gate in the IDT.
> > > > >
> > > > > Signed-off-by: Kevin Wolf <kwolf@redhat.com>
> > > > Applied, thanks. Found a bug with it and emulate_invalid_guest_state=1
> > > > which is default. Are you running with emulate_invalid_guest_state=0?
> > >
> > > Not knowingly at least, I didn't specify any module options. I
> > > guess I just have enable_unrestricted_guest == true, which makes
> > > guest_state_valid() return true immediately.
> > >
> > Can you check in
> > /sys/module/kvm_intel/parameters/emulate_invalid_guest_state and
> > /sys/module/kvm_intel/parameters/unrestricted_guest? You shouldn't have
> > failed entry problem with enable_unrestricted_guest == true either.
>
> $ cat /sys/module/kvm_intel/parameters/emulate_invalid_guest_state
> Y
> $ cat /sys/module/kvm_intel/parameters/unrestricted_guest
> Y
>
> Why do you think that I wouldn't have the failed entry check with
> unrestricted_guest == true? The task switch is always done in software
> and if it leads to an invalid segment descriptor in the VMCS, then a
> failed VM entry looks quite expected to me.
>
unrestricted_guest eliminates a lot of check on vcpu state during guest
entry since now real mode, along with big real mode, are virtualized
directly by the CPU. But you are right that with VM86 we hit the check
that is still there: if vcpu is in the VM86 mode segment registers should
be in a specific state.
--
Gleb.
prev parent reply other threads:[~2013-04-15 15:49 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-04-12 11:14 [PATCH kvm-unittests v2] x86/taskswitch2: Task switches into/out of VM86 Kevin Wolf
2013-04-14 12:42 ` Gleb Natapov
2013-04-15 8:56 ` Kevin Wolf
2013-04-15 15:38 ` Gleb Natapov
2013-04-15 15:42 ` Kevin Wolf
2013-04-15 15:49 ` Gleb Natapov [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=20130415154918.GC5807@redhat.com \
--to=gleb@redhat.com \
--cc=kvm@vger.kernel.org \
--cc=kwolf@redhat.com \
--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