From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jan Kiszka Subject: Re: [PATCH v2 01/13] nEPT: Support LOAD_IA32_EFER entry/exit controls for L1 Date: Mon, 06 May 2013 09:13:40 +0200 Message-ID: <51875824.6090402@web.de> References: <1367823872-25895-1-git-send-email-jun.nakajima@intel.com> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="----enig2UJNAEJTDMCDREEKDIOTW" Cc: kvm@vger.kernel.org To: Jun Nakajima Return-path: Received: from mout.web.de ([212.227.17.11]:64759 "EHLO mout.web.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752111Ab3EFHOM (ORCPT ); Mon, 6 May 2013 03:14:12 -0400 In-Reply-To: <1367823872-25895-1-git-send-email-jun.nakajima@intel.com> Sender: kvm-owner@vger.kernel.org List-ID: This is an OpenPGP/MIME signed message (RFC 4880 and 3156) ------enig2UJNAEJTDMCDREEKDIOTW Content-Type: text/plain; charset=ISO-8859-15 Content-Transfer-Encoding: quoted-printable On 2013-05-06 09:04, Jun Nakajima wrote: > Recent KVM, since http://kerneltrap.org/mailarchive/linux-kvm/2010/5/2/= 6261577 > switch the EFER MSR when EPT is used and the host and guest have differ= ent > NX bits. So if we add support for nested EPT (L1 guest using EPT to run= L2) > and want to be able to run recent KVM as L1, we need to allow L1 to use= this > EFER switching feature. >=20 > To do this EFER switching, KVM uses VM_ENTRY/EXIT_LOAD_IA32_EFER if ava= ilable, > and if it isn't, it uses the generic VM_ENTRY/EXIT_MSR_LOAD. This patch= adds > support for the former (the latter is still unsupported). >=20 > Nested entry and exit emulation (prepare_vmcs_02 and load_vmcs12_host_s= tate, > respectively) already handled VM_ENTRY/EXIT_LOAD_IA32_EFER correctly. S= o all > that's left to do in this patch is to properly advertise this feature t= o L1. >=20 > Note that vmcs12's VM_ENTRY/EXIT_LOAD_IA32_EFER are emulated by L0, by = using > vmx_set_efer (which itself sets one of several vmcs02 fields), so we al= ways > support this feature, regardless of whether the host supports it. >=20 > Signed-off-by: Nadav Har'El > Signed-off-by: Jun Nakajima > Signed-off-by: Xinhao Xu > --- > arch/x86/kvm/vmx.c | 18 ++++++++++++++---- > 1 file changed, 14 insertions(+), 4 deletions(-) >=20 > diff --git a/arch/x86/kvm/vmx.c b/arch/x86/kvm/vmx.c > index 867b810..485ded6 100644 > --- a/arch/x86/kvm/vmx.c > +++ b/arch/x86/kvm/vmx.c > @@ -2057,6 +2057,7 @@ static __init void nested_vmx_setup_ctls_msrs(voi= d) > #else > nested_vmx_exit_ctls_high =3D 0; > #endif > + nested_vmx_exit_ctls_high |=3D VM_EXIT_LOAD_IA32_EFER; You are using the wrong baseline. This does not apply against next. Please fix (you can find the properly rebased version in my tree). Thanks, Jan ------enig2UJNAEJTDMCDREEKDIOTW Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.16 (GNU/Linux) Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iEYEARECAAYFAlGHWCcACgkQitSsb3rl5xRmcACbBOBiOmHG/bUYd8TP6BPMgqdK 4dUAoLlJs5XV4j8Z/8WJdxeCxjl2cBdD =ldBL -----END PGP SIGNATURE----- ------enig2UJNAEJTDMCDREEKDIOTW--