mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-08 02:03:56 -06:00
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) -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQIcBAABAgAGBQJVmse1AAoJECObm247sIsi1SIP+gM8ym1C5ARch3jatPo/zQMC Jn0kDwBiHJWHP9M80SpQlmf6esUB6fiAHJc+G6OjwWVFvOCYIePZI4rUrnbU4A5s yzDrPVz+yU6zV5dMuUGgJSyts8v3xOnITV3z+TXkAKUULjQGaAfStEDB2jKmb3a7 O+i+IOIuTct5E2K+6yNfQlIkPQnkLmjA6bfDGRHUuP7upbJcdAgAtAFz/j8y6GCW ehGNUuXqG5pUwmjsrQHK4hIWK68QVrfcMJ3wl9rVY7M9A+QmXXaklfTxutpVHGV9 9TGtLNwvEt0ggIGA3kQdMvv5WC4dyuILXlBetRp3raVq4K8E1ttn59d49A5HpBKE OYsTslRzFIRzBVfi4cQY0lLvsoBptKGOgY3cmIm3V4w8uhlJBxtHtHbqRvoY6i6M m17WmJKyhcRvy/t6mm9mozsGTWJe6powDpiXV1GfWl1AvRL2dn+DLGp5V0XJGokd xgCDPalmOD0xu4gZL1SQkfbB/wBv32B6fgpjRNTKs9LxYUsvcu/LhQDFzkXfaH1B lwh1WX+FAmz0+zfOmCIR5Qnuo/RPjRqGOvFmJW/5WE9P+DKcUxeBnaElJUByDBzk henxiXBFvdSiqPWewRv12Z7/HFANFiXp+lz9xU60aT8ZYl943EeHY16Xm76fyH/v I1bUFqSsNNFn4nrxJKu3 =jxcI -----END PGP SIGNATURE----- Merge remote-tracking branch 'remotes/awilliam/tags/vfio-update-20150706.0' into staging 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
This commit is contained in:
commit
1452673888
16 changed files with 224 additions and 21 deletions
|
@ -183,10 +183,13 @@ extern unsigned long reserved_va;
|
|||
|
||||
/* ??? These should be the larger of uintptr_t and target_ulong. */
|
||||
extern uintptr_t qemu_real_host_page_size;
|
||||
extern uintptr_t qemu_real_host_page_mask;
|
||||
extern uintptr_t qemu_host_page_size;
|
||||
extern uintptr_t qemu_host_page_mask;
|
||||
|
||||
#define HOST_PAGE_ALIGN(addr) (((addr) + qemu_host_page_size - 1) & qemu_host_page_mask)
|
||||
#define REAL_HOST_PAGE_ALIGN(addr) (((addr) + qemu_real_host_page_size - 1) & \
|
||||
qemu_real_host_page_mask)
|
||||
|
||||
/* same as PROT_xxx */
|
||||
#define PAGE_READ 0x0001
|
||||
|
|
|
@ -114,6 +114,8 @@
|
|||
#define PCI_VENDOR_ID_ENSONIQ 0x1274
|
||||
#define PCI_DEVICE_ID_ENSONIQ_ES1370 0x5000
|
||||
|
||||
#define PCI_VENDOR_ID_CHELSIO 0x1425
|
||||
|
||||
#define PCI_VENDOR_ID_FREESCALE 0x1957
|
||||
#define PCI_DEVICE_ID_MPC8533E 0x0030
|
||||
|
||||
|
|
|
@ -58,6 +58,7 @@ typedef struct SysBusDeviceClass {
|
|||
* omitted then. (This is not considered a fatal error.)
|
||||
*/
|
||||
char *(*explicit_ofw_unit_address)(const SysBusDevice *dev);
|
||||
void (*connect_irq_notifier)(SysBusDevice *dev, qemu_irq irq);
|
||||
} SysBusDeviceClass;
|
||||
|
||||
struct SysBusDevice {
|
||||
|
|
|
@ -41,6 +41,7 @@ typedef struct VFIOINTp {
|
|||
int state; /* inactive, pending, active */
|
||||
uint8_t pin; /* index */
|
||||
uint32_t flags; /* IRQ info flags */
|
||||
bool kvm_accel; /* set when QEMU bypass through KVM enabled */
|
||||
} VFIOINTp;
|
||||
|
||||
/* function type for user side eventfd handler */
|
||||
|
@ -57,6 +58,7 @@ typedef struct VFIOPlatformDevice {
|
|||
uint32_t mmap_timeout; /* delay to re-enable mmaps after interrupt */
|
||||
QEMUTimer *mmap_timer; /* allows fast-path resume after IRQ hit */
|
||||
QemuMutex intp_mutex; /* protect the intp_list IRQ state */
|
||||
bool irqfd_allowed; /* debug option to force irqfd on/off */
|
||||
} VFIOPlatformDevice;
|
||||
|
||||
typedef struct VFIOPlatformDeviceClass {
|
||||
|
|
|
@ -19,6 +19,7 @@
|
|||
#include "qemu/queue.h"
|
||||
#include "qom/cpu.h"
|
||||
#include "exec/memattrs.h"
|
||||
#include "hw/irq.h"
|
||||
|
||||
#ifdef CONFIG_KVM
|
||||
#include <linux/kvm.h>
|
||||
|
@ -151,6 +152,7 @@ extern bool kvm_readonly_mem_allowed;
|
|||
#define kvm_halt_in_kernel() (false)
|
||||
#define kvm_eventfds_enabled() (false)
|
||||
#define kvm_irqfds_enabled() (false)
|
||||
#define kvm_resamplefds_enabled() (false)
|
||||
#define kvm_msi_via_irqfd_enabled() (false)
|
||||
#define kvm_gsi_routing_allowed() (false)
|
||||
#define kvm_gsi_direct_mapping() (false)
|
||||
|
@ -416,9 +418,15 @@ void kvm_irqchip_release_virq(KVMState *s, int virq);
|
|||
|
||||
int kvm_irqchip_add_adapter_route(KVMState *s, AdapterInfo *adapter);
|
||||
|
||||
int kvm_irqchip_add_irqfd_notifier_gsi(KVMState *s, EventNotifier *n,
|
||||
EventNotifier *rn, int virq);
|
||||
int kvm_irqchip_remove_irqfd_notifier_gsi(KVMState *s, EventNotifier *n,
|
||||
int virq);
|
||||
int kvm_irqchip_add_irqfd_notifier(KVMState *s, EventNotifier *n,
|
||||
EventNotifier *rn, int virq);
|
||||
int kvm_irqchip_remove_irqfd_notifier(KVMState *s, EventNotifier *n, int virq);
|
||||
EventNotifier *rn, qemu_irq irq);
|
||||
int kvm_irqchip_remove_irqfd_notifier(KVMState *s, EventNotifier *n,
|
||||
qemu_irq irq);
|
||||
void kvm_irqchip_set_qemuirq_gsi(KVMState *s, qemu_irq irq, int gsi);
|
||||
void kvm_pc_gsi_handler(void *opaque, int n, int level);
|
||||
void kvm_pc_setup_irq_routing(bool pci_enabled);
|
||||
void kvm_init_irq_routing(KVMState *s);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue