mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Paolo Bonzini <pbonzini@redhat.com>
To: Jim Mattson <jmattson@google.com>, Wanpeng Li <kernellwp@gmail.com>
Cc: LKML <linux-kernel@vger.kernel.org>,
	"kvm list" <kvm@vger.kernel.org>,
	"Radim Krčmář" <rkrcmar@redhat.com>,
	"Wanpeng Li" <wanpeng.li@hotmail.com>
Subject: Re: [PATCH v2 1/2] KVM: VMX: Don't advertise EPT switching if EPT itself is not exposed
Date: Tue, 17 Oct 2017 19:35:48 +0200	[thread overview]
Message-ID: <f60cbdeb-442f-8151-7b13-833ee8a4dc79@redhat.com> (raw)
In-Reply-To: <CALMp9eRG902CG4kAq19a3dGRMcQyJ1Le9osLF1QcoqLdyRKdbw@mail.gmail.com>

On 17/10/2017 19:29, Jim Mattson wrote:
> Following the same line of reasoning, what if
> vmx->nested.nested_vmx_secondary_ctls_high is 0 after clearing
> SECONDARY_EXEC_ENABLE_VMFUNC? Does it make sense to report
> CPU_BASED_ACTIVATE_SECONDARY_CONTROLS if we don't actually support any
> of the secondary controls?

All-zero is a valid value for secondary controls, so I think yes.  Besides:

1) userspace can always get into a situation where there are no valid
secondary controls but processor-based execution controls have bit 31 as
1-allowed;

2) I doubt that vmfunc can be the one bit that causes
nested_vmx_secondary_ctls_high to become zero :)

Paolo

  reply	other threads:[~2017-10-17 17:35 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-10-17  4:03 Wanpeng Li
2017-10-17  4:03 ` [PATCH v2 2/2] KVM: VMX: Fix VPID capability detection Wanpeng Li
2017-10-17 17:43   ` Jim Mattson
2017-10-17 17:48     ` Paolo Bonzini
2017-10-18  0:51       ` Wanpeng Li
2017-10-17 17:29 ` [PATCH v2 1/2] KVM: VMX: Don't advertise EPT switching if EPT itself is not exposed Jim Mattson
2017-10-17 17:35   ` Paolo Bonzini [this message]
2017-10-17 18:30     ` Jim Mattson
2017-10-18  1:05       ` Wanpeng Li

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=f60cbdeb-442f-8151-7b13-833ee8a4dc79@redhat.com \
    --to=pbonzini@redhat.com \
    --cc=jmattson@google.com \
    --cc=kernellwp@gmail.com \
    --cc=kvm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rkrcmar@redhat.com \
    --cc=wanpeng.li@hotmail.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

all inboxes | Powered by JetHome®