From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id A9519C433FE for ; Fri, 5 Nov 2021 18:37:53 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 927C9611C0 for ; Fri, 5 Nov 2021 18:37:53 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232623AbhKESkc (ORCPT ); Fri, 5 Nov 2021 14:40:32 -0400 Received: from mail.kernel.org ([198.145.29.99]:48698 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232528AbhKESka (ORCPT ); Fri, 5 Nov 2021 14:40:30 -0400 Received: from disco-boy.misterjones.org (disco-boy.misterjones.org [51.254.78.96]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id E1CDC61186; Fri, 5 Nov 2021 18:37:50 +0000 (UTC) Received: from sofa.misterjones.org ([185.219.108.64] helo=why.misterjones.org) by disco-boy.misterjones.org with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1mj460-003iL6-Mu; Fri, 05 Nov 2021 18:37:48 +0000 Date: Fri, 05 Nov 2021 18:37:48 +0000 Message-ID: <87wnlm8n43.wl-maz@kernel.org> From: Marc Zyngier To: Sean Christopherson Cc: Nicholas Piggin , Paolo Bonzini , kvm@vger.kernel.org, linux-kernel@vger.kernel.org, Juergen Gross Subject: Re: [PATCH] KVM: move struct kvm_vcpu * array to the bottom of struct kvm In-Reply-To: References: <20211105034949.1397997-1-npiggin@gmail.com> User-Agent: Wanderlust/2.15.9 (Almost Unreal) SEMI-EPG/1.14.7 (Harue) FLIM-LB/1.14.9 (=?UTF-8?B?R29qxY0=?=) APEL-LB/10.8 EasyPG/1.0.0 Emacs/27.1 (x86_64-pc-linux-gnu) MULE/6.0 (HANACHIRUSATO) MIME-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") Content-Type: text/plain; charset=US-ASCII X-SA-Exim-Connect-IP: 185.219.108.64 X-SA-Exim-Rcpt-To: seanjc@google.com, npiggin@gmail.com, pbonzini@redhat.com, kvm@vger.kernel.org, linux-kernel@vger.kernel.org, jgross@suse.com X-SA-Exim-Mail-From: maz@kernel.org X-SA-Exim-Scanned: No (on disco-boy.misterjones.org); SAEximRunCond expanded to false Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, 05 Nov 2021 14:49:57 +0000, Sean Christopherson wrote: > > +Juergen and Marc > > On Fri, Nov 05, 2021, Nicholas Piggin wrote: > > Increasing the max VCPUs on powerpc makes the kvm_arch member offset > > great enough that some assembly breaks due to addressing constants > > overflowing field widths. > > > > Moving the vcpus array to the end of struct kvm prevents this from > > happening. It has the side benefit that moving the large array out > > from the middle of the structure should help keep other commonly > > accessed fields in the same or adjacent cache lines. > > > > Signed-off-by: Nicholas Piggin > > --- > > > > It would next be possible to now make this a dynamically sized array, > > and make the KVM_MAX_VCPUS more dynamic > > Marc has a mostly-baked series to use an xarray[1][2] that AFAICT > would be well received. That has my vote, assuming it can get into > 5.16. Marc or Juergen, are either of you actively working on that? I've just revived it, as it needed some RISC-V changes. I'll post it in a jiffy. M. -- Without deviation from the norm, progress is not possible.