From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jan Kiszka Subject: Re: [PATCH RFC] KVM: x86: nested: support for MSR loading/storing Date: Mon, 08 Dec 2014 08:07:25 +0100 Message-ID: <54854E2D.2010900@web.de> References: <20141205225707.GA6689@gnote> <54842A3C.503@web.de> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="kWjqun7rb0lAGO06duCLBUSbGibSWxdQt" Cc: Bandan Das , Eugene Korenevsky , Paolo Bonzini , kvm@vger.kernel.org, Wanpeng Li To: Wincy Van Return-path: Received: from mout.web.de ([212.227.17.12]:54818 "EHLO mout.web.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751007AbaLHHHc (ORCPT ); Mon, 8 Dec 2014 02:07:32 -0500 In-Reply-To: Sender: kvm-owner@vger.kernel.org List-ID: This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --kWjqun7rb0lAGO06duCLBUSbGibSWxdQt Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 2014-12-08 04:49, Wincy Van wrote: >>>> +static bool vmx_msr_switch_area_verify(u32 count, u64 addr, int max= phyaddr) >>>> +{ >>>> + if (count =3D=3D 0) >>>> + return true; >>>> + if ((addr & 0xf) !=3D 0) >> >> Bits 11:0 have to be zero, in fact (page alignment required). >=20 >=20 > Why? According to SDM(24.8.2), "If the VM-entry MSR-load count is not z= ero, > the address must be 16-byte aligned." True, sorry, confused with the MSR usage bitmap. >=20 > I think the macro IS_ALIGNED would be better. Yes. Jan --kWjqun7rb0lAGO06duCLBUSbGibSWxdQt 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.22 (GNU/Linux) iEYEARECAAYFAlSFTi0ACgkQitSsb3rl5xQgHACgjfk0stlKtJ4v2jkCcYgubfPJ yS0An3v2WMgWum5iGpSMkALqfxrOi/fv =kxXu -----END PGP SIGNATURE----- --kWjqun7rb0lAGO06duCLBUSbGibSWxdQt--