From: Sean Christopherson <seanjc@google.com>
To: Nicholas Piggin <npiggin@gmail.com>
Cc: Juergen Gross <jgross@suse.com>,
kvm@vger.kernel.org, linux-kernel@vger.kernel.org,
Marc Zyngier <maz@kernel.org>,
Paolo Bonzini <pbonzini@redhat.com>
Subject: Re: [PATCH] KVM: move struct kvm_vcpu * array to the bottom of struct kvm
Date: Mon, 8 Nov 2021 15:35:11 +0000 [thread overview]
Message-ID: <YYlDr2HLI/eULoDy@google.com> (raw)
In-Reply-To: <1636158401.g3t5cp0jke.astroid@bobo.none>
On Sat, Nov 06, 2021, Nicholas Piggin wrote:
> Excerpts from Sean Christopherson's message of November 6, 2021 12:49 am:
> >> 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?
> >
> > [1] https://git.kernel.org/pub/scm/linux/kernel/git/maz/arm-platforms.git/log/?h=kvm-arm64/vcpu-xarray
> > [2] https://lkml.kernel.org/r/871r65wwk7.wl-maz@kernel.org
>
> Seems like a good idea if it can allow vcpu structs to be allocated to
> preferred nodes.
>
> >> however x86 kvm_svm uses its own scheme rather than kvm_arch for some reason.
> >
> > What's the problem in kvm_svm?
>
> It embeds a struct kvm so it couldn't be variable sized.
Oooh, when you said "dynamically sized" I thought you meant
struct kvm_vcpu *vcpus;
...
kvm->vcpus = kcalloc(...);
Anyways, SVM and VMX are quite different despited both being x86, to keep them
separated without requiring an extra allocation, kvm_svm and kvm_vmx embed kvm.
Ditto for vcpu_vmx and vmx_svm. Obviously not a hard requirement, but there also
hasn't been a reason not to do embed kvm/kvm_vcpu.
prev parent reply other threads:[~2021-11-08 15:35 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-11-05 3:49 [PATCH] KVM: move struct kvm_vcpu * array to the bottom of struct kvm Nicholas Piggin
2021-11-05 14:49 ` Sean Christopherson
2021-11-05 18:37 ` Marc Zyngier
2021-11-06 0:29 ` Nicholas Piggin
2021-11-08 15:35 ` Sean Christopherson [this message]
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=YYlDr2HLI/eULoDy@google.com \
--to=seanjc@google.com \
--cc=jgross@suse.com \
--cc=kvm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=maz@kernel.org \
--cc=npiggin@gmail.com \
--cc=pbonzini@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.