Received: by 2002:ac0:aed5:0:0:0:0:0 with SMTP id t21csp2716601imb; Mon, 4 Mar 2019 12:13:04 -0800 (PST) X-Google-Smtp-Source: APXvYqy74BdwXXRej46cPBtB4NWOTGfifxaDxRsdfYxlfn1Kv3202C2HP0qlmk2G0xkVbVhJ1Xm5 X-Received: by 2002:a17:902:bc81:: with SMTP id bb1mr5897823plb.48.1551730384010; Mon, 04 Mar 2019 12:13:04 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1551730384; cv=none; d=google.com; s=arc-20160816; b=bttRGko0w0R7l2rf2bvrIXv/WGTlb5RAm444NkVgAHCb8h5QCXnW9u3sJMUFc+VSPg kGHip8xuPzPc6aQZlJHEJjNK5CSIll3rRxmgitY4yc4g7kNohIk4CR+5F4ImXMZJLHEB F0Q70U1dJu7KAhsLPcouzwzq0qeJtSphPTltptg3345iQiAr8w3/qQmZhe5P+PDC3hx7 +JBxjkA3H2E7uYlYx6LqpxGnSaJYJpsQRK6cn/kBIK30A9HftYgEmUCxOXuIrGfvKwOn hpURPKqzYbBFU/aukgwHxK3sTXvVjoSQoHE45Oxwdw07LWRIxyCnObq55+5fN+WuDVXE 1+RQ== 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:dkim-signature; bh=3SJHnacTOoBW8b8W4vRv0uvz720ObhfHvmTAouUsjm4=; b=ygx2M3bXd8FOPBXEdlTjqcyTZPWEBwRqXG3Jlbxt1KqZpKYqvLXYs2fId0Oj7lmPyW 7pF0I8iKru5eLIfprPffp86FHB21Z6lH1oJ6wlv1JgCKwtPDUw9t1aKPngzxPw08UHMX EL+zU+gfAPehL4ZVlmIPhf6Y2sfgqf6p3tIIiU0AFe7sqpfM9DlXNTh6JlwDZMttH9gz BfwIMPOs5ijLaJ5eXYYKZVif0ud+uIJ0WVWB7Buf+6Wlosv8d8RKS39xlwKbRh3LwUjH +2Zs1VG6oQLqaoCdirPGOGr12+/0jXPXmpoRjNpGpwmv4IK4ytu/mVM1vJyyy/ESu0Z3 TrlQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=merlin.20170209 header.b=WYBo7Fjb; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id y184si5862502pgd.118.2019.03.04.12.12.48; Mon, 04 Mar 2019 12:13:03 -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; dkim=fail header.i=@infradead.org header.s=merlin.20170209 header.b=WYBo7Fjb; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726488AbfCDUMN (ORCPT + 99 others); Mon, 4 Mar 2019 15:12:13 -0500 Received: from merlin.infradead.org ([205.233.59.134]:47720 "EHLO merlin.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726308AbfCDUMM (ORCPT ); Mon, 4 Mar 2019 15:12:12 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=merlin.20170209; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=3SJHnacTOoBW8b8W4vRv0uvz720ObhfHvmTAouUsjm4=; b=WYBo7FjbN/ay5p15+iiU7lNRi G1hABjf33ZG3i01s4h+TCMgwFNbBZikIXpApItFCAQN7FVLWrMnWEvsHCHF4YoNj2dkEKbUL21r36 SFJWS8/OOhHZELLCYSxIa+tSI1u7DLuDnzSUWxOWpfmmmkOK0qoKEdyiycrbmnNSWIqVjHPUPfVou x+pRSr3R5uB2oEeZmTnokPdfx1GGwwtkKxcumkNXR/q9Kmllj1QMxQor0wK500nLaN9ns5CbSzfuA b3+ccopq3dzEikq8vwWFXAan4Ba5jGqUjLPZFNhTeKIYVRdBK1QD8gC6ny6siEUsoiZHd4i5aQyha QaqkskQog==; Received: from j217100.upc-j.chello.nl ([24.132.217.100] helo=hirez.programming.kicks-ass.net) by merlin.infradead.org with esmtpsa (Exim 4.90_1 #2 (Red Hat Linux)) id 1h0twR-0008VC-VR; Mon, 04 Mar 2019 20:12:04 +0000 Received: by hirez.programming.kicks-ass.net (Postfix, from userid 1000) id 6C2AA201383D7; Mon, 4 Mar 2019 21:12:01 +0100 (CET) Date: Mon, 4 Mar 2019 21:12:01 +0100 From: Peter Zijlstra To: Dave Hansen Cc: Fenghua Yu , Thomas Gleixner , Ingo Molnar , Borislav Petkov , H Peter Anvin , Paolo Bonzini , Ashok Raj , 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: <20190304201201.GT32494@hirez.programming.kicks-ass.net> 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.10.1 (2018-07-13) 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'. Nah.