Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753188AbaKCP3Y (ORCPT ); Mon, 3 Nov 2014 10:29:24 -0500 Received: from mail-wg0-f41.google.com ([74.125.82.41]:49612 "EHLO mail-wg0-f41.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752624AbaKCP3V (ORCPT ); Mon, 3 Nov 2014 10:29:21 -0500 Message-ID: <54579F4B.8050404@redhat.com> Date: Mon, 03 Nov 2014 16:29:15 +0100 From: Paolo Bonzini User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.2.0 MIME-Version: 1.0 To: Ben Hutchings CC: linux-kernel@vger.kernel.org, stable@vger.kernel.org, akpm@linux-foundation.org, Jun Nakajima , Xinhao Xu , Yang Zhang , Xiao Guangrong , Gleb Natapov , "Nadav Har'El" Subject: Re: [PATCH 3.2 087/102] nEPT: Nested INVEPT References: <5455F35E.1040304@redhat.com> <1415022261.27313.25.camel@decadent.org.uk> In-Reply-To: <1415022261.27313.25.camel@decadent.org.uk> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 03/11/2014 14:44, Ben Hutchings wrote: >> You can just use the same scheme as your patch 88/102: > Why is that? Why should I not use the upstream version? Because it makes no sense to invalidate nested EPT page tables, if the kernel cannot make nested EPT page tables in the first place. I think that this "if" in your patch should always trigger, thus making your large patch equivalent to my small patch: + if (!(nested_vmx_secondary_ctls_high & SECONDARY_EXEC_ENABLE_EPT) || + !(nested_vmx_ept_caps & VMX_EPT_INVEPT_BIT)) { + kvm_queue_exception(vcpu, UD_VECTOR); + return 1; + } ... but without looking at the entire source of vmx.c in the relatively old 3.2 kernel, I'd rather play it safe and avoid introducing bugs in case the above turns out not to be true. Paolo -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/