[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [RFC v2 3/3] virt: Check KVM_CAP_ARM_IRQ_LINE_LAYOUT_2
From: |
Auger Eric |
Subject: |
Re: [Qemu-devel] [RFC v2 3/3] virt: Check KVM_CAP_ARM_IRQ_LINE_LAYOUT_2 for smp_cpus > 256 |
Date: |
Thu, 12 Sep 2019 10:57:08 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.4.0 |
Hi Peter,
On 9/12/19 10:42 AM, Peter Maydell wrote:
> On Wed, 11 Sep 2019 at 16:51, 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 | 4 ++++
>> target/arm/kvm.c | 21 +++++++++++++++++++++
>> target/arm/kvm_arm.h | 15 +++++++++++++++
>> 3 files changed, 40 insertions(+)
>>
>> diff --git a/hw/arm/virt.c b/hw/arm/virt.c
>> index 0d1629ccb3..465e3140f7 100644
>> --- a/hw/arm/virt.c
>> +++ b/hw/arm/virt.c
>> @@ -1575,6 +1575,10 @@ static void machvirt_init(MachineState *machine)
>> virt_max_cpus = GIC_NCPU;
>> }
>>
>> + if (kvm_arm_irq_line_layout_mismatch(MACHINE(vms), max_cpus)) {
>> + exit(1);
>> + }
>> +
>
> Is there really no place to put this check in common code?
Not sure what you mean by common code here? Do you mean in a common code
for ARM machines (I don't think we have any atm) or directly in
kvm_init(). I did not want to pollute this latter with this ARM specific
fix.
Thanks
Eric
>
> thanks
> -- PMM
>
[Qemu-devel] [RFC v2 1/3] linux headers: update for KVM_CAP_ARM_IRQ_LINE_LAYOUT_2, Eric Auger, 2019/09/11