From mboxrd@z Thu Jan 1 00:00:00 1970 From: Tom Lendacky Subject: Re: [RFC PATCH v3 04/20] x86: Handle reduction in physical address size with SME Date: Tue, 15 Nov 2016 15:22:45 -0600 Message-ID: <39da89c3-b89f-1d93-6af3-ea93cb750c45@amd.com> References: <20161110003426.3280.2999.stgit@tlendack-t1.amdoffice.net> <20161110003513.3280.12104.stgit@tlendack-t1.amdoffice.net> <20161115121035.GD24857@8bytes.org> <20161115121456.f4slpk4i2jl3e2ke@pd.tnic> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <20161115121456.f4slpk4i2jl3e2ke-fF5Pk5pvG8Y@public.gmane.org> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: iommu-bounces-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org Errors-To: iommu-bounces-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org To: Borislav Petkov , Joerg Roedel Cc: linux-efi-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, kvm-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, =?UTF-8?B?UmFkaW0gS3LEjW3DocWZ?= , Matt Fleming , x86-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org, linux-mm-Bw31MaZKKs3YtjvyW6yDsg@public.gmane.org, Alexander Potapenko , "H. Peter Anvin" , Larry Woodman , linux-arch-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, Jonathan Corbet , linux-doc-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, kasan-dev-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org, Ingo Molnar , Andrey Ryabinin , Rik van Riel , Arnd Bergmann , Andy Lutomirski , Thomas Gleixner , Dmitry Vyukov , linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, iommu-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org, Paolo Bonzini List-Id: linux-arch.vger.kernel.org On 11/15/2016 6:14 AM, Borislav Petkov wrote: > On Tue, Nov 15, 2016 at 01:10:35PM +0100, Joerg Roedel wrote: >> Maybe add a comment here why you can't use cpu_has (yet). > > So that could be alleviated by moving this function *after* > init_scattered_cpuid_features(). Then you can simply do *cpu_has(). > Hmmm... I still need the ebx value from the CPUID instruction to calculate the proper reduction in physical bits, so I'll still need to make the CPUID call. Thanks, Tom > Also, I'm not sure why we're checking CPUID for the SME feature when we > have sme_get_me_mask() et al which have been setup much earlier... > From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-by2nam01on0076.outbound.protection.outlook.com ([104.47.34.76]:36278 "EHLO NAM01-BY2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752308AbcKOVW5 (ORCPT ); Tue, 15 Nov 2016 16:22:57 -0500 Subject: Re: [RFC PATCH v3 04/20] x86: Handle reduction in physical address size with SME References: <20161110003426.3280.2999.stgit@tlendack-t1.amdoffice.net> <20161110003513.3280.12104.stgit@tlendack-t1.amdoffice.net> <20161115121035.GD24857@8bytes.org> <20161115121456.f4slpk4i2jl3e2ke@pd.tnic> From: Tom Lendacky Message-ID: <39da89c3-b89f-1d93-6af3-ea93cb750c45@amd.com> Date: Tue, 15 Nov 2016 15:22:45 -0600 MIME-Version: 1.0 In-Reply-To: <20161115121456.f4slpk4i2jl3e2ke@pd.tnic> Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Sender: linux-arch-owner@vger.kernel.org List-ID: To: Borislav Petkov , Joerg Roedel Cc: linux-arch@vger.kernel.org, linux-efi@vger.kernel.org, kvm@vger.kernel.org, linux-doc@vger.kernel.org, x86@kernel.org, linux-kernel@vger.kernel.org, kasan-dev@googlegroups.com, linux-mm@kvack.org, iommu@lists.linux-foundation.org, Rik van Riel , =?UTF-8?B?UmFkaW0gS3LEjW3DocWZ?= , Arnd Bergmann , Jonathan Corbet , Matt Fleming , Konrad Rzeszutek Wilk , Paolo Bonzini , Larry Woodman , Ingo Molnar , Andy Lutomirski , "H. Peter Anvin" , Andrey Ryabinin , Alexander Potapenko , Thomas Gleixner , Dmitry Vyukov Message-ID: <20161115212245.ex-fKWLH9pyHC_nyMSzSD8AvG3QywjQwg6wUXY5scrA@z> On 11/15/2016 6:14 AM, Borislav Petkov wrote: > On Tue, Nov 15, 2016 at 01:10:35PM +0100, Joerg Roedel wrote: >> Maybe add a comment here why you can't use cpu_has (yet). > > So that could be alleviated by moving this function *after* > init_scattered_cpuid_features(). Then you can simply do *cpu_has(). > Hmmm... I still need the ebx value from the CPUID instruction to calculate the proper reduction in physical bits, so I'll still need to make the CPUID call. Thanks, Tom > Also, I'm not sure why we're checking CPUID for the SME feature when we > have sme_get_me_mask() et al which have been setup much earlier... >