From mboxrd@z Thu Jan 1 00:00:00 1970 From: Bandan Das Subject: Re: [PATCH v4 3/3] KVM: nVMX: Emulate EPTP switching for the L1 hypervisor Date: Tue, 11 Jul 2017 15:38:14 -0400 Message-ID: References: <20170710204936.4001-1-bsd@redhat.com> <20170710204936.4001-4-bsd@redhat.com> <2d50ebc4-9328-ce08-b55b-6a331ee13cc3@redhat.com> <20170711191334.GB3442@potion> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8BIT Cc: Jim Mattson , David Hildenbrand , kvm list , Paolo Bonzini , LKML To: Radim =?utf-8?B?S3LEjW3DocWZ?= Return-path: In-Reply-To: <20170711191334.GB3442@potion> ("Radim \=\?utf-8\?B\?S3LEjW3DocWZ\?\= \=\?utf-8\?B\?Iidz\?\= message of "Tue, 11 Jul 2017 21:13:34 +0200") Sender: linux-kernel-owner@vger.kernel.org List-Id: kvm.vger.kernel.org Radim Krčmář writes: > 2017-07-11 14:35-0400, Bandan Das: >> Jim Mattson writes: >> ... >> >>> I can find the definition for an vmexit in case of index >= >> >>> VMFUNC_EPTP_ENTRIES, but not for !vmcs12->eptp_list_address in the SDM. >> >>> >> >>> Can you give me a hint? >> >> >> >> I don't think there is. Since, we are basically emulating eptp switching >> >> for L2, this is a good check to have. >> > >> > There is nothing wrong with a hypervisor using physical page 0 for >> > whatever purpose it likes, including an EPTP list. >> >> Right, but of all the things, a l1 hypervisor wanting page 0 for a eptp list >> address most likely means it forgot to initialize it. Whatever damage it does will >> still end up with vmfunc vmexit anyway. > > Most likely, but not certainly. I also don't see a to diverge from the > spec here. Actually, this is a specific case where I would like to diverge from the spec. But then again, it's L1 shooting itself in the foot and this would be a rarely used code path, so, I am fine removing it.