[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [RFC 3/3] virt: Check KVM_CAP_ARM_IRQ_LINE_LAYOUT_2 for
From: |
Peter Maydell |
Subject: |
Re: [Qemu-devel] [RFC 3/3] virt: Check KVM_CAP_ARM_IRQ_LINE_LAYOUT_2 for smp_cpus > 256 |
Date: |
Fri, 6 Sep 2019 11:16:31 +0100 |
On Tue, 27 Aug 2019 at 17:06, Eric Auger <address@hidden> wrote:
>
> Host kernel within [4.18, 5.3] report an erroneous KVM_MAX_VCPUS=512
> for ARM. The actual capability to instantiate more than 256 vcpus
> was fixed in 5.4 with the upgrade of the KVM_IRQ_LINE ABI to support
> vcpu id encoded on 12 bits instead of 8 and a redistributor consuming
> a single KVM IO device instead of 2.
>
> So let's check this capability when attempting to use more than 256
> vcpus.
>
> Signed-off-by: Eric Auger <address@hidden>
> ---
> hw/arm/virt.c | 7 +++++++
> target/arm/kvm.c | 7 +++++++
> target/arm/kvm_arm.h | 13 +++++++++++++
> 3 files changed, 27 insertions(+)
>
> diff --git a/hw/arm/virt.c b/hw/arm/virt.c
> index 0d1629ccb3..bcc8d64384 100644
> --- a/hw/arm/virt.c
> +++ b/hw/arm/virt.c
> @@ -1575,6 +1575,13 @@ static void machvirt_init(MachineState *machine)
> virt_max_cpus = GIC_NCPU;
> }
>
> + if (kvm_enabled() && max_cpus > 256 &&
> + !kvm_arm_irq_line_layout_2(MACHINE(vms))) {
> + error_report("Using more than 256 vcpus require a host kernel "
> + "with KVM_CAP_ARM_IRQ_LINE_LAYOUT_2");
> + exit(1);
> + }
Is there some place we could put this check that isn't specific
to the virt board, so that we don't need to duplicate it in
any other future KVM-supporting boards we add?
thanks
-- PMM
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Re: [Qemu-devel] [RFC 3/3] virt: Check KVM_CAP_ARM_IRQ_LINE_LAYOUT_2 for smp_cpus > 256,
Peter Maydell <=