Re: [Qemu-devel] [PATCH] hw/arm/boot: fix rom_reset notifier registration order

2015-06-12 Thread Eric Auger
Hi Peter, Please can you test whether this patch fixes the issue on xlnx-ep108 board. I acknowledge I do not feel comfortable with that piece of code and meanwhile I continue looking at boot.c & loader.c files. Thank you in advance Best Regards Eric On 06/12/2015 02:19 PM, Eric Auger w

[Qemu-devel] [PATCH 0/2] hw/vfio/platform: irqfd setup changes

2015-09-22 Thread Eric Auger
eventfd signaling and there is no risk the IRQ is active nor masked when irqfd/IRQ forwarding is setup. Eric Auger (2): hw/vfio/platform: irqfd setup sequence update hw/vfio/platform: do not set resamplefd for edge-sensitive IRQS hw/vfio/platform.c | 55

[Qemu-devel] [PATCH 1/2] hw/vfio/platform: irqfd setup sequence update

2015-09-22 Thread Eric Auger
under injection into the guest. So the simpler solution is to remove this 2-step startup and directly attempt irqfd setup. This is what this patch does. Also in case the eventfd setup fails, there is no reason to go farther: let's abort. Signed-off-by: Eric Auger --- hw/vfio/platf

[Qemu-devel] [PATCH 2/2] hw/vfio/platform: do not set resamplefd for edge-sensitive IRQS

2015-09-22 Thread Eric Auger
-by: Eric Auger --- hw/vfio/platform.c | 4 1 file changed, 4 insertions(+) diff --git a/hw/vfio/platform.c b/hw/vfio/platform.c index 38eaccf..2c91650 100644 --- a/hw/vfio/platform.c +++ b/hw/vfio/platform.c @@ -352,6 +352,10 @@ static int vfio_set_resample_eventfd(VFIOINTp *intp) int

Re: [Qemu-devel] [PATCH 2/2] hw/vfio/platform: do not set resamplefd for edge-sensitive IRQS

2015-09-24 Thread Eric Auger
On 09/23/2015 09:28 PM, Alex Williamson wrote: > On Wed, 2015-09-23 at 00:00 +0100, Eric Auger wrote: >> In irqfd mode, current code attempts to set a resamplefd whatever >> the type of the IRQ. For an edge-sensitive IRQ this attempt fails >> and as a consequence the whole irq

[Qemu-devel] [PATCH v2 0/3] hw/vfio/platform: irqfd setup changes

2015-09-24 Thread Eric Auger
ialize unmask EventNotifier nor call vfio_set_resample_eventfd Eric Auger (3): hw/vfio/platform: irqfd setup sequence update hw/vfio/platform: change interrupt/unmask fields into pointer hw/vfio/platform: do not set resamplefd for edge-sensitive IRQS hw/vfio/platform.c

[Qemu-devel] [PATCH v2 2/3] hw/vfio/platform: change interrupt/unmask fields into pointer

2015-09-24 Thread Eric Auger
unmask EventNotifier might not be initialized in case of edge sensitive irq. Using EventNotifier pointers make life simpler to handle the edge-sensitive irqfd setup. Signed-off-by: Eric Auger --- hw/vfio/platform.c | 35 --- include/hw/vfio/vfio

[Qemu-devel] [PATCH v2 3/3] hw/vfio/platform: do not set resamplefd for edge-sensitive IRQS

2015-09-24 Thread Eric Auger
-off-by: Eric Auger --- v1 -> v2: - introduce vfio_irq_is_automasked helper function. in case of edge-sensitive IRQ, do not allocate/initialize unmask EventNotifier nor call vfio_set_resample_eventfd --- hw/vfio/platform.c | 42 +++--- trace-events |

[Qemu-devel] [PATCH v2 1/3] hw/vfio/platform: irqfd setup sequence update

