From nobody Tue Apr 30 05:56:30 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.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 (zoho.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=1573806924; cv=none; d=zoho.com; s=zohoarc; b=IkC4iiWL8igddNRXOneyfyOkPYyQ/dsgCIlv0bzG4jvQvGdaxSgLppuOeybsto5/H1tk1+isgWgHwBWDmO8mCpKhQ8bbxsciRau/PQ9MiUpB7PKp8QGXd8Emiepbv3A4Xolm6v4KT0qU5kZqy7rnxO0bylSdPQGSGeWcatBB9ss= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1573806924; h=Content-Transfer-Encoding:Cc:Date:From:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:To; bh=At9k4y1oHkRBugUQC1x1Ikei1kmQnJAFpOV+lUtr56c=; b=SljbECWIeOBORTJ0Ft5HnvVh7XcSaS6174IJ5VsXCSr/rNKb4JZq0kHy/mIb/xjaZ3eh2DJwaYKvy5ZPrzr+fHc2D/tbRcSRLmouwiPGd06LASU/HQo+5kbk2Jb6K5lmKFF6yQySaZJ6Kt9TE+TI6dlVXru9QoK3+wJih6NRS4k= ARC-Authentication-Results: i=1; mx.zoho.com; spf=pass (zoho.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 1573806924616107.78483461980568; Fri, 15 Nov 2019 00:35:24 -0800 (PST) Received: from localhost ([::1]:36660 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iVX4d-0007Vd-7a for importer@patchew.org; Fri, 15 Nov 2019 03:35:23 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:43647) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iVX3J-0006Vd-Ke for qemu-devel@nongnu.org; Fri, 15 Nov 2019 03:34:02 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iVX3H-0000tR-NG for qemu-devel@nongnu.org; Fri, 15 Nov 2019 03:34:00 -0500 Received: from mga05.intel.com ([192.55.52.43]:38727) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1iVX3H-0000sI-Dr for qemu-devel@nongnu.org; Fri, 15 Nov 2019 03:33:59 -0500 Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by fmsmga105.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 15 Nov 2019 00:33:55 -0800 Received: from tao-optiplex-7060.sh.intel.com ([10.239.159.36]) by fmsmga004.fm.intel.com with ESMTP; 15 Nov 2019 00:33:54 -0800 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.68,307,1569308400"; d="scan'208";a="230390059" From: Tao Xu To: pbonzini@redhat.com, rth@twiddle.net, ehabkost@redhat.com Subject: [PATCH] target/i386: Remove monitor from some CPU model Date: Fri, 15 Nov 2019 16:33:45 +0800 Message-Id: <20191115083345.22638-1-tao3.xu@intel.com> X-Mailer: git-send-email 2.20.1 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.43 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: Tao Xu , 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 | 58 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 58 insertions(+) diff --git a/target/i386/cpu.c b/target/i386/cpu.c index a624163ac2..7c5f1e8fe0 100644 --- a/target/i386/cpu.c +++ b/target/i386/cpu.c @@ -2770,6 +2770,19 @@ static X86CPUDefinition builtin_x86_defs[] =3D { MSR_ARCH_CAP_RDCL_NO | MSR_ARCH_CAP_SKIP_L1DFL_VMENTRY, .xlevel =3D 0x80000008, .model_id =3D "Intel Atom Processor (Denverton)", + .versions =3D (X86CPUVersionDefinition[]) { + { .version =3D 1 }, + { + .version =3D 2, + .props =3D (PropValue[]) { + { "monitor", "off" }, + { "model-id", + "Intel Atom Processor (Denverton, no MONITOR)" }, + { /* end of list */ }, + }, + }, + { /* end of list */ }, + }, }, { .name =3D "Snowridge", @@ -2850,6 +2863,16 @@ static X86CPUDefinition builtin_x86_defs[] =3D { { /* end of list */ }, }, }, + { + .version =3D 3, + .props =3D (PropValue[]) { + /* mpx was already removed by -v2 above */ + { "monitor", "off" }, + { "model-id", + "Intel Atom Processor (Snowridge, no MPX, no MONITOR= )" }, + { /* end of list */ }, + }, + }, { /* end of list */ }, }, }, @@ -2961,6 +2984,19 @@ 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" }, + { "model-id", + "AMD Opteron 23xx (Gen 3 Class Opteron, no MONITOR)"= }, + { /* end of list */ }, + }, + }, + { /* end of list */ }, + }, }, { .name =3D "Opteron_G4", @@ -3085,6 +3121,16 @@ static X86CPUDefinition builtin_x86_defs[] =3D { { /* end of list */ } } }, + { + .version =3D 3, + .props =3D (PropValue[]) { + /* ibpb was already enabled by -v2 above */ + { "monitor", "off" }, + { "model-id", + "AMD EPYC Processor (with IBPB, no MONITOR)" }, + { /* end of list */ }, + }, + }, { /* end of list */ } } }, @@ -3137,6 +3183,18 @@ 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" }, + { "model-id", "Hygon Dhyana Processor (no MONITOR)" }, + { /* end of list */ }, + }, + }, + { /* end of list */ }, + }, }, }; =20 --=20 2.20.1