kvm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Eduardo Habkost <ehabkost@redhat.com>
To: kvm@vger.kernel.org, Paolo Bonzini <pbonzini@redhat.com>
Cc: Sean Christopherson <seanjc@google.com>,
	Juergen Gross <jgross@suse.com>,
	Vitaly Kuznetsov <vkuznets@redhat.com>
Subject: [PATCH v2 0/3] kvm: x86: Set KVM_MAX_VCPUS=1024, KVM_SOFT_MAX_VCPUS=710
Date: Fri,  3 Sep 2021 17:15:57 -0400	[thread overview]
Message-ID: <20210903211600.2002377-1-ehabkost@redhat.com> (raw)

This:
- Increases KVM_MAX_VCPUS 288 to 1024.
- Increases KVM_MAX_VCPU_ID from 1023 to 4096.
- Increases KVM_SOFT_MAX_VCPUS from 240 to 710.

Note that this conflicts with:
  https://lore.kernel.org/lkml/20210903130808.30142-1-jgross@suse.com
  Date: Fri,  3 Sep 2021 15:08:01 +0200
  From: Juergen Gross <jgross@suse.com>
  Subject: [PATCH v2 0/6] x86/kvm: add boot parameters for max vcpu configs
  Message-Id: <20210903130808.30142-1-jgross@suse.com>

I don't intend to block Juergen's work.  I will be happy to
rebase and resubmit in case Juergen's series is merged first.
However, I do propose that we set the values above as the default
even if Juergen's series is merged.

The additional overhead (on x86_64) of the new defaults will be:
- struct kvm_ioapic will grow from 1628 to 5084 bytes.
- struct kvm will grow from 19328 to 22272 bytes.
- Bitmap stack variables that will grow:
- At kvm_hv_flush_tlb() & kvm_hv_send_ipi(),
  vp_bitmap[] and vcpu_bitmap[] will now be 128 bytes long
- vcpu_bitmap at bioapic_write_indirect() will be 128 bytes long
  once patch "KVM: x86: Fix stack-out-of-bounds memory access
  from ioapic_write_indirect()" is applied

Changes v1 -> v2:
* KVM_MAX_VCPUS is now 1024 (v1 set it to 710)
* KVM_MAX_VCPU_ID is now 4096 (v1 left it unchanged, at 1023)

v1 of this series was:

  https://lore.kernel.org/lkml/20210831204535.1594297-1-ehabkost@redhat.com
  Date: Tue, 31 Aug 2021 16:45:35 -0400
  From: Eduardo Habkost <ehabkost@redhat.com>
  Subject: [PATCH] kvm: x86: Increase MAX_VCPUS to 710
  Message-Id: <20210831204535.1594297-1-ehabkost@redhat.com>

Eduardo Habkost (3):
  kvm: x86: Set KVM_MAX_VCPU_ID to 4*KVM_MAX_VCPUS
  kvm: x86: Increase MAX_VCPUS to 1024
  kvm: x86: Increase KVM_SOFT_MAX_VCPUS to 710

 arch/x86/include/asm/kvm_host.h | 18 +++++++++++++++---
 1 file changed, 15 insertions(+), 3 deletions(-)

-- 
2.31.1


             reply	other threads:[~2021-09-03 21:16 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-03 21:15 Eduardo Habkost [this message]
2021-09-03 21:15 ` [PATCH v2 1/3] kvm: x86: Set KVM_MAX_VCPU_ID to 4*KVM_MAX_VCPUS Eduardo Habkost
2021-09-03 21:15 ` [PATCH v2 2/3] kvm: x86: Increase MAX_VCPUS to 1024 Eduardo Habkost
2021-09-03 21:16 ` [PATCH v2 3/3] kvm: x86: Increase KVM_SOFT_MAX_VCPUS to 710 Eduardo Habkost
2021-09-06 10:12 ` [PATCH v2 0/3] kvm: x86: Set KVM_MAX_VCPUS=1024, KVM_SOFT_MAX_VCPUS=710 Paolo Bonzini
2021-09-11  0:30   ` Sean Christopherson
2021-09-11 15:26     ` Eduardo Habkost
2021-09-13  5:09       ` Juergen Gross

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=20210903211600.2002377-1-ehabkost@redhat.com \
    --to=ehabkost@redhat.com \
    --cc=jgross@suse.com \
    --cc=kvm@vger.kernel.org \
    --cc=pbonzini@redhat.com \
    --cc=seanjc@google.com \
    --cc=vkuznets@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).