From nobody Fri Dec 19 16:03:34 2025 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=intel.com ARC-Seal: i=1; a=rsa-sha256; t=1750995056; cv=none; d=zohomail.com; s=zohoarc; b=lA1cRE5V3/CXfJqRjGXfyySE9o+efCMGMsHs3aRGcw4l5bD4Ptq/9HfUWExBnvAk+411vpGGIosWRTyrLxcWeqlRe3hTS6B+1hwve/0Wxi6p1qNbvH5ir6Mhcl41IxtFcj8qUM9APEpLQDqaY7c1uo1lBX+AItmBoSMeBWxhM5w= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1750995056; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=Ok0lXr/PjP8h0VI0YZnOxmy2AeOAO7wDKJKAvv0wyf8=; b=UJdbZd3UFnCHR4j3uOKkOHh66BAoz0+IaPpoQMGdjfhaaB3rCrUuBKLa4Y+90rRsICHiRl9wz+zqcXaeTIaAZiQVfO5YkkGTadJGMhPhncXkxdVFaNRqlpU7OGZS3ACk+SYPjQMHGpG97JM8oIs1Z5rVn+uWPpoMLHotLR5g5RA= 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 1750995056829112.87589247563972; Thu, 26 Jun 2025 20:30:56 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1uUznB-0002gl-EY; Thu, 26 Jun 2025 23:30:21 -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 1uUzn8-0002g3-Pv for qemu-devel@nongnu.org; Thu, 26 Jun 2025 23:30:18 -0400 Received: from mgamail.intel.com ([192.198.163.17]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1uUzn6-0007SZ-OU for qemu-devel@nongnu.org; Thu, 26 Jun 2025 23:30:18 -0400 Received: from orviesa003.jf.intel.com ([10.64.159.143]) by fmvoesa111.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 26 Jun 2025 20:30:15 -0700 Received: from liuzhao-optiplex-7080.sh.intel.com ([10.239.160.39]) by orviesa003.jf.intel.com with ESMTP; 26 Jun 2025 20:30:13 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1750995017; x=1782531017; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=aVTkAGWI/2ZaKLWpgm+xpYMqxlxfusnFITw89gyWokU=; b=RR1tVGNvklHe4lZRwtXMeAkdNeROlIdehCJmIyBqrSdJ4Pw9mlahN9sQ chi5mxEbc9DlCsiyS4ZHEbv2vpYfYrxbA7hgFuJ/yMDbzFEHdgG0Z2+N1 THbpo5ZJ6IYRKhIB1ntXSvt1cfuK+ddF/fwR5WNmwSDH6XpRxdZ2kOC1N /C5kXlbWlalNin2iUxsraEzHCyRn6OGugWHlBSO0S9U39Ms36OmtTXMp0 CBS9jTDyW+r2p/lVbcSqglH4jH9yHiUnZrVUwU9C6cFCAB8KLFEhGQwUo ZsX1oOn9X2ApCLQ1sChkUFPkeAjoDEBouV+ZO5OB5FkbvWK/dpXnd+c1S w==; X-CSE-ConnectionGUID: 6HbzFv/oQd6lAIRWzhq8fw== X-CSE-MsgGUID: 7ZJ/u1uuR8+zJCDuvXLpiA== X-IronPort-AV: E=McAfee;i="6800,10657,11476"; a="53247135" X-IronPort-AV: E=Sophos;i="6.16,269,1744095600"; d="scan'208";a="53247135" X-CSE-ConnectionGUID: tmkYkKvMSgSoCJlVrioU+w== X-CSE-MsgGUID: WFO+GGajRPGIvOEnNJPuiw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.16,269,1744095600"; d="scan'208";a="157084629" From: Zhao Liu To: Paolo Bonzini , =?UTF-8?q?Daniel=20P=20=2E=20Berrang=C3=A9?= , Igor Mammedov Cc: Ewan Hai , Xiaoyao Li , Tao Su , Yi Lai , Dapeng Mi , qemu-devel@nongnu.org, Zhao Liu Subject: [PATCH 1/4] i386/cpu: Mark EBX/ECX/EDX in CPUID 0x80000000 leaf as reserved for Intel Date: Fri, 27 Jun 2025 11:51:26 +0800 Message-Id: <20250627035129.2755537-2-zhao1.liu@intel.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20250627035129.2755537-1-zhao1.liu@intel.com> References: <20250627035129.2755537-1-zhao1.liu@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable 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: pass client-ip=192.198.163.17; envelope-from=zhao1.liu@intel.com; helo=mgamail.intel.com X-Spam_score_int: -43 X-Spam_score: -4.4 X-Spam_bar: ---- X-Spam_report: (-4.4 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_MED=-2.3, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, RCVD_IN_VALIDITY_SAFE_BLOCKED=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham 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: 1750995057313116600 Content-Type: text/plain; charset="utf-8" Per SDM, 80000000H EAX Maximum Input Value for Extended Function CPUID Information. EBX Reserved. ECX Reserved. EDX Reserved. EBX/ECX/EDX in CPUID 0x80000000 leaf are reserved. Intel is using 0x0 leaf to encode vendor. Signed-off-by: Zhao Liu --- target/i386/cpu.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/target/i386/cpu.c b/target/i386/cpu.c index c7f157a0f71c..867e08236540 100644 --- a/target/i386/cpu.c +++ b/target/i386/cpu.c @@ -8280,9 +8280,14 @@ void cpu_x86_cpuid(CPUX86State *env, uint32_t index,= uint32_t count, break; case 0x80000000: *eax =3D env->cpuid_xlevel; - *ebx =3D env->cpuid_vendor1; - *edx =3D env->cpuid_vendor2; - *ecx =3D env->cpuid_vendor3; + + if (cpu->vendor_cpuid_only_v2 && IS_INTEL_CPU(env)) { + *ebx =3D *ecx =3D *edx =3D 0; + } else { + *ebx =3D env->cpuid_vendor1; + *edx =3D env->cpuid_vendor2; + *ecx =3D env->cpuid_vendor3; + } break; case 0x80000001: *eax =3D env->cpuid_version; --=20 2.34.1