Allow --irqchip=gicv5-its now that the ITS DT nodes and PCI MSI requester mapping are in place. Start automatic irqchip selection at GICv5 ITS so it is preferred ahead of base GICv5 and older models. 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 4ba626bf..34622850 100644 --- a/arm64/gic.c +++ b/arm64/gic.c @@ -52,6 +52,8 @@ int irqchip_parser(const struct option *opt, const char *arg, int unset) *type = IRQCHIP_GICV3_ITS; } else if (!strcmp(arg, "gicv5")) { *type = IRQCHIP_GICV5; + } else if (!strcmp(arg, "gicv5-its")) { + *type = IRQCHIP_GICV5_ITS; } else { pr_err("irqchip: unknown type \"%s\"\n", arg); return -1; @@ -300,7 +302,7 @@ int gic__create(struct kvm *kvm, enum irqchip_type type) switch (type) { case IRQCHIP_AUTO: - for (try = IRQCHIP_GICV5; try >= IRQCHIP_GICV2; try--) { + for (try = IRQCHIP_GICV5_ITS; 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 46130663..936b142d 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|gicv5]", \ + "[gicv2|gicv2m|gicv3|gicv3-its|gicv5|gicv5-its]", \ "Type of interrupt controller to emulate in the guest", \ irqchip_parser, NULL), \ OPT_U64('\0', "firmware-address", &(cfg)->fw_addr, \ -- 2.34.1