From mboxrd@z Thu Jan 1 00:00:00 1970 From: David Vrabel Subject: Re: [PATCH v2 07/11] xen/hvmlite: Initialize context for secondary VCPUs Date: Thu, 4 Feb 2016 10:07:10 +0000 Message-ID: <56B322CE.6050701__14137.7045227729$1454580528$gmane$org@citrix.com> References: <1454341137-14110-1-git-send-email-boris.ostrovsky@oracle.com> <1454341137-14110-8-git-send-email-boris.ostrovsky@oracle.com> <56B0D786.7000002@citrix.com> <56B0E046.6050900@oracle.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail6.bemta4.messagelabs.com ([85.158.143.247]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1aRGoq-0008QW-Hr for xen-devel@lists.xenproject.org; Thu, 04 Feb 2016 10:07:20 +0000 In-Reply-To: <56B0E046.6050900@oracle.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Boris Ostrovsky , David Vrabel , konrad.wilk@oracle.com Cc: xen-devel@lists.xenproject.org, mcgrof@suse.com, linux-kernel@vger.kernel.org, roger.pau@citrix.com List-Id: xen-devel@lists.xenproject.org On 02/02/16 16:58, Boris Ostrovsky wrote: > On 02/02/2016 11:21 AM, David Vrabel wrote: >> This needs some more description in the commit message. >> >>> --- a/arch/x86/xen/smp.c >>> +++ b/arch/x86/xen/smp.c >> [...] >>> + hctxt->cpu_regs.x86_32.cs_base = 0; >>> + hctxt->cpu_regs.x86_32.cs_limit = ~0u; >>> + hctxt->cpu_regs.x86_32.cs_ar = 0xc9b; >>> + hctxt->cpu_regs.x86_32.ds_base = 0; >>> + hctxt->cpu_regs.x86_32.ds_limit = ~0u; >>> + hctxt->cpu_regs.x86_32.ds_ar = 0xc93; >>> + hctxt->cpu_regs.x86_32.es_base = 0; >>> + hctxt->cpu_regs.x86_32.es_limit = ~0u; >>> + hctxt->cpu_regs.x86_32.es_ar = 0xc93; >>> + hctxt->cpu_regs.x86_32.ss_base = 0; >>> + hctxt->cpu_regs.x86_32.ss_limit = ~0u; >>> + hctxt->cpu_regs.x86_32.ss_ar = 0xc93; >>> + hctxt->cpu_regs.x86_32.tr_base = 0; >>> + hctxt->cpu_regs.x86_32.tr_limit = 0xff; >>> + hctxt->cpu_regs.x86_32.tr_ar = 0x8b; >> Lots of hard-coded values here. Should this be #defined somewhere? > > We also don't need to set bases to zero since hctxt is kzalloc'd. I'll > remove that and add a comment. > > As for macros --- I couldn't find the bits defined symbolically anywhere > and since this is the only place this is used the macros would be local > here. Ok. David