[Qemu-devel] Dynamic QEMU platform device instantiation in machine files: phone call on Wed July 30

2014-07-28 Thread Eric Auger
Dear all, For your information, a phone call will be held this week on Wed July 30, 17h-18h CET to address the topic of dynamic instantiation of QEMU platform devices in machine files (using the -device qemu option). Related threads are:

Re: [Qemu-devel] Dynamic QEMU platform device instantiation in machine files: phone call on Wed July 30

2014-07-29 Thread Eric Auger
On 07/29/2014 08:24 AM, Markus Armbruster wrote: Eric Auger eric.au...@linaro.org writes: Dear all, For your information, a phone call will be held this week on Wed July 30, 17h-18h CET to address the topic of dynamic instantiation of QEMU platform devices in machine files (using the -device

Re: [Qemu-devel] Dynamic QEMU platform device instantiation in machine files: phone call on Wed July 30

2014-07-29 Thread Eric Auger
On 07/29/2014 11:07 AM, Markus Armbruster wrote: Eric Auger eric.au...@linaro.org writes: Hi Markus, Thank you for the proposal. Actually quite a lot of people are now OK with this time slot. This phone call was organized in non std way since Alex was not available next week. If you don't

Re: [Qemu-devel] Dynamic QEMU platform device instantiation in machine files: phone call on Wed July 30

2014-07-30 Thread Eric Auger
: - Eric Auger - Bharat Bhusan - Alexander Graf - Rob Herring - Peter Maydell - Alvise Rigo - Stuart Yoder Content: - Consensus on the fact the QEMU device is the wrong place to put that code. Rationale is there are too many platforms to support and device do not have sufficient knowledge

[Qemu-devel] [RFC v2 0/7] machvirt dynamic sysbus device instantiation

2014-08-08 Thread Eric Auger
): PPC: e500: Support dynamically spawned sysbus devices e500: Add support for eTSEC in device tree Eric Auger (5): hw/misc/dyn_sysbus_binding: helpers for sysbus device dynamic binding hw/arm/dyn_sysbus_devtree: helpers for sysbus device dynamic dt node generation hw/arm/boot: load_dtb

[Qemu-devel] [RFC v2 1/7] hw/misc/dyn_sysbus_binding: helpers for sysbus device dynamic binding

2014-08-08 Thread Eric Auger
written by Alex Graf. Those functions were initially in ppc e500 machine file. Now moved to a separate module. PPCE500Params is replaced by a generic struct named PlatformParams Signed-off-by: Alexander Graf ag...@suse.de Signed-off-by: Eric Auger eric.au...@linaro.org --- hw/misc/Makefile.objs

[Qemu-devel] [RFC v2 5/7] hw/arm/boot: load_dtb becomes non static

2014-08-08 Thread Eric Auger
load_dtb will be used by machvirt for dynamic instantiation of platform devices Signed-off-by: Eric Auger eric.au...@linaro.org --- hw/arm/boot.c| 2 +- include/hw/arm/arm.h | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/hw/arm/boot.c b/hw/arm/boot.c index 1241761

[Qemu-devel] [RFC v2 7/7] hw/arm/virt: Support dynamically spawned sysbus devices

2014-08-08 Thread Eric Auger
and moved between RTC and MMIO v1: Inspired from what Alex Graf did in ppc e500 https://lists.gnu.org/archive/html/qemu-ppc/2014-07/msg00012.html Signed-off-by: Alexander Graf ag...@suse.de Signed-off-by: Eric Auger eric.au...@linaro.org --- hw/arm/virt.c | 62

[Qemu-devel] [RFC v2 4/7] e500: Add support for eTSEC in device tree

2014-08-08 Thread Eric Auger
From: Alexander Graf ag...@suse.de This patch adds support to expose eTSEC devices in the dynamically created guest facing device tree. This allows us to expose eTSEC devices into guests without changes in the machine file. Because we can now tell the guest about eTSEC devices this patch allows

[Qemu-devel] [RFC v2 3/7] PPC: e500: Support dynamically spawned sysbus devices

2014-08-08 Thread Eric Auger
IRQs to predetermined IRQ lines that are reserved for platform device usage. This maps really nicely into device tree logic, so we can just tell the guest about our virtual simple bus in device tree as well. Signed-off-by: Alexander Graf ag...@suse.de Signed-off-by: Eric Auger eric.au...@linaro.org

[Qemu-devel] [RFC v2 6/7] hw/arm/virt: add new add_fdt_xxx_node functions

2014-08-08 Thread Eric Auger
Create new functions: - add_fdt_uart_node - add_fdt_rtc_node - add_fdt_virtio_nodes They will be used for dynamic sysbus instantiation. Signed-off-by: Eric Auger eric.au...@linaro.org --- hw/arm/virt.c | 67 +++ 1 file changed, 44

[Qemu-devel] [RFC v2 2/7] hw/arm/dyn_sysbus_devtree: helpers for sysbus device dynamic dt node generation

