From patchwork Fri Apr 21 01:42:01 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Ellerman X-Patchwork-Id: 753055 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 3w8JR35Y5Qz9s0g for ; Fri, 21 Apr 2017 11:43:11 +1000 (AEST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1034371AbdDUBnK (ORCPT ); Thu, 20 Apr 2017 21:43:10 -0400 Received: from mx0a-001b2d01.pphosted.com ([148.163.156.1]:45309 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1034283AbdDUBnJ (ORCPT ); Thu, 20 Apr 2017 21:43:09 -0400 Received: from pps.filterd (m0098396.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.20/8.16.0.20) with SMTP id v3L1coiq022156 for ; Thu, 20 Apr 2017 21:43:08 -0400 Received: from e23smtp03.au.ibm.com (e23smtp03.au.ibm.com [202.81.31.145]) by mx0a-001b2d01.pphosted.com with ESMTP id 29y0hdtvkd-1 (version=TLSv1.2 cipher=AES256-SHA bits=256 verify=NOT) for ; Thu, 20 Apr 2017 21:43:08 -0400 Received: from localhost by e23smtp03.au.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Fri, 21 Apr 2017 11:43:05 +1000 Received: from d23relay10.au.ibm.com (202.81.31.229) by e23smtp03.au.ibm.com (202.81.31.209) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Fri, 21 Apr 2017 11:43:03 +1000 Received: from d23av03.au.ibm.com (d23av03.au.ibm.com [9.190.234.97]) by d23relay10.au.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id v3L1gso246137580; Fri, 21 Apr 2017 11:43:02 +1000 Received: from d23av03.au.ibm.com (localhost [127.0.0.1]) by d23av03.au.ibm.com (8.14.4/8.14.4/NCO v10.0 AVout) with ESMTP id v3L1gODk027839; Fri, 21 Apr 2017 11:42:26 +1000 Received: from ozlabs.au.ibm.com (ozlabs.au.ibm.com [9.192.253.14]) by d23av03.au.ibm.com (8.14.4/8.14.4/NCO v10.0 AVin) with ESMTP id v3L1gO4v027419; Fri, 21 Apr 2017 11:42:24 +1000 Received: from localhost (haven.au.ibm.com [9.192.254.114]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ozlabs.au.ibm.com (Postfix) with ESMTPSA id 65416A00BE; Fri, 21 Apr 2017 11:42:04 +1000 (AEST) From: Michael Ellerman To: paulmck@linux.vnet.ibm.com, Paolo Bonzini Cc: tglx@linutronix.de, kvm@vger.kernel.org, oleg@redhat.com, peterz@infradead.org, fweisbec@gmail.com, bobby.prani@gmail.com, jiangshanlai@gmail.com, linux-kernel@vger.kernel.org, kvm-ppc@vger.kernel.org, josh@joshtriplett.org, dhowells@redhat.com, edumazet@google.com, "paulus\@samba.org" , rostedt@goodmis.org, dipankar@in.ibm.com, mathieu.desnoyers@efficios.com, akpm@linux-foundation.org, "linuxppc-dev\@lists.ozlabs.org" , mingo@kernel.org Subject: Re: powerpc KVM build break in linux-next (was Re: [PATCH tip/core/rcu 40/40] srcu: Parallelize callback handling) In-Reply-To: <20170421003834.GA14351@linux.vnet.ibm.com> References: <20170412174003.GA23207@linux.vnet.ibm.com> <1492018825-25634-40-git-send-email-paulmck@linux.vnet.ibm.com> <871ssn692a.fsf@concordia.ellerman.id.au> <24c85d26-bb4b-892d-5837-6d02af570e0e@redhat.com> <20170421003834.GA14351@linux.vnet.ibm.com> User-Agent: Notmuch/0.21 (https://notmuchmail.org) Date: Fri, 21 Apr 2017 11:42:01 +1000 MIME-Version: 1.0 X-TM-AS-MML: disable x-cbid: 17042101-0008-0000-0000-000001218E05 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 17042101-0009-0000-0000-0000094ED6AD Message-Id: <87zifatu3a.fsf@concordia.ellerman.id.au> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:, , definitions=2017-04-21_01:, , signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 spamscore=0 suspectscore=0 malwarescore=0 phishscore=0 adultscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1703280000 definitions=main-1704210027 Sender: kvm-ppc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm-ppc@vger.kernel.org "Paul E. McKenney" writes: > On Thu, Apr 20, 2017 at 05:28:32PM +0200, Paolo Bonzini wrote: >> On 20/04/2017 05:40, Michael Ellerman wrote: >> > "Paul E. McKenney" writes: >> > >> > This change seems to have had the non-obvious effect of breaking the >> > powerpc KVM build. ... >> >> Michael, if you want to move the two srcu structs at the end of struct >> kvm, that would be fine by me. Please send a patch yourself so you can >> test it on PPC. Thanks, > > On the off-chance that it is at all helpful, I have added the commit > shown below to -rcu. As shown below :) > If it helps, I am happy to push this, but am just as happy to drop it > in favor of some other fix. If at all possible, I would like to get > this into the upcoming merge window. Thanks, this looks perfect to me, and if you're happy to put it on top of your tree that would limit the breakage to a smaller history window, so that would be ideal. Tested-by: Michael Ellerman cheers From a19a6617e2817e485ccc2f7cc5a97bd7ff769b87 Mon Sep 17 00:00:00 2001 From: "Paul E. McKenney" Date: Thu, 20 Apr 2017 17:30:06 -0700 Subject: kvm: Move srcu_struct fields to end of struct kvm Parallelizing SRCU callback handling increased the size of srcu_struct, which moved the kvm_arch field within the kvm struct out of reach of powerpc's current assembly code, resulting in the following sort of build error: arch/powerpc/kvm/book3s_hv_rmhandlers.S:617: Error: operand out of range (0x000000000000b328 is not between 0xffffffffffff8000 and 0x0000000000007fff) This commit moves the srcu_struct fields in the kvm structure to follow the kvm_arch field, which again allows powerpc's assembly code to reach it. Reported-by: Stephen Rothwell Reported-by: Michael Ellerman Reported-by: kbuild test robot Suggested-by: Paolo Bonzini Signed-off-by: Paul E. McKenney Acked-by: Paolo Bonzini --- include/linux/kvm_host.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/linux/kvm_host.h b/include/linux/kvm_host.h index 2c14ad9..96c8e29 100644 --- a/include/linux/kvm_host.h +++ b/include/linux/kvm_host.h @@ -375,8 +375,6 @@ struct kvm { struct mutex slots_lock; struct mm_struct *mm; /* userspace tied to this vm */ struct kvm_memslots *memslots[KVM_ADDRESS_SPACE_NUM]; - struct srcu_struct srcu; - struct srcu_struct irq_srcu; struct kvm_vcpu *vcpus[KVM_MAX_VCPUS]; /* @@ -429,6 +427,8 @@ struct kvm { struct list_head devices; struct dentry *debugfs_dentry; struct kvm_stat_data **debugfs_stat_data; + struct srcu_struct srcu; + struct srcu_struct irq_srcu; }; #define kvm_err(fmt, ...) \