mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-03 07:43:54 -06:00
Merge remote-tracking branch 'qemu-kvm/uq/master' into staging
* qemu-kvm/uq/master: virtio: move common irqfd handling out of virtio-pci virtio: move common ioeventfd handling out of virtio-pci event_notifier: add event_notifier_set_handler memory: pass EventNotifier, not eventfd ivshmem: wrap ivshmem_del_eventfd loops with transaction ivshmem: use EventNotifier and memory API event_notifier: add event_notifier_init_fd event_notifier: remove event_notifier_test event_notifier: add event_notifier_set apic: Defer interrupt updates to VCPU thread apic: Reevaluate pending interrupts on LVT_LINT0 changes apic: Resolve potential endless loop around apic_update_irq kvm: expose tsc deadline timer feature to guest kvm_pv_eoi: add flag support kvm: Don't abort on kvm_irqchip_add_msi_route()
This commit is contained in:
commit
09f06a6c60
22 changed files with 233 additions and 145 deletions
31
kvm-all.c
31
kvm-all.c
|
@ -32,6 +32,7 @@
|
|||
#include "bswap.h"
|
||||
#include "memory.h"
|
||||
#include "exec-memory.h"
|
||||
#include "event_notifier.h"
|
||||
|
||||
/* This check must be after config-host.h is included */
|
||||
#ifdef CONFIG_EVENTFD
|
||||
|
@ -800,23 +801,29 @@ static void kvm_io_ioeventfd_del(MemoryRegionSection *section,
|
|||
|
||||
static void kvm_eventfd_add(MemoryListener *listener,
|
||||
MemoryRegionSection *section,
|
||||
bool match_data, uint64_t data, int fd)
|
||||
bool match_data, uint64_t data,
|
||||
EventNotifier *e)
|
||||
{
|
||||
if (section->address_space == get_system_memory()) {
|
||||
kvm_mem_ioeventfd_add(section, match_data, data, fd);
|
||||
kvm_mem_ioeventfd_add(section, match_data, data,
|
||||
event_notifier_get_fd(e));
|
||||
} else {
|
||||
kvm_io_ioeventfd_add(section, match_data, data, fd);
|
||||
kvm_io_ioeventfd_add(section, match_data, data,
|
||||
event_notifier_get_fd(e));
|
||||
}
|
||||
}
|
||||
|
||||
static void kvm_eventfd_del(MemoryListener *listener,
|
||||
MemoryRegionSection *section,
|
||||
bool match_data, uint64_t data, int fd)
|
||||
bool match_data, uint64_t data,
|
||||
EventNotifier *e)
|
||||
{
|
||||
if (section->address_space == get_system_memory()) {
|
||||
kvm_mem_ioeventfd_del(section, match_data, data, fd);
|
||||
kvm_mem_ioeventfd_del(section, match_data, data,
|
||||
event_notifier_get_fd(e));
|
||||
} else {
|
||||
kvm_io_ioeventfd_del(section, match_data, data, fd);
|
||||
kvm_io_ioeventfd_del(section, match_data, data,
|
||||
event_notifier_get_fd(e));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1142,7 +1149,7 @@ int kvm_irqchip_send_msi(KVMState *s, MSIMessage msg)
|
|||
|
||||
int kvm_irqchip_add_msi_route(KVMState *s, MSIMessage msg)
|
||||
{
|
||||
abort();
|
||||
return -ENOSYS;
|
||||
}
|
||||
|
||||
static int kvm_irqchip_assign_irqfd(KVMState *s, int fd, int virq, bool assign)
|
||||
|
@ -1156,11 +1163,21 @@ int kvm_irqchip_add_irqfd(KVMState *s, int fd, int virq)
|
|||
return kvm_irqchip_assign_irqfd(s, fd, virq, true);
|
||||
}
|
||||
|
||||
int kvm_irqchip_add_irq_notifier(KVMState *s, EventNotifier *n, int virq)
|
||||
{
|
||||
return kvm_irqchip_add_irqfd(s, event_notifier_get_fd(n), virq);
|
||||
}
|
||||
|
||||
int kvm_irqchip_remove_irqfd(KVMState *s, int fd, int virq)
|
||||
{
|
||||
return kvm_irqchip_assign_irqfd(s, fd, virq, false);
|
||||
}
|
||||
|
||||
int kvm_irqchip_remove_irq_notifier(KVMState *s, EventNotifier *n, int virq)
|
||||
{
|
||||
return kvm_irqchip_remove_irqfd(s, event_notifier_get_fd(n), virq);
|
||||
}
|
||||
|
||||
static int kvm_irqchip_create(KVMState *s)
|
||||
{
|
||||
QemuOptsList *list = qemu_find_opts("machine");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue