Message ID | 1520281107-5115-4-git-send-email-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 DF8466037E for <patchwork-kvm@patchwork.kernel.org>; Mon, 5 Mar 2018 20:18:55 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id CFE5B28A78 for <patchwork-kvm@patchwork.kernel.org>; Mon, 5 Mar 2018 20:18:55 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id C47C028AE6; Mon, 5 Mar 2018 20:18:55 +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=-6.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,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 6333B28A78 for <patchwork-kvm@patchwork.kernel.org>; Mon, 5 Mar 2018 20:18:55 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752886AbeCEUSx (ORCPT <rfc822;patchwork-kvm@patchwork.kernel.org>); Mon, 5 Mar 2018 15:18:53 -0500 Received: from mail-bn3nam01on0062.outbound.protection.outlook.com ([104.47.33.62]:47061 "EHLO NAM01-BN3-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752507AbeCEUSq (ORCPT <rfc822;kvm@vger.kernel.org>); Mon, 5 Mar 2018 15:18:46 -0500 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=rKQd5lfvVIQuVFSDa5JddZlfELn2nsS8h1EjV9b97gc=; b=H/suiqauzB6T0urDykCULE3dZbm4A96v3KC09+bmEBQEnOFWu1Ewpbc55EPoBcLSLkaj8UMq+POyoM5IzrqWU05JdEyFffyFDkuQUxMnj3x66RxrcTkVwZCP0dkLxXXIIxLkmOKf+D/FT/LfWvPDNGFPP6eYN5yNO/6FPpxEl4I= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Babu.Moger@amd.com; Received: from linux-pyp0.amd.com (165.204.77.1) by BN6PR12MB1763.namprd12.prod.outlook.com (10.175.101.136) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.548.13; Mon, 5 Mar 2018 20:18:42 +0000 From: Babu Moger <babu.moger@amd.com> To: pbonzini@redhat.com, rth@twiddle.net, ehabkost@redhat.com, rkrcmar@redhat.com Cc: mtosatti@redhat.com, qemu-devel@nongnu.org, kvm@vger.kernel.org, Gary.Hook@amd.com, Thomas.Lendacky@amd.com, babu.moger@amd.com Subject: [PATCH v3 3/5] target/i386: Add support for CPUID_8000_001E for AMD Date: Mon, 5 Mar 2018 15:18:25 -0500 Message-Id: <1520281107-5115-4-git-send-email-babu.moger@amd.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1520281107-5115-1-git-send-email-babu.moger@amd.com> References: <1520281107-5115-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: CY4PR1801CA0014.namprd18.prod.outlook.com (10.171.252.27) To BN6PR12MB1763.namprd12.prod.outlook.com (10.175.101.136) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: f767dd64-75c4-41fc-7864-08d582d64ade X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(4652020)(4534165)(4627221)(201703031133081)(201702281549075)(48565401081)(5600026)(4604075)(2017052603307)(7153060)(7193020); SRVR:BN6PR12MB1763; X-Microsoft-Exchange-Diagnostics: 1; BN6PR12MB1763; 3:32vNcJ5zI4LsImLfqTqE/fB3N3ANrgH10hWB0XflL+aEVp4kmIT5RdTnqFze19CpdH0ZdGGWRwG3DrT0jLEtA5u7XnbOon8/ARFZSdBHps0r2wC8vKnhVDMRcZmXjd+Mz4j+i5+PJryB6pP6JwOfkjMQ5oCMRr9y+uORp0Q7UHSOfmcylWA1nfvsvIHcNSurLLV39AEYYRCZnyer13nOZ/KTrbWHWRJjS3nBnqx8SSBSHu5GhBempTZhjqVtmFn5; 25:mIC0uIJLEFxnMziFyLBIQ3sgFg1UXTx9WQnuS/1u0IO2h6OjXKN1D6fV4QtA0yNF2YJAG2OJzgWk7YIoeeepfMOeDUZRFWnwKrzxGhrutxhgh1WheVc1kntqXI5BOxeKBeOd4NLe5mGMMvXVtNW4UGz9MsUeS4lzN/apyDI59HCWh4nGc5SLN3U5gf3yIcuco3gA+Orhy8acJLeG07XZ/3otiAJiPIO4asSw4hS7Yy4wdhk6wznal5GNuk11HWT96Ua2lgeFSLHaM+RpZhCJc+XmQ2HAyU7RhFAazfKlUqJ/OjFUz7oG+nOLAgWgVmy/cVQ4rTSGaSjg3VR6z3dDvA==; 31:VM6H6p6l0YvDWmu2Su04TwlcCgL9NZxQWphRoekQbzPs098TFiVIZMcgD2wv0w8H6Qqwh9mXoQPj367cBT+3zW/q/RfGj6nQdcYq2J3921FYySy1TNNdgNpS+arh2YTWsuq6kkJs3m73DaejbrsFcj+ByFi+3o9fhm6N4pQ02pmMVliQOz/Ld1AQ33kZZXzNWEhfOWimqZfjwIRZ1iuNYyw4ydKk3c4NOQt8mDanSSM= X-MS-TrafficTypeDiagnostic: BN6PR12MB1763: X-Microsoft-Exchange-Diagnostics: 1; BN6PR12MB1763; 20:3KuSWXPBHNQ/Q/tHjL3P/jLhYiqyvCr3slltJ6db2/mKlv9pmFnLq1wWudO3MUJfNQcC3IWI7kqVjgEuFSM0gxtiDcX/tWI/Vy+cfYEt2pl95Tb+Xldp+PcVA/Ee2tBNWa64N9tapgVyz885VC+H+EmVgbR9HLGF/vFXjTG4M2fvwY2TAHXFzfQ7UBkNcZ6SItYZhyEs7dNI3vOKyAsVpwy/mlT752Sx1kVN978sTiJgOxCclNTyKNRN+tXHwCrty5nHGLcRuNPMoL8uhF4KM1ho0HChb9c/+VHUG9LvSjEFvdy+ZaCVLQ3Gxq/eD1sq1OnEnrHR2WwWkPZL28GYwe8Ulh50Ovt23cGXtjvhf/9JtwAYj2KoFOHFvtk7YS6VGZniTpw5VP3ohMeLZ7icIcUY641bYirdWwzZKmWkJ1RUIhn6fFjmZU0t3jxynpPt6zK7V1qLzeRJc6lUAzvwQc6O/Zuj5YIy65/1+t9BpNl6AJghsvcN989OyNzKnjc5; 4:ULRXxG+k/fBiA6Rtx3iSupvH0Agvng6R2gHVmMw0tw+7RnLhqFF6Q+OsUUSZc62J6k4+Qba4/1NW2wJD3guipcHEa3ByDL6a4FBM/fa5AJI1bFtgZBDDISSVdwNW1Y4/26CmUytjOjTLhsZv67ZqlGVDifmzfabYxVBVH8xNC5VklQvAid5ewkZTuPqWsHdqtRhqifXEerTijoqK83Yaz6AngLLuCsdLVqsPR3/oU2Nx3W95wDdUNGQxbhgHYzpf7zwAZdV08ucuNyeFBVRiaEiJ69NuVw6rgnwUqGAJAA/6aAskCR600HlWIZow9b1m X-Microsoft-Antispam-PRVS: <BN6PR12MB176317817E90169782F7ADFF95DA0@BN6PR12MB1763.namprd12.prod.outlook.com> X-Exchange-Antispam-Report-Test: UriScan:(767451399110); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(8211001083)(6040501)(2401047)(5005006)(8121501046)(10201501046)(3231220)(944501244)(52105095)(3002001)(93006095)(93001095)(6055026)(6041288)(20161123558120)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123562045)(20161123560045)(20161123564045)(6072148)(201708071742011); SRVR:BN6PR12MB1763; BCL:0; PCL:0; RULEID:; SRVR:BN6PR12MB1763; X-Forefront-PRVS: 06022AA85F X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(39860400002)(39380400002)(396003)(366004)(376002)(346002)(189003)(199004)(2950100002)(4720700003)(2906002)(106356001)(66066001)(6666003)(97736004)(25786009)(36756003)(5660300001)(478600001)(48376002)(81166006)(81156014)(8676002)(72206003)(47776003)(8936002)(50226002)(4326008)(105586002)(50466002)(26005)(6486002)(305945005)(16586007)(186003)(16526019)(316002)(52116002)(53936002)(7696005)(68736007)(53416004)(3846002)(6116002)(386003)(51416003)(7736002)(76176011)(86362001); DIR:OUT; SFP:1101; SCL:1; SRVR:BN6PR12MB1763; H:linux-pyp0.amd.com; FPR:; SPF:None; PTR:InfoNoRecords; MX:1; A:1; LANG:en; Received-SPF: None (protection.outlook.com: amd.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; BN6PR12MB1763; 23:LVII81jfCGxdDwVBMmpXzwlqE5vNUaeFyNeZ/M/Sc?= =?us-ascii?Q?K2Ngu6A+X41FLSKBHhtpktNXh1aGVWm4mP8fl4H1z/7W8bL5Xnwj8/uSQpzg?= =?us-ascii?Q?c9oatXuvdJgKu+iGv5FaSTYF/BGr1ioq8E22s01JZKlxHMZrOrKFeNhC8Ohw?= =?us-ascii?Q?bvy7S34S7VOR8OqA77cX4pPcroHBetjMAHVLsSVrDqVoO7TSE9fsk+2GrMKx?= =?us-ascii?Q?8Zczs8QEtbNBZGEId+nn1c7s+h5j393uOi/yfwMXFq7zh/UoN/eX+nliLRi+?= =?us-ascii?Q?BmAEeVhBkCMD3sjlnsqpw18+VVtN8wj/6UTFI5KbS5sQUdh3Scm+GXMxrjnc?= =?us-ascii?Q?a5bm2c4BtwniGaPiQVx0XJkRsm7u64BPF7HjVPY3NDqHyAYx+vtm6y7OcVfM?= =?us-ascii?Q?dUlTvL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1763; 20:yt3szwBti0ferHhfBTSNYChLT0TO50kd/Y6iv5PeiXPZuPa6qWHM6mlaF+tW4SrNCBtl0Mp2SzLRuH+vnHQei/Yb2zxrwlLJeBRQOWAnqeEUPQso8DXKxdkikrJCrqbDVKip9JGwQJCTcaBIGoEt46yejKX5UdI/CUEHViDJJJZ89nCH6PxjugRCZLgFk686a2Eq7ruul1yMjcGrSD9BEycPszPU7UP8QvdnfOICjKt5ZV13BJbP+kJldUy5M45Y X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 05 Mar 2018 20:18:42.2717 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: f767dd64-75c4-41fc-7864-08d582d64ade X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN6PR12MB1763 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 1485175..555ab83 100644 --- a/target/i386/cpu.c +++ b/target/i386/cpu.c @@ -3666,6 +3666,15 @@ void cpu_x86_cpuid(CPUX86State *env, uint32_t index, uint32_t count, *edx = 0; } break; + case 0x8000001E: + if (env->features[FEAT_8000_0001_ECX] & CPUID_EXT3_TOPOEXT) { + assert(cpu->core_id <= 255); + *eax = cpu->apic_id; + *ebx = (cs->nr_threads - 1) << 8 | cpu->core_id; + *ecx = cpu->socket_id; + *edx = 0; + } + break; case 0xC0000000: *eax = env->cpuid_xlevel2; *ebx = 0;