From patchwork Fri Apr 21 13:46:09 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Yang, Weijiang" X-Patchwork-Id: 13220378 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 7722BC77B7F for ; Fri, 21 Apr 2023 16:51:15 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233370AbjDUQvO (ORCPT ); Fri, 21 Apr 2023 12:51:14 -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 Precedence: bulk List-ID: X-Mailing-List: kvm@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[] = {