2014-08-08 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: - Code moved in an arch

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

2014-08-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 v5 03/10] hw/vfio/pci: introduce VFIODevice

2014-08-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 v5 05/10] hw/vfio/pci: split vfio_get_device

2014-08-09 Thread Eric Auger
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...@linaro.org --- hw/vfio/pci.c | 181 ++ 1 file changed, 120 insertions(+), 61

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

2014-08-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 --- v4 - v5: - integrate

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

2014-08-09 Thread Eric Auger
Generates the device node of VFIO devices, if any are invoked in -device option. In case VFIO devices require more complex node generation, they can be handled before. Signed-off-by: Eric Auger eric.au...@linaro.org --- hw/arm/dyn_sysbus_devtree.c | 138

[Qemu-devel] [PATCH v5 07/10] hw/vfio/platform: add vfio-platform support

2014-08-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 v5 08/10] hw/intc/arm_gic_kvm: advertise irqfd

2014-08-09 Thread Eric Auger
set kvm_irqfds_allowed Signed-off-by: Eric Auger eric.au...@linaro.org --- hw/intc/arm_gic_kvm.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/hw/intc/arm_gic_kvm.c b/hw/intc/arm_gic_kvm.c index 5038885..08b7bf9 100644 --- a/hw/intc/arm_gic_kvm.c +++ b/hw/intc/arm_gic_kvm.c @@ -576,6

[Qemu-devel] [PATCH v5 09/10] hw/vfio/platform: Add irqfd support

2014-08-09 Thread Eric Auger
1st access to any region after IRQ hit. This removes the need for fast/slow path swap. Overall this brings significant performance improvements. It depends on host kernel KVM irqfd/GSI routing capability. Signed-off-by: Alvise Rigo a.r...@virtualopensystems.com Signed-off-by: Eric Auger eric.au

[Qemu-devel] VFIO-PCI testing after VFIO-platform rework

2014-08-11 Thread Eric Auger
Dear all, I would like to test VFIO-PCI after rework done for [PATCH v5 00/10] KVM platform device passthrough. Do you have advises about best test environment (was thinking about TCG system platform suitable for VFIO PCI assignment?). All inputs welcome Thank you in advance Best Regards

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

2014-08-11 Thread Eric Auger
On 08/11/2014 11:40 AM, Alexander Graf wrote: On 09.08.14 16:25, Eric Auger wrote: Generates the device node of VFIO devices, if any are invoked in -device option. In case VFIO devices require more complex node generation, they can be handled before. Signed-off-by: Eric Auger eric.au

Re: [Qemu-devel] [PATCH v5 08/10] hw/intc/arm_gic_kvm: advertise irqfd

2014-08-11 Thread Eric Auger
On 08/11/2014 11:37 AM, Alexander Graf wrote: On 09.08.14 16:25, Eric Auger wrote: set kvm_irqfds_allowed Signed-off-by: Eric Auger eric.au...@linaro.org --- hw/intc/arm_gic_kvm.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/hw/intc/arm_gic_kvm.c b/hw/intc/arm_gic_kvm.c

Re: [Qemu-devel] [RFC v2 1/7] hw/misc/dyn_sysbus_binding: helpers for sysbus device dynamic binding

2014-08-11 Thread Eric Auger
On 08/11/2014 03:08 PM, Alexander Graf wrote: On 08.08.14 17:03, Eric Auger wrote: 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. --- v1 - v2

Re: [Qemu-devel] [RFC v2 2/7] hw/arm/dyn_sysbus_devtree: helpers for sysbus device dynamic dt node generation

2014-08-11 Thread Eric Auger
On 08/11/2014 03:16 PM, Alexander Graf wrote: On 08.08.14 17:03, Eric Auger wrote: 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] [RFC v2 5/7] hw/arm/boot: load_dtb becomes non static

2014-08-11 Thread Eric Auger
On 08/11/2014 03:10 PM, Alexander Graf wrote: On 08.08.14 17:03, Eric Auger wrote: load_dtb will be used by machvirt for dynamic instantiation of platform devices Signed-off-by: Eric Auger eric.au...@linaro.org --- hw/arm/boot.c| 2 +- include/hw/arm/arm.h | 1 + 2 files

Re: [Qemu-devel] VFIO-PCI testing after VFIO-platform rework

2014-08-11 Thread Eric Auger
On 08/11/2014 03:50 PM, Will Deacon wrote: I'm playing with PCI device assignment with kvmtool, so I could do some basic testing if you like. Can you put the patches on a git tree somewhere please? Hi Will, Thanks for your proposal, the kernel part is at:

Re: [Qemu-devel] [PATCH v5 07/10] hw/vfio/platform: add vfio-platform support

2014-08-11 Thread Eric Auger
On 08/11/2014 10:13 PM, Alex Williamson wrote: On Sat, 2014-08-09 at 15:25 +0100, 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

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

