Re: [Qemu-devel] [PATCH v5 10/10] hw/arm/dyn_sysbus_devtree: enable simple VFIO dynamic instantiation

2014-08-19 Thread Eric Auger
On 08/19/2014 12:11 AM, Peter Maydell wrote: On 18 August 2014 22:54, Joel Schopp joel.sch...@amd.com wrote: +static void vfio_fdt_add_device_node(SysBusDevice *sbdev, void *opaque) +{ +PlatformDevtreeData *data = opaque; +void *fdt = data-fdt; +const char *parent_node =

Re: [Qemu-devel] [PATCH v5 10/10] hw/arm/dyn_sysbus_devtree: enable simple VFIO dynamic instantiation

2014-08-19 Thread Eric Auger
On 08/19/2014 12:26 AM, Joel Schopp wrote: On 08/18/2014 05:11 PM, Peter Maydell wrote: On 18 August 2014 22:54, Joel Schopp joel.sch...@amd.com wrote: +static void vfio_fdt_add_device_node(SysBusDevice *sbdev, void *opaque) +{ +PlatformDevtreeData *data = opaque; +void *fdt =

Re: [Qemu-devel] [PATCH v5 05/10] hw/vfio/pci: split vfio_get_device

2014-08-29 Thread Eric Auger
On 08/13/2014 05:32 AM, David Gibson wrote: On Tue, Aug 12, 2014 at 08:54:34AM +0200, Eric Auger wrote: On 08/12/2014 04:41 AM, David Gibson wrote: On Sat, Aug 09, 2014 at 03:25:44PM +0100, Eric Auger wrote: vfio_get_device now takes a VFIODevice as argument. The function is split into 4

[Qemu-devel] [PATCH] KVM_CAP_IRQFD and KVM_CAP_IRQFD_RESAMPLE checks

2014-08-29 Thread Eric Auger
-by: Eric Auger eric.au...@linaro.org --- in practice KVM_CAP_IRQFD_RESAMPLE seems to be always enabled as soon as kernel has HAVE_KVM_IRQFD so the resamplefd check may be unnecessary. --- hw/intc/openpic_kvm.c | 1 - hw/intc/xics_kvm.c| 1 - include/sysemu/kvm.h | 10 ++ kvm-all.c

Re: [Qemu-devel] [PATCH v5 06/10] hw/vfio: create common module

2014-09-01 Thread Eric Auger
On 08/13/2014 09:59 PM, Alex Williamson wrote: On Tue, 2014-08-12 at 08:09 +0200, Eric Auger wrote: On 08/11/2014 09:25 PM, Alex Williamson wrote: On Sat, 2014-08-09 at 15:25 +0100, Eric Auger wrote: diff --git a/include/hw/vfio/vfio-common.h b/include/hw/vfio/vfio-common.h new file mode

Re: [Qemu-devel] [PATCH v5 06/10] hw/vfio: create common module

2014-09-02 Thread Eric Auger
On 09/01/2014 07:41 PM, Alexander Graf wrote: Am 01.09.2014 um 18:31 schrieb Eric Auger eric.au...@linaro.org: On 08/13/2014 09:59 PM, Alex Williamson wrote: On Tue, 2014-08-12 at 08:09 +0200, Eric Auger wrote: On 08/11/2014 09:25 PM, Alex Williamson wrote: On Sat, 2014-08-09 at 15:25

[Qemu-devel] [RFC] vfio: migration to trace points

2014-09-03 Thread Eric Auger
This patch removes all DPRINTF and replace them by trace points. A few DPRINTF used in error cases were transformed into error_report. Signed-off-by: Eric Auger eric.au...@linaro.org --- - __func__ is removed since trace point name does the same job - HWADDR_PRIx were replaced by PRIx64

[Qemu-devel] [PATCH v2 0/2] actual checks of KVM_CAP_IRQFD and KVM_CAP_IRQFD_RESAMPLE

2014-09-03 Thread Eric Auger
This patch serie replaces direct settings of kvm_irqfds_allowed by actual checks of the KVM_CAP_IRQFD extension. Also A new kvm_resamplefds_enabled() enables to check KVM_CAP_IRQFD_RESAMPLE. in the second patch file the vfio device is the first user of kvm_resamplefds_enabled(). Eric Auger (2

[Qemu-devel] [PATCH v2 1/2] KVM_CAP_IRQFD and KVM_CAP_IRQFD_RESAMPLE checks

2014-09-03 Thread Eric Auger
-by: Eric Auger eric.au...@linaro.org --- in practice KVM_CAP_IRQFD_RESAMPLE seems to be always enabled as soon as kernel has HAVE_KVM_IRQFD so the resamplefd check may be unnecessary. --- hw/intc/openpic_kvm.c | 1 - hw/intc/xics_kvm.c| 1 - include/sysemu/kvm.h | 10 ++ kvm-all.c

[Qemu-devel] [PATCH v2 2/2] vfio: use kvm_resamplefds_enabled()

2014-09-03 Thread Eric Auger
Use the kvm_resamplefds_enabled function Signed-off-by: Eric Auger eric.au...@linaro.org --- hw/misc/vfio.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/hw/misc/vfio.c b/hw/misc/vfio.c index 40dcaa6..24f6a3a 100644 --- a/hw/misc/vfio.c +++ b/hw/misc/vfio.c @@ -406,7

Re: [Qemu-devel] [PATCH v2 1/2] KVM_CAP_IRQFD and KVM_CAP_IRQFD_RESAMPLE checks

2014-09-03 Thread Eric Auger
On 09/03/2014 02:50 PM, Christian Borntraeger wrote: On 03/09/14 11:54, Eric Auger wrote: [...] --- a/kvm-all.c +++ b/kvm-all.c [...] @@ -1548,6 +1549,12 @@ int kvm_init(MachineClass *mc) kvm_eventfds_allowed = (kvm_check_extension(s, KVM_CAP_IOEVENTFD) 0

[Qemu-devel] [PATCH v6 00/16] KVM platform device passthrough

2014-09-09 Thread Eric Auger
/2014-07/msg00047.html [2] [RFC v3] machvirt dynamic sysbus device instantiation, Eric Auger [3] [PATCH v2 0/2] actual checks of KVM_CAP_IRQFD and KVM_CAP_IRQFD_RESAMPLE, Eric Auger http://lists.nongnu.org/archive/html/qemu-devel/2014-09/msg00589.html [4] [RFC] vfio: migration to trace points

[Qemu-devel] [PATCH v6 02/16] hw/vfio/pci: Rename VFIODevice into VFIOPCIDevice

2014-09-09 Thread Eric Auger
This prepares for the introduction of VFIOPlatformDevice Signed-off-by: Eric Auger eric.au...@linaro.org --- hw/vfio/pci.c | 209 +- 1 file changed, 105 insertions(+), 104 deletions(-) diff --git a/hw/vfio/pci.c b/hw/vfio/pci.c index

[Qemu-devel] [PATCH v6 03/16] hw/vfio/pci: introduce VFIODevice

2014-09-09 Thread Eric Auger
, vfio_disable_irqindex which now apply to VFIODevice. They are renamed as *_irqindex. The index is passed as parameter to anticipate their usage for platform IRQs Signed-off-by: Eric Auger eric.au...@linaro.org --- v4-v5: - fix style issues - in vfio_initfn, rework allocation of vdev

[Qemu-devel] [PATCH v6 01/16] vfio: move hw/misc/vfio.c to hw/vfio/pci.c Move vfio.h into include/hw/vfio

2014-09-09 Thread Eric Auger
From: Kim Phillips kim.phill...@linaro.org This is done in preparation for the addition of VFIO platform device support. Signed-off-by: Kim Phillips kim.phill...@linaro.org --- LICENSE | 2 +- MAINTAINERS | 2 +- hw/Makefile.objs | 1

[Qemu-devel] [PATCH v6 04/16] hw/vfio/pci: Introduce VFIORegion

2014-09-09 Thread Eric Auger
too. vfio_mmap_bar becomes vfio_map_region Signed-off-by: Eric Auger eric.au...@linaro.org --- v4-v5: - remove fd field from VFIORegion - change error_report format string in vfio_region_write/read - remove #ifdef DEBUG_VFIO in the same function - correct missing initialization of bar region's

[Qemu-devel] [PATCH v6 10/16] hw/vfio: calxeda xgmac device

2014-09-09 Thread Eric Auger
The platform device class has become abstract. The device can be be instantiated on command line using such option. -device vfio-calxeda-xgmac,host=fff51000.ethernet compat string is hardcoded in the code except if user overrides it Signed-off-by: Eric Auger eric.au...@linaro.org --- v5 - v6

[Qemu-devel] [PATCH v6 09/16] hw/vfio/platform: add vfio-platform support

2014-09-09 Thread Eric Auger
Minimal VFIO platform implementation supporting - register space user mapping, - IRQ assignment based on eventfds handled on qemu side. irqfd kernel acceleration comes in a subsequent patch. Signed-off-by: Kim Phillips kim.phill...@linaro.org Signed-off-by: Eric Auger eric.au...@linaro.org

[Qemu-devel] [PATCH v6 05/16] hw/vfio/pci: split vfio_get_device

2014-09-09 Thread Eric Auger
, vfio_populate_interrupts and vfio_get_device. - correct misuse of errno - vfio_populate_regions always returns 0 - VFIODevice .name deallocation done in vfio_put_device instead of vfio_put_base_device - vfio_put_base_device done at vfio_get_device level. Signed-off-by: Eric Auger eric.au

[Qemu-devel] [PATCH v6 11/16] hw/arm/dyn_sysbus_devtree: enable vfio-calxeda-xgmac dynamic instantiation

2014-09-09 Thread Eric Auger
vfio-calxeda-xgmac now can be instantiated using the -device option Signed-off-by: Eric Auger eric.au...@linaro.org --- v2 - v3: - correct bug of reg_attr[2*i] in vfio_fdt_add_device_node - fix a bug related to compat_str_len computed on original compat instead of corrected compat

[Qemu-devel] [PATCH v6 13/16] hw/vfio/platform: Add irqfd support

2014-09-09 Thread Eric Auger
for fast/slow path swap. Overall this brings significant performance improvements. it depends on host kernel KVM irqfd. Signed-off-by: Alvise Rigo a.r...@virtualopensystems.com Signed-off-by: Eric Auger eric.au...@linaro.org --- v5 - v6 - rely on kvm_irqfds_enabled

[Qemu-devel] [PATCH v6 07/16] hw/vfio/pci: use name field in format strings

2014-09-09 Thread Eric Auger
Signed-off-by: Eric Auger eric.au...@linaro.org --- hw/vfio/pci.c | 213 -- trace-events | 105 ++--- 2 files changed, 111 insertions(+), 207 deletions(-) diff --git a/hw/vfio/pci.c b/hw/vfio/pci.c index 5623539

[Qemu-devel] [PATCH v6 12/16] vfio/platform: add fake injection modality

2014-09-09 Thread Eric Auger
is completed on another timer timeout to emulate eoi on write/read access. for instance, following options x-fake-irq[0]=1,x-fake-period[0]=10,x-fake-duration[0]=50, x-fake-irq[1]=2,x-fake-period[i]=20,x-fake-duration[1]=100 set vfio platform IRQ indexed #1 and #2 as fake IRQ Signed-off-by: Eric

[Qemu-devel] [PATCH v6 14/16] linux-headers: Update KVM headers from linux-next tag ToBeFilled

2014-09-09 Thread Eric Auger
Syncup KVM related linux headers from linux-next tree using scripts/update-linux-headers.sh. Integrate updated KVM-VFIO API related to forwarded IRQ Signed-off-by: Eric Auger eric.au...@linaro.org --- linux-headers/linux/kvm.h | 9 + 1 file changed, 9 insertions(+) diff --git a/linux

[Qemu-devel] [PATCH v6 15/16] VFIO: COMMON: vfio_kvm_device_fd moved in the common header

2014-09-09 Thread Eric Auger
the device is now used in platform for forwarded IRQ setup Signed-off-by: Eric Auger eric.au...@linaro.org --- hw/vfio/common.c | 3 ++- include/hw/vfio/vfio-common.h | 5 + 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/hw/vfio/common.c b/hw/vfio/common.c index

[Qemu-devel] [PATCH v6 16/16] VFIO: PLATFORM: add forwarded irq support

2014-09-09 Thread Eric Auger
virtual IRQ, the corresponding physical IRQ is completed and the same physical IRQ can hit again. A new x-forward property enables to force forwarding off although enabled by the kernel. Signed-off-by: Eric Auger eric.au...@linaro.org --- hw/vfio/platform.c | 52

[Qemu-devel] [PATCH v6 06/16] hw/vfio/pci: rename group_list into vfio_group_list

2014-09-09 Thread Eric Auger
better fit in the rest of the namespace Signed-off-by: Eric Auger eric.au...@linaro.org --- hw/vfio/pci.c | 22 +++--- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/hw/vfio/pci.c b/hw/vfio/pci.c index d48ca04..5623539 100644 --- a/hw/vfio/pci.c +++ b/hw/vfio

[Qemu-devel] [PATCH v6 08/16] hw/vfio: create common module

2014-09-09 Thread Eric Auger
A new common module is created. It implements all functions that have no device specificity (PCI, Platform). This patch only consists in move (no functional changes) Signed-off-by: Kim Phillips kim.phill...@linaro.org Signed-off-by: Eric Auger eric.au...@linaro.org --- v5 - v6: - follow all

[Qemu-devel] [PATCH v3 1/6] hw/misc/dyn_sysbus_binding: helpers for sysbus device dynamic binding

2014-09-09 Thread Eric Auger
This new module implements routines which help in dynamic device binding (mmio regions, irq). They are supposed to be used by machine files that support dynamic sysbus instantiation. Signed-off-by: Alexander Graf ag...@suse.de Signed-off-by: Eric Auger eric.au...@linaro.org --- v1 - v2

[Qemu-devel] [PATCH v3 2/6] hw/arm/dyn_sysbus_devtree: helpers for sysbus device dynamic dt node generation

2014-09-09 Thread Eric Auger
This module will be used by ARM machine files to generate device tree nodes of dynamically instantiated sysbus devices (ie. those instantiated with -device option). Signed-off-by: Alexander Graf ag...@suse.de Signed-off-by: Eric Auger eric.au...@linaro.org --- v2 - v3: - add arm_ prefix

[Qemu-devel] [PATCH v3 0/6] machvirt dynamic sysbus device instantiation

2014-09-09 Thread Eric Auger
shrinked to 4MB and relocated in machvirt to avoid PCI shrink (dynamic vfio-mmio support might come latter) - platform_bus_base removed from PlatformDevtreeData Alexander Graf (1): PPC: e500: use dyn_sysbus_binding helper routines Eric Auger (5): hw/misc/dyn_sysbus_binding: helpers for sysbus

[Qemu-devel] [PATCH v3 3/6] PPC: e500: use dyn_sysbus_binding helper routines

2014-09-09 Thread Eric Auger
From: Alexander Graf ag...@suse.de Now platform_bus_init_notify and functions it calls were moved to dyn_sysbus_binding.c, remove those functions from e500. PPCE500Params includes a DynSysbusParams struct which contains the settings related to platform device instantiation. Signed-off-by: Eric

Re: [Qemu-devel] [PATCH v3 1/6] hw/misc/dyn_sysbus_binding: helpers for sysbus device dynamic binding

2014-09-09 Thread Eric Auger
On 09/09/2014 12:56 PM, Paolo Bonzini wrote: Il 09/09/2014 09:54, Eric Auger ha scritto: This new module implements routines which help in dynamic device binding (mmio regions, irq). They are supposed to be used by machine files that support dynamic sysbus instantiation. Signed-off

Re: [Qemu-devel] [PATCH v3 2/6] hw/arm/dyn_sysbus_devtree: helpers for sysbus device dynamic dt node generation

2014-09-09 Thread Eric Auger
On 09/09/2014 01:04 PM, Paolo Bonzini wrote: Il 09/09/2014 09:54, Eric Auger ha scritto: This module will be used by ARM machine files to generate device tree nodes of dynamically instantiated sysbus devices (ie. those instantiated with -device option). Signed-off-by: Alexander Graf ag

Re: [Qemu-devel] [PATCH v3 2/6] hw/arm/dyn_sysbus_devtree: helpers for sysbus device dynamic dt node generation

2014-09-09 Thread Eric Auger
On 09/09/2014 06:00 PM, Peter Maydell wrote: On 9 September 2014 16:56, Eric Auger eric.au...@linaro.org wrote: irq_start: needed because when the interrupts property is set for the leaf component the irq number is irq_start + object_property_get_int(obj, irq[i], NULL) irq[i] being in [0

Re: [Qemu-devel] [PATCH v3 2/6] hw/arm/dyn_sysbus_devtree: helpers for sysbus device dynamic dt node generation

2014-09-09 Thread Eric Auger
On 09/09/2014 06:03 PM, Paolo Bonzini wrote: Il 09/09/2014 17:56, Eric Auger ha scritto: +if (!sbdev) { +/* Container, traverse it for children */ +return object_child_foreach(obj, +arm_sysbus_device_create_devtree, data

Re: [Qemu-devel] [PATCH v3 1/6] hw/misc/dyn_sysbus_binding: helpers for sysbus device dynamic binding

2014-09-09 Thread Eric Auger
On 09/09/2014 05:59 PM, Paolo Bonzini wrote: Il 09/09/2014 17:25, Eric Auger ha scritto: Please provide a wrapper like sysbus_register_dynamic that takes the params/address_space_mem/mpic as parameter. platform_bus_init_notify and DynSysbusNotifier can remain hidden within the .c file

Re: [Qemu-devel] [PATCH v3 1/6] hw/misc/dyn_sysbus_binding: helpers for sysbus device dynamic binding

2014-09-10 Thread Eric Auger
On 09/10/2014 12:09 PM, Alexander Graf wrote: On 10.09.14 12:05, Paolo Bonzini wrote: Il 10/09/2014 11:56, Alexander Graf ha scritto: On 10.09.14 11:43, Paolo Bonzini wrote: Il 10/09/2014 11:31, Alexander Graf ha scritto: Yeah, please do the registration in sysbus.c, not in virt.c.

Re: [Qemu-devel] [PATCH v6 08/16] hw/vfio: create common module

2014-09-11 Thread Eric Auger
On 09/10/2014 03:09 PM, Alexander Graf wrote: On 09.09.14 09:31, Eric Auger wrote: A new common module is created. It implements all functions that have no device specificity (PCI, Platform). This patch only consists in move (no functional changes) Signed-off-by: Kim Phillips kim.phill

Re: [Qemu-devel] [PATCH v6 11/16] hw/arm/dyn_sysbus_devtree: enable vfio-calxeda-xgmac dynamic instantiation

2014-09-11 Thread Eric Auger
On 09/10/2014 03:12 PM, Alexander Graf wrote: On 09.09.14 09:31, Eric Auger wrote: vfio-calxeda-xgmac now can be instantiated using the -device option Signed-off-by: Eric Auger eric.au...@linaro.org --- v2 - v3: - correct bug of reg_attr[2*i] in vfio_fdt_add_device_node - fix a bug

Re: [Qemu-devel] [PATCH v6 08/16] hw/vfio: create common module

2014-09-11 Thread Eric Auger
On 09/11/2014 02:13 PM, Alexander Graf wrote: On 11.09.14 14:11, Eric Auger wrote: On 09/10/2014 03:09 PM, Alexander Graf wrote: On 09.09.14 09:31, Eric Auger wrote: A new common module is created. It implements all functions that have no device specificity (PCI, Platform). This patch

Re: [Qemu-devel] [PATCH v6 00/16] KVM platform device passthrough

2014-09-15 Thread Eric Auger
On 09/12/2014 01:05 AM, Christoffer Dall wrote: On Thu, Sep 11, 2014 at 04:51:14PM -0600, Alex Williamson wrote: On Thu, 2014-09-11 at 15:23 -0700, Christoffer Dall wrote: On Thu, Sep 11, 2014 at 04:14:09PM -0600, Alex Williamson wrote: On Tue, 2014-09-09 at 08:31 +0100, Eric Auger wrote

Re: [Qemu-devel] [PATCH v6 00/16] KVM platform device passthrough

2014-09-16 Thread Eric Auger
On 09/16/2014 10:51 PM, Alex Williamson wrote: On Tue, 2014-09-16 at 00:01 +0200, Eric Auger wrote: On 09/12/2014 01:05 AM, Christoffer Dall wrote: On Thu, Sep 11, 2014 at 04:51:14PM -0600, Alex Williamson wrote: On Thu, 2014-09-11 at 15:23 -0700, Christoffer Dall wrote: On Thu, Sep 11, 2014

Re: [Qemu-devel] [RFC] vfio: migration to trace points

2014-09-18 Thread Eric Auger
launching qemu, add -trace events=events.txt Complete details can be found in docs/tracing.txt Best Regards Eric On 09/03/2014 10:45 AM, Eric Auger wrote: This patch removes all DPRINTF and replace them by trace points. A few DPRINTF used in error cases were transformed into error_report

[Qemu-devel] [question] virtio-net-device and multi-queue option

2014-09-18 Thread Eric Auger
Hi, I am currently doing some benchmarks using virtio-net-device using virtio-mmio (non PCI) with qemu_system_arm with KVM. Purpose is to compare with device passthrough performance. I heard about the availability of a multi-queue option that greatly improves the performance but I currently

Re: [Qemu-devel] [PATCH v6 00/16] KVM platform device passthrough

2014-09-18 Thread Eric Auger
On 09/16/2014 11:23 PM, Alex Williamson wrote: On Tue, 2014-09-16 at 14:51 -0600, Alex Williamson wrote: On Tue, 2014-09-16 at 00:01 +0200, Eric Auger wrote: On 09/12/2014 01:05 AM, Christoffer Dall wrote: On Thu, Sep 11, 2014 at 04:51:14PM -0600, Alex Williamson wrote: On Thu, 2014-09-11

Re: [Qemu-devel] [question] virtio-net-device and multi-queue option

2014-09-18 Thread Eric Auger
On 09/19/2014 03:42 AM, Gonglei (Arei) wrote: Subject: [Qemu-devel] [question] virtio-net-device and multi-queue option Hi, I am currently doing some benchmarks using virtio-net-device using virtio-mmio (non PCI) with qemu_system_arm with KVM. Purpose is to compare with device passthrough

Re: [Qemu-devel] [RFC] vfio: migration to trace points

2014-09-19 Thread Eric Auger
by %s write(%04x:%02x:%02x.%x:BAR%d+0x%PRIx64, 0x%PRIx64, %d Best Regards Eric On 09/19/2014 11:03 AM, Stefan Hajnoczi wrote: On Wed, Sep 03, 2014 at 09:45:14AM +0100, Eric Auger wrote: This patch removes all DPRINTF and replace them by trace points. A few DPRINTF used in error cases were

Re: [Qemu-devel] [PATCH v2] trace: tighten up trace-events regex to fix bad parse

2014-09-30 Thread Eric Auger
(name, props, fmt, args, arg_fmts) File scripts/tracetool/__init__.py, line 185, in __init__ % , .join(unknown_props)) ValueError: Unknown properties: foo(int, rc) Cc: LluĂ­s Vilanova vilan...@ac.upc.edu Reported-by: Eric Auger eric.au...@linaro.org Signed-off-by: Stefan Hajnoczi

[Qemu-devel] [PATCH v2] vfio: migration to trace points

2014-09-30 Thread Eric Auger
This patch removes all DPRINTF and replace them by trace points. A few DPRINTF used in error cases were transformed into error_report. Signed-off-by: Eric Auger eric.au...@linaro.org --- - __func__ is removed since trace point name does the same job - HWADDR_PRIx were replaced by PRIx64

Re: [Qemu-devel] [PATCH v3 6/6] hw/arm/virt: Support dynamically spawned sysbus devices

2014-10-20 Thread Eric Auger
On 09/09/2014 01:11 PM, Paolo Bonzini wrote: Il 09/09/2014 09:54, Eric Auger ha scritto: Allows sysbus devices to be instantiated from command line by using -device option Signed-off-by: Alexander Graf ag...@suse.de Signed-off-by: Eric Auger eric.au...@linaro.org --- v2 - v3 - renaming

[Qemu-devel] dynamic sysbus instantiation and load_dtb implementation

2014-10-23 Thread Eric Auger
Dear all, The goal of this mail is to summarize how dynamic sysbus device tree nodes were created on ARM with machvirt dynamic sysbus device instantiation, https://lists.gnu.org/archive/html/qemu-devel/2014-09/msg01626.html and request some advises after commit hw/arm/boot: load DTB as a ROM

Re: [Qemu-devel] dynamic sysbus instantiation and load_dtb implementation

2014-10-23 Thread Eric Auger
Hi, Thanks everyone for entering the thread reading my long email. Alex, I indeed can register the notifier in the machine file after the platform bus instantiation. This indeed guarantees the notifiers are called in the right order ... Thanks Best Regards Eric On 10/23/2014 01:26 PM,

Re: [Qemu-devel] dynamic sysbus instantiation and load_dtb implementation

2014-10-23 Thread Eric Auger
On 10/23/2014 01:41 PM, Eric Auger wrote: Hi, Thanks everyone for entering the thread reading my long email. Alex, I indeed can register the notifier in the machine file after s/after/before Eric the platform bus instantiation. This indeed guarantees the notifiers are called

[Qemu-devel] [PATCH v7 12/16] hw/arm/sysbus-fdt: enable vfio-calxeda-xgmac dynamic instantiation

2014-10-31 Thread Eric Auger
vfio-calxeda-xgmac now can be instantiated using the -device option. The node creation function generates a very basic dt node composed of the compat, reg and interrupts properties Signed-off-by: Eric Auger eric.au...@linaro.org --- v6 - v7: - compat string re-formatting removed since compat

[Qemu-devel] [PATCH v2 RESEND] vfio: migration to trace points

2014-10-31 Thread Eric Auger
This patch removes all DPRINTF and replace them by trace points. A few DPRINTF used in error cases were transformed into error_report. Signed-off-by: Eric Auger eric.au...@linaro.org --- - __func__ is removed since trace point name does the same job - HWADDR_PRIx were replaced by PRIx64

[Qemu-devel] [PATCH v7 05/16] hw/vfio/pci: split vfio_get_device

2014-10-31 Thread Eric Auger
, vfio_populate_interrupts and vfio_get_device. - correct misuse of errno - vfio_populate_regions always returns 0 - VFIODevice .name deallocation done in vfio_put_device instead of vfio_put_base_device - vfio_put_base_device done at vfio_get_device level. Signed-off-by: Eric Auger eric.au

[Qemu-devel] [PATCH v7 09/16] hw/vfio/platform: add vfio-platform support

2014-10-31 Thread Eric Auger
Minimal VFIO platform implementation supporting - register space user mapping, - IRQ assignment based on eventfds handled on qemu side. irqfd kernel acceleration comes in a subsequent patch. Signed-off-by: Kim Phillips kim.phill...@linaro.org Signed-off-by: Eric Auger eric.au...@linaro.org

[Qemu-devel] [PATCH v7 04/16] hw/vfio/pci: Introduce VFIORegion

2014-10-31 Thread Eric Auger
too. vfio_mmap_bar becomes vfio_map_region Signed-off-by: Eric Auger eric.au...@linaro.org --- v4-v5: - remove fd field from VFIORegion - change error_report format string in vfio_region_write/read - remove #ifdef DEBUG_VFIO in the same function - correct missing initialization of bar region's

[Qemu-devel] [PATCH v7 11/16] hw/arm/virt: add support for VFIO devices

2014-10-31 Thread Eric Auger
notifier in machvirt. Signed-off-by: Eric Auger eric.au...@linaro.org --- The registration of the IRQ start notifier could also happen in the platform bus. --- hw/arm/virt.c | 9 + 1 file changed, 9 insertions(+) diff --git a/hw/arm/virt.c b/hw/arm/virt.c index 3a09d58..911dbfc 100644

[Qemu-devel] [PATCH v7 13/16] hw/vfio/platform: Add irqfd support

2014-10-31 Thread Eric Auger
for fast/slow path swap. Overall this brings significant performance improvements. it depends on host kernel KVM irqfd. Signed-off-by: Alvise Rigo a.r...@virtualopensystems.com Signed-off-by: Eric Auger eric.au...@linaro.org --- v5 - v6 - rely on kvm_irqfds_enabled() and kvm_resamplefds_enabled

[Qemu-devel] [PATCH v4 0/6] machvirt dynamic sysbus device instantiation

2014-10-31 Thread Eric Auger
) - platform_bus_base removed from PlatformDevtreeData Eric Auger (6): hw/arm/boot: load_dtb becomes non static arm_load_dtb hw/arm/boot: dtb start and limit moved in arm_boot_info hw/arm/boot: do not free VirtBoardInfo fdt in arm_load_dtb hw/arm: add a new modify_dtb_opaque field in arm_boot_info hw/arm

[Qemu-devel] [PATCH v7 16/16] hw/vfio/platform: add forwarded irq support

2014-10-31 Thread Eric Auger
virtual IRQ, the corresponding physical IRQ is completed and the same physical IRQ can hit again. A new x-forward property enables to force forwarding off although enabled by the kernel. Signed-off-by: Eric Auger eric.au...@linaro.org --- hw/vfio/platform.c | 52

[Qemu-devel] [PATCH v7 14/16] linux-headers: Update KVM headers from linux-next tag ToBeFilled

2014-10-31 Thread Eric Auger
Syncup KVM related linux headers from linux-next tree using scripts/update-linux-headers.sh. Integrate updated KVM-VFIO API related to forwarded IRQ Signed-off-by: Eric Auger eric.au...@linaro.org --- linux-headers/linux/kvm.h | 9 + 1 file changed, 9 insertions(+) diff --git a/linux

[Qemu-devel] [PATCH v7 08/16] hw/vfio: create common module

2014-10-31 Thread Eric Auger
A new common module is created. It implements all functions that have no device specificity (PCI, Platform). This patch only consists in move (no functional changes) Signed-off-by: Kim Phillips kim.phill...@linaro.org Signed-off-by: Eric Auger eric.au...@linaro.org --- v6 - v7: - integrate

[Qemu-devel] [PATCH v4 5/6] hw/arm/sysbus-fdt: helpers for platform bus nodes addition

2014-10-31 Thread Eric Auger
to be called by ARM machine files that support platform bus and their dynamic sysbus. Addition of dynamic sysbus nodes is done only if the user did not provide any dtb. Signed-off-by: Alexander Graf ag...@suse.de Signed-off-by: Eric Auger eric.au...@linaro.org --- v3 - v4: - dyn_sysbus_devtree.c

[Qemu-devel] [PATCH v4 1/6] hw/arm/boot: load_dtb becomes non static arm_load_dtb

2014-10-31 Thread Eric Auger
load_dtb is renamed into arm_load_dtb and becomes non static. it will be used by machvirt for dynamic instantiation of platform devices Signed-off-by: Eric Auger eric.au...@linaro.org --- v2 - v3: load_dtb renamed into arm_load_dtb Conflicts: hw/arm/boot.c --- hw/arm/boot.c

[Qemu-devel] [PATCH v7 15/16] hw/vfio/common: vfio_kvm_device_fd moved in the common header

2014-10-31 Thread Eric Auger
the device is now used in platform for forwarded IRQ setup Signed-off-by: Eric Auger eric.au...@linaro.org --- hw/vfio/common.c | 3 ++- include/hw/vfio/vfio-common.h | 5 + 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/hw/vfio/common.c b/hw/vfio/common.c index

[Qemu-devel] [PATCH v7 10/16] hw/vfio: calxeda xgmac device

2014-10-31 Thread Eric Auger
The platform device class has become abstract. The device can be be instantiated on command line using such option. -device vfio-calxeda-xgmac,host=fff51000.ethernet Signed-off-by: Eric Auger eric.au...@linaro.org --- v5 - v6 - back again following Alex Graf advises - fix a bug related

[Qemu-devel] [PATCH v7 06/16] hw/vfio/pci: rename group_list into vfio_group_list

2014-10-31 Thread Eric Auger
better fit in the rest of the namespace Signed-off-by: Eric Auger eric.au...@linaro.org --- hw/vfio/pci.c | 22 +++--- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/hw/vfio/pci.c b/hw/vfio/pci.c index 0ee6f7f..2216bd4 100644 --- a/hw/vfio/pci.c +++ b/hw/vfio

[Qemu-devel] [PATCH v7 00/16] KVM platform device passthrough

2014-10-31 Thread Eric Auger
instantiation, Eric Auger [3] [PATCH v3 0/2] actual checks of KVM_CAP_IRQFD and KVM_CAP_IRQFD_RESAMPLE, Eric Auger http://lists.nongnu.org/archive/html/qemu-devel/2014-09/msg00589.html [4] [PATCH v2] vfio: migration to trace points, Eric Auger https://patchwork.ozlabs.org/patch/394785

[Qemu-devel] [PATCH RESEND] vfio: migration to trace points

2014-10-31 Thread Eric Auger
This patch removes all DPRINTF and replace them by trace points. A few DPRINTF used in error cases were transformed into error_report. Signed-off-by: Eric Auger eric.au...@linaro.org --- - __func__ is removed since trace point name does the same job - HWADDR_PRIx were replaced by PRIx64

[Qemu-devel] [PATCH v3 1/2] KVM_CAP_IRQFD and KVM_CAP_IRQFD_RESAMPLE checks

2014-10-31 Thread Eric Auger
in 84223598778ba08041f4297fda485df83414d57e, KVM: s390: irq routing for adapter interrupts. Both commits first appear in 3.15 so there should not be any kernel version impacted by this QEMU modification. Signed-off-by: Eric Auger eric.au...@linaro.org --- v2-v3: - changed the commit message only

[Qemu-devel] [PATCH v7 03/16] hw/vfio/pci: introduce VFIODevice

2014-10-31 Thread Eric Auger
, vfio_disable_irqindex which now apply to VFIODevice. They are renamed as *_irqindex. The index is passed as parameter to anticipate their usage for platform IRQs Signed-off-by: Eric Auger eric.au...@linaro.org --- v4-v5: - fix style issues - in vfio_initfn, rework allocation of vdev

[Qemu-devel] [PATCH v7 02/16] hw/vfio/pci: Rename VFIODevice into VFIOPCIDevice

2014-10-31 Thread Eric Auger
This prepares for the introduction of VFIOPlatformDevice Signed-off-by: Eric Auger eric.au...@linaro.org --- hw/vfio/pci.c | 210 +- 1 file changed, 106 insertions(+), 104 deletions(-) diff --git a/hw/vfio/pci.c b/hw/vfio/pci.c index

[Qemu-devel] [PATCH v7 01/16] vfio: move hw/misc/vfio.c to hw/vfio/pci.c Move vfio.h into include/hw/vfio

2014-10-31 Thread Eric Auger
From: Kim Phillips kim.phill...@linaro.org This is done in preparation for the addition of VFIO platform device support. Signed-off-by: Kim Phillips kim.phill...@linaro.org --- LICENSE | 2 +- MAINTAINERS | 2 +- hw/Makefile.objs | 1

[Qemu-devel] [PATCH v7 07/16] hw/vfio/pci: use name field in format strings

2014-10-31 Thread Eric Auger
Signed-off-by: Eric Auger eric.au...@linaro.org Conflicts: trace-events --- hw/vfio/pci.c | 213 -- trace-events | 109 -- 2 files changed, 116 insertions(+), 206 deletions(-) diff --git a/hw/vfio/pci.c

[Qemu-devel] [PATCH v4 6/6] hw/arm/virt: add dynamic sysbus device support

2014-10-31 Thread Eric Auger
sysbus devices. Indeed dynamic sysbus devices are created after machine init. machvirt also registers a notifier that will start the VFIO dynamic device IRQ handling. Signed-off-by: Alexander Graf ag...@suse.de Signed-off-by: Eric Auger eric.au...@linaro.org --- v3 - v4: - use platform bus object

[Qemu-devel] [PATCH v4 4/6] hw/arm: add a new modify_dtb_opaque field in arm_boot_info

2014-10-31 Thread Eric Auger
This field can be used by any modify_dtb() function to pass additional arguments requested to build the modified dtb. This is needed for creating the platform bus dynamic sysbus nodes. Signed-off-by: Eric Auger eric.au...@linaro.org --- include/hw/arm/arm.h | 4 1 file changed, 4 insertions

[Qemu-devel] [PATCH v3 2/2] vfio: use kvm_resamplefds_enabled()

2014-10-31 Thread Eric Auger
Use the kvm_resamplefds_enabled function Signed-off-by: Eric Auger eric.au...@linaro.org --- hw/misc/vfio.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/hw/misc/vfio.c b/hw/misc/vfio.c index b5e7981..75bfa1c 100644 --- a/hw/misc/vfio.c +++ b/hw/misc/vfio.c @@ -406,7

[Qemu-devel] [PATCH v4 3/6] hw/arm/boot: do not free VirtBoardInfo fdt in arm_load_dtb

2014-10-31 Thread Eric Auger
is destroyed, this is not possible. Signed-off-by: Eric Auger eric.au...@linaro.org --- hw/arm/boot.c | 8 ++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/hw/arm/boot.c b/hw/arm/boot.c index 9f0662e..0e4b078 100644 --- a/hw/arm/boot.c +++ b/hw/arm/boot.c @@ -427,12 +427,16 @@ int

[Qemu-devel] [PATCH v4 2/6] hw/arm/boot: dtb start and limit moved in arm_boot_info

2014-10-31 Thread Eric Auger
the dtb is already loaded. Storing those parameters in arm_boot_info allows to avoid computing again dtb_start and dtb_load, as done in arm_load_kernel. Signed-off-by: Eric Auger eric.au...@linaro.org --- hw/arm/boot.c| 38 +- include/hw/arm/arm.h | 5

[Qemu-devel] [PATCH v3 0/2] actual checks of KVM_CAP_IRQFD and KVM_CAP_IRQFD_RESAMPLE

2014-10-31 Thread Eric Auger
user of kvm_resamplefds_enabled(). Eric Auger (2): KVM_CAP_IRQFD and KVM_CAP_IRQFD_RESAMPLE checks vfio: use kvm_resamplefds_enabled() hw/intc/openpic_kvm.c | 1 - hw/intc/xics_kvm.c| 1 - hw/misc/vfio.c| 5 ++--- include/sysemu/kvm.h | 10 ++ kvm-all.c | 7

Re: [Qemu-devel] [PATCH RESEND] vfio: migration to trace points

2014-10-31 Thread Eric Auger
On 10/31/2014 03:35 PM, Alex Williamson wrote: On Fri, 2014-10-31 at 13:44 +, Eric Auger wrote: This patch removes all DPRINTF and replace them by trace points. A few DPRINTF used in error cases were transformed into error_report. Signed-off-by: Eric Auger eric.au...@linaro.org

Re: [Qemu-devel] [RFC PATCH 0/2] virtio-mmio: add irqfd support for vhost-net based on virtio-mmio

2014-11-05 Thread Eric Auger
On 10/27/2014 12:23 PM, Li Liu wrote: On 2014/10/27 17:37, Peter Maydell wrote: On 25 October 2014 09:24, john.liuli john.li...@huawei.com wrote: To get the interrupt reason to support such VIRTIO_NET_F_STATUS features I add a new register offset VIRTIO_MMIO_ISRMEM which will help to

Re: [Qemu-devel] [PATCH v7 09/16] hw/vfio/platform: add vfio-platform support

2014-11-05 Thread Eric Auger
On 11/05/2014 11:29 AM, Alexander Graf wrote: On 31.10.14 15:05, Eric Auger wrote: Minimal VFIO platform implementation supporting - register space user mapping, - IRQ assignment based on eventfds handled on qemu side. irqfd kernel acceleration comes in a subsequent patch. Signed-off

Re: [Qemu-devel] [PATCH v7 03/16] hw/vfio/pci: introduce VFIODevice

2014-11-06 Thread Eric Auger
On 11/05/2014 06:35 PM, Alex Williamson wrote: Hi Eric, On Fri, 2014-10-31 at 14:05 +, Eric Auger wrote: Introduce the VFIODevice struct that is going to be shared by VFIOPCIDevice and VFIOPlatformDevice. Additional fields will be added there later on for review convenience

Re: [Qemu-devel] [PATCH v7 12/16] hw/arm/sysbus-fdt: enable vfio-calxeda-xgmac dynamic instantiation

2014-11-06 Thread Eric Auger
On 11/05/2014 11:23 PM, Alexander Graf wrote: On 05.11.14 13:31, Eric Auger wrote: On 11/05/2014 11:59 AM, Alexander Graf wrote: On 31.10.14 15:05, Eric Auger wrote: vfio-calxeda-xgmac now can be instantiated using the -device option. The node creation function generates a very basic dt

Re: [Qemu-devel] dynamic sysbus instantiation and load_dtb implementation

2014-11-13 Thread Eric Auger
On 11/13/2014 05:02 AM, David Gibson wrote: On Fri, Oct 24, 2014 at 02:38:39PM +0200, David Gibson wrote: On Thu, Oct 23, 2014 at 01:26:08PM +0200, Alexander Graf wrote: On 23.10.14 13:24, Peter Maydell wrote: On 23 October 2014 12:23, Alexander Graf ag...@suse.de wrote: On 23.10.14 12:19,

Re: [Qemu-devel] [PATCH v7 09/16] hw/vfio/platform: add vfio-platform support

2014-11-26 Thread Eric Auger
On 11/05/2014 11:29 AM, Alexander Graf wrote: On 31.10.14 15:05, Eric Auger wrote: Minimal VFIO platform implementation supporting - register space user mapping, - IRQ assignment based on eventfds handled on qemu side. irqfd kernel acceleration comes in a subsequent patch. Signed-off

Re: [Qemu-devel] [PATCH v7 09/16] hw/vfio/platform: add vfio-platform support

2014-11-26 Thread Eric Auger
On 11/26/2014 11:24 AM, Alexander Graf wrote: On 26.11.14 10:45, Eric Auger wrote: On 11/05/2014 11:29 AM, Alexander Graf wrote: On 31.10.14 15:05, Eric Auger wrote: Minimal VFIO platform implementation supporting - register space user mapping, - IRQ assignment based on eventfds

Re: [Qemu-devel] [PATCH v7 09/16] hw/vfio/platform: add vfio-platform support

2014-11-26 Thread Eric Auger
On 11/26/2014 12:20 PM, Alexander Graf wrote: On 26.11.14 11:48, Eric Auger wrote: On 11/26/2014 11:24 AM, Alexander Graf wrote: On 26.11.14 10:45, Eric Auger wrote: On 11/05/2014 11:29 AM, Alexander Graf wrote: On 31.10.14 15:05, Eric Auger wrote: Minimal VFIO platform

Re: [Qemu-devel] [PATCH v4 1/6] hw/arm/boot: load_dtb becomes non static arm_load_dtb

2014-11-27 Thread Eric Auger
On 11/27/2014 10:00 AM, Shannon Zhao wrote: Hi Eric, On 2014/10/31 21:53, Eric Auger wrote: load_dtb is renamed into arm_load_dtb and becomes non static. it will be used by machvirt for dynamic instantiation of platform devices Signed-off-by: Eric Auger eric.au...@linaro.org --- v2

Re: [Qemu-devel] [PATCH v4 1/6] hw/arm/boot: load_dtb becomes non static arm_load_dtb

2014-11-27 Thread Eric Auger
On 11/27/2014 11:17 AM, Shannon Zhao wrote: On 2014/11/27 17:19, Eric Auger wrote: On 11/27/2014 10:00 AM, Shannon Zhao wrote: Hi Eric, On 2014/10/31 21:53, Eric Auger wrote: load_dtb is renamed into arm_load_dtb and becomes non static. it will be used by machvirt for dynamic instantiation

Re: [Qemu-devel] [PATCH v4 5/6] hw/arm/sysbus-fdt: helpers for platform bus nodes addition

2014-11-27 Thread Eric Auger
On 11/27/2014 01:07 PM, Shannon Zhao wrote: On 2014/10/31 21:53, Eric Auger wrote: This new C module will be used by ARM machine files to generate platform bus node and their dynamic sysbus device tree nodes. Dynamic sysbus device node addition is done in a machine init done notifier

Re: [Qemu-devel] [PATCH v4 5/6] hw/arm/sysbus-fdt: helpers for platform bus nodes addition

2014-11-27 Thread Eric Auger
On 11/27/2014 01:56 PM, Shannon Zhao wrote: On 2014/11/27 20:25, Eric Auger wrote: On 11/27/2014 01:07 PM, Shannon Zhao wrote: On 2014/10/31 21:53, Eric Auger wrote: This new C module will be used by ARM machine files to generate platform bus node and their dynamic sysbus device tree nodes

Re: [Qemu-devel] [PATCH v7 09/16] hw/vfio/platform: add vfio-platform support

2014-11-27 Thread Eric Auger
On 11/26/2014 03:46 PM, Eric Auger wrote: On 11/26/2014 12:20 PM, Alexander Graf wrote: On 26.11.14 11:48, Eric Auger wrote: On 11/26/2014 11:24 AM, Alexander Graf wrote: On 26.11.14 10:45, Eric Auger wrote: On 11/05/2014 11:29 AM, Alexander Graf wrote: On 31.10.14 15:05, Eric Auger

Re: [Qemu-devel] [PATCH v7 09/16] hw/vfio/platform: add vfio-platform support

2014-11-27 Thread Eric Auger
On 11/27/2014 03:35 PM, Alexander Graf wrote: On 27.11.14 15:05, Eric Auger wrote: On 11/26/2014 03:46 PM, Eric Auger wrote: On 11/26/2014 12:20 PM, Alexander Graf wrote: On 26.11.14 11:48, Eric Auger wrote: On 11/26/2014 11:24 AM, Alexander Graf wrote: On 26.11.14 10:45, Eric Auger

Re: [Qemu-devel] [PATCH v7 09/16] hw/vfio/platform: add vfio-platform support

2014-11-27 Thread Eric Auger
On 11/27/2014 04:55 PM, Alexander Graf wrote: On 27.11.14 16:28, Alexander Graf wrote: On 27.11.14 16:14, Eric Auger wrote: On 11/27/2014 03:35 PM, Alexander Graf wrote: On 27.11.14 15:05, Eric Auger wrote: On 11/26/2014 03:46 PM, Eric Auger wrote: On 11/26/2014 12:20 PM, Alexander

Re: [Qemu-devel] [PATCH v7 09/16] hw/vfio/platform: add vfio-platform support

2014-11-27 Thread Eric Auger
On 11/27/2014 06:24 PM, Alexander Graf wrote: On 27.11.14 18:13, Eric Auger wrote: On 11/27/2014 04:55 PM, Alexander Graf wrote: On 27.11.14 16:28, Alexander Graf wrote: On 27.11.14 16:14, Eric Auger wrote: On 11/27/2014 03:35 PM, Alexander Graf wrote: On 27.11.14 15:05, Eric Auger

<    1   2   3   4   5   6   7   8   9   10   >