2015-09-24 Thread Eric Auger
under injection into the guest. So the simpler solution is to remove this 2-step startup and directly attempt irqfd setup. This is what this patch does. Also in case the eventfd setup fails, there is no reason to go farther: let's abort. Signed-off-by: Eric Auger --- hw/vfio/platf

Re: [Qemu-devel] [PATCH v10 2/5] intc/gic: Extract some reusable vGIC code

2015-08-18 Thread Eric Auger
Hi Pavel, On 08/18/2015 03:33 PM, Pavel Fedin wrote: > These functions are useful also for vGICv3 implementation. Make them > accessible > from within other modules. I think it would be worth justifying the changes in signature: removal of GICState* due to the introduction of GICV3State and also

Re: [Qemu-devel] [PATCH v10 1/5] hw/intc: Implement GIC-500 base class

2015-08-18 Thread Eric Auger
n the hope that it will be useful, > + * but WITHOUT ANY WARRANTY; without even the implied warranty of > + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the > + * GNU General Public License for more details. > + * > + * You should have received a copy of the

Re: [Qemu-devel] [PATCH v10 3/5] arm_kvm: Do not assume particular GIC type in kvm_arch_irqchip_create()

2015-08-18 Thread Eric Auger
Reviewed-by: Eric Auger On 08/18/2015 03:33 PM, Pavel Fedin wrote: > This allows to use different GIC types from v2. There are no kernels which > could advertise KVM_CAP_DEVICE_CTRL without the actual ability to create > GIC with it. > > Signed-off-by: Pavel Fedin > --- >

Re: [Qemu-devel] [PATCH v10 4/5] hw/intc: Initial implementation of vGICv3

2015-08-18 Thread Eric Auger
Hi Pavel, On 08/18/2015 03:33 PM, Pavel Fedin wrote: > This is the initial version of KVM-accelerated GICv3 support. > State load and save are not yet supported, live migration is > not possible. > > In order to get correct class name in a simpler way, gicv3_class_name() > function is implemented,

Re: [Qemu-devel] [PATCH v10 2/5] intc/gic: Extract some reusable vGIC code

2015-08-19 Thread Eric Auger
Hi Pavel, On 08/19/2015 08:36 AM, Pavel Fedin wrote: > Hello! > >> I think it would be worth justifying the changes in signature: >> removal of GICState* due to the introduction of GICV3State and also >> justify replacement of uint32_t *val into void*. > > I described it in the cover letter.

Re: [Qemu-devel] [PATCH v10 5/5] hw/arm/virt: Add gic-version option to virt machine