2014-08-11 Thread Eric Auger
On 08/11/2014 09:20 PM, Alex Williamson wrote: On Sat, 2014-08-09 at 15:25 +0100, 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

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

2014-08-12 Thread Eric Auger
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 100644 index 000..4684ee5 --- /dev/null +++ b/include/hw/vfio/vfio-common.h @@ -0,0 +1,151

Re: [Qemu-devel] VFIO-PCI testing after VFIO-platform rework

2014-08-12 Thread Eric Auger
On 08/11/2014 07:57 PM, Will Deacon wrote: On Mon, Aug 11, 2014 at 03:28:40PM +0100, Eric Auger wrote: On 08/11/2014 03:50 PM, Will Deacon wrote: I'm playing with PCI device assignment with kvmtool, so I could do some basic testing if you like. Can you put the patches on a git tree somewhere

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

2014-08-12 Thread Eric Auger
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 functional parts: dev_info query, device check, region populate and interrupt populate. the last 3

Re: [Qemu-devel] The status about vhost-net on kvm-arm?

2014-08-12 Thread Eric Auger
On 08/12/2014 04:41 AM, Li Liu wrote: Hi all, Is anyone there can tell the current status of vhost-net on kvm-arm? Half a year has passed from Isa Ansharullah asked this question: http://www.spinics.net/lists/kvm-arm/msg08152.html I have found two patches which have provided the kvm-arm

Re: [Qemu-devel] [PATCH v5 07/10] hw/vfio/platform: add vfio-platform support

2014-08-12 Thread Eric Auger
On 08/12/2014 09:59 AM, bharat.bhus...@freescale.com wrote: -Original Message- From: Alexander Graf [mailto:ag...@suse.de] Sent: Monday, August 11, 2014 3:06 PM To: Eric Auger; eric.au...@st.com; christoffer.d...@linaro.org; qemu- de...@nongnu.org; Phillips Kim-R1AAHA; a.r

[Qemu-devel] [RFC v2 1/6] hw/arm/virt: add a xgmac device

2014-04-09 Thread Eric Auger
From: Kim Phillips kim.phill...@linaro.org This is a hack and only serves as an example of what needs to be done to make the next RFC - add vfio-platform support - work for development purposes on a Calxeda Midway system. We don't want mach-virt to always create this ethernet device - DO NOT

[Qemu-devel] [RFC v2 3/6] vfio: add vfio-platform support

2014-04-09 Thread Eric Auger
From: Kim Phillips kim.phill...@linaro.org Functions for which PCI and platform device support share are moved into common.c. The common vfio_{get,put}_group() get an additional argument, a pointer to a vfio_reset_handler(), for which to pass on to qemu_register_reset, but only if it exists (the

[Qemu-devel] [RFC v2 5/6] virt: Assign a VFIO platform device to a virt VM in QEMU command line

2014-04-09 Thread Eric Auger
could not be tested Signed-off-by: Eric Auger eric.au...@linaro.org --- hw/arm/virt.c | 178 +++-- hw/vfio/platform.c | 43 ++--- 2 files changed, 181 insertions(+), 40 deletions(-) diff --git a/hw/arm/virt.c b/hw/arm/virt.c index 31ae7d2

[Qemu-devel] [RFC v2 4/6] vfio: Add initial IRQ support in QEMU platform device

2014-04-09 Thread Eric Auger
. This will be improved in another patch - currently tested on a single IRQ (xgmac main IRQ) - a KVM patch is required to invalidate stage2 entries on RAM memory region destruction (see [PATCH] ARM: KVM: Handle IPA unmapping on memory region deletion) Signed-off-by: Eric Auger eric.au...@linaro.org --- hw

[Qemu-devel] [RFC v2 2/6] vfio: move hw/misc/vfio.c to hw/vfio/pci.c

2014-04-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] [RFC v2 6/6] vfio: add exit function and IRQ disable functions

2014-04-09 Thread Eric Auger
this patch brings misc improvements: - improve comments - remove interrupt field in VFIODevice - add IRQ disable routines used by new exitfn function Signed-off-by: Eric Auger eric.au...@linaro.org --- hw/vfio/platform.c | 167 - 1 file changed

[Qemu-devel] [RFC v2 0/6] KVM platform device passthrough

2014-04-09 Thread Eric Auger
an in read/write function of vfio platform driver - iommu/arm-smmu commit serie and especially bf5a852 fixing an issue with Calxeda Midway sMMU. QEMU commits can be found on vfio-dev-integ git://git.linaro.org/people/eric.auger/qemu.git Best Regards Eric Eric Auger (3): vfio: Add initial

Re: [Qemu-devel] KVM call agenda for 2014-04-15

2014-04-15 Thread Eric Auger
On 04/15/2014 04:55 PM, Alexander Graf wrote: On 04/15/2014 04:00 PM, Markus Armbruster wrote: Juan Quintela quint...@redhat.com writes: Juan Quintela quint...@redhat.com wrote: Hi Please, send any topic that you are interested in covering. Thanks, Juan. As there are no topics, no call.

