diff options
author | Eric Auger <eric.auger@redhat.com> | 2018-06-22 13:28:38 +0100 |
---|---|---|
committer | Peter Maydell <peter.maydell@linaro.org> | 2018-06-22 13:28:38 +0100 |
commit | b10fbd5363e58a9996ad9af0f8f456d89770b0a9 (patch) | |
tree | 674c8be7294f29b62d1a5b427fa4b623027abde4 /hw/arm | |
parent | 17ec075a651a3f9613429c2d97018fce459ed943 (diff) | |
download | qemu-b10fbd5363e58a9996ad9af0f8f456d89770b0a9.zip qemu-b10fbd5363e58a9996ad9af0f8f456d89770b0a9.tar.gz qemu-b10fbd5363e58a9996ad9af0f8f456d89770b0a9.tar.bz2 |
hw/arm/virt: Increase max_cpus to 512
virt 3.0 now allows up to 512 vcpus whereas for earlier machine
types, max_cpus was set to 255 and any attempt to start the
machine with vcpus > 255 was rejected at a very early stage,
in vl.c/main level.
512 is the max supported by KVM. Anyway the actual vcpu count
that can be achieved depends on other parameters such as the
acceleration mode, the vgic version, the host kernel version.
Those are discovered later on.
Signed-off-by: Eric Auger <eric.auger@redhat.com>
Reviewed-by: Andrew Jones <drjones@redhat.com>
Message-id: 1529072910-16156-12-git-send-email-eric.auger@redhat.com
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'hw/arm')
-rw-r--r-- | hw/arm/virt.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/hw/arm/virt.c b/hw/arm/virt.c index 0f8bfa5..742f68a 100644 --- a/hw/arm/virt.c +++ b/hw/arm/virt.c @@ -1706,11 +1706,11 @@ static void virt_machine_class_init(ObjectClass *oc, void *data) HotplugHandlerClass *hc = HOTPLUG_HANDLER_CLASS(oc); mc->init = machvirt_init; - /* Start max_cpus at the maximum QEMU supports. We'll further restrict - * it later in machvirt_init, where we have more information about the + /* Start with max_cpus set to 512, which is the maximum supported by KVM. + * The value may be reduced later when we have more information about the * configuration of the particular instance. */ - mc->max_cpus = 255; + mc->max_cpus = 512; machine_class_allow_dynamic_sysbus_dev(mc, TYPE_VFIO_CALXEDA_XGMAC); machine_class_allow_dynamic_sysbus_dev(mc, TYPE_VFIO_AMD_XGBE); machine_class_allow_dynamic_sysbus_dev(mc, TYPE_RAMFB_DEVICE); @@ -1837,6 +1837,7 @@ static void virt_machine_2_12_options(MachineClass *mc) virt_machine_3_0_options(mc); SET_MACHINE_COMPAT(mc, VIRT_COMPAT_2_12); vmc->no_highmem_ecam = true; + mc->max_cpus = 255; } DEFINE_VIRT_MACHINE(2, 12) |