mirror of
https://github.com/qemu/qemu.git
synced 2026-07-08 17:56:38 +00:00
accel/mshv: use s->irq_routes in commit_routes
In mshv_irqchip_commit_routes() the entries that have been accumulated in s->irq_routes are committed directly to MSHV's irqchip. The old commit_msi_routing_table() fn will be removed in a subsquent commit. Signed-off-by: Magnus Kulke <magnuskulke@linux.microsoft.com> Link: https://lore.kernel.org/r/20260417105618.3621-12-magnuskulke@linux.microsoft.com Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
This commit is contained in:
committed by
Paolo Bonzini
parent
fff9929879
commit
f48f2011fd
@@ -55,7 +55,7 @@ void accel_irqchip_commit_routes(void)
|
||||
{
|
||||
#ifdef CONFIG_MSHV_IS_POSSIBLE
|
||||
if (mshv_msi_via_irqfd_enabled()) {
|
||||
mshv_irqchip_commit_routes();
|
||||
mshv_irqchip_commit_routes(mshv_state);
|
||||
}
|
||||
#endif
|
||||
if (kvm_enabled()) {
|
||||
|
||||
@@ -394,16 +394,17 @@ int mshv_request_interrupt(MshvState *mshv_state, uint32_t interrupt_type, uint3
|
||||
return 0;
|
||||
}
|
||||
|
||||
void mshv_irqchip_commit_routes(void)
|
||||
void mshv_irqchip_commit_routes(MshvState *s)
|
||||
{
|
||||
int ret;
|
||||
int vm_fd = mshv_state->vm;
|
||||
int vm_fd = s->vm;
|
||||
|
||||
ret = commit_msi_routing_table(vm_fd);
|
||||
ret = ioctl(vm_fd, MSHV_SET_MSI_ROUTING, s->irq_routes);
|
||||
if (ret < 0) {
|
||||
error_report("Failed to commit msi routing table");
|
||||
abort();
|
||||
}
|
||||
trace_mshv_commit_msi_routing_table(vm_fd, s->irq_routes->nr);
|
||||
}
|
||||
|
||||
int mshv_irqchip_add_irqfd_notifier_gsi(const EventNotifier *event,
|
||||
|
||||
@@ -28,7 +28,7 @@ int mshv_irqchip_update_msi_route(int virq, MSIMessage msg, PCIDevice *dev)
|
||||
return -ENOSYS;
|
||||
}
|
||||
|
||||
void mshv_irqchip_commit_routes(void)
|
||||
void mshv_irqchip_commit_routes(MshvState *s)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
@@ -62,8 +62,8 @@ int mshv_request_interrupt(MshvState *mshv_state, uint32_t interrupt_type, uint3
|
||||
|
||||
int mshv_irqchip_add_msi_route(AccelRouteChange *c, int vector, PCIDevice *dev);
|
||||
int mshv_irqchip_update_msi_route(int virq, MSIMessage msg, PCIDevice *dev);
|
||||
void mshv_irqchip_commit_routes(void);
|
||||
void mshv_irqchip_release_virq(MshvState *s, int virq);
|
||||
void mshv_irqchip_commit_routes(MshvState *s);
|
||||
int mshv_irqchip_add_irqfd_notifier_gsi(const EventNotifier *n,
|
||||
const EventNotifier *rn, int virq);
|
||||
int mshv_irqchip_remove_irqfd_notifier_gsi(const EventNotifier *n, int virq);
|
||||
|
||||
Reference in New Issue
Block a user