Re: [Qemu-devel] [RFC v2 4/6] vfio: Add initial IRQ support in QEMU platform device

2014-04-16 Thread Eric Auger
On 04/11/2014 03:34 AM, Kim Phillips wrote: On Wed, 9 Apr 2014 16:33:07 +0100 Eric Auger eric.au...@linaro.org wrote: This work is inspired of PCI INTx. The code was prepared to support multiple IRQs but this was not tested at that stage. Similarly to what is done on PCI, the device

Re: [Qemu-devel] [PATCH 1/5] Platform: Add platform device class

2014-06-19 Thread Eric Auger
On 06/04/2014 02:28 PM, Alexander Graf wrote: This patch adds a new device class called platform device. This is an abstract class for consumption of actual classes that implement devices. The new thing about platform devices is that they have awareness of all memory regions and IRQs that

Re: [Qemu-devel] [PATCH 4/5] PPC: e500: Support platform devices

2014-06-19 Thread Eric Auger
On 06/04/2014 02:28 PM, Alexander Graf wrote: For e500 our approach to supporting platform devices is to create a simple bus from the guest's point of view within which we map platform devices dynamically. We allocate memory regions always within the platform hole in address space and map

Re: [Qemu-devel] [RFC v3 06/10] virt: Assign a VFIO platform device with -device option

2014-06-26 Thread Eric Auger
On 06/26/2014 12:28 AM, Alexander Graf wrote: On 26.06.14 00:28, Peter Maydell wrote: On 2 June 2014 08:49, Eric Auger eric.au...@linaro.org wrote: This patch aims at allowing the end-user to specify the device he wants to directly assign to his mach-virt guest in the QEMU command line

Re: [Qemu-devel] [RFC v3 03/10] vfio: add vfio-platform support

2014-06-26 Thread Eric Auger
On 06/25/2014 11:21 PM, Alexander Graf wrote: On 02.06.14 09:49, Eric Auger wrote: From: Kim Phillips kim.phill...@linaro.org Functions for which PCI and platform device support share are moved into common.c. The common vfio_{get,put}_group() get an additional argument, a pointer

Re: [Qemu-devel] [RFC v3 05/10] vfio: Add initial IRQ support in platform device

2014-06-26 Thread Eric Auger
On 06/25/2014 11:40 PM, Alex Williamson wrote: On Wed, 2014-06-25 at 23:28 +0200, Alexander Graf wrote: On 02.06.14 09:49, Eric Auger wrote: This patch brings a first support for device IRQ assignment to a KVM guest. Code is inspired of PCI INTx code. General principle of IRQ handling

Re: [Qemu-devel] [RFC v3 06/10] virt: Assign a VFIO platform device with -device option

2014-06-26 Thread Eric Auger
On 06/25/2014 11:30 PM, Alexander Graf wrote: On 02.06.14 09:49, Eric Auger wrote: This patch aims at allowing the end-user to specify the device he wants to directly assign to his mach-virt guest in the QEMU command line. The QEMU platform device becomes generic. Current choice

Re: [Qemu-devel] [RFC v3 06/10] virt: Assign a VFIO platform device with -device option

2014-06-26 Thread Eric Auger
On 06/26/2014 11:25 AM, Alexander Graf wrote: On 26.06.14 10:53, Eric Auger wrote: On 06/25/2014 11:30 PM, Alexander Graf wrote: On 02.06.14 09:49, Eric Auger wrote: This patch aims at allowing the end-user to specify the device he wants to directly assign to his mach-virt guest in the QEMU

Re: [Qemu-devel] [PATCH 4/5] PPC: e500: Support platform devices

2014-06-27 Thread Eric Auger
On 06/04/2014 02:28 PM, Alexander Graf wrote: For e500 our approach to supporting platform devices is to create a simple bus from the guest's point of view within which we map platform devices dynamically. We allocate memory regions always within the platform hole in address space and map

Re: [Qemu-devel] [PATCH 4/5] PPC: e500: Support platform devices

2014-06-27 Thread Eric Auger
On 06/27/2014 01:30 PM, Alexander Graf wrote: On 27.06.14 11:29, Eric Auger wrote: On 06/04/2014 02:28 PM, Alexander Graf wrote: For e500 our approach to supporting platform devices is to create a simple bus from the guest's point of view within which we map platform devices dynamically

Re: [Qemu-devel] [RFC v2 1/4] Add EXEC_FLAG to VFIO DMA mappings

2014-05-23 Thread Eric Auger
On 05/11/2014 07:13 PM, Alvise Rigo wrote: The flag is mandatory for the ARM SMMU so we always add it if the MMIO handles it. Hi Alvise, Refering to the root problem explanation found in https://lkml.org/lkml/2014/2/8/176, I understand the problem is specific to devices that fetch instructions

Re: [Qemu-devel] [RFC 1/2] hw/arm/virt: add a Calxeda XGMAC device

