From nobody Wed Mar 5 18:12:57 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=1741068236; cv=none; d=zohomail.com; s=zohoarc; b=W+0gquD/IWBJ6B0k2A18/mwxcSyM5LD76I4L5rqq83dQulZeYhuJSVX9cCmKktw9PHG4UvQPrm/7a2UfOovFWgNqLOCHkNDBNHagaWOGD9kA+AWy4Sqy1OyjmuSZ0osLIIRLO/pJUM6gtmlEW914mEmL0RRfkuU59hAGP7LRCu8= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1741068236; 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=Pa5RnQIJGQ48sbKQ1Mc50Fh9Es2cn+SyoZoB3gCJjpE=; b=C+X3po/SdETZvgM16tXAckRQMVR4H4SiEXfag20knmRBAcfRgm2cIJo7rgEbNyIk0T50Uvndce+YaR1pp02JZQ+HOudvBJlUj2h5fNjGdrswlyhYbguVKgBFHBYMJqRZFr1BwRu+kYPPvNQzvMBgMrbR/X1i1zBmIQFCJtts/IU= 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 1741068236560993.3901324343136; Mon, 3 Mar 2025 22:03:56 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tpLMr-00061w-1V; Tue, 04 Mar 2025 01:03:02 -0500 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 1tpLMa-00060x-GC for qemu-devel@nongnu.org; Tue, 04 Mar 2025 01:02:45 -0500 Received: from mgamail.intel.com ([192.198.163.8]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tpLMX-0001L0-UU for qemu-devel@nongnu.org; Tue, 04 Mar 2025 01:02:43 -0500 Received: from orviesa010.jf.intel.com ([10.64.159.150]) by fmvoesa102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 03 Mar 2025 22:02:33 -0800 Received: from lxy-clx-4s.sh.intel.com ([10.239.48.52]) by orviesa010.jf.intel.com with ESMTP; 03 Mar 2025 22:02:30 -0800 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1741068162; x=1772604162; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=Royr0YQHx4K+3ITmwcIeH6IdEhVwMH0jLDn8bMuDm0A=; b=f5N8RZhetFlKph0LrygIcMmB8P/IluUSmwIbQ+/iDx+BOqTBchCIQTmR NnuKMOZc0Sn7gv1n0+DAhiaraG7sdnzSNDjXM7fAo6BkDpi+C/tAZpHQR 29mZUyOd7+aSphMvObH4i2Ojm1dLwjF9H2KPtDQMqRdB/7kOiLBBQRTUT 9vAsDbyUFcOdbR+rg7LMljT0D0vFR77big9gbqQrbfEw4j7NN3YrSfzpS G9OQ5pwQTHO8mf4xcAe3Z5NwtgZOOwpbMrEy0G5FxU8XgbtXPAaI8WXn7 7DQ+CxvtGYUWJSsPV7qySj/K7kwZbYujfPfOFLQ2/OenFvS9OlUsoxfQW A==; X-CSE-ConnectionGUID: RVT3XW/9QxKmmN2KfJyQHQ== X-CSE-MsgGUID: nc1zBR6eSMeqz3arN1O/dw== X-IronPort-AV: E=McAfee;i="6700,10204,11362"; a="59519171" X-IronPort-AV: E=Sophos;i="6.13,331,1732608000"; d="scan'208";a="59519171" X-CSE-ConnectionGUID: AkjU4NFsRV2s1v8gWNZ/yg== X-CSE-MsgGUID: hg9QiAEEQemHlsUm+m74jA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.12,224,1728975600"; d="scan'208";a="118132372" From: Xiaoyao Li To: Paolo Bonzini Cc: Zhao Liu , qemu-devel@nongnu.org, Xiaoyao Li , Dongli Zhang Subject: [PATCH 2/2] i386/cpu: Warn about why CPUID_EXT_PDCM is not available Date: Tue, 4 Mar 2025 00:24:50 -0500 Message-Id: <20250304052450.465445-3-xiaoyao.li@intel.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20250304052450.465445-1-xiaoyao.li@intel.com> References: <20250304052450.465445-1-xiaoyao.li@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.8; envelope-from=xiaoyao.li@intel.com; helo=mgamail.intel.com X-Spam_score_int: -33 X-Spam_score: -3.4 X-Spam_bar: --- X-Spam_report: (-3.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, HK_RANDOM_ENVFROM=0.001, HK_RANDOM_FROM=0.998, RCVD_IN_DNSWL_MED=-2.3, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED=0.001, RCVD_IN_VALIDITY_RPBL_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: 1741068240490019100 Content-Type: text/plain; charset="utf-8" When user requests PDCM explicitly via "+pdcm" without PMU enabled, emit a warning to inform the user. Signed-off-by: Xiaoyao Li --- target/i386/cpu.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/target/i386/cpu.c b/target/i386/cpu.c index 2bf6495140a0..2aa2bab12100 100644 --- a/target/i386/cpu.c +++ b/target/i386/cpu.c @@ -7682,6 +7682,9 @@ void x86_cpu_expand_features(X86CPU *cpu, Error **err= p) } =20 if (!cpu->enable_pmu) { + mark_unavailable_features(cpu, FEAT_1_ECX, + env->user_features[FEAT_1_ECX] & CPUID_E= XT_PDCM, + "This feature is not available due to PM= U disabled"); env->features[FEAT_1_ECX] &=3D ~CPUID_EXT_PDCM; } =20 --=20 2.34.1