]> xenbits.xensource.com Git - qemu-xen.git/commitdiff
Merge remote-tracking branch 'remotes/awilliam/tags/vfio-update-20150706.0' into...
authorPeter Maydell <peter.maydell@linaro.org>
Tue, 7 Jul 2015 08:22:40 +0000 (09:22 +0100)
committerPeter Maydell <peter.maydell@linaro.org>
Tue, 7 Jul 2015 08:22:40 +0000 (09:22 +0100)
VFIO updates for 2.4-rc0
- "real" host page size API (Peter Crosthwaite)
- platform device irqfd support (Eric Auger)
- spapr container disconnect fix (Alexey Kardashevskiy)
- quirk for broken Chelsio hardware (Gabriel Laupre)
- coverity fix (Paolo Bonzini)

# gpg: Signature made Mon Jul  6 19:23:49 2015 BST using RSA key ID 3BB08B22
# gpg: Good signature from "Alex Williamson <alex.williamson@redhat.com>"
# gpg:                 aka "Alex Williamson <alex@shazbot.org>"
# gpg:                 aka "Alex Williamson <alwillia@redhat.com>"
# gpg:                 aka "Alex Williamson <alex.l.williamson@gmail.com>"

* remotes/awilliam/tags/vfio-update-20150706.0:
  vfio/pci : Add pba_offset PCI quirk for Chelsio T5 devices
  vfio: Unregister IOMMU notifiers when container is destroyed
  hw/vfio/platform: add irqfd support
  kvm: some fixes to kvm_resamplefds_allowed
  sysbus: add irq_routing_notifier
  intc: arm_gic_kvm: set the qemu_irq/gsi mapping
  kvm-all.c: add qemu_irq/gsi hash table and utility routines
  kvm: rename kvm_irqchip_[add,remove]_irqfd_notifier with gsi suffix
  vfio: cpu: Use "real" page size API
  cpu-all: complete "real" host page size API
  vfio: fix return type of pread

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Conflicts:
kvm-all.c

1  2 
kvm-all.c

diff --cc kvm-all.c
index edff01ca03ee6314b7e7c48c24167736ccdd3ceb,cb8318707a7f7a21b3fbfe15ded186cba57d1c55..06e06f2b3fd681c0de1fb54c5c2d8062564a648c
+++ b/kvm-all.c
@@@ -1345,7 -1344,36 +1348,36 @@@ int kvm_irqchip_remove_irqfd_notifier_g
             false);
  }
  
 -static int kvm_irqchip_create(MachineState *machine, KVMState *s)
+ int kvm_irqchip_add_irqfd_notifier(KVMState *s, EventNotifier *n,
+                                    EventNotifier *rn, qemu_irq irq)
+ {
+     gpointer key, gsi;
+     gboolean found = g_hash_table_lookup_extended(s->gsimap, irq, &key, &gsi);
+     if (!found) {
+         return -ENXIO;
+     }
+     return kvm_irqchip_add_irqfd_notifier_gsi(s, n, rn, GPOINTER_TO_INT(gsi));
+ }
+ int kvm_irqchip_remove_irqfd_notifier(KVMState *s, EventNotifier *n,
+                                       qemu_irq irq)
+ {
+     gpointer key, gsi;
+     gboolean found = g_hash_table_lookup_extended(s->gsimap, irq, &key, &gsi);
+     if (!found) {
+         return -ENXIO;
+     }
+     return kvm_irqchip_remove_irqfd_notifier_gsi(s, n, GPOINTER_TO_INT(gsi));
+ }
+ void kvm_irqchip_set_qemuirq_gsi(KVMState *s, qemu_irq irq, int gsi)
+ {
+     g_hash_table_insert(s->gsimap, irq, GINT_TO_POINTER(gsi));
+ }
 +static void kvm_irqchip_create(MachineState *machine, KVMState *s)
  {
      int ret;
  
      kvm_halt_in_kernel_allowed = true;
  
      kvm_init_irq_routing(s);
 -
 -    return 0;
+     s->gsimap = g_hash_table_new(g_direct_hash, g_direct_equal);
  }
  
  /* Find number of supported CPUs using the recommended