2014-03-04 Thread Eric Auger
Hi Kim, - Parameter 'driver' expects pluggable device type this can be fixed setting dc-cannot_instantiate_with_device_add_yet to false in vfio_platform_dev_class_init. You do not get the error anymore. However I must aknowledge I have not studies all possible side effects of this setting and

Re: [Qemu-devel] [RFC 2/2] hw/misc/vfio: add vfio-platform support

2014-03-04 Thread Eric Auger
Hi Kim, 1) I agree with Alex on the fact I would prefer to have the qemu-side platform device code separated from PCI device one, both using a separate generic helper code. Indeed calling functions referencing BAR in the platform device does not look natural to me; although I understand the code

Re: [Qemu-devel] [RFC 4/4] MemoryRegion with EOI callbacks for VFIO Platform devices

2014-04-23 Thread Eric Auger
Hi Alvise, Thank you for the patch. Indeed I am very interested in further discussing the vfio-platform integration with you. On 04/17/2014 07:29 PM, Alvise Rigo wrote: The user can specify the location of the memory region (register) used by the guest driver to clear the pending interrupt; if

Re: [Qemu-devel] [RFC 0/4] AMBA platform device passthrough

2014-04-23 Thread Eric Auger
On 04/17/2014 07:29 PM, Alvise Rigo wrote: These patches were born after trying the current work on device passthrough (see thread [Qemu-devel] [RFC v2 0/6] KVM platform device passthrough) with a DMA330 and FastModels. This work want to be the starting point for dicussion on some aspects

[Qemu-devel] [RFC v3 00/10] KVM platform device passthrough

2014-06-02 Thread Eric Auger
Auger): - reworked split between PCI and platform (3) - IRQ initial support (5) - dynamic instantiation (6) v2-v3 changes (Alvise Rigo, Eric Auger): - Following Alex recommandations, further efforts to factorize the code between PCI, platform usage of VFIOPlatform and VFIORegion as base classes

[Qemu-devel] [RFC v3 01/10] hw/arm/virt: add a xgmac device

2014-06-02 Thread Eric Auger
From: Kim Phillips kim.phill...@linaro.org This is a hack and only serves as an example of what needs to be done to make the next RFC - add vfio-platform support - work for development purposes on a Calxeda Midway system. We don't want mach-virt to always create this ethernet device - DO NOT

[Qemu-devel] [RFC v3 07/10] Add EXEC_FLAG to VFIO DMA mappings

2014-06-02 Thread Eric Auger
From: Alvise Rigo a.r...@virtualopensystems.com The flag is mandatory for the ARM SMMU so we always add it if the MMIO handles it. Signed-off-by: Alvise Rigo a.r...@virtualopensystems.com --- hw/vfio/common.c | 9 + hw/vfio/vfio-common.h | 1 + linux-headers/linux/vfio.h

[Qemu-devel] [RFC v3 02/10] vfio: move hw/misc/vfio.c to hw/vfio/pci.c

2014-06-02 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] [RFC v3 04/10] vfio: simplifed DPRINTF calls using device name

2014-06-02 Thread Eric Auger
:%02x:%02x.%01x format string. Signed-off-by: Eric Auger eric.au...@linaro.org --- hw/vfio/pci.c | 227 -- 1 file changed, 78 insertions(+), 149 deletions(-) diff --git a/hw/vfio/pci.c b/hw/vfio/pci.c index a9e4d97..ad0c2a0 100644 --- a/hw/vfio

[Qemu-devel] [RFC v3 06/10] virt: Assign a VFIO platform device with -device option

2014-06-02 Thread Eric Auger
This patch aims at allowing the end-user to specify the device he wants to directly assign to his mach-virt guest in the QEMU command line. The QEMU platform device becomes generic. Current choice is to reuse the -device option. For example when assigning Calxeda Midway xgmac device this option

[Qemu-devel] [RFC v3 08/10] Add AMBA devices support to VFIO

2014-06-02 Thread Eric Auger
string contains the substring arm,primecell, a clock property will be added to the device tree node in order to allow the AMBA bus code to probe the device. [Eric Auger] put str_ptr in the declaration part and rename pcompat into compat Signed-off-by: Alvise Rigo a.r...@virtualopensystems.com Signed

[Qemu-devel] [RFC v3 10/10] vfio: Add irqfd support in platform device

2014-06-02 Thread Eric Auger
. Signed-off-by: Eric Auger eric.au...@linaro.org --- hw/arm/virt.c | 14 + hw/intc/arm_gic_kvm.c | 1 + hw/vfio/platform.c| 165 +- 3 files changed, 166 insertions(+), 14 deletions(-) diff --git a/hw/arm/virt.c b/hw/arm/virt.c index

[Qemu-devel] [RFC v3 05/10] vfio: Add initial IRQ support in platform device

