From nobody Tue Nov 26 03:44:39 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass header.i=@intel.com; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linux.intel.com ARC-Seal: i=1; a=rsa-sha256; t=1710341663; cv=none; d=zohomail.com; s=zohoarc; b=KTJkFVlqVTRhY+Fxig+IdZQEoOsFKp7JNYY71rBW1ZSc2Fx5+sGwXwhoG+3DB59Rq3EfMnK7BhzdwpajPfSKRO3XUmsqWJv+ighKVTrT9txE1XsLP1QhGEpSMSkoTDyjtWRzJwCgzk5eDHSuGTwlmmoZArG2klHHgZEwieoL+zk= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1710341663; h=Content-Type:Cc:Cc:Date:Date:From:From:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=eghmhqIX+q43dql2glutKAaSk+I02k6Bxr7VT28EqAI=; b=NojwaIrIcmYQop9jRhPNJigkoJVYhmoxBgqG74BcFo2IcS0rHOWRmEPTlVjBvHNnHs5bqy+kgAxRS2Tjuq319MB8KVcoZq4nJzva1u9IL2bLHdPY4ELhtwlR3/Fs1mFkW4FWam6TLfZQTy0t4z/Fbj/1dggHoPQj9Sd8bGitnWo= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass header.i=@intel.com; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1710341663891966.3635436868959; Wed, 13 Mar 2024 07:54:23 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rkPz5-00067w-CB; Wed, 13 Mar 2024 10:53:35 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rkPz1-00067j-JO for qemu-devel@nongnu.org; Wed, 13 Mar 2024 10:53:32 -0400 Received: from mgamail.intel.com ([192.198.163.9]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rkPyz-000281-LJ for qemu-devel@nongnu.org; Wed, 13 Mar 2024 10:53:31 -0400 Received: from orviesa009.jf.intel.com ([10.64.159.149]) by fmvoesa103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 13 Mar 2024 07:53:25 -0700 Received: from tnbowmax-mobl.amr.corp.intel.com (HELO desk) ([10.212.137.40]) by orviesa009-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 13 Mar 2024 07:53:25 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1710341609; x=1741877609; h=date:from:to:cc:subject:message-id:mime-version; bh=XOemtsi8vdmeDqBW+6o4uTJO0rOcvSG7dIYrpbWw3oQ=; b=ersHc6qC8QxdQpKZ6F/QcZMno28XYCoBuZpRMN5Ppz5YX5MMslZXHrSL 9yNokhVF5AocY61tggjospt4tkEZ9RpTWemrU7s+rMvwavyEvajiuLATT P9et2NqhOh3tPIRXdIHHvuJUhAgSd9EVNotvJ0SLdqmNxtnxuQbTofnqS pc3+4AUVFC14mGJD3Ysg6WgUOkMX/152u0sXUlTJiss58I55PrDxdmSOh 5CnGb0WAIaIDaM8EMjaFSK/sUPWw8h9lXe8A2n+c3+ODbPJUfBoIBKjlx YjzSFoI/RMHBRxx1QRmMVy51OjgqGhjSmDVf4n69gWElEYTVlGQICMc6u A==; X-IronPort-AV: E=McAfee;i="6600,9927,11011"; a="15834796" X-IronPort-AV: E=Sophos;i="6.07,122,1708416000"; d="scan'208";a="15834796" X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.07,122,1708416000"; d="scan'208";a="11981940" Date: Wed, 13 Mar 2024 07:53:23 -0700 From: Pawan Gupta To: qemu-devel@nongnu.org Cc: Paolo Bonzini , Chao Gao , antonio.gomez.iglesias@linux.intel.com, Daniel Sneddon Subject: [PATCH] target/i386: Export RFDS bit to guests Message-ID: <9a38877857392b5c2deae7e7db1b170d15510314.1710341348.git.pawan.kumar.gupta@linux.intel.com> MIME-Version: 1.0 Content-Disposition: inline Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: none client-ip=192.198.163.9; envelope-from=pawan.kumar.gupta@linux.intel.com; helo=mgamail.intel.com X-Spam_score_int: -4 X-Spam_score: -0.5 X-Spam_bar: / X-Spam_report: (-0.5 / 5.0 requ) AC_FROM_MANY_DOTS=2.497, BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.971, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_NONE=0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @intel.com) X-ZM-MESSAGEID: 1710341665904100003 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Register File Data Sampling (RFDS) is a CPU side-channel vulnerability that may expose stale register value. CPUs that set RFDS_NO bit in MSR IA32_ARCH_CAPABILITIES indicate that they are not vulnerable to RFDS. Similarly, RFDS_CLEAR indicates that CPU is affected by RFDS, and has the microcode to help mitigate RFDS. Make RFDS_CLEAR and RFDS_NO bits available to guests. Signed-off-by: Pawan Gupta Reviewed-by: Xiaoyao Li Reviewed-by: Zhao Liu --- target/i386/cpu.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/target/i386/cpu.c b/target/i386/cpu.c index 9a210d8d9290..693a5e0fb2ce 100644 --- a/target/i386/cpu.c +++ b/target/i386/cpu.c @@ -1158,8 +1158,8 @@ FeatureWordInfo feature_word_info[FEATURE_WORDS] =3D { NULL, "sbdr-ssdp-no", "fbsdp-no", "psdp-no", NULL, "fb-clear", NULL, NULL, NULL, NULL, NULL, NULL, - "pbrsb-no", NULL, "gds-no", NULL, - NULL, NULL, NULL, NULL, + "pbrsb-no", NULL, "gds-no", "rfds-no", + "rfds-clear", NULL, NULL, NULL, }, .msr =3D { .index =3D MSR_IA32_ARCH_CAPABILITIES, base-commit: a1932d7cd6507d4d9db2044a54731fff3e749bac --=20 2.34.1