Received: by 2002:ac0:aed5:0:0:0:0:0 with SMTP id t21csp2688024imb; Mon, 4 Mar 2019 11:25:54 -0800 (PST) X-Google-Smtp-Source: APXvYqwNwnwaX5NNigV86RTgWrPloDvbgxPjdiVVLmtpw2KklixGZzf+2repkThvD8Pbn6Dc2tkT X-Received: by 2002:a17:902:9003:: with SMTP id a3mr21749440plp.2.1551727554717; Mon, 04 Mar 2019 11:25:54 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1551727554; cv=none; d=google.com; s=arc-20160816; b=C5hI5HAt3RQWxKiTmxWVNlK+HVbqlB5R7XbsyNhPysoCPqvXZTkYr7l3CL0hF3eIq+ U11S0sH3J/MVxED4efjfDBIHQp54SIDBo9v9h+92VwrE+4DDisSKJuf6eag+oGcrcjYJ MjsWW4IS34s/2PCM3naDflymReiFH2AUDsOaKNxEgcCglZxir9m9JEmKRR9+nsoFvA8R vfVcr2YWZQrP4RG1/pr9YT8XYEBxYTcEU26oDarTGaI2RSLzT46iGNZXMoPbr/4U/ycl XG32BIzuwdmMfY6Sm4d8lgOnePI1468FzzbqYGxJ+MozOpX3Tp7i/7Y7JEgInVeRnGjC JROQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=aVUCPMz0NyQ9q5VnfpnF3zJReu3KE+4UtuG5P18Rfyg=; b=B+tlCh6xchSdYN//waAm++EslAVyRx0A1O/j/jGEVWc2QseUWiSqTVwZa4sD9RJ3EA nCI1ag4iU2SslPSUAwwrJgPEisOs68hUTQxw8HyCEzmtYQdV3BGoItu04hY43PN3BhGt Rsn1RXugl4NDWEo5M3iR39PUoD4RNgIkMOUFPqmCOy4NNnw5b/Ah2EdwYped3Yo2dG2h yxBK6V8TGHAWNFSm2rmthfvMvGBxCJccOAQRLLq+KjN3WZNvFFEyTKAiTgDbJaYEDcQa C0Ick2XT7R/0uj52gt3PuNwBxbqbniEkT3cRXo4eCYsscS8/kgVOXbLLytA7CdVblsvu 8zvw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id k5si3497518pgr.287.2019.03.04.11.25.39; Mon, 04 Mar 2019 11:25:54 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726294AbfCDTWH (ORCPT + 99 others); Mon, 4 Mar 2019 14:22:07 -0500 Received: from mga06.intel.com ([134.134.136.31]:9917 "EHLO mga06.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726038AbfCDTWH (ORCPT ); Mon, 4 Mar 2019 14:22:07 -0500 X-Amp-Result: UNSCANNABLE X-Amp-File-Uploaded: False Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by orsmga104.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 04 Mar 2019 11:22:06 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.58,441,1544515200"; d="scan'208";a="148511849" Received: from romley-ivt3.sc.intel.com ([172.25.110.60]) by fmsmga002.fm.intel.com with ESMTP; 04 Mar 2019 11:22:05 -0800 Date: Mon, 4 Mar 2019 11:15:12 -0800 From: Fenghua Yu To: Dave Hansen Cc: Thomas Gleixner , Ingo Molnar , Borislav Petkov , H Peter Anvin , Paolo Bonzini , Ashok Raj , Peter Zijlstra , Ravi V Shankar , Xiaoyao Li , linux-kernel , x86 , kvm@vger.kernel.org Subject: Re: [PATCH v4 04/17] x86/split_lock: Align x86_capability to unsigned long to avoid split locked access Message-ID: <20190304191512.GB231946@romley-ivt3.sc.intel.com> References: <1551494711-213533-1-git-send-email-fenghua.yu@intel.com> <1551494711-213533-5-git-send-email-fenghua.yu@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Mar 04, 2019 at 10:52:19AM -0800, Dave Hansen wrote: > On 3/1/19 6:44 PM, Fenghua Yu wrote: > > diff --git a/arch/x86/include/asm/processor.h b/arch/x86/include/asm/processor.h > > index 33051436c864..eb8ae701ef65 100644 > > --- a/arch/x86/include/asm/processor.h > > +++ b/arch/x86/include/asm/processor.h > > @@ -93,7 +93,9 @@ struct cpuinfo_x86 { > > __u32 extended_cpuid_level; > > /* Maximum supported CPUID level, -1=no CPUID: */ > > int cpuid_level; > > - __u32 x86_capability[NCAPINTS + NBUGINTS]; > > + /* Unsigned long alignment to avoid split lock in atomic bitmap ops */ > > + __u32 x86_capability[NCAPINTS + NBUGINTS] > > + __aligned(sizeof(unsigned long)); > > I think this also warrants a comment in the changelog about the > alignment of 'struct cpuinfo_x86'. How about add "Depending on the starting address where GCC generates for data of struct cpuinfo_x86, x86_capability[] may or may not align to unsigned long...."? Thanks. -Fenghua