2014-06-02 Thread Eric Auger
and mmap_timeout in new VFIODevice struct as PCI/platform factorization. - multiple IRQ handling (a pending IRQ queue is added) - not tested - - create vfio_mmap_set_enabled as in PCI code - name of irq changed in virt Signed-off-by: Eric Auger eric.au...@linaro.org --- hw/arm/virt.c

[Qemu-devel] [RFC v3 09/10] Always use eventfd as notifying mechanism

2014-06-02 Thread Eric Auger
From: Alvise Rigo a.r...@virtualopensystems.com When eventfd is not configured the method event_notifier_init fallbacks to the pipe/pipe2 system call, causing an error in VFIO_DEVICE_SET_IRQS since we pass to the kernel a file descriptor which is not created by eventfd. Signed-off-by: Alvise

Re: [Qemu-devel] [RFC 1/2] hw/arm/virt: add a Calxeda XGMAC device

2014-03-05 Thread Eric Auger
in create_ethernet(), so I have doubts. Indeed the intent is to move the hardcoded address currently set in virt.c into something more dynamic in vfio.c' realize. Best Regards Eric On 5 March 2014 12:25, Andreas Färber afaer...@suse.de wrote: Hi, Am 05.03.2014 05:27, schrieb Eric Auger: Hi Kim

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

2014-07-07 Thread Eric Auger
some clock handles may need to be provided. Best Regards Eric Eric Auger (7): hw/misc/platform_devices: helpers for dynamic instantiation of platform devices hw/arm/boot: load_dtb becomes non static hw/arm/virt: add new add_fdt_xxx_node functions hw/arm/virt: Support dynamically

[Qemu-devel] [PATCH 1/7] hw/misc/platform_devices: helpers for dynamic instantiation of platform devices

2014-07-07 Thread Eric Auger
This new module implements routines which help in dynamic instantiation of sysbus devices. Machine files can use those generic routines. --- Dynamic sysbus device allocation fully written by Alex Graf. [Eric Auger] Those functions were initially in ppc e500 machine file. Now moved to a separate

[Qemu-devel] [PATCH 4/7] hw/arm/virt: Support dynamically spawned sysbus devices

2014-07-07 Thread Eric Auger
Allows sysbus devices to be instantiated from command line by using -device option --- Inspired from what Alex Graf did in ppc e500 https://lists.gnu.org/archive/html/qemu-ppc/2014-07/msg00012.html Signed-off-by: Alexander Graf ag...@suse.de Signed-off-by: Eric Auger eric.au...@linaro.org

[Qemu-devel] [PATCH 3/7] hw/arm/virt: add new add_fdt_xxx_node functions

2014-07-07 Thread Eric Auger
Create new functions: - add_fdt_uart_node - add_fdt_rtc_node - add_fdt_virtio_nodes They will be used for dynamic sysbus instantiation. Signed-off-by: Eric Auger eric.au...@linaro.org --- hw/arm/virt.c | 67 +++ 1 file changed, 44

[Qemu-devel] [PATCH 2/7] hw/arm/boot: load_dtb becomes non static

2014-07-07 Thread Eric Auger
load_dtb will be used by machvirt for dynamic instantiation of platform devices --- hw/arm/boot.c| 2 +- include/hw/arm/arm.h | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/hw/arm/boot.c b/hw/arm/boot.c index 3d1f4a2..314bbfd 100644 --- a/hw/arm/boot.c +++

[Qemu-devel] [PATCH 5/7] hw/core/sysbus: add fdt_add_node method

2014-07-07 Thread Eric Auger
This method is meant to be called on sysbus device dynamic instantiation (-device option). Devices that support this kind of instantiation must implement this method. Signed-off-by: Eric Auger eric.au...@linaro.org --- hw/core/sysbus.c| 12 include/hw/sysbus.h | 2 ++ 2 files

[Qemu-devel] [PATCH 6/7] hw/misc/platform_devices: add call to sysbus fdt_add_node

2014-07-07 Thread Eric Auger
Creation of the node in the device tree relies on the new sysbus fdt_add_node method. Signed-off-by: Eric Auger eric.au...@linaro.org --- hw/misc/platform_devices.c | 11 --- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/hw/misc/platform_devices.c b/hw/misc

[Qemu-devel] [PATCH 7/7] hw/misc/platform_devices: Add platform_bus_base to PlatformDevtreeData

2014-07-07 Thread Eric Auger
The base address of the platform bus sometimes is used to build the reg property. --- Actually I did not succeed in doing it another way with Calxeda xgmac. If someone knows how to do without, please advise. Signed-off-by: Eric Auger eric.au...@linaro.org --- hw/misc/platform_devices.c

[Qemu-devel] [RFC v4 04/13] hw/vfio/pci: introduce VFIODevice

2014-07-07 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 --- hw/vfio/pci.c | 243 +++--- 1

[Qemu-devel] [RFC v4 06/13] hw/vfio/pci: split vfio_get_device

