Message ID | 20180129163944.114684-1-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 F030F60375 for <patchwork-kvm@patchwork.kernel.org>; Mon, 29 Jan 2018 16:40:16 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id AE18C28AED for <patchwork-kvm@patchwork.kernel.org>; Mon, 29 Jan 2018 16:40:16 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id AC51E28B1C; Mon, 29 Jan 2018 16:40:16 +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=unavailable 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 61AE128AED for <patchwork-kvm@patchwork.kernel.org>; Mon, 29 Jan 2018 16:40:13 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751337AbeA2QkA (ORCPT <rfc822;patchwork-kvm@patchwork.kernel.org>); Mon, 29 Jan 2018 11:40:00 -0500 Received: from mail-sn1nam01on0078.outbound.protection.outlook.com ([104.47.32.78]:33024 "EHLO NAM01-SN1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751212AbeA2Qj6 (ORCPT <rfc822;kvm@vger.kernel.org>); Mon, 29 Jan 2018 11:39:58 -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=nETGNo+KwPxGmmlMXeEMx4+z/aFYa/238VRObP+MEpQ=; b=PJfS2BsaEbJusG+GDRXGAmZRCL4H4M/cYg/oKUrmCbUl1ng4VZuDMSum28VdLKy4ZXoNbrJ0419qtpg2cugu+SuI6KACkfJGHIdID2uDpZerlUpBsS+x+UFcCvBebWQdaTgkVRzQ//JIMI9lC4nuYr8ZIXNGOyI762LPq/6KJvY= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Babu.Moger@amd.com; Received: from linux-pyp0.amd.com (165.204.77.1) by CY4PR12MB1768.namprd12.prod.outlook.com (2603:10b6:903:122::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.444.14; Mon, 29 Jan 2018 16:39:55 +0000 From: Babu Moger <babu.moger@amd.com> To: pbonzini@redhat.com, rkrcmar@redhat.com, tglx@linutronix.de, mingo@redhat.com, hpa@zytor.com Cc: x86@kernel.org, kvm@vger.kernel.org, linux-kernel@vger.kernel.org, pixo@polepetko.eu Subject: [PATCH] KVM:x86: AMD Processor Topology Information Date: Mon, 29 Jan 2018 11:39:44 -0500 Message-Id: <20180129163944.114684-1-babu.moger@amd.com> X-Mailer: git-send-email 2.16.0 In-Reply-To: <20171029215633.3102-1-pixo@polepetko.eu> References: <20171029215633.3102-1-pixo@polepetko.eu> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [165.204.77.1] X-ClientProxiedBy: MWHPR04CA0034.namprd04.prod.outlook.com (2603:10b6:300:ee::20) To CY4PR12MB1768.namprd12.prod.outlook.com (2603:10b6:903:122::10) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: 7215e2fe-1cd3-4f1b-8cb8-08d56736ede9 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(4652020)(4534165)(4627221)(201703031133081)(201702281549075)(48565401081)(5600026)(4604075)(2017052603307)(7153060)(7193020); SRVR:CY4PR12MB1768; X-Microsoft-Exchange-Diagnostics: 1; CY4PR12MB1768; 3:7csSzArZGc/zz/MdMsqHi/xOGuMSTSF7xk/wCCbV9iM4o37ZJfM7i2wPz6ZZksEKB+hpJwahMv+Ys5JWNlw0Zjej/iquCByOXGEt0SX4SeTxatfRYKfVeSmksmGs/LLkFmuwdn0A5ogah9UmsmAuxIx5F8VWfXtImBYTSBVUOmbmpTA3MP3Yhek48Q0LdChlP4w5TDFxLDcru42rJhanALjD+x3pAifBLvUdT4ELNDgnSRO4SZ1pxxN/Bx/K/4bz; 25:F5WCHBEwk38hBuaRiumeZW/oKW69WlGbviYEj0PpdCsQIWq15KRYdCQgYuWNK8dH2Qy9MPuDcZU5L9ePInJ/ZeOX6AvPHFbJKU+e6RSkGwbxPcrQdGtPe8Rh7WZJ06tTnh5dvzLKXFH9091b/mxiWlWExjWX1/vHy/u6xCkYXI0eRNsUW1FBFBZ8p9IZQsQa76FSvg1/ZjZQz4fIn6A3qXBZh6bhACSezB7Kyonlf826Fh5tXOkFOh89fcg+sXsWUUPa6w76Q6F1KbdC6D5ozg5JmBcyLHLFLMM2Lq3O4vpLlnU0i9fm6AWQfC4FEQ3sg42CAl6FGTM/smoHZ8CkLQ==; 31:rH1V0n6P0MBo5tvsAasCx1h2zdprilcn6yPH0D27qnk0K8Ko02JA3wRPlGHy8QFdtapXgDDekPyUL9blDs3U5to26NxdtYl8jKjBwAOLuNxTzd+zP7JHKUlKcr17aKkn7cRjD0J/hq5u/FOOzItkc0uTOsRZ8CLCFls+pVPvPKnpW6++eAXjdl+2P/8pj6UxIjvv7Z0gysTYF8spSYgn+tlXQ8NS/wD4+JL5xJpo0DE= X-MS-TrafficTypeDiagnostic: CY4PR12MB1768: X-Microsoft-Exchange-Diagnostics: 1; CY4PR12MB1768; 20:5BhVtMRTyF6624YBrpa3rb5ckI7w1LFK2CzE9EcHuPDUcn7eURSW5yN+dIkcEg5XxqfRii3cnmMwHxxobPbClRjwEn3LLq1AVCy/J9EjFp7owoC/UiiSwKCpgmCZny6NnH9sGFnH9nDWbK2wf0oMZFdrTDXMXJno07ohEOriS/dDX5bwNFwgIGbDE/c1XWMtvI+dDB3PK8ltq5Q0c89OaiotYCRTPUwanOIzqWVhU5cZnHOUx95eAeggz6k1iZj5FGpYMyC/+d/m1yXig8ne1IhDzL9UzghTFfZnw3tOYrAoeaozGR1ceZPWizaiHHRs6W2dQEyU7k8fVAR0kqrt3cROltjYosWe/DDI6iQtnR/GHgxF+PBvGkKJ5n7DUxTJgFV1hlu5fUQgiJqwJHFsveaGH0+gTvg2sSO67BKwVdneHfVXp06eTqj89qHqVoUN+zflnR8srNvzpu0xO2MP70EPkoNOrSUFfNVHxwJow8LpHVBkaMT9XLzYCyji0Jly; 4:UZ/1flo9JmjzhZs6+V3MCGIhE03865rGtU2D2ucWiXEsPBQBUDvktfD8yT38TAiOAiJ/yeX1EFZeiw4gz39Q5vLyhBPLphRNcCOKv6qaSruost+tcs+iCu3wAShr512sq4DV8ptA2YlKnwj1wnNhk/6lBPmouB3D1G8EstlOifWYAXGTvjUy9Wp3MrtS8IYRSjD9i6RvibZcvgRLkrJwsCGy+0SQNO3f/3E4CWULNDD+nf6Vb2rGlHgY9Q7L2saY2awIddvt0uPHjelYuEJi0LJYeMA1ClxgaMc+5S93H1ebv4NZ8Yse5YDUpBar+o+XX4mw6u/eHURIMGn20jJT+A== X-Microsoft-Antispam-PRVS: <CY4PR12MB1768609F3340BC1B8448548695E50@CY4PR12MB1768.namprd12.prod.outlook.com> X-Exchange-Antispam-Report-Test: UriScan:(85827821059158)(767451399110); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6040501)(2401047)(5005006)(8121501046)(3002001)(10201501046)(93006095)(93001095)(3231101)(944501161)(6055026)(6041288)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123560045)(20161123562045)(20161123564045)(20161123558120)(6072148)(201708071742011); SRVR:CY4PR12MB1768; BCL:0; PCL:0; RULEID:; SRVR:CY4PR12MB1768; X-Forefront-PRVS: 0567A15835 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(376002)(346002)(396003)(366004)(39860400002)(39380400002)(189003)(199004)(50466002)(59450400001)(316002)(53416004)(53936002)(68736007)(50226002)(8676002)(8936002)(81166006)(81156014)(16586007)(386003)(105586002)(36756003)(6486002)(26005)(48376002)(66066001)(5660300001)(106356001)(97736004)(47776003)(72206003)(478600001)(6666003)(2950100002)(76176011)(3846002)(6116002)(7736002)(1076002)(52116002)(16526019)(186003)(2906002)(4326008)(305945005)(86362001)(51416003)(25786009)(7696005); DIR:OUT; SFP:1101; SCL:1; SRVR:CY4PR12MB1768; 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; CY4PR12MB1768; 23:16e86mmtzRuDJ2pHY13Ogee84y9+Ses7ZPMRa6GI1?= =?us-ascii?Q?dsoAVwa1FMjbZEUFA46zRHp79Scf2Hq1XX/PzMarauWVckM2+jRA3TQSvkV0?= =?us-ascii?Q?tVWDPJPo2+bXD9wq6erVgPxkVB9O1Q0jtlgvyUits/OVRzM4pMjIusO/7QaQ?= =?us-ascii?Q?irzX7v3fn9OZCcHHjZKY2iOJPeTIFKVR77SCRb4fbNMMcNoE0vw0nYLVZPNJ?= =?us-ascii?Q?ZjzNI5f2etPiXM+H1vPcK6fTv02kBxht6ehg/Bbk5s8myW9p5YlWRa8a1GFM?= =?us-ascii?Q?8sTkx8tsnnTS5ul4QkgYFAVVWgQaQhYlMSwn5TuiG8HYSl+gfM57GXAc85aS?= =?us-ascii?Q?LqgyFFVZsIjArT9BlZl+0OR7xH5FYXjXLOEIuhziH0fK9upQPJh61OtolsbR?= =?us-ascii?Q?An4aSEX6Cm9xi8iIidYwM9QC3zy/uY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ov4tptmpz8Au+DNXUvYwu7tLuA X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 29 Jan 2018 16:39:55.1912 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 7215e2fe-1cd3-4f1b-8cb8-08d56736ede9 X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY4PR12MB1768 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 |
2018-01-29 11:39-0500, Babu Moger: > From: Stanislav Lanci <pixo@polepetko.eu> > > This patch allow to enable x86 feature TOPOEXT. This is needed to provide > information about SMT on AMD Zen CPUs to the guest. > > Signed-off-by: Stanislav Lanci <pixo@polepetko.eu> > Tested-by: Nick Sarnie <commendsarnex@gmail.com> > Reviewed-by: Paolo Bonzini <pbonzini@redhat.com> > Signed-off-by: Babu Moger <babu.moger@amd.com> > --- > > Rebased on top of linux-next. > Maximum extended functions are already set to 0x8000001f after the commit > 8765d75329a3 KVM: X86: Extend CPUID range to include new leaf Queued, thanks.
diff --git a/arch/x86/kvm/cpuid.c b/arch/x86/kvm/cpuid.c index ac0041c2f5af..20e491b94f44 100644 --- a/arch/x86/kvm/cpuid.c +++ b/arch/x86/kvm/cpuid.c @@ -371,7 +371,8 @@ static inline int __do_cpuid_ent(struct kvm_cpuid_entry2 *entry, u32 function, F(LAHF_LM) | F(CMP_LEGACY) | 0 /*SVM*/ | 0 /* ExtApicSpace */ | F(CR8_LEGACY) | F(ABM) | F(SSE4A) | F(MISALIGNSSE) | F(3DNOWPREFETCH) | F(OSVW) | 0 /* IBS */ | F(XOP) | - 0 /* SKINIT, WDT, LWP */ | F(FMA4) | F(TBM); + 0 /* SKINIT, WDT, LWP */ | F(FMA4) | F(TBM) | + F(TOPOEXT); /* cpuid 0xC0000001.edx */ const u32 kvm_cpuid_C000_0001_edx_x86_features =