From nobody Mon Feb 9 17:36:53 2026 Delivered-To: importer@patchew.org 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; Authentication-Results: mx.zohomail.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=fail(p=none dis=none) header.from=intel.com ARC-Seal: i=1; a=rsa-sha256; t=1575875677; cv=none; d=zohomail.com; s=zohoarc; b=XT1vvsqsjatv7kn8Xu7bScGd04UUocImKZAMsNlzY04jMyyTtac7pYrpCLYOkIWGZMq5K++4dkTJkrULSxCI0KbW0nGF6Pc7HFVr6s/RaufrpJwYylySquEOSQNlT9O+IhcGZ/OA452k/K0efQjQOwkN3hKrQ1v0W7KPv31yeas= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1575875677; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=uJO1xUf1o1HhVWLHs7sEf6swEL2WBqL590ssBk9Jx14=; b=lubDvl8wNN6i1J1GGuXVQsMB4zQBGcHIcNicDFX3j1VQLWyzbQS67IIrgYMU22TsPIR2xQdz7qwD8acAtgxPQyFhgL9rXdcGNNKCvQcfz0FECC0JJTQHrxbpFMMSv6H36XoPFQcOngIlvM7i4BnXdymdKgoVZULa7u4oNk9agz0= ARC-Authentication-Results: i=1; mx.zohomail.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=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 15758756768661011.2556512814797; Sun, 8 Dec 2019 23:14:36 -0800 (PST) Received: from localhost ([::1]:36778 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ieDFa-0003Xf-Rv for importer@patchew.org; Mon, 09 Dec 2019 02:14:34 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:44089) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ieDEH-0002G0-Gx for qemu-devel@nongnu.org; Mon, 09 Dec 2019 02:13:14 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ieDEG-0002k0-CT for qemu-devel@nongnu.org; Mon, 09 Dec 2019 02:13:13 -0500 Received: from mga11.intel.com ([192.55.52.93]:5958) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1ieDEG-0002eS-4i for qemu-devel@nongnu.org; Mon, 09 Dec 2019 02:13:12 -0500 Received: from orsmga007.jf.intel.com ([10.7.209.58]) by fmsmga102.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 08 Dec 2019 23:13:10 -0800 Received: from tao-optiplex-7060.sh.intel.com ([10.239.159.36]) by orsmga007.jf.intel.com with ESMTP; 08 Dec 2019 23:13:09 -0800 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.69,294,1571727600"; d="scan'208";a="202738820" From: Tao Xu To: ehabkost@redhat.com, pbonzini@redhat.com, rth@twiddle.net Subject: [PATCH v2 2/4] target/i386: Remove monitor from some CPU models Date: Mon, 9 Dec 2019 15:13:01 +0800 Message-Id: <20191209071303.24303-3-tao3.xu@intel.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20191209071303.24303-1-tao3.xu@intel.com> References: <20191209071303.24303-1-tao3.xu@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 192.55.52.93 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: qemu-devel@nongnu.org Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" Content-Type: text/plain; charset="utf-8" Add new version of Snowridge, Denverton, Opteron_G3, EPYC, and Dhyana CPU model to remove MONITOR/MWAIT feature. After QEMU/KVM use "-overcommit cpu-pm=3Don" to expose MONITOR/MWAIT (commit id 6f131f13e68d648a8e4f083c667ab1acd88ce4cd), the MONITOR/MWAIT feature in these CPU model is unused. Signed-off-by: Tao Xu --- target/i386/cpu.c | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) diff --git a/target/i386/cpu.c b/target/i386/cpu.c index 06a3077f95..b09ac38409 100644 --- a/target/i386/cpu.c +++ b/target/i386/cpu.c @@ -3621,6 +3621,14 @@ static X86CPUDefinition builtin_x86_defs[] =3D { { /* end of list */ }, }, }, + { + .version =3D 3, + .props =3D (PropValue[]) { + /* mpx was already removed by -v2 above */ + { "monitor", "off" }, + { /* end of list */ }, + }, + }, { /* end of list */ }, }, }, @@ -3732,6 +3740,17 @@ static X86CPUDefinition builtin_x86_defs[] =3D { CPUID_EXT3_ABM | CPUID_EXT3_SVM | CPUID_EXT3_LAHF_LM, .xlevel =3D 0x80000008, .model_id =3D "AMD Opteron 23xx (Gen 3 Class Opteron)", + .versions =3D (X86CPUVersionDefinition[]) { + { .version =3D 1 }, + { + .version =3D 2, + .props =3D (PropValue[]) { + { "monitor", "off" }, + { /* end of list */ }, + }, + }, + { /* end of list */ }, + }, }, { .name =3D "Opteron_G4", @@ -3856,6 +3875,14 @@ static X86CPUDefinition builtin_x86_defs[] =3D { { /* end of list */ } } }, + { + .version =3D 3, + .props =3D (PropValue[]) { + /* ibpb was already enabled by -v2 above */ + { "monitor", "off" }, + { /* end of list */ }, + }, + }, { /* end of list */ } } }, @@ -3908,6 +3935,17 @@ static X86CPUDefinition builtin_x86_defs[] =3D { .xlevel =3D 0x8000001E, .model_id =3D "Hygon Dhyana Processor", .cache_info =3D &epyc_cache_info, + .versions =3D (X86CPUVersionDefinition[]) { + { .version =3D 1 }, + { + .version =3D 2, + .props =3D (PropValue[]) { + { "monitor", "off" }, + { /* end of list */ }, + }, + }, + { /* end of list */ }, + }, }, }; =20 --=20 2.20.1