2014-07-07 Thread Eric Auger
dev_info. vfio_put_base_device is created. Signed-off-by: Eric Auger eric.au...@linaro.org --- hw/vfio/pci.c | 181 +++--- 1 file changed, 121 insertions(+), 60 deletions(-) diff --git a/hw/vfio/pci.c b/hw/vfio/pci.c index 5f0164a..d228cf8 100644

[Qemu-devel] [RFC v4 11/13] hw/vfio/platform: Add irqfd support

2014-07-07 Thread Eric Auger
1st access to any region after IRQ hit. This removes the need for fast/slow path swap. Overall this brings significant performance improvements. It depends on host kernel KVM irqfd/GSI routing capability. Signed-off-by: Alvise Rigo a.r...@virtualopensystems.com Signed-off-by: Eric Auger eric.au

[Qemu-devel] [RFC v4 05/13] hw/vfio/pci: Introduce VFIORegion

2014-07-07 Thread Eric Auger
too. vfio_mmap_bar becomes vfio_map_region Signed-off-by: Eric Auger eric.au...@linaro.org --- hw/vfio/pci.c | 169 -- 1 file changed, 93 insertions(+), 76 deletions(-) diff --git a/hw/vfio/pci.c b/hw/vfio/pci.c index d0bee62..5f0164a 100644

[Qemu-devel] [RFC v4 00/13] KVM platform device passthrough

2014-07-07 Thread Eric Auger
assignment). 10-11) addition of irqfd/virqfd support 12) capability to dynamically instantiate the device 13) example derived VFIO device: calxeda xgmac v3-v4 changes (Eric Auger, Alvise Rigo) - rebase on last VFIO PCI code (v2.1.0-rc0) - full git history rework to ease PCI code change review - mv

[Qemu-devel] [RFC v4 10/13] hw/intc/arm_gic_kvm: enable irqfd and set routing table

2014-07-07 Thread Eric Auger
Makes possible to use KVM irqfd. An identity GSI routing table is defined so that virtual IRQ injection can happen. Signed-off-by: Eric Auger eric.au...@linaro.org --- hw/intc/arm_gic_kvm.c | 11 +++ 1 file changed, 11 insertions(+) diff --git a/hw/intc/arm_gic_kvm.c b/hw/intc

[Qemu-devel] [RFC v4 08/13] hw/vfio/common: Add EXEC_FLAG to VFIO DMA mappings

2014-07-07 Thread Eric Auger
From: Alvise Rigo a.r...@virtualopensystems.com The flag is mandatory for the ARM SMMU so we always add it if the MMIO handles it. Signed-off-by: Alvise Rigo a.r...@virtualopensystems.com --- hw/vfio/common.c | 9 + include/hw/vfio/vfio-common.h | 1 +

[Qemu-devel] [RFC v4 09/13] hw/vfio/platform: add vfio-platform support

2014-07-07 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] [RFC v4 03/13] hw/vfio/pci: Remove unneeded include files

2014-07-07 Thread Eric Auger
Signed-off-by: Eric Auger eric.au...@linaro.org --- hw/vfio/pci.c | 12 1 file changed, 12 deletions(-) diff --git a/hw/vfio/pci.c b/hw/vfio/pci.c index 5c7bfd5..a7df3de 100644 --- a/hw/vfio/pci.c +++ b/hw/vfio/pci.c @@ -18,26 +18,14 @@ * Copyright (C) 2008, IBM, Muli Ben-Yehuda

Re: [Qemu-devel] [RFC v4 08/13] hw/vfio/common: Add EXEC_FLAG to VFIO DMA mappings

2014-07-07 Thread Eric Auger
On 07/07/2014 03:25 PM, Alvise Rigo wrote: Il 07/07/2014 14:49, Will Deacon ha scritto: On Mon, Jul 07, 2014 at 01:27:18PM +0100, Eric Auger wrote: From: Alvise Rigo a.r...@virtualopensystems.com The flag is mandatory for the ARM SMMU so we always add it if the MMIO handles it. I though

[Qemu-devel] [RFC v4 13/13] hw/vfio: add an example calxeda_xgmac

2014-07-07 Thread Eric Auger
is hard coded in the realize function. -device vfio-calxeda-xgmac,vfio_device=fff51000.ethernet cannot be used instead of -device vfio-platform,vfio_device=fff51000.ethernet,compat=calxeda/hb-xgmac This is an example. NOT TO BE APPLIED for this device. Not-signed-off-by: Eric Auger eric.au

[Qemu-devel] [RFC v4 12/13] hw/vfio/platform: add default dt generation for vfio device

2014-07-07 Thread Eric Auger
...@virtualopensystems.com Signed-off-by: Eric Auger eric.au...@linaro.org --- hw/vfio/platform.c | 143 include/hw/vfio/vfio-platform.h | 1 + 2 files changed, 144 insertions(+) diff --git a/hw/vfio/platform.c b/hw/vfio/platform.c index fb0f7c9..447ce50 100644

