Received: by 2002:a05:6358:9144:b0:117:f937:c515 with SMTP id r4csp8410010rwr; Thu, 11 May 2023 00:24:22 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ4I3DHa+OL197g68usVn87kaTV2LdXpcumAkotTVhJ7wLzZr8Jvd5NoOBdmxxSNuXBetM67 X-Received: by 2002:a05:6a21:3a8b:b0:f3:756e:e116 with SMTP id zv11-20020a056a213a8b00b000f3756ee116mr19857306pzb.38.1683789862491; Thu, 11 May 2023 00:24:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1683789862; cv=none; d=google.com; s=arc-20160816; b=AR+NR26vKuEXsReyvvuoNz0FLECCYb1G0DJEkPmw3H1dzYgmzqGqp0s3vhtg9eTwWm WKvPx7ZTpJSbo8wV3o1zLKG0lRCYxdY4TOerj2XXyJ/AT+u3tS5quxa0wEdhuuhjYiap 4DtNlgWVvvl904+U2rG9mQqvr6SagFry6oYtnFSGIJ3pw/M9BDnBOq+RWN9MJ9XNGyHO 5y6MxIXh4mqW2aTVTU5uebg+SXgM+5I84VJlY9RbN3uOIOnHTsRi7JBJ5rPN/Za3bk6A IufLpK8df/s9Z2NyadOecSYJrqACg4XcwMdagiZCWhP/ebBZw6BMs5NhPv8474gLrB38 hG1w== 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=NWFwfFUF4WImGv6dJsdLlaSp0hOVCVryoOZeERiWuUY=; b=s3w/ltrZHk9jqnpZUjooHtVQuCeKggAkPFwAAAtNg4mU2E42oBIQZO86c3qcj1U4bD fTgj6kMfRDa/WI5jIBzGvCBxl7GXx6ZmsVksSOvdSXgZ9af90sBWpdDqN392iwGItR96 uiHzPO2nliwOCWLZ2jy3q8DMoNFTErVlavVJuZLipoQ3pBQpjl+omvBTJDREVwtucCyh eno0SXz92Q6BiGomCPXlPqzxJ2IvubBbhfv7DcepS9J2QOvNvZQ5T3SCsJwVPJJul/UK HiIU+8SEj2vEZlREz/wbPdxYLE+RZWpmVU1lKegpAb/dUpfWbfBQ+DEcXyHWhUY/lQ// kLEg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=TrSPysq+; 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 i30-20020a63585e000000b0052856cec94asi6020098pgm.884.2023.05.11.00.24.08; Thu, 11 May 2023 00:24:22 -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=TrSPysq+; 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 S237598AbjEKHOf (ORCPT + 99 others); Thu, 11 May 2023 03:14:35 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48394 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237458AbjEKHOP (ORCPT ); Thu, 11 May 2023 03:14:15 -0400 Received: from mga18.intel.com (mga18.intel.com [134.134.136.126]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6DD9786A0; Thu, 11 May 2023 00:13:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1683789234; x=1715325234; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=zOQMasU7O3ApDraDZEqE3fWIuTTvJXbEyrdSDU+BbJk=; b=TrSPysq+plbHO0ctkh/DjDCKMamBQRloP1c4aHJ+Z/qHhWOAXIPaPjOo 0NIQZgQAzDDVDyHDfzIYP+Y1INE9g09uIgI9ep0RnQ00yTw4yICM1+lzn ItHOeYLirClPedGbNZlmkRnCvZhtNEnxk9gaLxwFrGUZunxU0E5a4Z2oH XSc/eguApjXjCcV4SycgJMGHX9egq9y44N9gp/995MU/+8+y83sgHLuFN VcCJKlTmZ3r2m3bnLQq3otDYUJYuwUmYG7uFsWcmA8g5lNGJxRgklld1o bCKsn7K65U9W1g93R8AgIoofKfFj8vzC3zp0NuuyrdN7VOL7ZQEc0kWNb Q==; X-IronPort-AV: E=McAfee;i="6600,9927,10706"; a="334896630" X-IronPort-AV: E=Sophos;i="5.99,266,1677571200"; d="scan'208";a="334896630" Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by orsmga106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 11 May 2023 00:13:34 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10706"; a="1029512360" X-IronPort-AV: E=Sophos;i="5.99,266,1677571200"; d="scan'208";a="1029512360" Received: from embargo.jf.intel.com ([10.165.9.183]) by fmsmga005-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 11 May 2023 00:13:23 -0700 From: Yang Weijiang To: seanjc@google.com, pbonzini@redhat.com, kvm@vger.kernel.org, linux-kernel@vger.kernel.org Cc: peterz@infradead.org, rppt@kernel.org, binbin.wu@linux.intel.com, rick.p.edgecombe@intel.com, weijiang.yang@intel.com, john.allen@amd.com, Sean Christopherson Subject: [PATCH v3 06/21] KVM:x86: Report XSS as to-be-saved if there are supported features Date: Thu, 11 May 2023 00:08:42 -0400 Message-Id: <20230511040857.6094-7-weijiang.yang@intel.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20230511040857.6094-1-weijiang.yang@intel.com> References: <20230511040857.6094-1-weijiang.yang@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-0.5 required=5.0 tests=BAYES_00,DATE_IN_PAST_03_06, DKIMWL_WL_HIGH,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, SPF_HELO_NONE,SPF_NONE,T_SCC_BODY_TEXT_LINE autolearn=no 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 From: Sean Christopherson Add MSR_IA32_XSS to the list of MSRs reported to userspace if supported_xss is non-zero, i.e. KVM supports at least one XSS based feature. 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 e7f78fe79b32..33a780fe820b 100644 --- a/arch/x86/kvm/x86.c +++ b/arch/x86/kvm/x86.c @@ -1454,6 +1454,7 @@ static const u32 msrs_to_save_base[] = { MSR_IA32_UMWAIT_CONTROL, MSR_IA32_XFD, MSR_IA32_XFD_ERR, + MSR_IA32_XSS, }; static const u32 msrs_to_save_pmu[] = { -- 2.27.0