2015-08-19 Thread Eric Auger
Hi Pavel, On 08/18/2015 03:33 PM, Pavel Fedin wrote: > Add gic_version to VirtMachineState, set it to value of the option > and pass it around where necessary. Instantiate devices and fdt > nodes according to the choice. > > max_cpus for virt machine increased to 126 (calculated from redistributor

Re: [Qemu-devel] [PATCH] vl: move rom_load_all after machine init done

2015-07-07 Thread Eric Auger
Hi Paolo, Peter, On 06/22/2015 11:58 AM, Eric Auger wrote: > On 06/22/2015 11:53 AM, Paolo Bonzini wrote: >> >> >> On 22/06/2015 11:49, Eric Auger wrote: >>>>> It seems safe because rom_load_all really doesn't load anything, it only >>>>>

Re: [Qemu-devel] [PATCH] vl: move rom_load_all after machine init done

2015-07-07 Thread Eric Auger
On 07/07/2015 11:02 AM, Paolo Bonzini wrote: > > > On 07/07/2015 11:00, Eric Auger wrote: >> Hi Paolo, Peter, >> On 06/22/2015 11:58 AM, Eric Auger wrote: >>> On 06/22/2015 11:53 AM, Paolo Bonzini wrote: >>>> >>>> >>>> On

Re: [Qemu-devel] [PATCH v4 0/9] GIC-500 implementation, software + KVM

2015-07-07 Thread Eric Auger
Hi Pavel, On 07/02/2015 04:13 PM, Pavel Fedin wrote: > This is a complete GICv3 implementation, both software emulation and KVM > acceleration are supported. do you plan to resend a version without TCG code, just using shared base class? Eric > > This series is a consolidated and updated patch se

Re: [Qemu-devel] [PATCH v4 0/9] GIC-500 implementation, software + KVM

2015-07-07 Thread Eric Auger
On 07/07/2015 02:45 PM, Pavel Fedin wrote: >> do you plan to resend a version without TCG code, just using shared base >> class? > > Done that, you missed it: > http://lists.nongnu.org/archive/html/qemu-devel/2015-07/msg00830.html Hum OK thanks. I will review that one then ;-) Eric > > Sorry

Re: [Qemu-devel] [PATCH v3 3/5] Introduce irqchip type specification for KVM

2015-07-09 Thread Eric Auger
Hi Pavel, On 07/07/2015 03:54 PM, Pavel Fedin wrote: > This patch introduces kernel_irqchip_type member in Machine class, which > it passed to kvm_arch_irqchip_create. It allows machine models to specify s/it/is > correct GIC type during KVM capability verification. The variable is > defined as int

Re: [Qemu-devel] [PATCH v3 2/5] Extract some reusable vGIC code

2015-07-09 Thread Eric Auger
Pavel, On 07/07/2015 03:54 PM, Pavel Fedin wrote: > These functions are useful also for vGICv3 implementation. Make them > accessible > from within other modules. > > Actually kvm_dist_get() and kvm_dist_put() could also be made reusable, but > they would require two extra parameters (s->dev_fd a

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

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 >> >> Functions for which PCI and platform device support share are moved >> into common.c. The common vfio_{get,put}_group() get an addition

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

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 d

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

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 an

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

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

2014-07-07 Thread Eric Auger
need to be augmented: typically 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:

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

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

[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 +++ b/hw/arm/bo

[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 --- hw/core/sysbus.c| 12 include/hw/sysbus.h | 2 ++ 2 files changed, 14 insertions

[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 --- hw/misc/platform_devices.c | 11 --- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/hw/misc/platform_devices.c b/hw/misc/platform_devices.c index 96ab272

[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 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 --- hw/misc/platform_devices.c | 1 + include/hw/misc

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

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

[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 --- 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 --- a/hw/vfio/pci.c

[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 Signed-off-by: Eric Auger --- v3 -> v4: [Alvise Rigo] Use

[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 --- 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 --- a/hw/vfio/pci.c

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

2014-07-07 Thread Eric Auger
support (MMIO direct access and IRQ 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

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

[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 The flag is mandatory for the ARM SMMU so we always add it if the MMIO handles it. Signed-off-by: Alvise Rigo --- hw/vfio/common.c | 9 + include/hw/vfio/vfio-common.h | 1 + linux-headers/linux/vfio.h| 2 ++ 3 files changed, 12 insertions(+) diff --

[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 Signed-off-by: Eric Auger --- v3 -> v4: [Eric Auger] - merge of &q

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

2014-07-07 Thread Eric Auger
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/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 (m...@il.ibm.com

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 >>> >>> The flag is mandatory for the ARM SMMU so we always add it if the MMIO >>

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

2014-07-07 Thread Eric Auger
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-sign

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

2014-07-07 Thread Eric Auger
implement a default dt generation for VFIO platform device. This enables dynamic instantiation. If the device tree generation does not match the expectation it is possible to derive a component and write one's own fdt_add_device_node method. Signed-off-by: Alvise Rigo Signed-off-by: Eric

[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 --- 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 db2bdcd..5c7bfd5 100644

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

Re: [Qemu-devel] [PULL 20/22] hw/arm/boot: arm_load_kernel implemented as a machine init done notifier

2015-06-15 Thread Eric Auger
Hi Peter, On 06/12/2015 08:04 PM, Peter Crosthwaite wrote: > On Fri, Jun 12, 2015 at 3:04 AM, Peter Maydell > wrote: >> On 12 June 2015 at 09:53, Eric Auger wrote: >>> On 06/12/2015 10:25 AM, Eric Auger wrote: >>>>> I think it is because this is now delayi

Re: [Qemu-devel] Assigning an eth port to a guest VM

2015-06-15 Thread Eric Auger
Hi Yehuda, On 06/15/2015 01:01 PM, Yehuda Yitschak wrote: > Cc: Eric Auger > >> -Original Message- >> From: Yehuda Yitschak >> Sent: Monday, June 15, 2015 9:35 >> To: qemu-devel@nongnu.org >> Cc: Yuval Caduri; Shadi Ammouri >> Subject: Assig

[Qemu-devel] [RESEND PATCH v16 1/6] hw/arm/sysbus-fdt: enable vfio-calxeda-xgmac dynamic instantiation

2015-06-15 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] [RESEND PATCH v16 2/6] kvm: rename kvm_irqchip_[add, remove]_irqfd_notifier with gsi suffix

2015-06-15 Thread Eric Auger
Anticipating for the introduction of new add/remove functions taking a qemu_irq parameter, let's rename existing ones with a gsi suffix. Signed-off-by: Eric Auger Tested-by: Vikram Sethi --- v15 -> v16: - added Vikram's T-b - resolve rebase conflict in kvm.h --- hw/s390x/virt

[Qemu-devel] [RESEND PATCH v16 0/6] KVM platform device passthrough

2015-06-15 Thread Eric Auger
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 anymore v3->v4 changes (Eric Auger, Alvise Rigo) - rebase on last VFIO PCI code (v2.1.0-

[Qemu-devel] [RESEND PATCH v16 4/6] intc: arm_gic_kvm: set the qemu_irq/gsi mapping

2015-06-15 Thread Eric Auger
The arm_gic_kvm now calls kvm_irqchip_set_qemuirq_gsi to build the hash table storing qemu_irq/gsi mappings. From that point on irqfd can be setup directly from the qemu_irq using kvm_irqchip_add_irqfd_notifier. Signed-off-by: Eric Auger Tested-by: Vikram Sethi --- v15 -> v16: - added Vikra

[Qemu-devel] [RESEND PATCH v16 3/6] kvm-all.c: add qemu_irq/gsi hash table and utility routines

2015-06-15 Thread Eric Auger
is supposed to use it. kvm_irqchip_[add, remove]_irqfd_notifier allows to setup/tear down irqfd directly from the qemu_irq. Signed-off-by: Eric Auger Tested-by: Vikram Sethi --- v15 -> v16: - Added Vikram's T-b v13 -> v14: - correct checkpatch warning v2 -> v3 (integration in

[Qemu-devel] [RESEND PATCH v16 5/6] sysbus: add irq_routing_notifier

2015-06-15 Thread Eric Auger
Add a new connect_irq_notifier notifier in the SysBusDeviceClass. This notifier, if populated, is called after sysbus_connect_irq. This mechanism is used to setup VFIO signaling once VFIO platform devices get attached to their platform bus, on a machine init done notifier. Signed-off-by: Eric

[Qemu-devel] [RESEND PATCH v16 6/6] hw/vfio/platform: add irqfd support

2015-06-15 Thread Eric Auger
for fast/slow path swap. Overall this brings significant performance improvements. Signed-off-by: Alvise Rigo Signed-off-by: Eric Auger Reviewed-by: Alex Bennée Tested-by: Vikram Sethi --- v15 -> v16: - add Vikram's T-b v13 -> v14: - use connect_irq_notifi

Re: [Qemu-devel] Assigning an eth port to a guest VM

2015-06-15 Thread Eric Auger
Hi Yehuda, On 06/15/2015 06:52 PM, Yehuda Yitschak wrote: > > > From: Eric Auger > Sent: Monday, June 15, 2015 4:42 PM > To: Yehuda Yitschak; qemu-devel@nongnu.org > Cc: Yuval Caduri; Shadi Ammouri > Subject: Re: Assigning an e

Re: [Qemu-devel] Assigning an eth port to a guest VM

2015-06-15 Thread Eric Auger
On 06/15/2015 07:45 PM, Yehuda Yitschak wrote: > > > From: Alex Williamson > Sent: Monday, June 15, 2015 8:15 PM > To: Yehuda Yitschak > Cc: Eric Auger; qemu-devel@nongnu.org; Yuval Caduri; Shadi Ammouri > Subject: Re: Assigning an e

Re: [Qemu-devel] [RESEND PATCH v16 1/6] hw/arm/sysbus-fdt: enable vfio-calxeda-xgmac dynamic instantiation

2015-06-16 Thread Eric Auger
On 06/16/2015 10:29 AM, Peter Maydell wrote: > On 15 June 2015 at 17:33, Eric Auger wrote: >> This patch allows the instantiation of the vfio-calxeda-xgmac device >> from the QEMU command line (-device vfio-calxeda-xgmac,host=""). >> >> A specialized devi

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

2015-06-16 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

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

2015-06-16 Thread Eric Auger
Hi Peter, On 06/16/2015 01:59 PM, Peter Maydell wrote: > On 16 June 2015 at 12:58, Eric Auger wrote: >> This patch allows the instantiation of the vfio-calxeda-xgmac device >> from the QEMU command line (-device vfio-calxeda-xgmac,host=""). >> >> A specialize

[Qemu-devel] [PATCH] vl: move rom_load_all after machine init done

2015-06-16 Thread Eric Auger
->data can be freed on ROM reset notifier. To fix that regression the patch moves the rom_load_all call after machine init done. We also take the opportunity to rename the rom_load_all function into rom_check_and_resgister_reset() and integrate the rom_load_done in it. Signed-off-by: Eric Au

Re: [Qemu-devel] [PATCH] vfio: fix build error on CentOS 5.7

2015-06-17 Thread Eric Auger
Hi Leon, On 06/17/2015 02:35 PM, Leon Alrae wrote: > Include linux/vfio.h after sys/ioctl.h, just like in hw/vfio/common.c. > > Signed-off-by: Leon Alrae > --- > CentOS 5 is one of hosts I still use. For building I already provide custom > GLib to satisfy version 2.22 dependency. However, with co

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

2015-06-22 Thread Eric Auger
On 06/18/2015 10:27 PM, Peter Maydell wrote: > On 16 June 2015 at 13:11, Eric Auger wrote: >> Hi Peter, >> On 06/16/2015 01:59 PM, Peter Maydell wrote: >>> This was part of a series before -- is it a standalone >>> patch now? What's the relationship with the

Re: [Qemu-devel] [RESEND PATCH v16 0/6] KVM platform device passthrough

2015-06-22 Thread Eric Auger
functionality in 2.4 without the perf I think. Thank you in advance Best Regards Eric On 06/15/2015 06:33 PM, Eric Auger wrote: > Now that the platform-bus is instantiated in virt, the ARM sysbus-fdt > infrastructure, the VFIO platform device and its first Calxeda xgmac > specialization

Re: [Qemu-devel] [PATCH] vl: move rom_load_all after machine init done

2015-06-22 Thread Eric Auger
ping Do you think that change is sensible? Since this takes place in vl.c I am quite scared but with your experience you may know how much this can be wrong. Best Regards Eric On 06/16/2015 06:07 PM, Eric Auger wrote: > On ARM, commit ac9d32e39664e060cd1b538ff190980d57ad69e4 postponed

Re: [Qemu-devel] [PATCH] vl: move rom_load_all after machine init done

2015-06-22 Thread Eric Auger
Hi Paolo, On 06/22/2015 11:43 AM, Paolo Bonzini wrote: > > > On 22/06/2015 11:26, Eric Auger wrote: >> ping >> >> Do you think that change is sensible? Since this takes place in vl.c I >> am quite scared but with your experience you may know how much this ca

Re: [Qemu-devel] [PATCH] vl: move rom_load_all after machine init done

2015-06-22 Thread Eric Auger
On 06/22/2015 11:53 AM, Paolo Bonzini wrote: > > > On 22/06/2015 11:49, Eric Auger wrote: >>>> It seems safe because rom_load_all really doesn't load anything, it only >>>> does an overlap check. Is this right? >> it does the check + isrom

[Qemu-devel] Access to the 2.4 ChangeLog page

2015-06-23 Thread Eric Auger
Hi, I would need to update the 2.4 ChangeLog wiki page to add in 1.12.12 (Device emulation and assignment/VFIO) - VFIO Platform Device and Calxeda Midway Xgmac platform device I think I need a wiki account for that. Please can anyone create an account for me or add the info on my behalf. Thanks

Re: [Qemu-devel] [PULL 3/8] vfio: Generalize region support

2016-03-09 Thread Eric Auger
Hi Alex, On 03/09/2016 08:53 PM, Alex Williamson wrote: > Both platform and PCI vfio drivers create a "slow", I/O memory region > with one or more mmap memory regions overlayed when supported by the > device. Generalize this to a set of common helpers in the core that > pulls the region info from v

[Qemu-devel] [PATCH v15 02/10] hw/vfio/platform: vfio-platform skeleton

2015-04-30 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 --- v14 -> v15: - vfio_platform_compute_needs_reset now returns true while vfio_platform_hot_reset_multi returns -1 - adjust g_malloc

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

2015-04-30 Thread Eric Auger
_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 anymore v3->

[Qemu-devel] [PATCH v15 06/10] kvm: rename kvm_irqchip_[add, remove]_irqfd_notifier with gsi suffix

2015-04-30 Thread Eric Auger
Anticipating for the introduction of new add/remove functions taking a qemu_irq parameter, let's rename existing ones with a gsi suffix. Signed-off-by: Eric Auger --- hw/s390x/virtio-ccw.c | 8 hw/vfio/pci.c | 6 +++--- hw/virtio/virtio-pci.c | 4 ++-- include/sysemu/

[Qemu-devel] [PATCH v15 01/10] linux-headers: update

2015-04-30 Thread Eric Auger
From: Cornelia Huck This updates linux-headers against master 4.1-rc1 (commit b787f68c36d49bb1d9236f403813641efa74a031). Signed-off-by: Cornelia Huck --- include/standard-headers/linux/virtio_balloon.h | 28 +++- include/standard-headers/linux/virtio_blk.h | 8 +- include/standard-heade

[Qemu-devel] [PATCH v15 03/10] hw/vfio/platform: add irq assignment

2015-04-30 Thread Eric Auger
This patch adds the code requested to assign interrupts to a guest. The interrupts are mediated through user handled eventfds only. Signed-off-by: Eric Auger --- v13 -> v14: - remove virtualID field in header v12 -> v13: - start user-side eventfd handling at realize time - remove start_

[Qemu-devel] [PATCH v15 10/10] hw/vfio/platform: add irqfd support

2015-04-30 Thread Eric Auger
for fast/slow path swap. Overall this brings significant performance improvements. Signed-off-by: Alvise Rigo Signed-off-by: Eric Auger Reviewed-by: Alex Bennee --- v13 -> v14: - use connect_irq_notifier - remove trace_vfio_platform_start_eventfd v12 -> v13: - setup the new mechani

[Qemu-devel] [PATCH v15 04/10] hw/vfio/platform: calxeda xgmac device

2015-04-30 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 v15 05/10] hw/arm/sysbus-fdt: enable vfio-calxeda-xgmac dynamic instantiation

2015-04-30 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 v15 09/10] sysbus: add irq_routing_notifier

2015-04-30 Thread Eric Auger
Add a new connect_irq_notifier notifier in the SysBusDeviceClass. This notifier, if populated, is called after sysbus_connect_irq. This mechanism is used to setup VFIO signaling once VFIO platform devices get attached to their platform bus, on a machine init done notifier. Signed-off-by: Eric

[Qemu-devel] [PATCH v15 08/10] intc: arm_gic_kvm: set the qemu_irq/gsi mapping

2015-04-30 Thread Eric Auger
The arm_gic_kvm now calls kvm_irqchip_set_qemuirq_gsi to build the hash table storing qemu_irq/gsi mappings. From that point on irqfd can be setup directly from the qemu_irq using kvm_irqchip_add_irqfd_notifier. Signed-off-by: Eric Auger --- v2 -> v3: - kvm_irqchip_add_qemuirq_irqfd_notif

[Qemu-devel] [PATCH v15 07/10] kvm-all.c: add qemu_irq/gsi hash table and utility routines

2015-04-30 Thread Eric Auger
is supposed to use it. kvm_irqchip_[add, remove]_irqfd_notifier allows to setup/tear down irqfd directly from the qemu_irq. Signed-off-by: Eric Auger --- v13 -> v14: - correct checkpatch warning v2 -> v3 (integration into VFIO series v13): - rename kvm_irqchip_[add,

Re: [Qemu-devel] PCI on ARM virt machine - status ?

2015-04-30 Thread Eric Auger
On 04/29/2015 02:38 PM, Pavel Fedin wrote: > Hello! > I would like to ask, what is the status of > http://www.spinics.net/lists/kvm-arm/msg14466.html and > http://www.spinics.net/lists/kvm-arm/msg14284.html ? > I do not see this committed, but i would like to say that i have tested > this, and t

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

2015-05-04 Thread Eric Auger
(v8), now moved in a separate RFC since dependent on many RFCs. Best Regards Eric Eric Auger (4): linux-headers: Update KVM header for KVM-VFIO FORWARD/UNFORWARD hw/vfio/common: vfio_kvm_device_fd moved in the common header kvm: add kvm_vfio_get_device_irq hw/vfio/platform: add forwar

[Qemu-devel] [RFC v2 3/4] kvm: add kvm_vfio_get_device_irq

2015-05-04 Thread Eric Auger
Since the introduction of the qemu_irq/gsi hash table in kvm, the gsi information is stored in kvm. New functions are introduced to allocate/populate a kvm_vfio_dev_irq struct pointer from a qemu_irq object and free it. Signed-off-by: Eric Auger --- include/sysemu/kvm.h | 5 + kvm-all.c

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

2015-05-04 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 --- v1 -> v2: - use kvm_vfio_get|put_device_irq, new irq connect notifier

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

2015-05-04 Thread Eric Auger
Integrate updated KVM-VFIO API related to forwarded IRQ Update the kvm header according to the header found in http://git.linaro.org/people/eric.auger/linux.git branch 4.1-rc1_forward Signed-off-by: Eric Auger --- linux-headers/linux/kvm.h | 12 1 file changed, 12 insertions

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

2015-05-04 Thread Eric Auger
the device is now used in platform for forwarded IRQ setup Signed-off-by: Eric Auger --- hw/vfio/common.c | 2 +- include/hw/vfio/vfio-common.h | 4 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/hw/vfio/common.c b/hw/vfio/common.c index b012620..18ad67c 100644

Re: [Qemu-devel] [PATCH v15 00/10] KVM platform device passthrough

2015-05-05 Thread Eric Auger

Re: [Qemu-devel] [PATCH v15 00/10] KVM platform device passthrough

2015-05-05 Thread Eric Auger
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 anymore v3->v4 changes (Eric Auger, Alvise Rig

Re: [PATCH] vhost-vdpa: skip TPM CRB memory section

2022-11-22 Thread Eric Auger
vhost-vdpa case: > qemu-kvm: vhost_vdpa_listener_region_add received unaligned region > > Skip the CRB device. > > Fixes: > https://bugzilla.redhat.com/show_bug.cgi?id=2141965 > > Signed-off-by: Marc-André Lureau Reviewed-by: Eric Auger Eric > --- > hw/virtio/vhost-vdp

Re: [PATCH for 7.2?] vhost: fix vq dirt bitmap syncing when vIOMMU is enabled

2022-11-22 Thread Eric Auger
UNK < dev->log_size' failed. "using 1G memory": We hit the issue with a guest started with 1GB initial RAM. > >> Fixes: c471ad0e9bd46 ("vhost_net: device IOTLB support") >> Cc: qemu-sta...@nongnu.org >> Reported-by: Ya

Re: [PATCH v5 0/2] vfio/common: remove spurious tpm-crb-cmd misalignment warning

2022-11-23 Thread Eric Auger
Hi Michael, On 11/23/22 07:34, Michael S. Tsirkin wrote: > On Fri, May 06, 2022 at 03:25:08PM +0200, Eric Auger wrote: >> The CRB command buffer currently is a RAM MemoryRegion and given >> its base address alignment, it causes an error report on >> vfio_listener_region_add

Re: [PATCH v5 1/2] sysemu: tpm: Add a stub function for TPM_IS_CRB

2022-11-23 Thread Eric Auger
Hi, On 11/23/22 07:36, Michael S. Tsirkin wrote: > On Fri, May 06, 2022 at 09:47:52AM -0400, Stefan Berger wrote: >> >> On 5/6/22 09:25, Eric Auger wrote: >>> In a subsequent patch, VFIO will need to recognize if >>> a memory region owner is a TPM CRB de

Re: [PATCH v5 1/2] sysemu: tpm: Add a stub function for TPM_IS_CRB

2022-11-23 Thread Eric Auger
On 11/23/22 10:30, Michael S. Tsirkin wrote: > On Wed, Nov 23, 2022 at 09:18:39AM +0100, Eric Auger wrote: >> Hi, >> >> On 11/23/22 07:36, Michael S. Tsirkin wrote: >>> On Fri, May 06, 2022 at 09:47:52AM -0400, Stefan Berger wrote: >>>> On 5/6/22 09:2

Re: [PATCH v5 1/2] sysemu: tpm: Add a stub function for TPM_IS_CRB

2022-11-23 Thread Eric Auger
On 11/23/22 12:24, Michael S. Tsirkin wrote: > On Wed, Nov 23, 2022 at 12:10:09PM +0100, Eric Auger wrote: >> >> On 11/23/22 10:30, Michael S. Tsirkin wrote: >>> On Wed, Nov 23, 2022 at 09:18:39AM +0100, Eric Auger wrote: >>>> Hi, >>>> >>&g

Re: [PATCH for-8.0 2/9] hw/arm: Convert TYPE_ARM_SMMUV3 to 3-phase reset

2022-11-28 Thread Eric Auger
-phase versions of the "save the parent reset method and > chain to it" code. > > Signed-off-by: Peter Maydell Reviewed-by: Eric Auger Eric > --- > include/hw/arm/smmuv3.h | 2 +- > hw/arm/smmuv3.c | 12 > 2 files changed, 9 insertions(+), 5 d

Re: [PATCH for-8.0 1/9] hw/arm: Convert TYPE_ARM_SMMU to 3-phase reset

2022-11-28 Thread Eric Auger
base class before we can convert the > TYPE_ARM_SMMUV3 subclass -- transitional support in Resettable > handles "chain to parent class reset" when the base class is 3-phase > and the subclass is still using legacy reset, but not the other way > around. > > Signed-off-by:

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