[Qemu-devel] [RFC v4 02/13] hw/vfio/pci: Rename VFIODevice into VFIOPCIDevice

2014-07-07 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] [RFC v4 01/13] vfio: move hw/misc/vfio.c to hw/vfio/pci.c Move vfio.h into include/hw/vfio

2014-07-07 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

Re: [Qemu-devel] [RFC v4 03/13] hw/vfio/pci: Remove unneeded include files

2014-07-23 Thread Eric Auger
On 07/08/2014 08:55 PM, Alex Williamson wrote: On Mon, 2014-07-07 at 13:27 +0100, Eric Auger wrote: Signed-off-by: Eric Auger eric.au...@linaro.org --- hw/vfio/pci.c | 12 1 file changed, 12 deletions(-) diff --git a/hw/vfio/pci.c b/hw/vfio/pci.c index 5c7bfd5..a7df3de 100644

Re: [Qemu-devel] [RFC v4 04/13] hw/vfio/pci: introduce VFIODevice

2014-07-23 Thread Eric Auger
On 07/23/2014 12:24 PM, Peter Maydell wrote: On 23 July 2014 11:02, Eric Auger eric.au...@linaro.org wrote: On 07/09/2014 12:41 AM, Alex Williamson wrote: On Mon, 2014-07-07 at 13:27 +0100, Eric Auger wrote: +vdev-vbasedev.ops = vfio_pci_ops; + +vdev-vbasedev.type

Re: [Qemu-devel] [PATCH 1/7] hw/misc/platform_devices: helpers for dynamic instantiation of platform devices

2014-07-23 Thread Eric Auger
On 07/08/2014 03:43 PM, Alexander Graf wrote: On 07.07.14 09:08, Eric Auger wrote: This new module implements routines which help in dynamic instantiation of sysbus devices. Machine files can use those generic routines. --- Dynamic sysbus device allocation fully written by Alex Graf

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

2014-07-23 Thread Eric Auger
On 07/08/2014 03:51 PM, Alexander Graf wrote: On 07.07.14 09:08, Eric Auger wrote: Allows sysbus devices to be instantiated from command line by using -device option --- Inspired from what Alex Graf did in ppc e500 https://lists.gnu.org/archive/html/qemu-ppc/2014-07/msg00012.html

Re: [Qemu-devel] [PATCH 5/7] hw/core/sysbus: add fdt_add_node method

2014-07-23 Thread Eric Auger
On 07/08/2014 03:52 PM, Alexander Graf wrote: On 07.07.14 09:08, Eric Auger wrote: This method is meant to be called on sysbus device dynamic instantiation (-device option). Devices that support this kind of instantiation must implement this method. Signed-off-by: Eric Auger eric.au

Re: [Qemu-devel] [PATCH 7/7] hw/misc/platform_devices: Add platform_bus_base to PlatformDevtreeData

2014-07-23 Thread Eric Auger
On 07/08/2014 03:53 PM, Alexander Graf wrote: On 07.07.14 09:08, Eric Auger wrote: The base address of the platform bus sometimes is used to build the reg property. --- Actually I did not succeed in doing it another way with Calxeda xgmac. If someone knows how to do without, please

Re: [Qemu-devel] [PATCH 5/7] hw/core/sysbus: add fdt_add_node method

2014-07-24 Thread Eric Auger
On 07/24/2014 01:02 AM, Alexander Graf wrote: On 23.07.14 17:33, Eric Auger wrote: On 07/08/2014 03:52 PM, Alexander Graf wrote: On 07.07.14 09:08, Eric Auger wrote: This method is meant to be called on sysbus device dynamic instantiation (-device option). Devices that support this kind

Re: [Qemu-devel] [RFC v4 06/13] hw/vfio/pci: split vfio_get_device

2014-07-24 Thread Eric Auger
On 07/09/2014 12:43 AM, Alex Williamson wrote: On Mon, 2014-07-07 at 13:27 +0100, Eric Auger wrote: vfio_get_device now takes a VFIODevice as argument. The function is split into 4 functional parts: dev_info query, device check, region populate and interrupt populate. the last 3

Re: [Qemu-devel] [RFC v4 06/13] hw/vfio/pci: split vfio_get_device

2014-07-24 Thread Eric Auger
On 07/24/2014 11:51 AM, Eric Auger wrote: On 07/09/2014 12:43 AM, Alex Williamson wrote: On Mon, 2014-07-07 at 13:27 +0100, Eric Auger wrote: vfio_get_device now takes a VFIODevice as argument. The function is split into 4 functional parts: dev_info query, device check, region populate

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/18/2014 11:54 PM, Joel Schopp wrote: +static void vfio_fdt_add_device_node(SysBusDevice *sbdev, void *opaque) +{ +PlatformDevtreeData *data = opaque; +void *fdt = data-fdt; +const char *parent_node = data-node; +int compat_str_len; +char *nodename; +int i,

  1   2   3   4   5   6   7   8   9   10   >