Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752461AbdGMRIy (ORCPT ); Thu, 13 Jul 2017 13:08:54 -0400 Received: from mx1.redhat.com ([209.132.183.28]:58354 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750953AbdGMRIx (ORCPT ); Thu, 13 Jul 2017 13:08:53 -0400 DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com BAD7DC04F4B6 Authentication-Results: ext-mx07.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx07.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=bsd@redhat.com DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.redhat.com BAD7DC04F4B6 From: Bandan Das To: David Hildenbrand Cc: kvm@vger.kernel.org, pbonzini@redhat.com, linux-kernel@vger.kernel.org, Radim =?utf-8?B?S3LEjW3DocWZ?= Subject: Re: [PATCH v4 3/3] KVM: nVMX: Emulate EPTP switching for the L1 hypervisor References: <20170710204936.4001-1-bsd@redhat.com> <20170710204936.4001-4-bsd@redhat.com> <2d50ebc4-9328-ce08-b55b-6a331ee13cc3@redhat.com> <8c58f57d-091f-103d-5d8c-fc49b9d00e13@redhat.com> Date: Thu, 13 Jul 2017 13:08:49 -0400 In-Reply-To: <8c58f57d-091f-103d-5d8c-fc49b9d00e13@redhat.com> (David Hildenbrand's message of "Thu, 13 Jul 2017 17:39:48 +0200") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.31]); Thu, 13 Jul 2017 17:08:52 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1062 Lines: 27 David Hildenbrand writes: >>>> + /* >>>> + * If the (L2) guest does a vmfunc to the currently >>>> + * active ept pointer, we don't have to do anything else >>>> + */ >>>> + if (vmcs12->ept_pointer != address) { >>>> + if (address >> cpuid_maxphyaddr(vcpu) || >>>> + !IS_ALIGNED(address, 4096)) >>> >>> Couldn't the pfn still be invalid and make kvm_mmu_reload() fail? >>> (triggering a KVM_REQ_TRIPLE_FAULT) >> >> If there's a triple fault, I think it's a good idea to inject it >> back. Basically, there's no need to take care of damage control >> that L1 is intentionally doing. > > I quickly rushed over the massive amount of comments. Sounds like you'll > be preparing a v5. Would be great if you could add some comments that > were the result of this discussion (for parts that are not that obvious > - triple faults) - thanks! Will do. Basically, we agreed that we don't need to do anything with mmu_reload() faillures because the invalid eptp that mmu_unload will write to root_hpa will result in an ept violation. Bandan