From: Jan Kiszka <jan.kiszka@web.de>
To: Bandan Das <bsd@redhat.com>, kvm@vger.kernel.org
Cc: pbonzini@redhat.com, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] KVM: nVMX: Disable unrestricted mode if ept=0
Date: Sun, 07 Dec 2014 11:22:25 +0100 [thread overview]
Message-ID: <54842A61.5080006@web.de> (raw)
In-Reply-To: <jpg388s95zb.fsf@redhat.com>
[-- Attachment #1: Type: text/plain, Size: 1187 bytes --]
On 2014-12-06 16:02, Bandan Das wrote:
>
> If L0 has disabled EPT, don't advertise unrestricted
> mode at all since it depends on EPT to run real mode code.
>
> Signed-off-by: Bandan Das <bsd@redhat.com>
> ---
> arch/x86/kvm/vmx.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/arch/x86/kvm/vmx.c b/arch/x86/kvm/vmx.c
> index 3e556c6..ed70394 100644
> --- a/arch/x86/kvm/vmx.c
> +++ b/arch/x86/kvm/vmx.c
> @@ -2377,12 +2377,12 @@ static __init void nested_vmx_setup_ctls_msrs(void)
> nested_vmx_secondary_ctls_low = 0;
> nested_vmx_secondary_ctls_high &=
> SECONDARY_EXEC_VIRTUALIZE_APIC_ACCESSES |
> - SECONDARY_EXEC_UNRESTRICTED_GUEST |
> SECONDARY_EXEC_WBINVD_EXITING;
>
> if (enable_ept) {
> /* nested EPT: emulate EPT also to L1 */
> - nested_vmx_secondary_ctls_high |= SECONDARY_EXEC_ENABLE_EPT;
> + nested_vmx_secondary_ctls_high |= SECONDARY_EXEC_ENABLE_EPT |
> + SECONDARY_EXEC_UNRESTRICTED_GUEST;
> nested_vmx_ept_caps = VMX_EPT_PAGE_WALK_4_BIT |
> VMX_EPTP_WB_BIT | VMX_EPT_2MB_PAGE_BIT |
> VMX_EPT_INVEPT_BIT;
>
Reviewed-by: Jan Kiszka <jan.kiszka@siemens.com>
Jan
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 198 bytes --]
next prev parent reply other threads:[~2014-12-07 10:22 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-12-06 15:02 [PATCH] KVM: nVMX: Disable unrestricted mode if ept=0 Bandan Das
2014-12-07 10:22 ` Jan Kiszka [this message]
2014-12-10 12:06 ` Paolo Bonzini
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=54842A61.5080006@web.de \
--to=jan.kiszka@web.de \
--cc=bsd@redhat.com \
--cc=kvm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=pbonzini@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;
as well as URLs for NNTP newsgroup(s).