Received: by 2002:a05:6358:9144:b0:117:f937:c515 with SMTP id r4csp2516252rwr; Fri, 21 Apr 2023 09:53:57 -0700 (PDT) X-Google-Smtp-Source: AKy350afi5eKbBRAhD6DDweB3DFrDvT66DI+zA2K0dISJUGsIOJYjGOdofBnGRDoDBBOLv34jZj1 X-Received: by 2002:a05:6a00:230a:b0:63d:2d6a:47be with SMTP id h10-20020a056a00230a00b0063d2d6a47bemr6485617pfh.2.1682096036773; Fri, 21 Apr 2023 09:53:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1682096036; cv=none; d=google.com; s=arc-20160816; b=OVdFFvGTC6u9je0jKyNV8kwx64L6hJh7zuZlbj7cbiUDAAOHynLEFiIIcYo2FZPEX6 +EesWpl0yB/0mz3th9g0DeEVr01V5zEfrv4NBYewZgm20UiAtDfXR0MQopmXqQmPUDH/ lYq/lLvN5tjvHESrIyeB1WUuaPJhRBhlVzZByZBYln/TnY59gWC6WIvboW3wDNHCkLlc uXm+Aj1UO5ozytPbe1zCxen9arVUzHVC9WMaL1A+mms/RxEU7GDD1jSS9ElOrWmnMJom r66gs0UfLWoDVd+fi1Yo5SiCclvY020TvRCnCQ3RVGgV34OSl1G1rEx+ImrSQtOoDiyi j3Pg== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=16YuhyyA9G8hqNiF6c6umjqu0d919tnF4whWe2v4GLs=; b=juZuanrxUpvrfEiuMlxoMoLZ2dyU+jQa9AePv4azk5Fxu4+8s3mZLhdoQ/7c73+9Tl 1KdPdeF5uDrz3gI+O65e2pQ3UtWWN73Xto8/sw1uLjUX0PiHVfoc1K4KcLb2PQyybf86 agZFP0MhmpAHcL1gdLbqBE4/xWV+IeJWi9T52tfHeYaugZb0ROfIfBRlnKtQIhk2qQP/ /gcaHUVLsCE/cjUDx32bJ64uhmVNPKgFC5JEps/YFLD5CuzkY1lZyC8KcgoIQdy73tC4 iz5CrO9SoqfZXduGdOIpTrTYGwJIxptH3PGa50JnUkd8lCAcOyh9AvBoVD+O8yn5ROje gAWA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=iChbHomh; 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=intel.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id h190-20020a6253c7000000b0063b5e220edasi4526334pfb.400.2023.04.21.09.53.42; Fri, 21 Apr 2023 09:53:56 -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=@intel.com header.s=Intel header.b=iChbHomh; 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=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233439AbjDUQvf (ORCPT + 99 others); Fri, 21 Apr 2023 12:51:35 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57814 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233299AbjDUQvE (ORCPT ); Fri, 21 Apr 2023 12:51:04 -0400 Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4CFE115474; Fri, 21 Apr 2023 09:50:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1682095851; x=1713631851; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=/nWbrU0s+VgwW4b1cPKFggjfOPEJLo1z3uE/OMYi758=; b=iChbHomhOVRkU3I/k+WToTqsYhiKqymIk0QEocGqx34iX3RCHnD4IQhl mkO6Ft707YRrFDIcGsqFWVHyckQsqMEIoUrPTm9FQHj0QWKn+bnFc74g3 u0U7zZ/VvQmmAU8AmvJuL+q9biYzEQ2vfy7I40hUMCrqhHcNwetP5qPqI oiXbgmyFMJxknwXY0UFlLjYWw7Cp24XL4SDARIGh/Hgu2Fxej3OS85WHA Dlpm+sA9vD9loTAQGWnrXucnztrIWz78HORJDIJXjSdGGTd+uatNJfT8V mPBVDMgG+sXDDt1M2OsMkUgb7ewURKIoQwb36ldWVEkgvEB2F9npxjmSD w==; X-IronPort-AV: E=McAfee;i="6600,9927,10687"; a="344787048" X-IronPort-AV: E=Sophos;i="5.99,214,1677571200"; d="scan'208";a="344787048" Received: from orsmga008.jf.intel.com ([10.7.209.65]) by fmsmga104.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 21 Apr 2023 09:50:47 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10687"; a="722817409" X-IronPort-AV: E=Sophos;i="5.99,214,1677571200"; d="scan'208";a="722817409" Received: from embargo.jf.intel.com ([10.165.9.183]) by orsmga008-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 21 Apr 2023 09:50:44 -0700 From: Yang Weijiang To: seanjc@google.com, pbonzini@redhat.com, peterz@infradead.org, john.allen@amd.com, kvm@vger.kernel.org, linux-kernel@vger.kernel.org Cc: rick.p.edgecombe@intel.com, weijiang.yang@intel.com, Sean Christopherson Subject: [PATCH v2 15/21] KVM:x86: Report CET MSRs as to-be-saved if CET is supported Date: Fri, 21 Apr 2023 09:46:09 -0400 Message-Id: <20230421134615.62539-16-weijiang.yang@intel.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20230421134615.62539-1-weijiang.yang@intel.com> References: <20230421134615.62539-1-weijiang.yang@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DATE_IN_PAST_03_06, DKIMWL_WL_HIGH,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, RCVD_IN_DNSWL_MED,SPF_HELO_NONE,SPF_NONE,T_SCC_BODY_TEXT_LINE, URIBL_BLOCKED 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 Report all CET MSRs, including the synthetic GUEST_SSP MSR, as to-be-saved, e.g. for migration, if CET is supported by KVM. Co-developed-by: Sean Christopherson Signed-off-by: Sean Christopherson Signed-off-by: Yang Weijiang --- arch/x86/kvm/x86.c | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c index 7cd7f6755acd..95dba3c3df5f 100644 --- a/arch/x86/kvm/x86.c +++ b/arch/x86/kvm/x86.c @@ -1470,6 +1470,7 @@ static const u32 msrs_to_save_base[] = { MSR_IA32_XFD, MSR_IA32_XFD_ERR, MSR_IA32_XSS, + MSR_IA32_U_CET, MSR_IA32_PL3_SSP, MSR_KVM_GUEST_SSP, }; static const u32 msrs_to_save_pmu[] = { -- 2.27.0