* [PATCH] KVM: PPC: Book3S: Move vcore definition to end of kvm_arch struct
@ 2014-07-04 10:56 Alexander Graf
2014-07-04 12:30 ` Paul Mackerras
0 siblings, 1 reply; 2+ messages in thread
From: Alexander Graf @ 2014-07-04 10:56 UTC (permalink / raw)
To: kvm-ppc; +Cc: kvm, paulus
When building KVM with a lot of vcores (NR_CPUS is big), we can potentially
get out of the ld immediate range for dereferences inside that struct.
Move the array to the end of our kvm_arch struct. This fixes compilation
issues with NR_CPUS=2048 for me.
Signed-off-by: Alexander Graf <agraf@suse.de>
---
arch/powerpc/include/asm/kvm_host.h | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/arch/powerpc/include/asm/kvm_host.h b/arch/powerpc/include/asm/kvm_host.h
index faf2f0e..855ba4d 100644
--- a/arch/powerpc/include/asm/kvm_host.h
+++ b/arch/powerpc/include/asm/kvm_host.h
@@ -255,7 +255,6 @@ struct kvm_arch {
atomic_t hpte_mod_interest;
spinlock_t slot_phys_lock;
cpumask_t need_tlb_flush;
- struct kvmppc_vcore *vcores[KVM_MAX_VCORES];
int hpt_cma_alloc;
#endif /* CONFIG_KVM_BOOK3S_HV_POSSIBLE */
#ifdef CONFIG_KVM_BOOK3S_PR_POSSIBLE
@@ -273,6 +272,10 @@ struct kvm_arch {
struct kvmppc_xics *xics;
#endif
struct kvmppc_ops *kvm_ops;
+#ifdef CONFIG_KVM_BOOK3S_HV_POSSIBLE
+ /* This array can grow quite large, keep it at the end */
+ struct kvmppc_vcore *vcores[KVM_MAX_VCORES];
+#endif
};
/*
--
1.8.1.4
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] KVM: PPC: Book3S: Move vcore definition to end of kvm_arch struct
2014-07-04 10:56 [PATCH] KVM: PPC: Book3S: Move vcore definition to end of kvm_arch struct Alexander Graf
@ 2014-07-04 12:30 ` Paul Mackerras
0 siblings, 0 replies; 2+ messages in thread
From: Paul Mackerras @ 2014-07-04 12:30 UTC (permalink / raw)
To: Alexander Graf; +Cc: kvm-ppc, kvm
On Fri, Jul 04, 2014 at 12:56:58PM +0200, Alexander Graf wrote:
> When building KVM with a lot of vcores (NR_CPUS is big), we can potentially
> get out of the ld immediate range for dereferences inside that struct.
>
> Move the array to the end of our kvm_arch struct. This fixes compilation
> issues with NR_CPUS=2048 for me.
>
> Signed-off-by: Alexander Graf <agraf@suse.de>
Acked-by: Paul Mackerras <paulus@samba.org>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2014-07-04 12:30 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-07-04 10:56 [PATCH] KVM: PPC: Book3S: Move vcore definition to end of kvm_arch struct Alexander Graf
2014-07-04 12:30 ` Paul Mackerras
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox