From 0ea2730bef0b764ce87f5d6859f9b1eac6069250 Mon Sep 17 00:00:00 2001 From: Eric Auger Date: Mon, 8 Jun 2015 09:25:25 -0600 Subject: hw/vfio/platform: vfio-platform skeleton Minimal VFIO platform implementation supporting register space user mapping but not IRQ assignment. Signed-off-by: Kim Phillips Signed-off-by: Eric Auger Tested-by: Vikram Sethi Signed-off-by: Alex Williamson --- trace-events | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'trace-events') diff --git a/trace-events b/trace-events index a589650..e1a34ec 100644 --- a/trace-events +++ b/trace-events @@ -1564,6 +1564,11 @@ vfio_put_group(int fd) "close group->fd=%d" vfio_get_device(const char * name, unsigned int flags, unsigned int num_regions, unsigned int num_irqs) "Device %s flags: %u, regions: %u, irqs: %u" vfio_put_base_device(int fd) "close vdev->fd=%d" +# hw/vfio/platform.c +vfio_platform_populate_regions(int region_index, unsigned long flag, unsigned long size, int fd, unsigned long offset) "- region %d flags = 0x%lx, size = 0x%lx, fd= %d, offset = 0x%lx" +vfio_platform_base_device_init(char *name, int groupid) "%s belongs to group #%d" +vfio_platform_realize(char *name, char *compat) "vfio device %s, compat = %s" + #hw/acpi/memory_hotplug.c mhp_acpi_invalid_slot_selected(uint32_t slot) "0x%"PRIx32 mhp_acpi_ejecting_invalid_slot(uint32_t slot) "0x%"PRIx32 -- cgit v1.1 From 38559979bf0095a586f61bc9e028df36673f21a1 Mon Sep 17 00:00:00 2001 From: Eric Auger Date: Mon, 8 Jun 2015 09:25:26 -0600 Subject: hw/vfio/platform: add irq assignment This patch adds the code requested to assign interrupts to a guest. The interrupts are mediated through user handled eventfds only. Signed-off-by: Eric Auger Tested-by: Vikram Sethi Signed-off-by: Alex Williamson --- trace-events | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'trace-events') diff --git a/trace-events b/trace-events index e1a34ec..7af9f19 100644 --- a/trace-events +++ b/trace-events @@ -1568,6 +1568,13 @@ vfio_put_base_device(int fd) "close vdev->fd=%d" vfio_platform_populate_regions(int region_index, unsigned long flag, unsigned long size, int fd, unsigned long offset) "- region %d flags = 0x%lx, size = 0x%lx, fd= %d, offset = 0x%lx" vfio_platform_base_device_init(char *name, int groupid) "%s belongs to group #%d" vfio_platform_realize(char *name, char *compat) "vfio device %s, compat = %s" +vfio_platform_eoi(int pin, int fd) "EOI IRQ pin %d (fd=%d)" +vfio_platform_mmap_set_enabled(bool enabled) "fast path = %d" +vfio_platform_intp_mmap_enable(int pin) "IRQ #%d still active, stay in slow path" +vfio_platform_intp_interrupt(int pin, int fd) "Inject IRQ #%d (fd = %d)" +vfio_platform_intp_inject_pending_lockheld(int pin, int fd) "Inject pending IRQ #%d (fd = %d)" +vfio_platform_populate_interrupts(int pin, int count, int flags) "- IRQ index %d: count %d, flags=0x%x" +vfio_intp_interrupt_set_pending(int index) "irq %d is set PENDING" #hw/acpi/memory_hotplug.c mhp_acpi_invalid_slot_selected(uint32_t slot) "0x%"PRIx32 -- cgit v1.1