Received: by 2002:a6b:fb09:0:0:0:0:0 with SMTP id h9csp3787051iog; Tue, 28 Jun 2022 02:47:51 -0700 (PDT) X-Google-Smtp-Source: AGRyM1uDcfqRdOXbKmU83qh6/IyczUFmLszQ7MQrXliYr6Eg6THLi6UwTF9wEbOgxbIB81jE1PWd X-Received: by 2002:a17:903:11c9:b0:16b:8293:c599 with SMTP id q9-20020a17090311c900b0016b8293c599mr4051034plh.136.1656409671316; Tue, 28 Jun 2022 02:47:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1656409671; cv=none; d=google.com; s=arc-20160816; b=ZbO6NEx1n/5RLXYD9MKV0uA9ZcQ6D7lzbyXP7OVcYaCq2Thcd+IYjkvHBsEMyIXzrG GhgHb6ujPq10dGm54RnavuLM6l78tpS+B7Ef10YaNyYFubVgnzai0Q93p9UEBAMRQ7QO WvleuQRdsF3juVTiJMf8x6PjT3TSZqNeMVrL6adMiL5Bu1JEf5NgWwq34FnMH4CREIHq IPmqho9ZfBX1rzf1D7iA/Fm12bQhTpDlyJTKN3OxEtfkRpylEmJeQ85ObwwicqJ8LwYf ivIqYsZxIDcBk3TgPyBGXTvwAuHMr/XNk4sLIRkJs+KPcqrw/BZq2e56jgCQlVIZfhvd T+6A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:date:cc:to:from:subject :message-id:dkim-signature; bh=BXAG5b0n3utC+xKu/ur4SDi+QqaWJ5b7MPRWdkNFMEA=; b=RS0TcNIH+XM7veQisRftY6PBKO/+ZUWDP5uOoNAfqI5j11GWgL/d5fw0P8tgomaACL h0YLm4E/+L/ugr4+IXHqJcm+fuzGxYub7NxmBen9/7RLV1dENZHOGBhPqawNnV5bvTJP F1zvKaE5Sz/Fk0RtfQdtxZNx4lpwQ80wX8rb2Lvjasb05OPpRHmzU8hGG8e2wUWWwY2b R8PoHa5NJzD1R+Aug26dXKL5PBBifMCcNEFUWz4OI/+BbiL5jRCLOBKa1gLl6fz0pVpX G1Ud/QkPA4IA+RDr8gVsY4dA9MoJJqg7j6mwLiGLikLqBxc0k7QweTDarDk0eIoiy722 Qq7Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=Hp2VyrvP; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id bd10-20020a170902830a00b0016228c736afsi16527526plb.511.2022.06.28.02.47.38; Tue, 28 Jun 2022 02:47:51 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=Hp2VyrvP; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1343978AbiF1JIP (ORCPT + 99 others); Tue, 28 Jun 2022 05:08:15 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35478 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234062AbiF1JIN (ORCPT ); Tue, 28 Jun 2022 05:08:13 -0400 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 0FFF91038 for ; Tue, 28 Jun 2022 02:08:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1656407291; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=BXAG5b0n3utC+xKu/ur4SDi+QqaWJ5b7MPRWdkNFMEA=; b=Hp2VyrvPxe8OSP1bwAZdtmD6yoQlnUqyqwLnHHzMJl+Z8jj7ZFL8pFM7fHgLQzt2mXOcES rFfvlFfC6gYwAPgAS/UckB5Zi9FLb2QxagEtgU/20j0Nrz2diyzXmwq660FvsFLUmQYDzh KWXD12XfOdQU5IGzcFNIypZM75R4wZM= Received: from mimecast-mx02.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-590-FYALN4vtN4yD3bN7U9-Tsw-1; Tue, 28 Jun 2022 05:08:09 -0400 X-MC-Unique: FYALN4vtN4yD3bN7U9-Tsw-1 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.rdu2.redhat.com [10.11.54.2]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 4474F2999B40; Tue, 28 Jun 2022 09:08:09 +0000 (UTC) Received: from starship (unknown [10.40.194.38]) by smtp.corp.redhat.com (Postfix) with ESMTP id DD37E404E4C8; Tue, 28 Jun 2022 09:08:06 +0000 (UTC) Message-ID: <0739589fe08c75c563e10cb41388640c7e050a52.camel@redhat.com> Subject: Re: [PATCH 00/14] KVM: nVMX: Use vmcs_config for setting up nested VMX MSRs From: Maxim Levitsky To: Vitaly Kuznetsov , kvm@vger.kernel.org, Paolo Bonzini , Sean Christopherson Cc: Anirudh Rayabharam , Wanpeng Li , Jim Mattson , linux-hyperv@vger.kernel.org, linux-kernel@vger.kernel.org Date: Tue, 28 Jun 2022 12:08:05 +0300 In-Reply-To: <20220627160440.31857-1-vkuznets@redhat.com> References: <20220627160440.31857-1-vkuznets@redhat.com> Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.36.5 (3.36.5-2.fc32) MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Scanned-By: MIMEDefang 2.84 on 10.11.54.2 X-Spam-Status: No, score=-2.5 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_NONE,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, 2022-06-27 at 18:04 +0200, Vitaly Kuznetsov wrote: > Changes since RFC: > - "KVM: VMX: Extend VMX controls macro shenanigans" PATCH added and the > infrastructure is later used in other patches [Sean] PATCHes 1-3 added > to support the change. > - "KVM: VMX: Clear controls obsoleted by EPT at runtime, not setup" PATCH > added [Sean]. > - Commit messages added. > > vmcs_config is a sanitized version of host VMX MSRs where some controls are > filtered out (e.g. when Enlightened VMCS is enabled, some know bugs are > discovered, some inconsistencies in controls are detected,...) but > nested_vmx_setup_ctls_msrs() uses raw host MSRs instead. This may end up > in exposing undesired controls to L1. Switch to using vmcs_config instead. > > Sean Christopherson (1): > KVM: VMX: Clear controls obsoleted by EPT at runtime, not setup > > Vitaly Kuznetsov (13): > KVM: VMX: Check VM_ENTRY_IA32E_MODE in setup_vmcs_config() > KVM: VMX: Check CPU_BASED_{INTR,NMI}_WINDOW_EXITING in > setup_vmcs_config() > KVM: VMX: Tweak the special handling of SECONDARY_EXEC_ENCLS_EXITING > in setup_vmcs_config() > KVM: VMX: Extend VMX controls macro shenanigans > KVM: VMX: Move CPU_BASED_CR8_{LOAD,STORE}_EXITING filtering out of > setup_vmcs_config() > KVM: VMX: Add missing VMEXIT controls to vmcs_config > KVM: VMX: Add missing VMENTRY controls to vmcs_config > KVM: VMX: Add missing CPU based VM execution controls to vmcs_config > KVM: nVMX: Use sanitized allowed-1 bits for VMX control MSRs > KVM: VMX: Store required-1 VMX controls in vmcs_config > KVM: nVMX: Use sanitized required-1 bits for VMX control MSRs > KVM: VMX: Cache MSR_IA32_VMX_MISC in vmcs_config > KVM: nVMX: Use cached host MSR_IA32_VMX_MISC value for setting up > nested MSR > > arch/x86/kvm/vmx/capabilities.h | 16 +-- > arch/x86/kvm/vmx/nested.c | 37 +++--- > arch/x86/kvm/vmx/nested.h | 2 +- > arch/x86/kvm/vmx/vmx.c | 198 ++++++++++++++------------------ > arch/x86/kvm/vmx/vmx.h | 118 +++++++++++++++++++ > 5 files changed, 229 insertions(+), 142 deletions(-) > Sorry that I was a bit out of loop on this, so before I review it, does this patch series solve the eVMCS issue we had alone, or we still need the eVMCS version patch series as well? Best regards, Maxim Levitsky