From patchwork Mon Dec 2 06:32:31 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tao Xu X-Patchwork-Id: 1202967 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=intel.com Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 47RFlC5p9rz9sPJ for ; Mon, 2 Dec 2019 17:36:55 +1100 (AEDT) Received: from localhost ([::1]:59576 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ibfKH-0003qy-Mk for incoming@patchwork.ozlabs.org; Mon, 02 Dec 2019 01:36:53 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:60204) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ibfGG-0006iq-SA for qemu-devel@nongnu.org; Mon, 02 Dec 2019 01:32:45 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ibfGF-00015y-O4 for qemu-devel@nongnu.org; Mon, 02 Dec 2019 01:32:44 -0500 Received: from mga07.intel.com ([134.134.136.100]:13274) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1ibfGF-00015V-Fa for qemu-devel@nongnu.org; Mon, 02 Dec 2019 01:32:43 -0500 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga001.jf.intel.com ([10.7.209.18]) by orsmga105.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 01 Dec 2019 22:32:42 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.69,268,1571727600"; d="scan'208";a="293301502" Received: from tao-optiplex-7060.sh.intel.com ([10.239.159.36]) by orsmga001.jf.intel.com with ESMTP; 01 Dec 2019 22:32:41 -0800 From: Tao Xu To: pbonzini@redhat.com, rth@twiddle.net, ehabkost@redhat.com Subject: [PATCH RESEND 2/4] target/i386: Remove monitor from some CPU models Date: Mon, 2 Dec 2019 14:32:31 +0800 Message-Id: <20191202063233.28523-3-tao3.xu@intel.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20191202063233.28523-1-tao3.xu@intel.com> References: <20191202063233.28523-1-tao3.xu@intel.com> MIME-Version: 1.0 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 134.134.136.100 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: tao3.xu@intel.com, qemu-devel@nongnu.org Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" 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=on" 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[] = { { /* end of list */ }, }, }, + { + .version = 3, + .props = (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[] = { CPUID_EXT3_ABM | CPUID_EXT3_SVM | CPUID_EXT3_LAHF_LM, .xlevel = 0x80000008, .model_id = "AMD Opteron 23xx (Gen 3 Class Opteron)", + .versions = (X86CPUVersionDefinition[]) { + { .version = 1 }, + { + .version = 2, + .props = (PropValue[]) { + { "monitor", "off" }, + { /* end of list */ }, + }, + }, + { /* end of list */ }, + }, }, { .name = "Opteron_G4", @@ -3856,6 +3875,14 @@ static X86CPUDefinition builtin_x86_defs[] = { { /* end of list */ } } }, + { + .version = 3, + .props = (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[] = { .xlevel = 0x8000001E, .model_id = "Hygon Dhyana Processor", .cache_info = &epyc_cache_info, + .versions = (X86CPUVersionDefinition[]) { + { .version = 1 }, + { + .version = 2, + .props = (PropValue[]) { + { "monitor", "off" }, + { /* end of list */ }, + }, + }, + { /* end of list */ }, + }, }, };