Message ID | 20221018101000.934413-1-vkuznets@redhat.com |
---|---|
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:4ac7:0:0:0:0:0 with SMTP id y7csp1873636wrs; Tue, 18 Oct 2022 03:14:54 -0700 (PDT) X-Google-Smtp-Source: AMsMyM4ThNh50mVWMUHs0r673gXubHy3+eZsLsYUXIxOz1pBOcVLTrVWd86DYTerJun5M4a+a7O6 X-Received: by 2002:a63:fa4f:0:b0:438:e26d:5ec with SMTP id g15-20020a63fa4f000000b00438e26d05ecmr2001589pgk.361.1666088093945; Tue, 18 Oct 2022 03:14:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666088093; cv=none; d=google.com; s=arc-20160816; b=CYiFl3EPJ0+4ktEPMkWPw7aemBZu35pAIYDCH8H8RlwapudR12SdnotrI8T/cUmR8K HXsN3PE/0JBUphHQ16QaFAXxbSfVnOpca3fZVKu0RoJBdm618FS4H/68skbCjZiSyp5G 3QagLqxqfNRvblFqx8MzuCh8B0ZdPunw714ZLm8F1akceQiG+/RQWxeXAysCfskrJD85 hoAYgxm8CgKABQ93Cus4GQ0iLOburbng/ijAze5dR2fcmKdirtSYxZnEnaNx9hu8/vat +wOg3unzQOhT5OZZegYsoX5zVIGowgEBYNyE+iC1GXXG2UdHVzx+LgsPduTyOddNjEm6 XSCQ== 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 :message-id:date:subject:cc:to:from:dkim-signature; bh=T1fNmJPBVIEsz+JLKi8Sx69F/41LoIY1mODMhEBFtEs=; b=ys0ywEF3/P61PWmGF4hm5jmPYC05VFBNSE6Y4LfiIDOJHkB/nDWFVH+zXSY8lrPNp2 RLwd9uiIk0HZS4jCKleFxpLwbrnXb4I8gfSHkdnMmpIfAONXqS5ixlZTTte1RBATxJcP XPbpp56Sa0MsAB5WCpFhfYQ2gTF+a0l7xDllUeT5TLJxqu/qRKzDh/nDEGChGIuhpwnG OkE/5npp02dbSFRIiJocl8QTl6p253l20PGsqNyx+Y9BPusPsBCBYm2zsx1bI0sBI3Yr QEwEE9AvE/syFtfnz/izbHCZqTMbAk/r09xEKRt8QnhhiglcHePeqiOSYfClyy27ViNK 37Wg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=aL0dZQDj; 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: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id j65-20020a638b44000000b0046b2ebb0a4esi12300409pge.212.2022.10.18.03.14.40; Tue, 18 Oct 2022 03:14:53 -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=aL0dZQDj; 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 S230136AbiJRKKO (ORCPT <rfc822;carlos.wei.hk@gmail.com> + 99 others); Tue, 18 Oct 2022 06:10:14 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36478 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230315AbiJRKKJ (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Tue, 18 Oct 2022 06:10:09 -0400 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 60C42501A4 for <linux-kernel@vger.kernel.org>; Tue, 18 Oct 2022 03:10:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1666087806; 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; bh=T1fNmJPBVIEsz+JLKi8Sx69F/41LoIY1mODMhEBFtEs=; b=aL0dZQDjX+tNYzp3S8yCF2YHOGNQ1NT0bU3r4LncmxVuTfMIyf66q+Or47qOv5NEtuL7Nl jmOIiDgpOD0327cP8Yvr0xdphmSfwHvmaod0k6m5NlBvlIeQA5aUJPgZwMKyKsg9fP/vgz Nu1WuV3XGyYPJTcxgKAJhjgApOKouqo= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-447-Z1zQxKcNMca16ckOdHUlEA-1; Tue, 18 Oct 2022 06:10:03 -0400 X-MC-Unique: Z1zQxKcNMca16ckOdHUlEA-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 C3C87101A52A; Tue, 18 Oct 2022 10:10:02 +0000 (UTC) Received: from ovpn-193-156.brq.redhat.com (ovpn-193-156.brq.redhat.com [10.40.193.156]) by smtp.corp.redhat.com (Postfix) with ESMTP id 015DE40C94AA; Tue, 18 Oct 2022 10:10:00 +0000 (UTC) From: Vitaly Kuznetsov <vkuznets@redhat.com> To: kvm@vger.kernel.org, Paolo Bonzini <pbonzini@redhat.com> Cc: Sean Christopherson <seanjc@google.com>, Wanpeng Li <wanpengli@tencent.com>, Jim Mattson <jmattson@google.com>, Maxim Levitsky <mlevitsk@redhat.com>, linux-hyperv@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 0/4] KVM: VMX: nVMX: Make eVMCS enablement more robust Date: Tue, 18 Oct 2022 12:09:56 +0200 Message-Id: <20221018101000.934413-1-vkuznets@redhat.com> MIME-Version: 1.0 Content-Type: text/plain Content-Transfer-Encoding: 8bit X-Scanned-By: MIMEDefang 3.1 on 10.11.54.2 X-Spam-Status: No, score=-2.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_NONE autolearn=unavailable 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: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1747019989334059217?= X-GMAIL-MSGID: =?utf-8?q?1747019989334059217?= |
Series |
KVM: VMX: nVMX: Make eVMCS enablement more robust
|
|
Message
Vitaly Kuznetsov
Oct. 18, 2022, 10:09 a.m. UTC
This is a continuation of "KVM: VMX: Support updated eVMCSv1 revision + use vmcs_config for L1 VMX MSRs" work: https://lore.kernel.org/kvm/20220830133737.1539624-1-vkuznets@redhat.com/ and a preparation to enabling new eVMCS features for Hyper-V on KVM, namely nested TSC scaling. Future proof KVM against two scenarios: - nVMX: A new feature which doesn't have a corresponding eVMCSv1 field gets implemented in KVM but EVMCS1_UNSUPPORTED_* defines are left unchanged. - VMX: A new feature supported by KVM but currently missing in eVMCSv1 gets implemented in a future Hyper-V version breaking KVM. Note: 'vmx/evmcs.{c,h}' are renamed to 'vmx/hyperv.{c,h}' in https://lore.kernel.org/kvm/20221004123956.188909-7-vkuznets@redhat.com/ Vitaly Kuznetsov (4): KVM: nVMX: Sanitize primary processor-based VM-execution controls with eVMCS too KVM: nVMX: Invert 'unsupported by eVMCSv1' check KVM: nVMX: Prepare to sanitize tertiary execution controls with eVMCS KVM: VMX: Resurrect vmcs_conf sanitization for KVM-on-Hyper-V arch/x86/kvm/vmx/evmcs.c | 118 ++++++++++++++++++++++++++++++++------- arch/x86/kvm/vmx/evmcs.h | 93 +++++++++++++++++++++++++----- arch/x86/kvm/vmx/vmx.c | 5 ++ 3 files changed, 180 insertions(+), 36 deletions(-)