From: Michael Ellerman <michaele@au1•ibm.com>
To: "Paul E. McKenney" <paulmck@linux•vnet.ibm.com>,
linux-kernel@vger•kernel.org,
"paulus@samba•org" <paulus@samba•org>,
kvm@vger•kernel.org, kvm-ppc@vger•kernel.org,
"linuxppc-dev@lists•ozlabs.org" <linuxppc-dev@lists•ozlabs.org>,
pbonzini@redhat•com
Cc: mingo@kernel•org, jiangshanlai@gmail•com, dipankar@in•ibm.com,
akpm@linux-foundation•org, mathieu.desnoyers@efficios•com,
josh@joshtriplett•org, tglx@linutronix•de, peterz@infradead•org,
rostedt@goodmis•org, dhowells@redhat•com, edumazet@google•com,
fweisbec@gmail•com, oleg@redhat•com, bobby.prani@gmail•com,
"Paul E. McKenney" <paulmck@linux•vnet.ibm.com>
Subject: powerpc KVM build break in linux-next (was Re: [PATCH tip/core/rcu 40/40] srcu: Parallelize callback handling)
Date: Thu, 20 Apr 2017 13:40:13 +1000 [thread overview]
Message-ID: <871ssn692a.fsf@concordia.ellerman.id.au> (raw)
In-Reply-To: <1492018825-25634-40-git-send-email-paulmck@linux.vnet.ibm.com>
"Paul E. McKenney" <paulmck@linux•vnet.ibm.com> writes:
> diff --git a/include/linux/srcutree.h b/include/linux/srcutree.h
> index f2b3bd6c6bc2..0400e211aa44 100644
> --- a/include/linux/srcutree.h
> +++ b/include/linux/srcutree.h
> @@ -24,25 +24,75 @@
...
> +/*
> + * Per-SRCU-domain structure, similar in function to rcu_state.
> + */
> struct srcu_struct {
> - unsigned long completed;
> - unsigned long srcu_gp_seq;
> - atomic_t srcu_exp_cnt;
> - struct srcu_array __percpu *per_cpu_ref;
> - spinlock_t queue_lock; /* protect ->srcu_cblist */
> - struct rcu_segcblist srcu_cblist;
> + struct srcu_node node[NUM_RCU_NODES]; /* Combining tree. */
> + struct srcu_node *level[RCU_NUM_LVLS + 1];
> + /* First node at each level. */
> + struct mutex srcu_cb_mutex; /* Serialize CB preparation. */
> + spinlock_t gp_lock; /* protect ->srcu_cblist */
> + struct mutex srcu_gp_mutex; /* Serialize GP work. */
> + unsigned int srcu_idx; /* Current rdr array element. */
> + unsigned long srcu_gp_seq; /* Grace-period seq #. */
> + unsigned long srcu_gp_seq_needed; /* Latest gp_seq needed. */
> + atomic_t srcu_exp_cnt; /* # ongoing expedited GPs. */
> + struct srcu_data __percpu *sda; /* Per-CPU srcu_data array. */
> + unsigned long srcu_barrier_seq; /* srcu_barrier seq #. */
> + struct mutex srcu_barrier_mutex; /* Serialize barrier ops. */
> + struct completion srcu_barrier_completion;
> + /* Awaken barrier rq at end. */
> + atomic_t srcu_barrier_cpu_cnt; /* # CPUs not yet posting a */
> + /* callback for the barrier */
> + /* operation. */
This change seems to have had the non-obvious effect of breaking the
powerpc KVM build.
Because struct kvm contains two srcu_structs which are located
before the kvm_arch struct, the increase in size of srcu_struct has
caused the offset from the start of struct kvm to kvm_arch to be too big
for some of our asm.
struct kvm {
spinlock_t mmu_lock;
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_arch arch;
Example error:
arch/powerpc/kvm/book3s_hv_rmhandlers.S:617: Error: operand out of range (0x000000000000b328 is not between 0xffffffffffff8000 and 0x0000000000007fff)
Where line 617 is:
lwz r7,KVM_LPID(r9)
And the KVM_LPID constant comes from asm-offsets.s. The diff of old vs
new is:
-->KVM_LPID 17752 offsetof(struct kvm, arch.lpid) #
+->KVM_LPID 45864 offsetof(struct kvm, arch.lpid) #
We can probably just fix it by changing the asm to keep the address of
kvm_arch in a register, and then offset from that.
cheers
next prev parent reply other threads:[~2017-04-20 3:41 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20170412174003.GA23207@linux.vnet.ibm.com>
2017-04-12 17:39 ` [PATCH tip/core/rcu 02/40] rcu: Make arch select smp_mb__after_unlock_lock() strength Paul E. McKenney
2017-04-13 9:21 ` Peter Zijlstra
2017-04-13 16:17 ` Paul E. McKenney
2017-04-13 9:24 ` Peter Zijlstra
2017-04-13 16:26 ` Paul E. McKenney
2017-04-13 16:37 ` Peter Zijlstra
2017-04-13 17:03 ` Paul E. McKenney
2017-04-19 13:38 ` Michael Ellerman
2017-04-19 15:09 ` Paul E. McKenney
[not found] ` <1492018825-25634-40-git-send-email-paulmck@linux.vnet.ibm.com>
2017-04-20 3:40 ` Michael Ellerman [this message]
2017-04-20 14:19 ` powerpc KVM build break in linux-next (was Re: [PATCH tip/core/rcu 40/40] srcu: Parallelize callback handling) Paul E. McKenney
2017-04-20 15:28 ` Paolo Bonzini
2017-04-21 0:38 ` Paul E. McKenney
2017-04-21 1:42 ` Michael Ellerman
2017-04-21 4:17 ` Paul E. McKenney
2017-04-21 7:27 ` Paolo Bonzini
2017-04-21 12:51 ` Paul E. McKenney
2017-04-22 6:09 ` Michael Ellerman
2017-04-21 2:13 ` Michael Ellerman
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=871ssn692a.fsf@concordia.ellerman.id.au \
--to=michaele@au1$(echo .)ibm.com \
--cc=akpm@linux-foundation$(echo .)org \
--cc=bobby.prani@gmail$(echo .)com \
--cc=dhowells@redhat$(echo .)com \
--cc=dipankar@in$(echo .)ibm.com \
--cc=edumazet@google$(echo .)com \
--cc=fweisbec@gmail$(echo .)com \
--cc=jiangshanlai@gmail$(echo .)com \
--cc=josh@joshtriplett$(echo .)org \
--cc=kvm-ppc@vger$(echo .)kernel.org \
--cc=kvm@vger$(echo .)kernel.org \
--cc=linux-kernel@vger$(echo .)kernel.org \
--cc=linuxppc-dev@lists$(echo .)ozlabs.org \
--cc=mathieu.desnoyers@efficios$(echo .)com \
--cc=mingo@kernel$(echo .)org \
--cc=oleg@redhat$(echo .)com \
--cc=paulmck@linux$(echo .)vnet.ibm.com \
--cc=paulus@samba$(echo .)org \
--cc=pbonzini@redhat$(echo .)com \
--cc=peterz@infradead$(echo .)org \
--cc=rostedt@goodmis$(echo .)org \
--cc=tglx@linutronix$(echo .)de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox