[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 --- 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 --- 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/pci.c @@ -283,7 +283,7

[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 Signed-off-by: Eric Auger --- v5 -> v6: - follow all evolutions of original PCI code from v5 to

[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 Signed-off-by: Eric Auger --- v1 -> v2: - platform_devices renamed i

[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 Signed-off-by: Eric Auger --- v2 -> v3: - add arm_ prefix - arm_sysbus_device_create_devt

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

2014-09-09 Thread Eric Auger
sysbus_devtree - VFIO region 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

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

2014-09-09 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 --- v2 -> v3: load_dtb renamed into arm_load_dtb --- hw/arm/boot.c| 4 ++-- include/hw/arm/arm.h | 1 + 2 files changed

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

2014-09-09 Thread Eric Auger
Allows sysbus devices to be instantiated from command line by using -device option Signed-off-by: Alexander Graf Signed-off-by: Eric Auger --- v2 -> v3 - renaming of arm_platform_bus_create_devtree and arm_load_dtb - add copyright in hw/arm/dyn_sysbus_devtree.c v1 -> v2: - remove u

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

2014-09-09 Thread Eric Auger
From: Alexander Graf 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 Auger

[Qemu-devel] [PATCH v3 5/6] hw/arm/virt: new add_fdt_*_node functions

2014-09-09 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 --- v2 -> v3: reword title to avoid content violation --- hw/arm/virt.c |

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 instan

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). >>

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 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]&q

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 */ >>

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

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 sysbu

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

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 >> >> --- >> >> v2 -> v3: >> - correct 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 a

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

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 >> --- >> hw/vfio/pci.c | 12 >> 1 file changed, 12 deletions(-) >> >> diff --git a/hw/vfio/pci.c b/hw/vfio

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

2014-07-23 Thread Eric Auger
On 07/09/2014 12:41 AM, Alex Williamson wrote: > On Mon, 2014-07-07 at 13:27 +0100, 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 revie

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 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;

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

2014-07-23 Thread Eric Auger
On 07/09/2014 12:41 AM, Alex Williamson wrote: > On Mon, 2014-07-07 at 13:27 +0100, Eric Auger wrote: >> This structure is going to be shared by VFIOPCIDevice and >> VFIOPlatformDevice. VFIOBAR includes it. >> >> vfio_eoi becomes an ops of VFIODevice specialized by p

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

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 >> htt

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. >>

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 >> property. >> >> --- >> >> Actually I did not succeed in doing it another way with Calxeda xg

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

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

2014-07-24 Thread Eric Auger
On 07/24/2014 01:07 AM, Alexander Graf wrote: > > On 23.07.14 16:58, Eric Auger wrote: >> 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 >>

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 pop

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

[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: http://lists.gnu.org/archive/html/qemu-ppc/2014-07/msg00047

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

2014-07-29 Thread Eric Auger
Eric On 07/29/2014 08:24 AM, Markus Armbruster wrote: > Eric Auger 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

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 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 avai

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

2014-07-30 Thread Eric Auger
ndees: - 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 knowled

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

2014-08-08 Thread Eric Auger
vtreeData Alexander Graf (2): 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

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

2014-08-08 Thread Eric Auger
lly 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 Signed-off-by: Eric Auger --- hw/misc/Makefile.objs| 1 + hw/m

[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 --- 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..53b43e8 100644 --- a

[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 Signed-off-by: Eric Auger --- hw/arm/virt.c | 62 +-- 1 f

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

2014-08-08 Thread Eric Auger
From: Alexander Graf 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 the user to sp

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

2014-08-08 Thread Eric Auger
and map 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 Signed-off-by: Eric Auger --- v1 -> v2

[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 --- hw/arm/virt.c | 67 +++ 1 file changed, 44 insertions(+), 23 deletions

[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 Signed-off-by: Eric Auger --- v2: - Code moved in an arch specific file to accomodate architecture

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

2014-04-09 Thread Eric Auger
From: Kim Phillips 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 APPLY, etc. Initial attemp

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

2014-04-09 Thread Eric Auger
From: Kim Phillips 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 platform device code cu

[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
ly handled - cases where multiple VFIO devices are assigned could not be tested Signed-off-by: Eric Auger --- hw/arm/virt.c | 178 +++-- hw/vfio/platform.c | 43 ++--- 2 files changed, 181 insertions(+), 40 deletions(-) diff --git a/hw

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

2014-04-09 Thread Eric Auger
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 --- hw/arm/virt.c | 13

[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 This is done in preparation for the addition of VFIO platform device support. Signed-off-by: Kim Phillips --- LICENSE| 2 +- MAINTAINERS| 2 +- hw/Makefile.objs | 1 + hw/misc/Makefile.objs | 1 - hw/vfio/Mak

[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 --- hw/vfio/platform.c | 167 - 1 file changed, 127 insertions

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

2014-04-09 Thread Eric Auger
: corrects 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: A

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 writes: >> >>> Juan Quintela wrote: Hi Please, send any topic that you are interested in covering. Thanks, Juan. >>> As there are no topics, no call. >> Did w

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 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, t

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; i

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 aspect

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 may

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 1/2] hw/arm/virt: add a Calxeda XGMAC device

2014-03-05 Thread Eric Auger
HERNET].base 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 wrote: > Hi, > > Am 05.03.2014 05:2

[Qemu-devel] [PATCH v3 1/2] linux-headers: update KVM headers from KVM_DEV_ARM_VGIC_GRP_CTRL

2015-02-12 Thread Eric Auger
Add a new group/attribute in VGIC KVM device enabling to force vgic init: KVM_DEV_ARM_VGIC_GRP_CTRL/KVM_DEV_ARM_VGIC_CTRL_INIT Update according to 3.19 headers. Signed-off-by: Eric Auger --- linux-headers/asm-arm/kvm.h | 5 + linux-headers/asm-arm64/kvm.h | 5 + 2 files changed, 10

[Qemu-devel] [PATCH v3 0/2] explicit VGIC initialization in finalize function

2015-02-12 Thread Eric Auger
f IRQs must be known at init time. Eric Auger (2): linux-headers: update KVM headers from KVM_DEV_ARM_VGIC_GRP_CTRL hw/intc/arm_gic: Initialize the vgic in the realize function hw/intc/arm_gic_kvm.c | 6 ++ linux-headers/asm-arm/kvm.h | 5 + linux-headers/asm-arm64/kvm

[Qemu-devel] [PATCH v3 2/2] hw/intc/arm_gic: Initialize the vgic in the realize function

2015-02-12 Thread Eric Auger
This patch forces vgic initialization in the vgic realize function. It uses a new group/attribute that allows such operation. This earlier initialization allows, for example, to setup VFIO signaling and irqfd after vgic initialization, on a reset notifier. Signed-off-by: Eric Auger --- hw/intc

[Qemu-devel] [PATCH v10 0/7] KVM platform device passthrough

2015-02-12 Thread Eric Auger
vfio: type1: support for ARM SMMUS with VFIO_IOMMU_TYPE1 VOSYS, http://www.spinics.net/lists/kvm-arm/msg11738.html [5] [PATCH v8] irqfd support for arm/arm64 Eric Auger, https://lkml.org/lkml/2015/1/19/410 - kernel pieces can be found at: http://git.linaro.org/people/eric.auger/linux.git (br

[Qemu-devel] [PATCH v10 1/7] linux-headers: update VFIO header for VFIO platform drivers

2015-02-12 Thread Eric Auger
Update according to vfio.h header found in http://git.linaro.org/people/eric.auger/linux.git branch irqfd_integ_v9 Signed-off-by: Eric Auger --- v9 -> v10: - AMBA removed v8 -> v9: - rewording of the commit message --- linux-headers/linux/vfio.h | 31 ++-

[Qemu-devel] [PATCH v10 3/7] hw/vfio/platform: add irq assignment

2015-02-12 Thread Eric Auger
This patch adds the code requested to assign interrupts to a guest. The interrupts are mediated through user handled eventfds only. The mechanics to start the IRQ handling is not yet there through. Signed-off-by: Eric Auger --- v8 -> v9: - free irq related resources in case of error

[Qemu-devel] [PATCH v10 2/7] hw/vfio/platform: vfio-platform skeleton

2015-02-12 Thread Eric Auger
Minimal VFIO platform implementation supporting register space user mapping but not IRQ assignment. Signed-off-by: Kim Phillips Signed-off-by: Eric Auger --- v9 -> v10: - vfio_populate_device no more called in common vfio_get_device but in vfio_base_device_init v8 -> v9: - irq managem

[Qemu-devel] [PATCH v10 4/7] hw/vfio/platform: add capability to start IRQ propagation

2015-02-12 Thread Eric Auger
Add a reset notify function that enables to start the propagation of interrupts to the guest. Signed-off-by: Eric Auger --- v8 -> v9: - handle failure in vfio_irq_starter --- hw/vfio/platform.c | 52 + include/hw/vfio/vfio-platform.h |

[Qemu-devel] [PATCH v10 5/7] hw/vfio: calxeda xgmac device

2015-02-12 Thread Eric Auger
The platform device class has become abstract. This patch introduces a calxeda xgmac device that can be be instantiated on command line using such option. -device vfio-calxeda-xgmac,host="fff51000.ethernet" Signed-off-by: Eric Auger --- v8 -> v9: - renamed calxeda_xgmac.c into ca

[Qemu-devel] [PATCH v10 7/7] hw/vfio/platform: add irqfd support

2015-02-12 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 Signed-off-by: Eric Auger --- v5 -> v6 - rely on kvm_irqfds_enabled() and kvm_resamplefds_enabled() - guard KVM code with #ifdef CONFIG_KVM

[Qemu-devel] [PATCH v10 6/7] hw/arm/sysbus-fdt: enable vfio-calxeda-xgmac dynamic instantiation

2015-02-12 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 --- v8 -> v9: - properly free resources in case of errors

Re: [Qemu-devel] [PATCH v3 1/2] linux-headers: update KVM headers from KVM_DEV_ARM_VGIC_GRP_CTRL

2015-02-12 Thread Eric Auger
On 02/13/2015 04:42 AM, Peter Maydell wrote: > On 13 February 2015 at 03:37, Eric Auger wrote: >> Add a new group/attribute in VGIC KVM device enabling to force >> vgic init: KVM_DEV_ARM_VGIC_GRP_CTRL/KVM_DEV_ARM_VGIC_CTRL_INIT >> >> Update according to 3.19 headers.

[Qemu-devel] [RFC 0/3] VFIO Platform device featuring IRQ forwarding

2015-02-12 Thread Eric Auger
series (v8), now moved in a separate RFC since dependent on many RFCs. Best Regards Eric Eric Auger (3): linux-headers: Update KVM header for KVM-VFIO FORWARD/UNFORWARD hw/vfio/common: vfio_kvm_device_fd moved in the common header hw/vfio/platform: add forwarded irq support hw/vfio

[Qemu-devel] [RFC 1/3] linux-headers: Update KVM header for KVM-VFIO FORWARD/UNFORWARD

2015-02-12 Thread Eric Auger
Integrate updated KVM-VFIO API related to forwarded IRQ Update according to header found in http://git.linaro.org/people/eric.auger/linux.git branch irqfd_integ_v9 Signed-off-by: Eric Auger --- v8 -> v9: use new kvm_vfio_dev_irq struct --- linux-headers/linux/kvm.h |

[Qemu-devel] [RFC 3/3] hw/vfio/platform: add forwarded irq support

2015-02-12 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 --- v8 -> v9: - use new kvm_vfio_dev_irq struct --- hw/vfio/platfor

[Qemu-devel] [RFC 2/3] hw/vfio/common: vfio_kvm_device_fd moved in the common header

2015-02-12 Thread Eric Auger
the device is now used in platform for forwarded IRQ setup Signed-off-by: Eric Auger --- 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 c5d1551..be72ad6

Re: [Qemu-devel] [PATCH] vfio: Fix debug message compile error

2015-02-09 Thread Eric Auger
Hi Alexey, Thanks for pointing that issue. Best Regards Eric On 02/10/2015 07:14 AM, Alexey Kardashevskiy wrote: > This fixes a compiler error which occurs if DEBUG_VFIO is defined. > > Signed-off-by: Alexey Kardashevskiy > --- > hw/vfio/pci.c | 2 +- > 1 file changed, 1 insertion(+), 1 dele

[Qemu-devel] [PATCH v11 1/9] linux-headers: update VFIO header for VFIO platform/amba drivers

2015-03-19 Thread Eric Auger
Update according to the vfio.h header found in ssh://g...@git.linaro.org/people/eric.auger/linux.git branch 4.0-rc3-v14 --- v10 -> v11: - only includes header modifications related to vfio platform driver v14 and not those related to "vfio: type1: support for ARM SMMUS with VFIO_IOMMU_TYPE1"

[Qemu-devel] [PATCH v11 2/9] hw/vfio/platform: vfio-platform skeleton

2015-03-19 Thread Eric Auger
Minimal VFIO platform implementation supporting register space user mapping but not IRQ assignment. Signed-off-by: Kim Phillips Signed-off-by: Eric Auger --- v10 -> v11: x Take into account Alex Bennee's comments: - use g_malloc0_n instead of g_malloc0 - use block declarations when

[Qemu-devel] [PATCH v11 0/9] KVM platform device passthrough

2015-03-19 Thread Eric Auger
w/arm/dyn_sysbus_devtree.c - remove "hw/vfio: add an example calxeda_xgmac": with removal of device tree node generation we do not have so many things to implement in that derived device yet. May be re-introduced later on if needed typically for reset/migration. - no GSI routing table a

[Qemu-devel] [PATCH v11 9/9] hw/vfio/platform: add irqfd support

2015-03-19 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 Signed-off-by: Eric Auger Reviewed-by: Alex Bennee --- v10 -> v11: - Add Alex' Reviewed-by - introduce kvm_accel in this patch and initi

[Qemu-devel] [PATCH v11 4/9] hw/vfio/platform: add capability to start IRQ propagation

2015-03-19 Thread Eric Auger
Add a reset notify function that enables to start the propagation of interrupts to the guest. Signed-off-by: Eric Auger --- v10 -> v11: - comment reword v8 -> v9: - handle failure in vfio_irq_starter --- hw/vfio/platform.c | 64 + i

[Qemu-devel] [PATCH v11 3/9] hw/vfio/platform: add irq assignment

2015-03-19 Thread Eric Auger
This patch adds the code requested to assign interrupts to a guest. The interrupts are mediated through user handled eventfds only. The mechanics to start the IRQ handling is not yet there through. Signed-off-by: Eric Auger --- v10 -> v11: - use block declaration when possible - change or

[Qemu-devel] [PATCH v11 5/9] hw/arm/virt: start VFIO IRQ propagation

2015-03-19 Thread Eric Auger
handled in a machine init done notifier and only at that time the aboslute GSI number the physical IRQ is forwarded to is known. Signed-off-by: Eric Auger v10 - v11: - becomes a separate patch --- hw/arm/virt.c | 34 -- 1 file changed, 20 insertions(+), 14 deletions

[Qemu-devel] [PATCH v11 7/9] hw/arm/sysbus-fdt: enable vfio-calxeda-xgmac dynamic instantiation

2015-03-19 Thread Eric Auger
This patch allows the instantiation of the vfio-calxeda-xgmac device from the QEMU command line (-device vfio-calxeda-xgmac,host=""). A specialized device tree node is created for the guest, containing compat, dma-coherent, reg and interrupts properties. Signed-off-by: Eric Auger

[Qemu-devel] [PATCH v11 6/9] hw/vfio/platform: calxeda xgmac device

2015-03-19 Thread Eric Auger
The platform device class has become abstract. This patch introduces a calxeda xgmac device that derives from it. Signed-off-by: Eric Auger Reviewed-by: Alex Bennee --- v10 -> v11: - add Alex Reviewed-by - move virt modifications in a separate patch v8 -> v9: - renamed calxeda_xgmac.

[Qemu-devel] [PATCH v11 8/9] linux-headers: update arm/arm64 KVM headers for irqfd

2015-03-19 Thread Eric Auger
Update according to arm/arm64 kvm.h headers found in ssh://git.linaro.org/people/eric.auger/linux.git branch irqfd_v9_stdalone_official_release Signed-off-by: Eric Auger --- linux-headers/asm-arm/kvm.h | 3 +++ linux-headers/asm-arm64/kvm.h | 3 +++ 2 files changed, 6 insertions(+) diff

Re: [Qemu-devel] [PATCH v10 3/7] hw/vfio/platform: add irq assignment

2015-03-19 Thread Eric Auger
Hi Alex, On 02/17/2015 12:24 PM, Alex Bennée wrote: > > Eric Auger writes: > >> This patch adds the code requested to assign interrupts to >> a guest. The interrupts are mediated through user handled >> eventfds only. >> >> The mechanics to start th

[Qemu-devel] [PATCH v12 1/9] linux-headers: update VFIO header for VFIO platform/amba drivers

2015-03-19 Thread Eric Auger
Update according to the vfio.h header found in ssh://g...@git.linaro.org/people/eric.auger/linux.git branch 4.0-rc3-v14 --- v10 -> v11: - only includes header modifications related to vfio platform driver v14 and not those related to "vfio: type1: support for ARM SMMUS with VFIO_IOMMU_TYPE1"

[Qemu-devel] [PATCH v12 5/9] hw/arm/virt: start VFIO IRQ propagation

2015-03-19 Thread Eric Auger
handled in a machine init done notifier and only at that time the aboslute GSI number the physical IRQ is forwarded to is known. Signed-off-by: Eric Auger v10 - v11: - becomes a separate patch --- hw/arm/virt.c | 34 -- 1 file changed, 20 insertions(+), 14 deletions

[Qemu-devel] [PATCH v12 4/9] hw/vfio/platform: add capability to start IRQ propagation

2015-03-19 Thread Eric Auger
Add a reset notify function that enables to start the propagation of interrupts to the guest. Signed-off-by: Eric Auger --- v10 -> v11: - comment reword v8 -> v9: - handle failure in vfio_irq_starter --- hw/vfio/platform.c | 64 + i

[Qemu-devel] [PATCH v12 3/9] hw/vfio/platform: add irq assignment

2015-03-19 Thread Eric Auger
This patch adds the code requested to assign interrupts to a guest. The interrupts are mediated through user handled eventfds only. The mechanics to start the IRQ handling is not yet there through. Signed-off-by: Eric Auger --- v10 -> v11: - use block declaration when possible - change or

[Qemu-devel] [PATCH v12 9/9] hw/vfio/platform: add irqfd support

2015-03-19 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 Signed-off-by: Eric Auger Reviewed-by: Alex Bennée --- v10 -> v11: - Add Alex' Reviewed-by - introduce kvm_accel in this patch and initi

[Qemu-devel] [PATCH v12 2/9] hw/vfio/platform: vfio-platform skeleton

2015-03-19 Thread Eric Auger
Minimal VFIO platform implementation supporting register space user mapping but not IRQ assignment. Signed-off-by: Kim Phillips Signed-off-by: Eric Auger --- v11 -> v12: - add x-mmap property definition, without which the default value of vbasedev.allow_mmap is false, hence preventing

[Qemu-devel] [PATCH v12 0/9] KVM platform device passthrough

2015-03-19 Thread Eric Auger
n we do not have so many things to implement in that derived device yet. May be re-introduced later on if needed typically for reset/migration. - no GSI routing table anymore v3->v4 changes (Eric Auger, Alvise Rigo) - rebase on last VFIO PCI code (v2.1.0-rc0) - full git history rework to ease

[Qemu-devel] [PATCH v12 6/9] hw/vfio/platform: calxeda xgmac device

2015-03-19 Thread Eric Auger
The platform device class has become abstract. This patch introduces a calxeda xgmac device that derives from it. Signed-off-by: Eric Auger Reviewed-by: Alex Bennée --- v10 -> v11: - add Alex Reviewed-by - move virt modifications in a separate patch v8 -> v9: - renamed calxeda_xgmac.

[Qemu-devel] [PATCH v12 8/9] linux-headers: update arm/arm64 KVM headers for irqfd

2015-03-19 Thread Eric Auger
Update according to arm/arm64 kvm.h headers found in ssh://git.linaro.org/people/eric.auger/linux.git branch irqfd_v9_stdalone_official_release Signed-off-by: Eric Auger --- linux-headers/asm-arm/kvm.h | 3 +++ linux-headers/asm-arm64/kvm.h | 3 +++ 2 files changed, 6 insertions(+) diff

[Qemu-devel] [PATCH v12 7/9] hw/arm/sysbus-fdt: enable vfio-calxeda-xgmac dynamic instantiation

2015-03-19 Thread Eric Auger
This patch allows the instantiation of the vfio-calxeda-xgmac device from the QEMU command line (-device vfio-calxeda-xgmac,host=""). A specialized device tree node is created for the guest, containing compat, dma-coherent, reg and interrupts properties. Signed-off-by: Eric Auger

[Qemu-devel] [PATCH v8 2/3] hw/arm/boot: arm_load_kernel implemented as a machine init done notifier

2015-01-05 Thread Eric Auger
sysbus device nodes are integrated in the dtb. Signed-off-by: Eric Auger Reviewed-by: Shannon Zhao Reviewed-by: Alexander Graf --- v7 -> v8: - Add Reviewed-by from Alex & Shannon - rebase on 2.2.0 v6: creation of this patch file --- hw/arm/boot.c| 14 +- include/hw/ar

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

2015-01-05 Thread Eric Auger
O region shrinked to 4MB and relocated in machvirt to avoid PCI shrink (dynamic vfio-mmio support might come latter) - platform_bus_base removed from PlatformDevtreeData Eric Auger (3): hw/arm/sysbus-fdt: helpers for platform bus nodes addition hw/arm/boot: arm_load_kernel implemented as

[Qemu-devel] [PATCH v8 1/3] hw/arm/sysbus-fdt: helpers for platform bus nodes addition

2015-01-05 Thread Eric Auger
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 Signed-off-by: Eric Auger Reviewed-by: Shannon Zhao Reviewed-by: Alexander Graf --- v7 -> v8:

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

2015-01-05 Thread Eric Auger
sysbus devices. Indeed dynamic sysbus devices are created after machine init. machvirt also registers a notifier that will build the device tree nodes for the platform bus and its children dynamic sysbus devices. Signed-off-by: Alexander Graf Signed-off-by: Eric Auger --- v7 -> v8: - rebase

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