Message ID | 20180514164156.27034-8-babu.moger@amd.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show
Return-Path: <kvm-owner@kernel.org> Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 1A7F060536 for <patchwork-kvm@patchwork.kernel.org>; Mon, 14 May 2018 16:42:41 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 0BDAF28390 for <patchwork-kvm@patchwork.kernel.org>; Mon, 14 May 2018 16:42:41 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id F3B17283AD; Mon, 14 May 2018 16:42:40 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 5BAC428390 for <patchwork-kvm@patchwork.kernel.org>; Mon, 14 May 2018 16:42:40 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932280AbeENQmi (ORCPT <rfc822;patchwork-kvm@patchwork.kernel.org>); Mon, 14 May 2018 12:42:38 -0400 Received: from mail-cys01nam02on0080.outbound.protection.outlook.com ([104.47.37.80]:44837 "EHLO NAM02-CY1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S932279AbeENQmZ (ORCPT <rfc822;kvm@vger.kernel.org>); Mon, 14 May 2018 12:42:25 -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=BMMw2VG20dHyh71QL6uVY6qbMQv9bnL4ziepHFw0JjM=; b=0OfwtJ9npYNlE/VlPliU7E5OXh0nQaBfZuD0a5JGflS1nykt23Y1qq6nQM6IM+6igzKLJGdW4v8mVfFywR/yIAdDBA2nsUXt4d2b7hZwUKiaZZNf8dbLWSKkJ9yyZeJ0FXYvZksrVSkMkhFOpB8tJchRyYuYkhqPmSSEbCJITvo= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Babu.Moger@amd.com; Received: from bmoger-ubuntu.amd.com (165.204.78.1) by MW2PR12MB2476.namprd12.prod.outlook.com (2603:10b6:907:9::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.755.16; Mon, 14 May 2018 16:42:21 +0000 From: Babu Moger <babu.moger@amd.com> To: mst@redhat.com, marcel.apfelbaum@gmail.com, pbonzini@redhat.com, rth@twiddle.net, ehabkost@redhat.com, mtosatti@redhat.com Cc: qemu-devel@nongnu.org, kvm@vger.kernel.org, geoff@hostfission.com, kash@tripleback.net, babu.moger@amd.com Subject: [PATCH v9 7/7] i386: Remove generic SMT thread check Date: Mon, 14 May 2018 11:41:56 -0500 Message-Id: <20180514164156.27034-8-babu.moger@amd.com> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20180514164156.27034-1-babu.moger@amd.com> References: <20180514164156.27034-1-babu.moger@amd.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [165.204.78.1] X-ClientProxiedBy: SN4PR0701CA0008.namprd07.prod.outlook.com (2603:10b6:803:28::18) To MW2PR12MB2476.namprd12.prod.outlook.com (2603:10b6:907:9::15) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(4652020)(5600026)(48565401081)(4534165)(4627221)(201703031133081)(201702281549075)(2017052603328)(7153060)(7193020); SRVR:MW2PR12MB2476; X-Microsoft-Exchange-Diagnostics: 1; MW2PR12MB2476; 3:nfWXUf1qLCdDCFZeoq+neeDTTQKKXVqGKAO8Nv99x3bG3XWfdU0k+IbpmQxki08asiN+fUiEQ4Y3v8N6tI0J7t0iVhP/0ijrTLBiKnB9Tw8MNQyf+bBTUQwFceEM6EMbEjiEkLv+aJvxGpxjE4noM8m699BWYUl5Kxs5XgntlLO0rgCuILdA4+i9PX6Tb1Os+pWfOCdYibMWuEeKhmuUAx/JfAhvMgyoDuexUhBvAinacWODvcjVmrag3tsf0hwI; 25:CsvQ5bziWALGopwKlEruyW3iPRhRWSZxSTJYulWzrj2aS1XuWyRpQbNJQk2ncqHq9/f1ui835zUsR2EBMxT9dM1RD7w5G8lBFrujxDzLRbQaKLKRlWfTV57YIVUbg/qeRLih0urnW1ZL7gnaCP0Q9syHriZl2dv190lDDg3Fno/UaZ2bFeZ634XdSBldRglgFtnUjWr6honpVHuripEl0d/Qf6rrik7my+RrStBuAwEPMUfn6LMkWndyvK+tGTVardi5JLSxILwQvhKYj8JdqPzhPl9aQeJ9kWgBapaiD8I8+gjWnjl/w5wxCTzpj60QK5qr3V1lkyVDwj6iPCgkNA==; 31:DAt2o+AxgxnUyvmc9G0yJZwgdprXKJZNjxzla8T0UD2TQnPzA7JX4lA80/HpZXFoD7A5yJEqvkAGD+QJTS8wq10u0KNSTK5n6tT/bdxUlVpmtRZB6rBaFwARNZ32QDXfqjlttxzbOKVfAci7MW+iPy4e+7hddWI5gkdstowyB9RQTJpvJocJZOXqHB3lP9J47U3Fvwc8XDu1ToCLJEIJ6FE+JWgzP8bd1fjA2hr8rWw= X-MS-TrafficTypeDiagnostic: MW2PR12MB2476: X-Microsoft-Exchange-Diagnostics: 1; MW2PR12MB2476; 20:F/NhhiB7vT4lMhu6r8kila0DTyOKAMyj0/7eCMrKKhn8T7R/oiKCN9Qj9uB+kgfR750tNXd5ziPTc+kkYsstH2bJgaOL2JS1cYYCkPqB1k4lnlTPzhOIcqtkHSy6vUVheVXVkFr7n/RPgicDoMiFEaPdqS+SdlV80/oNnYjJ2z2lzrnbsJSxIuE0ZfZxU+u7a3VjALbNHwXoaqUB18URWVSO7ElQ2YLILt/rbLfUJUYiG+WlNHwcEtxlM/wycKExq+QjWAJqNr8Bb/DSVUB/D24GGZiZySQLivNTl6vMweBf7SBvQAmnWE8PJJ7tQprEqOEPrDuU32HPW42xSUA7UrUJj+z9yH3E5KOoIz692eps8gHzsXG1wQULO7VBdMI5kmIvljfGyPV4RCyBFWQGyzubcTnwzmOXMPFGyfgbZrSDiNQq6xmaOD7jabtB8jmXFXQFsFZtn6fE9o0IgLIlMCe5Rm/QdLF2jpDuMo4xZ7kEacc0SCw9RI7UV+ijNX6K; 4:QkiaYUDPld/mpm/3PxOUrgafEtOdwTSszpgqcPDRP3s/niGAp3H4gCSzvJz2vQGey2Fs7P7hp6qDIi3rcmAgI474DcClGBh0saIZcIgvfp77Opxo2m6CHwZyxeSRzBx5ykT5TRh9XUinB1DoN99rmydIH/iKnVTbQZWsbctPfV4wQe0zHjlhJmn0UCx7wSsVoEJEQj6pcvt0/z7qxtgE2edwY0hr907OWcB4rEjR7Rk/pgU/YbnNQwe/NyO1h1Xj5dg4FAhgsIfcoQsaQmJUQZvtAajf813Zf9PNL4VsM4UHAgNyt/nQI83QKJRlJvym X-Microsoft-Antispam-PRVS: <MW2PR12MB24762E84D14184E4728B5D33959C0@MW2PR12MB2476.namprd12.prod.outlook.com> X-Exchange-Antispam-Report-Test: UriScan:(767451399110); X-MS-Exchange-SenderADCheck: 1 X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(8211001083)(6040522)(2401047)(5005006)(8121501046)(3231254)(944501410)(52105095)(93006095)(93001095)(3002001)(10201501046)(6055026)(149027)(150027)(6041310)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123558120)(20161123562045)(20161123564045)(20161123560045)(6072148)(201708071742011); SRVR:MW2PR12MB2476; BCL:0; PCL:0; RULEID:; SRVR:MW2PR12MB2476; X-Forefront-PRVS: 067270ECAF X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(39380400002)(39860400002)(396003)(346002)(376002)(366004)(199004)(189003)(50226002)(53936002)(50466002)(8936002)(8676002)(39060400002)(48376002)(2616005)(486006)(476003)(305945005)(25786009)(7736002)(6666003)(446003)(11346002)(956004)(59450400001)(5660300001)(76176011)(186003)(36756003)(86362001)(575784001)(16526019)(81166006)(26005)(4326008)(386003)(81156014)(7416002)(106356001)(53416004)(72206003)(97736004)(316002)(47776003)(478600001)(105586002)(51416003)(68736007)(6116002)(3846002)(16586007)(2906002)(6486002)(1076002)(44832011)(7696005)(66066001)(52116002)(41533002); DIR:OUT; SFP:1101; SCL:1; SRVR:MW2PR12MB2476; H:bmoger-ubuntu.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; MW2PR12MB2476; 23:34XqdFPl97d263G3oPtc2kn6fBgJc84gAfZIU87kO?= =?us-ascii?Q?BBQKVJ+afQxc5TxI0ctEvzdWvT692PIbtFYDa3k7l79X4QalalJueYxJE+fw?= =?us-ascii?Q?o9VReEREmdAmP/Uj1vMUWjFdBRUHYkBdwIVdfKEQ8WyZ4wZ/I9OLyA5fb768?= =?us-ascii?Q?LSg2t7/AJrOlqMaDlJBDMQYNfy3bEJ1HaSb00LJdFw9JJ40r8IUzYXpIoDkz?= =?us-ascii?Q?+OOpY2mTpseXjbo/6qLJGx2vCR1nAfWx+WkRbDcXa4qW5yr0VLii1oPcY0oM?= =?us-ascii?Q?gtwDh60ZShysQK6UazQUusLEp9oGPbQTBmAY4BgX8NJvcFbQOhiuHnoDPhoB?= =?us-ascii?Q?VKw/60IMpLaO8WlUxVPqtGzI9UHP6mObq7RLm1UkMbL+T1pGDywndQfKyVw6?= =?us-ascii?Q?rmvwiCuo0nZzaXDTAiaU4ZtOC9laxVTa7v+ZZnjkSsure4/IfLnBhjPYiHni?= =?us-ascii?Q?MPD6zvrgzphN/wh/9KBd26LKksUK+99dV2hDYoO60rh0qAgdfSVvm2IEveF1?= =?us-ascii?Q?JZpCagVOrsDk6fUmJpdmgHeneXz6/DeDiRTcqDSW3VGi9Ti2Le1lWjzicmmt?= =?us-ascii?Q?RCWmYb1dGVekmR69+6JaTkBMsBPK7lb56ME9X02cwYpi1PEz+mQB3eZoGkbw?= =?us-ascii?Q?CrQGRUZdPKb9k+84zU0TEOtdkKc1iIviAdBcstE3ehEo3K45wYM3aZ/K3LJ0?= =?us-ascii?Q?lhMrq/mlnwBurIRXwnP8YT5gWMk5Aj0d+RZvdGv4fDVWei4gpnR7t1UsOYlG?= =?us-ascii?Q?9HYWe/03L0frMLyWDRdmn93BGbCyEPSNp2xjg0891akh4e5WWl2XfK1C1XbI?= =?us-ascii?Q?r9viBsl7MfFnX4Iq0sm4twN216jNmVYogS0t6XlxtNWjF5/fWktc4kQtNRS2?= =?us-ascii?Q?r5NImJSSxdsh81pLyRzxQe6eeff723CXF6g0Z+2iRLa/30fWWGEzAIug/B6b?= =?us-ascii?Q?EzZ6i5kgOxSSAgLFuSEhM4b0R2nwKu1rGeYFNDJzHxruWXnywYlU9CrUpdL+?= =?us-ascii?Q?U2Ms0AD4RH1Id/bPc2GBXq1adybt++TQQBYn2OnskGDjSEGIreW9+jwjbtmk?= =?us-ascii?Q?GeodmKgz4VtrCeQpSj/Bf3kygGimtPVai/c7N12Bi3DiNForRhzYZWyZmcFT?= =?us-ascii?Q?u4givXXS+7N5D06wxG/d/7vhcwpjSGxM0omYUqseEv44sIipcx9foBmxTO8W?= =?us-ascii?Q?rFnRPkYEcYxj9KZYK4L+ka0kvF52cjvab0fMb9JpGfhCKmuAaBcHT3wyGRMx?= =?us-ascii?Q?Di11caQAdYARzvhqP59reAoh8IVNeGIvj6UE/wqcpn2e1QItWQNXRbNlwJ8J?= =?us-ascii?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pamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; MW2PR12MB2476; 7:3dZLc13gMfd+6TGVPISq8lHuP7hVb0X7JXBONoUXsU2igbN3Pptx9rNqV76iUQpfvP7+VEqHuhCFOhrxxM7L0DYT2SAkSJt32EQxOv3hd1pSb2sdaRf/UhUYZD7+P4+5Tjj5UD4QLzguazrl3AeL0BOEuv2TIa8xKS/bCJGrOGtRf8TcY+S2m7ssO0HW82Co1ROMwPtBKve2LxTfZ5TjRzJb7kectf1X5AqRfbVrGlB7eKqo/Oe495G/wv/Vm+WM; 20:+gULgH5prEjlyH6pdc1f3SREKBCC1DLNCJZdPBD7dDsuMGjCF3qO/X3Qz4dc5cVyhZYwvCyJcFDovYkhiBqrhlDkrV1ixsi8gKRUmMtuwOjRy+tuRUMehZHTufA/72F6p+ASKmEh9lY97vMDxx7+mMIxE+i2baVOWi5YyUwAadqc+WNCSQdHiz1bC++Y7mXA1PbKf/NbArujK0i95FJ8BdADSDsR9OdAl6lfKI2SU6SQWeY/86Xch6+vhDalSJpW X-MS-Office365-Filtering-Correlation-Id: cedc1de0-df80-461c-43d9-08d5b9b9aa97 X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 14 May 2018 16:42:21.5858 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: cedc1de0-df80-461c-43d9-08d5b9b9aa97 X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-Transport-CrossTenantHeadersStamped: MW2PR12MB2476 Sender: kvm-owner@vger.kernel.org Precedence: bulk List-ID: <kvm.vger.kernel.org> X-Mailing-List: kvm@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP |
diff --git a/target/i386/cpu.c b/target/i386/cpu.c index de2749ae81..d28b51c0a3 100644 --- a/target/i386/cpu.c +++ b/target/i386/cpu.c @@ -4821,17 +4821,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; }