Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.18]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 459B827BF6C for ; Fri, 24 Oct 2025 06:35:48 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=192.198.163.18 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1761287749; cv=none; b=tcyQhkSDzZWAxUS72GYiHG2RS536syVlJE1JVaJyfdhnQLeuuQr8Q3HaH4csFcP4YAahL6qVX3SS1Ga4a8u+hyzStADABnV6A6xB3thsF3vfNUP9+NYal4dY2Vqg8b+j3tMjAtUUcnunJ+j6UnEMyrmGrv8mFtQNoSAnVEnu6Zk= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1761287749; c=relaxed/simple; bh=Y8zhy26akKwdW2BhI+hvLWp8vFtvjafeaMR+Q2ZDdtQ=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=rFVWAb5RlME8432Q6Qo5Bt8aZhqMdYX4HNCE+fFZ0Z+a6O3OcMFk0lkUDAoQPbJ/ulW5Sgf/HSJ5fZyaVgNUOUsRyyHRb50rKvZRJ4ARdtyLlcKY0eVFgkFFMwPSngdFjFDb62cwOHVPMaZSP0/WAwx6cTMyu2QDrEv4KleeRdQ= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com; spf=pass smtp.mailfrom=intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=dT2ASQrp; arc=none smtp.client-ip=192.198.163.18 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=intel.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="dT2ASQrp" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1761287748; x=1792823748; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=Y8zhy26akKwdW2BhI+hvLWp8vFtvjafeaMR+Q2ZDdtQ=; b=dT2ASQrpGMpPxW9RdEJNlvmncX6W9DJV9DjRuCGMe8pYgyP8e/+cZ/+n QiuqVzx1LfXoKRyavBCuSKm/jhT5cH0Fr/YdK5mKY6CdG3ygSl3deCKx6 2/UCfI9vQE5Z4vOVXujAtGUTDNC8mGo4YzzxtHeWhW5wL6vUKyursbD+C hpo/3tWyWePeLU9qg3EsVQLmC6ZXIYT6Zy46DJ0dgryHEb/jm5pHvvOnb sXfeYR4zehMBiwvxH/lKM08q2oEnkh/kcdDxGcq6/AtUHkvTaqi+EFWJD cO4s/oGTwwlcCSxsJM1pfci1CE5ANZLvI1f7sVn1DSRXKavtJ11PI38ep A==; X-CSE-ConnectionGUID: LhfRS9B+SKCwbXX13XeSZw== X-CSE-MsgGUID: c18Vjd5JQhmf793fXh3zXw== X-IronPort-AV: E=McAfee;i="6800,10657,11586"; a="62675705" X-IronPort-AV: E=Sophos;i="6.19,251,1754982000"; d="scan'208";a="62675705" Received: from fmviesa006.fm.intel.com ([10.60.135.146]) by fmvoesa112.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 23 Oct 2025 23:35:48 -0700 X-CSE-ConnectionGUID: h5zgwAcYRXCJymnotI8q0w== X-CSE-MsgGUID: xvT4b0YwQmyerxvlECQr1w== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.19,251,1754982000"; d="scan'208";a="184276147" Received: from liuzhao-optiplex-7080.sh.intel.com ([10.239.160.39]) by fmviesa006.fm.intel.com with ESMTP; 23 Oct 2025 23:35:45 -0700 From: Zhao Liu To: Paolo Bonzini , Marcelo Tosatti Cc: qemu-devel@nongnu.org, kvm@vger.kernel.org, Chao Gao , John Allen , Babu Moger , Mathias Krause , Dapeng Mi , Zide Chen , Chenyi Qiang , Xiaoyao Li , Farrah Chen , Zhao Liu Subject: [PATCH v3 18/20] i386/cpu: Enable cet-ss & cet-ibt for supported CPU models Date: Fri, 24 Oct 2025 14:56:30 +0800 Message-Id: <20251024065632.1448606-19-zhao1.liu@intel.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20251024065632.1448606-1-zhao1.liu@intel.com> References: <20251024065632.1448606-1-zhao1.liu@intel.com> Precedence: bulk X-Mailing-List: kvm@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Add new versioned CPU models for Sapphire Rapids, Sierra Forest, Granite Rapids and Clearwater Forest, to enable shadow stack and indirect branch tracking. Tested-by: Farrah Chen Signed-off-by: Zhao Liu --- target/i386/cpu.c | 44 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) diff --git a/target/i386/cpu.c b/target/i386/cpu.c index 9a1001c47891..73026d5bce91 100644 --- a/target/i386/cpu.c +++ b/target/i386/cpu.c @@ -5161,6 +5161,17 @@ static const X86CPUDefinition builtin_x86_defs[] = { { /* end of list */ }, } }, + { + .version = 5, + .note = "with cet-ss and cet-ibt", + .props = (PropValue[]) { + { "cet-ss", "on" }, + { "cet-ibt", "on" }, + { "vmx-exit-save-cet", "on" }, + { "vmx-entry-load-cet", "on" }, + { /* end of list */ }, + } + }, { /* end of list */ } } }, @@ -5323,6 +5334,17 @@ static const X86CPUDefinition builtin_x86_defs[] = { { /* end of list */ }, } }, + { + .version = 4, + .note = "with cet-ss and cet-ibt", + .props = (PropValue[]) { + { "cet-ss", "on" }, + { "cet-ibt", "on" }, + { "vmx-exit-save-cet", "on" }, + { "vmx-entry-load-cet", "on" }, + { /* end of list */ }, + } + }, { /* end of list */ }, }, }, @@ -5477,6 +5499,17 @@ static const X86CPUDefinition builtin_x86_defs[] = { { /* end of list */ }, } }, + { + .version = 4, + .note = "with cet-ss and cet-ibt", + .props = (PropValue[]) { + { "cet-ss", "on" }, + { "cet-ibt", "on" }, + { "vmx-exit-save-cet", "on" }, + { "vmx-entry-load-cet", "on" }, + { /* end of list */ }, + } + }, { /* end of list */ }, }, }, @@ -5612,6 +5645,17 @@ static const X86CPUDefinition builtin_x86_defs[] = { .model_id = "Intel Xeon Processor (ClearwaterForest)", .versions = (X86CPUVersionDefinition[]) { { .version = 1 }, + { + .version = 2, + .note = "with cet-ss and cet-ibt", + .props = (PropValue[]) { + { "cet-ss", "on" }, + { "cet-ibt", "on" }, + { "vmx-exit-save-cet", "on" }, + { "vmx-entry-load-cet", "on" }, + { /* end of list */ }, + } + }, { /* end of list */ }, }, }, -- 2.34.1