[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v2 5/6] hw/arm/virt: kvm: Check the chosen gic version is sup
From: |
Auger Eric |
Subject: |
Re: [PATCH v2 5/6] hw/arm/virt: kvm: Check the chosen gic version is supported by the host |
Date: |
Sun, 1 Mar 2020 19:02:25 +0100 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.4.0 |
Hi Richard,
On 3/1/20 6:56 PM, Richard Henderson wrote:
> On 3/1/20 2:40 AM, Eric Auger wrote:
>> + /* Check chosen version is effectively supported by the host */
>> + if (vms->gic_version == VIRT_GIC_VERSION_2 &&
>> + !(probe_bitmap & KVM_ARM_VGIC_V2)) {
>> + error_report("host does not support in-kernel GICv2
>> emulation");
>> + exit(1);
>> + } else if (vms->gic_version == VIRT_GIC_VERSION_3 &&
>> + !(probe_bitmap & KVM_ARM_VGIC_V3)) {
>> + error_report("host does not support in-kernel GICv3
>> emulation");
>> + exit(1);
>> + }
>
> Indentation is wrong here.
OK
>
>> + case VIRT_GIC_VERSION_HOST:
>> + error_report("gic-version=host requires KVM");
>> + exit(1);
>> + default: /* explicit V2/V3 are left untouched */
>> + break;
>> }
>
> I'd prefer to just list V2 and V3 here explicitly, instead of the default.
> It'll be nicer with gic_version changed to an enum.
OK I will respin with those changes.
Thank you for the review!
Best Regards
Eric
>
> With those changes,
> Reviewed-by: Richard Henderson <address@hidden>
>
>
> r~
>
- [PATCH v2 0/6] hw/arm/virt: kvm: allow gicv3 by default if v2 cannot work, Eric Auger, 2020/03/01
- [PATCH v2 1/6] hw/arm/virt: Document 'max' value in gic-version property description, Eric Auger, 2020/03/01
- [PATCH v2 2/6] hw/arm/virt: Use VIRT_GIC_VERSION defines, Eric Auger, 2020/03/01
- [PATCH v2 4/6] target/arm/kvm: Let kvm_arm_vgic_probe() return a bitmap, Eric Auger, 2020/03/01
- [PATCH v2 5/6] hw/arm/virt: kvm: Check the chosen gic version is supported by the host, Eric Auger, 2020/03/01
- [PATCH v2 6/6] hw/arm/virt: kvm: allow gicv3 by default if v2 cannot work, Eric Auger, 2020/03/01
- [PATCH v2 3/6] hw/arm/virt: Introduce finalize_gic_version(), Eric Auger, 2020/03/01
- Re: [PATCH v2 0/6] hw/arm/virt: kvm: allow gicv3 by default if v2 cannot work, Andrew Jones, 2020/03/02