Message ID | 1526949675-106737-6-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="FCr/9kYK"; 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 40qcL83nGgz9s1w for <incoming@patchwork.ozlabs.org>; Tue, 22 May 2018 10:42:23 +1000 (AEST) Received: from localhost ([::1]:53011 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 1fKvNb-0002No-36 for incoming@patchwork.ozlabs.org; Mon, 21 May 2018 20:42:19 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:39851) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from <Babu.Moger@amd.com>) id 1fKvMr-0002NL-79 for qemu-devel@nongnu.org; Mon, 21 May 2018 20:41:34 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from <Babu.Moger@amd.com>) id 1fKvMo-0007AL-NA for qemu-devel@nongnu.org; Mon, 21 May 2018 20:41:33 -0400 Received: from mail-co1nam03on0050.outbound.protection.outlook.com ([104.47.40.50]:16315 helo=NAM03-CO1-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 1fKvMo-00078T-F6 for qemu-devel@nongnu.org; Mon, 21 May 2018 20:41:30 -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:X-MS-Exchange-SenderADCheck; bh=mZoedMjZp2bhamGsgLzHW7yfB5uXTu8avv5PJN8fxzo=; b=FCr/9kYKtnxQQiA7BDeXkCWY87Gf1dPS6BLlMBRFtnrUNGCe0jqu4NjOHQS8+kwjVw7kKIF5p2zJm0vf8uBmrzQbaEppNw/G4/ZpevhH1rzHiXkg3ouyQuOJMR/aaWb02nFF2+E39QOppM/Lz1v05QFCKhNLwBrxpa4PZETHSMY= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Babu.Moger@amd.com; Received: from linux-h3ml.amd.com (165.204.77.1) by SN1PR12MB2479.namprd12.prod.outlook.com (2603:10b6:802:29::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.776.11; Tue, 22 May 2018 00:41:27 +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 Date: Mon, 21 May 2018 20:41:15 -0400 Message-Id: <1526949675-106737-6-git-send-email-babu.moger@amd.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1526949675-106737-1-git-send-email-babu.moger@amd.com> References: <1526949675-106737-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: SN1PR12CA0071.namprd12.prod.outlook.com (2603:10b6:802:20::42) To SN1PR12MB2479.namprd12.prod.outlook.com (2603:10b6:802:29::18) 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:SN1PR12MB2479; X-Microsoft-Exchange-Diagnostics: 1; SN1PR12MB2479; 3:CdHqRabzG+EK/xyKOSSoCyFtt/7V7OZxVCD7hsg5ou65SFmRRLNt5tet9ox90yUcIDmOoPcIhJAyVWYKTSB79NGbZG9dX6huNTmQZ1wFWTsk2bZPc5inU/Xj/fgLMRvtNGKKLYH0nUA0hJ33fQvWjMAxqmCAd6jdTT9Nym6bE6c2tHB9uCszHbwuYi0hHjywEGg7FEZGg1M0DzGCKU2DXH3y/vl6gVWPxmRmbn6egZDx3kR9P7xccKVoh0trsR9y; 25:Rjv+2Zdovb21AqS2jmzvglLdO3r53wMupbu7PrXbuFMAjSoFO9eGB0a5VZe1Idku2fhFT1XpsAQlXTZO22Oz3YMDJVd8uDj6t+Zv3lwNxMGlM5kpswDTk5wGDVBryAvGS21KU+QwcrSX1ywKhYjw6wCrJyN8W96HU+7p2/TkKpOsTl8BKfdJ1OdOQ0nZldhXpzUNYgXtPoceb+FUL+NPwxcagYflmQH0ODyCftY8yfbbrpRaCzRe36mJ6gwyKmyZoZZRRV0wNkaNBTiul82rh1eXMW1rtYkFA8dueiiPBu2cmkrx7VrPgtIsvnyHUI9HylHrwfwcoJfe5yN2CZhZew==; 31:bHGM7Jp0dyu3KO3ciYJop0GZxAOAZsitjtUnBkS+Z+SxeDODLDVMJe4MdxokV1158i3FBVqm/QK8do7dm3cn/ovoaVW0Fp05eQTvvco4HMT/npwfvh5XxRdftZFbkx1yikCaLtO7BNM7bH2cFATpz9/ml5V6GDAo92SxVe3PSmHzbmAMBf/YkDV9AdK5twDVh2Ib1VINDhQRBgXWlsLc69t2WLiAgx31pj6YYEZ6utk= X-MS-TrafficTypeDiagnostic: SN1PR12MB2479: X-Microsoft-Exchange-Diagnostics: 1; SN1PR12MB2479; 20:3dgatQoWXR6W9bb9hcmzQ2ZLmSWc8lYp4pAYXJs2iynKRtbDl6rAUjWRRDeKv88IZlzvWy8oADQrOtC9PlDEDKHkCbYsd3I5CdKy7pLveVZFLdZJf+nxE27xL3u+sb6lnqMwtglGW/FGK0sPcKBi94PRO3G7/YbWYT4LWsl+walCYc2fNs0HePVxVZ+K4UGDbQid8/UfocGHPJo7H9+M3i/FCsdJCnfQBi1jZtTTwi0ycE8HbY49hiXjtohW0zOObRTzweCvC1lXHVX1PIol33DdsKnJqt/eAgraCxshHFWGWKiNM9emO257i+KeGxMRcqWRJutzX2LNCElyv99OkwZHN8nTtd5dwC32LEqioXK/DWwn6q9b/lBwyE0iLpPu0r5VNRxnethBU1j2AqpAaYnesNMXknjss+A7DL5zwiZ+L+FJcQzcWMcqE8SR1P5/kqwbdBT4jgYrI5YHUmEil2c1zczDtYRZ8zeKZQIPv2XUueXNzdpoyEmVXizX62lY; 4:ib/8J05NkYyTvO/Ceg8gn3kZpkK9YAZeK+u6ezWpbqKiGijp7N1PowBytsm8rWlJPXRzvcTmlbmAoqE6HEU9pQSIJtwjcDw55G6Cnl8F7zdwJ5xk5UHtnbuVR9artaNHtp9GYMvuFnH/nvGj59aGELOR3O9B+rqTfwMZebwK3145LMPZiJnb2Tl7GBMIWxKe7ECdPE8w7tr1T2zDpVwlLWIb5UwG/Du/faNrBNQ4hIAmeh5HrHqgHMOGhRhLHSsUWJQwrXkZh3v2/qcc/7VC71GRjYagVdGeLd1je3jonk2UZ1/f2e4PpQcLuwzlNZOb X-Microsoft-Antispam-PRVS: <SN1PR12MB2479AB4E634BAA11ECA6C9F495940@SN1PR12MB2479.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)(8121501046)(5005006)(3231254)(944501410)(52105095)(93006095)(93001095)(10201501046)(3002001)(6055026)(149027)(150027)(6041310)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123560045)(20161123558120)(20161123562045)(20161123564045)(6072148)(201708071742011)(7699016); SRVR:SN1PR12MB2479; BCL:0; PCL:0; RULEID:; SRVR:SN1PR12MB2479; X-Forefront-PRVS: 0680FADD48 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(396003)(366004)(346002)(39860400002)(376002)(39380400002)(199004)(189003)(16586007)(66066001)(25786009)(6666003)(36756003)(316002)(305945005)(48376002)(2616005)(486006)(3846002)(4720700003)(68736007)(956004)(47776003)(7736002)(53936002)(44832011)(50466002)(2906002)(6116002)(446003)(476003)(11346002)(8676002)(26005)(81166006)(8936002)(106356001)(7416002)(81156014)(386003)(105586002)(86362001)(97736004)(72206003)(5660300001)(478600001)(7696005)(186003)(39060400002)(50226002)(51416003)(59450400001)(53416004)(6486002)(16526019)(52116002)(76176011)(4326008)(41533002); DIR:OUT; SFP:1101; SCL:1; SRVR:SN1PR12MB2479; H:linux-h3ml.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; SN1PR12MB2479; 23:w8cnJVM3ItKJEO+ohCDgyDK7a6b+aQSsH2zV1fZDv?= qJwWhaA3PQCSzYVc/684mUz4TMvSJcDsm9JdCiG0RLG9S/416+HktbMt4xcO0fP3tmIGjEmK+WlXMx0LdfH/vsdzRtdsPcUfRS5bA9tbQ1CNZ38w6d2LtUE74xuHGDACOr+snXXH9zCR1O3TqolE8yQnXcy1tI5EOoTw7T0i1bJQt0P5aRWZMduVERzXo7GGvVbztHx8LOlXUOay2qOFltbSWqJsIC1w8zo+Ewv+Kwtt57jF1g+y2q5nBThNYw2CksPaEzhqnVgDNiwGpTAyazj0owBOjZzSsqhY9JlHbXsRa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Qir4q1HpqDj4UgeQPY6EIIRmbglC12XB4ZFQUluEqCiOrBcKj2IRuZ+MPtcmz+n6gaKWQaBEHvlwhB10/9WtYmTPh3N6Fcf/6Q+NyWmUVKHVGQN2U34VAjXIYXxqfcdVecxX4damDcytb+t4+rU+hJajlDiie6mXWWneJbCbqt/PQ3DL9sQNRkxaGOSC1FHShwL5y2itZA4MqdSYJaRvb4MvF; 20:Y+x54YRzH20YjwMV0uVW6fpDLL++bQGZ4tX6jZlcuG2fIp4Vdz8M7J5r9A2gWwtMCXA+ReaaN9TKavft2BX6qsg1N0rPfEI1UarpQhmzxqJSbUmxx2WBUroi36u7FW2lceA736D89EYKNHdYwZz4gRE6YXv4NPdLvwZJntGAZp6EnnzQl3ZGivB5TnM5kXhqdjGYnFTmVa1JdWiz+NMwDyatL1y4o413KiTUfv3hrJ5V6+KdmWx+Rt+r6VNLxF/t X-MS-Office365-Filtering-Correlation-Id: 172ff495-d5d2-41c8-58e8-08d5bf7cc0e5 X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 22 May 2018 00:41:27.2617 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 172ff495-d5d2-41c8-58e8-08d5bf7cc0e5 X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN1PR12MB2479 X-detected-operating-system: by eggs.gnu.org: Windows 7 or 8 [fuzzy] X-Received-From: 104.47.40.50 Subject: [Qemu-devel] [PATCH v10 5/5] 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 d20b305..7eba8cc 100644 --- a/target/i386/cpu.c +++ b/target/i386/cpu.c @@ -4961,17 +4961,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(%d). Please configure -smp " + "options properly.", cs->nr_threads); ht_warned = true; }