All of lore.kernel.org
 help / color / mirror / Atom feed
From: Sean Christopherson <sean.j.christopherson@intel.com>
To: Nadav Amit <nadav.amit@gmail.com>
Cc: "Krish Sadhukhan" <krish.sadhukhan@oracle.com>,
	"Paolo Bonzini" <pbonzini@redhat.com>,
	"kvm list" <kvm@vger.kernel.org>,
	"Radim Krčmář" <rkrcmar@redhat.com>,
	"Jim Mattson" <jmattson@google.com>
Subject: Re: [PATCH 2/2 v2]kvm-unit-test: nVMX: Test Host Segment Registers and Descriptor Tables on vmentry of nested guests
Date: Wed, 24 Jul 2019 08:55:36 -0700	[thread overview]
Message-ID: <20190724155536.GA25376@linux.intel.com> (raw)
In-Reply-To: <826A8AB0-D0A3-4C77-96C9-9C6670CF6C9C@gmail.com>

On Sun, Jul 21, 2019 at 11:26:24AM -0700, Nadav Amit wrote:
> > On Jul 3, 2019, at 4:54 PM, Krish Sadhukhan <krish.sadhukhan@oracle.com> wrote:
> > 
> > According to section "Checks on Host Segment and Descriptor-Table
> > Registers" in Intel SDM vol 3C, the following checks are performed on
> > vmentry of nested guests:
> > 
> >    - In the selector field for each of CS, SS, DS, ES, FS, GS and TR, the
> >      RPL (bits 1:0) and the TI flag (bit 2) must be 0.
> >    - The selector fields for CS and TR cannot be 0000H.
> >    - The selector field for SS cannot be 0000H if the "host address-space
> >      size" VM-exit control is 0.
> >    - On processors that support Intel 64 architecture, the base-address
> >      fields for FS, GS, GDTR, IDTR, and TR must contain canonical
> >      addresses.
> 
> As I noted on v1, this patch causes the test to fail on bare-metal:
> 
>  FAIL: HOST_SEL_SS 0: VMX inst error is 8 (actual 7)
> 
> I don’t know what the root-cause is, but I don't think that tests that
> fail on bare-metal (excluding because of CPU errata) should be included.

A 64-bit VMM isn't allowed to transition to 32-bit mode by way of VM-Exit,
and the VMX tests are 64-bit only.

  If the logical processor is in IA-32e mode (if IA32_EFER.LMA=1) at the
  time of VM entry, the "host address space size" VM-exit control must be 1.

  reply	other threads:[~2019-07-24 15:55 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-07-03 23:54 [PATCH 0/2 v2]nVMX: Check Host Segment Registers and Descriptor Tables on vmentry of nested guests Krish Sadhukhan
2019-07-03 23:54 ` [PATCH 1/2 v2] KVM nVMX: " Krish Sadhukhan
2019-07-03 23:54 ` [PATCH 2/2 v2]kvm-unit-test: nVMX: Test " Krish Sadhukhan
2019-07-21 18:26   ` Nadav Amit
2019-07-24 15:55     ` Sean Christopherson [this message]
2019-07-24 16:12   ` Sean Christopherson
2019-07-25 22:32     ` Krish Sadhukhan
2019-07-25 22:45       ` Jim Mattson

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=20190724155536.GA25376@linux.intel.com \
    --to=sean.j.christopherson@intel.com \
    --cc=jmattson@google.com \
    --cc=krish.sadhukhan@oracle.com \
    --cc=kvm@vger.kernel.org \
    --cc=nadav.amit@gmail.com \
    --cc=pbonzini@redhat.com \
    --cc=rkrcmar@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 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.