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

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

2014-09-18 Thread Eric Auger
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_

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

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

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 devi

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

2014-09-19 Thread Eric Auger
uot;PRIx64 - "%s write(%04x:%02x:%02x.%x:BAR%d+0x%"PRIx64", 0x%"PRIx64", %d)" replaced 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

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

2014-09-19 Thread Eric Auger
On 09/19/2014 04:30 AM, Gonglei (Arei) wrote: >> From: Eric Auger [mailto:eric.au...@linaro.org] >> Sent: Friday, September 19, 2014 10:23 AM >> To: Gonglei (Arei); qemu list; Michael S. Tsirkin >> Subject: Re: [Qemu-devel] [question] virtio-net-device and multi-queue optio

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

2014-09-22 Thread Eric Auger
__init__.py", line 225, in build >> return Event(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Ă­

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

2014-09-29 Thread Eric Auger
t; res.append(Event.build(line)) > File "scripts/tracetool/__init__.py", line 225, in build > return Event(name, props, fmt, args, arg_fmts) > File "scripts/tracetool/__init__.py", line 185, in __init__ > % ", ".join(unknown_prop

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

2014-09-29 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 --- - __func__ is removed since trace point name does the same job - HWADDR_PRIx were replaced by PRIx64 - this transformation just

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 t

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 an

[Qemu-devel] [PATCH v5 04/10] hw/vfio/pci: Introduce VFIORegion

2014-08-09 Thread Eric Auger
too. vfio_mmap_bar becomes vfio_map_region Signed-off-by: Eric Auger --- 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 vbased

[Qemu-devel] [PATCH v5 00/10] KVM platform device passthrough

2014-08-09 Thread Eric Auger
ement 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 PCI code change review - mv include files

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

2014-08-09 Thread Eric Auger
This prepares for the introduction of VFIOPlatformDevice Signed-off-by: Eric Auger --- 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 188fdd2..c2cdd73 100644

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

[Qemu-devel] [PATCH v5 03/10] hw/vfio/pci: introduce VFIODevice

2014-08-09 Thread Eric Auger
_intx, 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 --- v4->v5: - fix style issues - in vfio_initfn, rework allocation of vdev->vbasedev.name an

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

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

[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 Signed-off-by: Eric Auger --- v4 -> v5: - integrate "sPAPR/IOMMU: Fix TCE entry pe

[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 --- hw/arm/dyn_sysbus_devtree.c | 138 1 file changed

[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 Signed-off-by: Eric Auger --- v4 -> v5: - vfio-plaform.h included fi

[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 --- 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 +576,8 @@ static void

[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 Signed-off-by: Eric Auger --- v4 -> v5: - addition of sys

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

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

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 >> --- >> hw/intc/arm_gic_kvm.c | 2 ++ >> 1 file changed, 2 insertions(+) >> >> diff --git a/

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

2014-08-11 Thread Eric Auger
On 08/11/2014 02:05 PM, Alexander Graf wrote: > > On 11.08.14 14:04, Eric Auger wrote: >> 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

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 instantia

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

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 >> --- >> hw/arm/boot.c| 2 +- &g

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: git://git.linaro.org/people/eric.a

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

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 functiona

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

2014-08-11 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

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

2014-08-11 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 y

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

2014-08-11 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 pop

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

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

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

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

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 wrote: >>> +static void vfio_fdt_add_device_node(SysBusDevice *sbdev, void *opaque) >>> +{ >>> +PlatformDevtreeData *data = opaque; >>> +void *fdt = data->fd

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 a

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 instruction

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 >> Signed-off-by: Eric Auger >>

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

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

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 not

[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 --- v6 -> v7: - compat string re-formatting removed since compat string is not expo

[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 --- - __func__ is removed since trace point name does the same job - HWADDR_PRIx were replaced by PRIx64 - this transformation just

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

2014-10-31 Thread Eric Auger
egions, 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 --- h

[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 Signed-off-by: Eric Auger --- v6 -> v7: - compat is not exposed anymore

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

[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 --- 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 --- a/hw/arm/virt.c +++ b

[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 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 v4 0/6] machvirt dynamic sysbus device instantiation

2014-10-31 Thread Eric Auger
ht come latter) - 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

[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 --- 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 --- linux-headers/linux/kvm.h | 9 + 1 file changed, 9 insertions(+) diff --git a/linux-headers/linux/kvm.h b

[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 Signed-off-by: Eric Auger --- v6 -> v7: - integrate Revert "vfio: Make BARs native endian&q

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

2014-10-31 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 --- v3 -> v4: - dyn_sysbus_devtree.c renamed into sysbus-fdt.c - use

[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 --- 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 --- 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 fbd9e7f..99ff89a

[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 --- v5 -> v6 - back again following Alex Graf advises - fix a bug related to compat

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

[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 --- - __func__ is removed since trace point name does the same job - HWADDR_PRIx were replaced by PRIx64 - this transformation just

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

2014-10-31 Thread Eric Auger
brought 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 --- v2->v3: - changed the commit me

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

2014-10-31 Thread Eric Auger
_intx, 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 --- v4->v5: - fix style issues - in vfio_initfn, rework allocation of vdev->vbasedev.name an

[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 --- 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 8514b9e..93181bf 100644

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

[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 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 b/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 Signed-off-by: Eric Auger --- v3 -> v4: - use platform bus object, instantiated in create_platform_

[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 --- include/hw/arm/arm.h | 4 1 file changed, 4 insertions(+) diff --git a

[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 --- 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 +406,7 @@ static void

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

2014-10-31 Thread Eric Auger
destroyed, this is not possible. Signed-off-by: Eric Auger --- 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 arm_load_dtb(const

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

2014-10-31 Thread Eric Auger
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 --- hw/arm/boot.c| 38 +- include/hw/arm/arm.h | 5 +++-- 2 files changed, 24

[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 +0000, 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

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

2014-08-29 Thread Eric Auger
-by: Eric Auger --- 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 | 7

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

2014-09-01 Thread Eric Auger
On 09/01/2014 12:49 PM, Paolo Bonzini wrote: > Il 29/08/2014 19:38, Eric Auger ha scritto: >> Compute kvm_irqfds_allowed by checking the KVM_CAP_IRQFD extension. >> Remove direct settings in architecture specific files. >> >> Add a new kvm_resamplefds_allowed variable,

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/

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 : >> >>> 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, Ale

[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 --- - __func__ is removed since trace point name does the same job - HWADDR_PRIx were replaced by PRIx64 Besides those changes

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

[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 --- 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 +406,7 @@ static void

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_ch

[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 --- 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 7e6a1bc..ad5da4b 100644

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

2014-09-09 Thread Eric Auger
_intx, 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 --- v4->v5: - fix style issues - in vfio_initfn, rework allocation of vdev->vbasedev.name an

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

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

[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 --- 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 Signed-off-by: Eric Auger --- v5 -> v6: - vfio_device property rena

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

2014-09-09 Thread Eric Auger
egions, 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 --- h

[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 --- 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 - wrap_vfio_fdt_add_node tak

[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 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 v6 07/16] hw/vfio/pci: use name field in format strings

2014-09-09 Thread Eric Auger
Signed-off-by: Eric Auger --- 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..c617b79 100644 --- a/hw

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

2014-09-09 Thread Eric Auger
he IRQ 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

[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 --- linux-headers/linux/kvm.h | 9 + 1 file changed, 9 insertions(+) diff --git a/linux-headers/linux/kvm.h b

[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 --- 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 252c0b8..466b0e8

  1   2   3   4   5   6   7   8   9   10   >