@@ -927,6 +927,8 @@ static inline int mmu_notifier_retry(struct kvm *kvm, unsigned long mmu_seq)
#ifdef CONFIG_S390
#define KVM_MAX_IRQ_ROUTES 4096 //FIXME: we can have more than that...
+#elif defined(CONFIG_ARM64)
+#define KVM_MAX_IRQ_ROUTES 4096 //FIXME: we can have more than that too...
#else
#define KVM_MAX_IRQ_ROUTES 1024
#endif
@@ -2256,6 +2256,19 @@ int kvm_set_routing_entry(struct kvm_kernel_irq_routing_entry *e,
(e->irqchip.irqchip >= KVM_NR_IRQCHIPS))
goto out;
break;
+ case KVM_IRQ_ROUTING_MSI:
+ e->set = kvm_set_msi;
+ e->msi.address_lo = ue->u.msi.address_lo;
+ e->msi.address_hi = ue->u.msi.address_hi;
+ e->msi.data = ue->u.msi.data;
+ break;
+ case KVM_IRQ_ROUTING_EXTENDED_MSI:
+ e->set = kvm_set_msi;
+ e->ext_msi.address_lo = ue->u.ext_msi.address_lo;
+ e->ext_msi.address_hi = ue->u.ext_msi.address_hi;
+ e->ext_msi.data = ue->u.ext_msi.data;
+ e->ext_msi.devid = ue->u.ext_msi.devid;
+ break;
default:
goto out;
}
Up to now, only irqchip routing entries could be set. This patch adds the capability to insert MSI routing entries, extended or standard ones. Although standard MSI entries can be set, their injection still is not supported. For ARM64, let's also increase KVM_MAX_IRQ_ROUTES to 4096. Signed-off-by: Eric Auger <eric.auger@linaro.org> --- include/linux/kvm_host.h | 2 ++ virt/kvm/arm/vgic.c | 13 +++++++++++++ 2 files changed, 15 insertions(+)