Allow --irqchip=gicv5 and prefer GICv5 for automatic irqchip selection when the kernel supports it. The IRS and guest DT support are now in place. Reviewed-by: Vladimir Murzin Tested-by: Vladimir Murzin Signed-off-by: Sascha Bischoff --- arm64/gic.c | 4 +++- arm64/include/kvm/kvm-config-arch.h | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/arm64/gic.c b/arm64/gic.c index 91447703..6abd7d44 100644 --- a/arm64/gic.c +++ b/arm64/gic.c @@ -78,6 +78,8 @@ int irqchip_parser(const struct option *opt, const char *arg, int unset) *type = IRQCHIP_GICV3; } else if (!strcmp(arg, "gicv3-its")) { *type = IRQCHIP_GICV3_ITS; + } else if (!strcmp(arg, "gicv5")) { + *type = IRQCHIP_GICV5; } else { pr_err("irqchip: unknown type \"%s\"\n", arg); return -1; @@ -404,7 +406,7 @@ int gic__create(struct kvm *kvm, enum irqchip_type type) switch (type) { case IRQCHIP_AUTO: - for (try = IRQCHIP_GICV3_ITS; try >= IRQCHIP_GICV2; try--) { + for (try = IRQCHIP_GICV5; try >= IRQCHIP_GICV2; try--) { err = gic__create(kvm, try); if (!err) break; diff --git a/arm64/include/kvm/kvm-config-arch.h b/arm64/include/kvm/kvm-config-arch.h index d8a8ef7f..46130663 100644 --- a/arm64/include/kvm/kvm-config-arch.h +++ b/arm64/include/kvm/kvm-config-arch.h @@ -59,7 +59,7 @@ int sve_vl_parser(const struct option *opt, const char *arg, int unset); "transport (Deprecated: Use --virtio-transport " \ "option instead)", virtio_transport_parser, kvm), \ OPT_CALLBACK('\0', "irqchip", &(cfg)->irqchip, \ - "[gicv2|gicv2m|gicv3|gicv3-its]", \ + "[gicv2|gicv2m|gicv3|gicv3-its|gicv5]", \ "Type of interrupt controller to emulate in the guest", \ irqchip_parser, NULL), \ OPT_U64('\0', "firmware-address", &(cfg)->fw_addr, \ -- 2.34.1