Message ID | 1523402169-113351-10-git-send-email-babu.moger@amd.com |
---|---|
State | New |
Headers | show
Return-Path: <qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org> X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=nongnu.org (client-ip=2001:4830:134:3::11; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=<UNKNOWN>) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=amd.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=amdcloud.onmicrosoft.com header.i=@amdcloud.onmicrosoft.com header.b="dOS4V0q0"; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 40LNYt25spz9s1p for <incoming@patchwork.ozlabs.org>; Wed, 11 Apr 2018 09:25:06 +1000 (AEST) Received: from localhost ([::1]:54948 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from <qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org>) id 1f62dM-00024z-CU for incoming@patchwork.ozlabs.org; Tue, 10 Apr 2018 19:25:04 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:33821) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from <Babu.Moger@amd.com>) id 1f62V9-0003IL-KT for qemu-devel@nongnu.org; Tue, 10 Apr 2018 19:16:36 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from <Babu.Moger@amd.com>) id 1f62V6-0005jx-So for qemu-devel@nongnu.org; Tue, 10 Apr 2018 19:16:35 -0400 Received: from mail-by2nam01on0049.outbound.protection.outlook.com ([104.47.34.49]:54239 helo=NAM01-BY2-obe.outbound.protection.outlook.com) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from <Babu.Moger@amd.com>) id 1f62V6-0005jN-LR for qemu-devel@nongnu.org; Tue, 10 Apr 2018 19:16:32 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amdcloud.onmicrosoft.com; s=selector1-amd-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=vY4vPheSXj1Ng+3yJsTXKsCzUOZ4duddNHjMlbM+BYw=; b=dOS4V0q0mc2RzQOls+LLrIpcBxYDE8tuMjAMDl0ucWbQVnaVd19hvQAoovXSSCeyzBI4VmThlmMIrxaQBbpMQR+tV+hWDJbIzegxcpKBSLSshQjnO7MnOjovbCkdqpXMTFigqT9lORBOhjXuwE2PifBeFdVAI+ngEhE36Mc/HiU= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Babu.Moger@amd.com; Received: from linux-pyp0.amd.com (165.204.77.1) by CY4PR12MB1767.namprd12.prod.outlook.com (2603:10b6:903:122::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.653.12; Tue, 10 Apr 2018 23:16:30 +0000 From: Babu Moger <babu.moger@amd.com> To: mst@redhat.com, marcel@redhat.com, pbonzini@redhat.com, rth@twiddle.net, ehabkost@redhat.com, mtosatti@redhat.com Date: Tue, 10 Apr 2018 19:16:09 -0400 Message-Id: <1523402169-113351-10-git-send-email-babu.moger@amd.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1523402169-113351-1-git-send-email-babu.moger@amd.com> References: <1523402169-113351-1-git-send-email-babu.moger@amd.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [165.204.77.1] X-ClientProxiedBy: MWHPR2201CA0048.namprd22.prod.outlook.com (2603:10b6:301:16::22) To CY4PR12MB1767.namprd12.prod.outlook.com (2603:10b6:903:122::9) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(4652020)(5600026)(4534165)(4627221)(201703031133081)(201702281549075)(48565401081)(2017052603328)(7153060)(7193020); SRVR:CY4PR12MB1767; X-Microsoft-Exchange-Diagnostics: 1; CY4PR12MB1767; 3:mmU+7qtUW5c5ON97DA9SfW/rNiwgzAZJAlMKnUdM3hry+W/+uiNhSf9t1/6Uo88EIMBZ4EVvvNIfCquGLuPRlJ6shEG5rmPGCvrZBlbpp0Gue8S6C/baMtrutP/9wcVoK+xXZri1E5wYjZHzVIs3cg9ewSsaQiiy+db2eVEq9hhM4ItPOOQioDaVV7gbtN5ABc+uzIp3yO2HI6GbJ5QdP2rXLIP4yDJbSrFR5q2ZzWt6QjvCOG9lAFiHInXeI4uH; 25:cZkfvgNDMfx6EiBlsGRh/Q1d00q4wUuoulKT3hJzI2EbpPN/5WF0thd/ltHw6d+STGPmyC9sB3vLnLaAmXkUHkFzjthAQZ3q396ikQC54dYIbesvU5rSAq7WYhMvbirp4X39iVpe2c2U+f2XnclLloRTF4yLcv+Jz75SfE9cOB8soLg42Zq9QoNgol/X1obhtoRQ4vgL1gxbulef5Vo2Z6PwbmYi1dXMNHnTH7U1V54igZXyFpfnRxj+FX1nuTXsiHdWsy8zBpN7ZiruOj2TQAMECFAgvsUeRr4206sJ2QNyS/9EcoKLPxqUALHk+adaejd57+F9CnvqDQNJnDxo/g==; 31:4joFYAAimez0baSRvNCgZ9JVD3/sSkKzS+FMTlpAoJyjqCowd+bVlbJyLvB/C4eJqrMT3KzJNl07a6vo3QsHjCn4yebrMpPIYTXcuC2HHxmMHuWlw8K/NqhKWhJk9kDMV3nSHwwNXueUratuv/XwiZ3GcKpSCIWkyp+t98CliYhTBgWcaTXQrtpDo94AY4ee9MUyjBJtOYRWB9w8t6moFVt3eKGlpI6NQ0hkKdaGqlg= X-MS-TrafficTypeDiagnostic: CY4PR12MB1767: X-Microsoft-Exchange-Diagnostics: 1; CY4PR12MB1767; 20:MAYdO+tmj5tfWuVexcCaidy6QzXOD2oaotumAz6A8xcnMPA4CauwE7fEMS0tzSBb5a3Il+wXV96miWdIP31W3XL+PPsT+JjHmVCiGxmUp+m51lqyDNhbIpIZ5mVOnA4aPJMZJf4oeqKAw9TKqpTSuLsJpxc1xtg6TJHs/vwudslw+OnJ6xYU+IKddHomyKb5bzfEs7WhTh/d2g2qP7eXfFiwC/+vP1B8KAWwe9wJlYjrZh8sNoWPbdpkqWT0kSmehULPKAzLUA9KCJDx6KmYqCdSP+55rCKasHSatarqNfMaR/yr/waT2k3YCzTtCL/5OvHGcxbVGUVUYTBm8BEPd+B6+vF835p3JxUH+5xFFp0QFh3HB8n0OnYx8OT2kUPBDWmxHNMDvAtejNmIiltoW5Ji8HDWLEw6K3ExzDnDZrmSk3+PzAJT3PN29q/E8aXYGQpGd2izOGuF2arfF+C6cklm95BemQ/3Bm2bldZlNNdaIB82luEz5NJM2Va89zNi; 4:CCN/QHTMJB5irmC34hc5C/7RpMNL3NSL0qU4DQFP5sVveLeBmnt2kyDpIk+5ZE8Bq9+gf+RjMeGKE7aJVYwLtWt8G8TZgikSEFGpzvQYEeWVdq+fHs1E1JlpV04zJj5vK1CNklaMI/YMhPS8NowZnJ/ziI7vSk5pww72WhODZiwt26wqmht4oOfBJvxl052Ed8PThZLgwbOSlJvwJQCF5a6rhiqhuESmmHzzb3U/Tcfb8jz1R2dE+gPXUZz0prJN9o8cDZQSDuQzzoY6sQY4qnieDM78le6zXgTfGttbMkbeofLXbI4oZPyETYWANNb6 X-Microsoft-Antispam-PRVS: <CY4PR12MB176724265647F733D905289E95BE0@CY4PR12MB1767.namprd12.prod.outlook.com> X-Exchange-Antispam-Report-Test: UriScan:(767451399110); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(8211001083)(6040522)(2401047)(8121501046)(5005006)(93006095)(93001095)(3231221)(944501327)(52105095)(3002001)(10201501046)(6055026)(6041310)(20161123560045)(20161123564045)(20161123558120)(20161123562045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(6072148)(201708071742011); SRVR:CY4PR12MB1767; BCL:0; PCL:0; RULEID:; SRVR:CY4PR12MB1767; X-Forefront-PRVS: 0638FD5066 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(346002)(376002)(366004)(39860400002)(39380400002)(396003)(199004)(189003)(476003)(2906002)(52116002)(26005)(86362001)(50466002)(50226002)(305945005)(5660300001)(186003)(48376002)(7736002)(16526019)(6666003)(25786009)(6116002)(446003)(11346002)(105586002)(4720700003)(2616005)(6486002)(4326008)(956004)(3846002)(66066001)(53416004)(8936002)(386003)(72206003)(478600001)(316002)(16586007)(8676002)(81156014)(81166006)(59450400001)(97736004)(36756003)(47776003)(76176011)(106356001)(7416002)(7696005)(51416003)(68736007)(53936002)(486006)(41533002); DIR:OUT; SFP:1101; SCL:1; SRVR:CY4PR12MB1767; H:linux-pyp0.amd.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; A:1; MX:1; Received-SPF: None (protection.outlook.com: amd.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; CY4PR12MB1767; 23:meo0v4Y2KQ/1VL6Gvni5oqqQCsfUbf46DmPRDLSYA?= z3A6tpGA7BSMOjsaJVz5e8GP8p9l+VMeEc4AT1SyDTNU7Qw0fZVaEJ9XJjtMZ3eOracy5ESWXUN00CgStpsMUH6DsWYEAIMPVwce1eyTzfJwjcs6PgdVQSP/QCShWz+IVhnPDhSEqZ4hTV5auxRFcrr0Zgr7q0M1ohekpnofaPfjNtXxi8KmuZOo1rTdPn2Crh7ecIzcVbhaJiXd6T3w2nldJxCr1mPZTym6Q6UGNu0m2W6ZNpqaNUhF7XKWSlBpFrNsqDYB0WbP7U2HeOP5zdHuOpL1KqmeJ7VOR7CSg5PMtYtVt0z+0lRIhmbxtT+CQ6bDkgzXhNDAdQm87kaxaLjiDksT14o/RxZzmW98s8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co1FRb9Cl42mvNU5C2lDpL405DBBCQU8qOEOxFuSZeNemA8Ay5zfktOlkaGQag3R3NEtniXaRY; 20:fImGeiDqHCUoR7yw22CccesITUxD3BgUcd7uY9+x2H4e79XOdTlgq46yX4r1qQ8Q7uBpTa5Fsj9V9lXOTzJGVp5TlW+8HO8AUa3DCt85LaXFxnZRQoSlh4HX7rOyi+NITU99AComEDIvixemAZ3QBpK2HvJ+bcU5jq34PK96lzSTDSq8HIA73kea95vdP9wvUXsGidF4yQy7G0Fx+4zfTMXRAvzWFQtqqfJOwBmPbLw/sjgXQMvf6rSUqGIrrIVk X-MS-Office365-Filtering-Correlation-Id: a17bc69d-5b29-4860-ac84-08d59f391841 X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 10 Apr 2018 23:16:30.1390 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: a17bc69d-5b29-4860-ac84-08d59f391841 X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY4PR12MB1767 X-detected-operating-system: by eggs.gnu.org: Windows 7 or 8 [fuzzy] X-Received-From: 104.47.34.49 Subject: [Qemu-devel] [PATCH v6 9/9] i386: Remove generic SMT thread check X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: <qemu-devel.nongnu.org> List-Unsubscribe: <https://lists.nongnu.org/mailman/options/qemu-devel>, <mailto:qemu-devel-request@nongnu.org?subject=unsubscribe> List-Archive: <http://lists.nongnu.org/archive/html/qemu-devel/> List-Post: <mailto:qemu-devel@nongnu.org> List-Help: <mailto:qemu-devel-request@nongnu.org?subject=help> List-Subscribe: <https://lists.nongnu.org/mailman/listinfo/qemu-devel>, <mailto:qemu-devel-request@nongnu.org?subject=subscribe> Cc: geoff@hostfission.com, babu.moger@amd.com, kash@tripleback.net, qemu-devel@nongnu.org, kvm@vger.kernel.org Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" <qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org> |
Series |
i386: Enable TOPOEXT to support hyperthreading on AMD CPU
|
expand
|
diff --git a/target/i386/cpu.c b/target/i386/cpu.c index bfe24b9..077364a 100644 --- a/target/i386/cpu.c +++ b/target/i386/cpu.c @@ -4822,17 +4822,20 @@ static void x86_cpu_realizefn(DeviceState *dev, Error **errp) qemu_init_vcpu(cs); - /* Only Intel CPUs support hyperthreading. Even though QEMU fixes this - * issue by adjusting CPUID_0000_0001_EBX and CPUID_8000_0008_ECX - * based on inputs (sockets,cores,threads), it is still better to gives + /* Most Intel and certain AMD CPUs support hyperthreading. Even though QEMU + * fixes this issue by adjusting CPUID_0000_0001_EBX and CPUID_8000_0008_ECX + * based on inputs (sockets,cores,threads), it is still better to give * users a warning. * * NOTE: the following code has to follow qemu_init_vcpu(). Otherwise * cs->nr_threads hasn't be populated yet and the checking is incorrect. */ - if (!IS_INTEL_CPU(env) && cs->nr_threads > 1 && !ht_warned) { - error_report("AMD CPU doesn't support hyperthreading. Please configure" - " -smp options properly."); + if (IS_AMD_CPU(env) && + !(env->features[FEAT_8000_0001_ECX] & CPUID_EXT3_TOPOEXT) && + cs->nr_threads > 1 && !ht_warned) { + error_report("This family of AMD CPU doesn't support " + "hyperthreading. Please configure -smp " + "options properly."); ht_warned = true; }