[RFC 5/9] hw/virt: make Qemu aware that WHPX has a vGICv3

Mohamed Mediouni posted 9 patches 3 months, 2 weeks ago
Maintainers: Peter Maydell <peter.maydell@linaro.org>, Paolo Bonzini <pbonzini@redhat.com>, "Marc-André Lureau" <marcandre.lureau@redhat.com>, "Daniel P. Berrangé" <berrange@redhat.com>, "Philippe Mathieu-Daudé" <philmd@linaro.org>, Sunil Muthuswamy <sunilmut@microsoft.com>
There is a newer version of this series
[RFC 5/9] hw/virt: make Qemu aware that WHPX has a vGICv3
Posted by Mohamed Mediouni 3 months, 2 weeks ago
WHPX is a vGICv3-only target without vGICv2 or user-mode irqchip
support.

Signed-off-by: Mohamed Mediouni <mohamed@unpredictable.fr>
---
 hw/arm/virt.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/hw/arm/virt.c b/hw/arm/virt.c
index ef6be3660f..4996c2075e 100644
--- a/hw/arm/virt.c
+++ b/hw/arm/virt.c
@@ -49,6 +49,7 @@
 #include "system/tcg.h"
 #include "system/kvm.h"
 #include "system/hvf.h"
+#include "system/whpx.h"
 #include "system/qtest.h"
 #include "hw/loader.h"
 #include "qapi/error.h"
@@ -2058,6 +2059,8 @@ static void finalize_gic_version(VirtMachineState *vms)
         /* KVM w/o kernel irqchip can only deal with GICv2 */
         gics_supported |= VIRT_GIC_VERSION_2_MASK;
         accel_name = "KVM with kernel-irqchip=off";
+    } else if (whpx_enabled()) {
+        gics_supported |= VIRT_GIC_VERSION_3_MASK;
     } else if (tcg_enabled() || hvf_enabled() || qtest_enabled())  {
         gics_supported |= VIRT_GIC_VERSION_2_MASK;
         if (module_object_class_by_name("arm-gicv3")) {
-- 
2.39.5 (Apple Git-154)
Re: [RFC 5/9] hw/virt: make Qemu aware that WHPX has a vGICv3
Posted by Philippe Mathieu-Daudé 3 months, 2 weeks ago
On 31/7/25 07:27, Mohamed Mediouni wrote:
> WHPX is a vGICv3-only target without vGICv2 or user-mode irqchip
> support.
> 
> Signed-off-by: Mohamed Mediouni <mohamed@unpredictable.fr>
> ---
>   hw/arm/virt.c | 3 +++
>   1 file changed, 3 insertions(+)
> 
> diff --git a/hw/arm/virt.c b/hw/arm/virt.c
> index ef6be3660f..4996c2075e 100644
> --- a/hw/arm/virt.c
> +++ b/hw/arm/virt.c
> @@ -49,6 +49,7 @@
>   #include "system/tcg.h"
>   #include "system/kvm.h"
>   #include "system/hvf.h"
> +#include "system/whpx.h"
>   #include "system/qtest.h"
>   #include "hw/loader.h"
>   #include "qapi/error.h"
> @@ -2058,6 +2059,8 @@ static void finalize_gic_version(VirtMachineState *vms)
>           /* KVM w/o kernel irqchip can only deal with GICv2 */
>           gics_supported |= VIRT_GIC_VERSION_2_MASK;
>           accel_name = "KVM with kernel-irqchip=off";
> +    } else if (whpx_enabled()) {
> +        gics_supported |= VIRT_GIC_VERSION_3_MASK;
>       } else if (tcg_enabled() || hvf_enabled() || qtest_enabled())  {
>           gics_supported |= VIRT_GIC_VERSION_2_MASK;
>           if (module_object_class_by_name("arm-gicv3")) {

Should this patch be the last of the series to avoid breaking
git bisectability?
Re: [RFC 5/9] hw/virt: make Qemu aware that WHPX has a vGICv3
Posted by Mohamed Mediouni 3 months, 2 weeks ago

> On 31. Jul 2025, at 10:35, Philippe Mathieu-Daudé <philmd@linaro.org> wrote:
> 
> On 31/7/25 07:27, Mohamed Mediouni wrote:
>> WHPX is a vGICv3-only target without vGICv2 or user-mode irqchip
>> support.
>> Signed-off-by: Mohamed Mediouni <mohamed@unpredictable.fr>
>> ---
>>  hw/arm/virt.c | 3 +++
>>  1 file changed, 3 insertions(+)
>> diff --git a/hw/arm/virt.c b/hw/arm/virt.c
>> index ef6be3660f..4996c2075e 100644
>> --- a/hw/arm/virt.c
>> +++ b/hw/arm/virt.c
>> @@ -49,6 +49,7 @@
>>  #include "system/tcg.h"
>>  #include "system/kvm.h"
>>  #include "system/hvf.h"
>> +#include "system/whpx.h"
>>  #include "system/qtest.h"
>>  #include "hw/loader.h"
>>  #include "qapi/error.h"
>> @@ -2058,6 +2059,8 @@ static void finalize_gic_version(VirtMachineState *vms)
>>          /* KVM w/o kernel irqchip can only deal with GICv2 */
>>          gics_supported |= VIRT_GIC_VERSION_2_MASK;
>>          accel_name = "KVM with kernel-irqchip=off";
>> +    } else if (whpx_enabled()) {
>> +        gics_supported |= VIRT_GIC_VERSION_3_MASK;
>>      } else if (tcg_enabled() || hvf_enabled() || qtest_enabled())  {
>>          gics_supported |= VIRT_GIC_VERSION_2_MASK;
>>          if (module_object_class_by_name("arm-gicv3")) {
> 
> Should this patch be the last of the series to avoid breaking
> git bisectability?

Not needed for buildability I think, as system/whpx.h was already present before because of x86 whpx