From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jan Kiszka Subject: Re: [PATCH 10/11] KVM: nVMX: Synchronize VMCS12 content with the shadow vmcs Date: Sun, 14 Apr 2013 12:27:10 +0200 Message-ID: <516A847E.1090603@web.de> References: <20130409131435.GX17919@redhat.com> <20130411065411.GO17919@redhat.com> <20130412103117.GC25219@redhat.com> <20130412104804.GD25219@redhat.com> <20130414100010.GI17919@redhat.com> <20130414100710.GJ17919@redhat.com> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="----enig2KEUQOBCXMUQCDXSJIXLR" Cc: Abel Gordon , dongxiao.xu@intel.com, jun.nakajima@intel.com, kvm@vger.kernel.org, kvm-owner@vger.kernel.org, Nadav Har'El , owasserm@redhat.com To: Gleb Natapov Return-path: Received: from mout.web.de ([212.227.15.4]:60359 "EHLO mout.web.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751270Ab3DNK12 (ORCPT ); Sun, 14 Apr 2013 06:27:28 -0400 In-Reply-To: <20130414100710.GJ17919@redhat.com> Sender: kvm-owner@vger.kernel.org List-ID: This is an OpenPGP/MIME signed message (RFC 4880 and 3156) ------enig2KEUQOBCXMUQCDXSJIXLR Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable On 2013-04-14 12:07, Gleb Natapov wrote: > On Sun, Apr 14, 2013 at 01:00:10PM +0300, Gleb Natapov wrote: >> On Sun, Apr 14, 2013 at 12:51:34PM +0300, Abel Gordon wrote: >>> >>> >>> Gleb Natapov wrote on 12/04/2013 01:48:04 PM: >>> >>>> On Fri, Apr 12, 2013 at 01:44:14PM +0300, Abel Gordon wrote: >>>>> >>>>> Ok, so then you prefer to add the inline functions to read/write to= the >>>>> vmcs12 >>>>> fields, (to set the request bit if shadowed field changed) and you = are >>> not >>>>> concerned >>>>> about any merge/rebase mess. I will work on this direction. >>>>> I'll first send an independent patch to introduce the accessors. On= ce >>> you >>>>> apply this patch, I'll continue and send you v2 patches for shadow >>> vmcs. >>>>> >>>>> Do you agree ? >>>> Yes. >>> >>> Looking again at the code it seems like we could avoid adding the >>> accessors. >>> We could just set a flag in nested_vmx_vmexit and >>> nested_vmx_entry_failure. Then, in vmx_vcpu_run we check/reset the fl= ag and >>> call copy_vmcs12_to_shadow (if required). >>> >>> What do you think ? >> Good idea! With accessors we can do further optimization by copying on= ly >> things that changed, but it will be premature optimization at this >> point. >> > Actually this is good idea only if we know for sure that VMX emulation > changes vmcs12 only during guest entry/exit. Is this the case? I think > so. Some vmcs12 fields that are exposed to L1 are changed outside L2<->L1 transitions. What comes to my mind: L0 emulates some change that L1 does not trap, e.g. CRx accesses. Or what do you mean? Jan ------enig2KEUQOBCXMUQCDXSJIXLR 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/ iEYEARECAAYFAlFqhIYACgkQitSsb3rl5xRg5wCdG7LFnQzLBDWkr2zgQiYB8T1N 3rIAn0480v8Qh4DDDnwNAoUViT3T6psU =5VAN -----END PGP SIGNATURE----- ------enig2KEUQOBCXMUQCDXSJIXLR--