From mboxrd@z Thu Jan 1 00:00:00 1970 From: Brijesh Singh Subject: Re: [RFC Part2 PATCH v3 05/26] KVM: SVM: Reserve ASID range for SEV guest Date: Tue, 12 Sep 2017 15:24:05 -0500 Message-ID: References: <20170724200303.12197-1-brijesh.singh@amd.com> <20170724200303.12197-6-brijesh.singh@amd.com> <20170912200416.ygcsqvznkkp2gd7r@pd.tnic> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Cc: brijesh.singh@amd.com, linux-kernel@vger.kernel.org, x86@kernel.org, kvm@vger.kernel.org, Thomas Gleixner , Joerg Roedel , "Michael S . Tsirkin" , Paolo Bonzini , =?UTF-8?B?XCJSYWRpbSBLcsSNbcOhxZlcIg==?= , Tom Lendacky To: Borislav Petkov Return-path: In-Reply-To: <20170912200416.ygcsqvznkkp2gd7r@pd.tnic> Content-Language: en-US Sender: linux-kernel-owner@vger.kernel.org List-Id: kvm.vger.kernel.org On 09/12/2017 03:04 PM, Borislav Petkov wrote: ... >> SEV-enabled guest is from 1 to a maximum value defined via CPUID >> Fn8000_001f[ECX]. > > I'd rewrite that to: > > "The range of allowed SEV guest ASIDs is [1 - CPUID_8000_001F[ECX][31:0]]". > thanks, will do. ... >> >> +/* Secure Encrypted Virtualization */ > > If anything, this comment should explain what that variable is. > Basically the comment you have in sev_hardware_setup() now. > Will add more comments. ... > > max_sev_asid is static and it is already initialized to 0 and thus this > function can be simplified to: > > /* > * Get maximum number of encrypted guest supported: Fn8001_001F[ECX]. > * [31:0]: Number of supported guests. > */ > static __init void sev_hardware_setup(void) > { > max_sev_asid = cpuid_ecx(0x8000001F); > } > Agreed, I will improve it. thanks