[Qemu-devel] [PATCH 4/6] device_tree: qemu_fdt_getprop converted to use the error API

2015-12-17 Thread Eric Auger
atal. This preserves the existing behaviour. Then to use the API with your optional semantic a null parameter can be conveyed. Signed-off-by: Eric Auger --- RFC -> v1: - get rid of qemu_fdt_getprop_optional and implement Peter's suggestion that consists in using the error API Signed-

[Qemu-devel] [PATCH 3/6] device_tree: introduce qemu_fdt_node_path

2015-12-17 Thread Eric Auger
This new helper routine returns the node path of a device referred to by its node name and compat string. Signed-off-by: Eric Auger --- RFC -> v1: - improve error handling according to Alex' comments --- device_tree.c| 45

[Qemu-devel] [PATCH 6/6] hw/arm/sysbus-fdt: enable amd-xgbe dynamic instantiation

2015-12-17 Thread Eric Auger
odes (dma and ptp) also are created. It is checked those clocks are fixed on host side. Signed-off-by: Eric Auger --- RFC -> v1: - use qemu_fdt_getprop with Error ** - free substrings in sysfs_to_dt_name - add some comments related to endianess in add_amd_xgbe_fdt_node - reword commit mes

Re: [Qemu-devel] [RESEND RFC 5/6] hw/arm/sysbus-fdt: helpers for clock node generation

2015-12-17 Thread Eric Auger
Hi Alex, On 12/17/2015 04:13 PM, Alex Bennée wrote: > > Peter Maydell writes: > >> On 17 December 2015 at 13:28, Alex Bennée wrote: >>> Usually I would expect to see a pre-declaration of a function at the >>> head of the file and only if it is used before the actual definition of >>> the functi

Re: [Qemu-devel] [PATCH 2/6] device_tree: introduce load_device_tree_from_sysfs

2016-01-04 Thread Eric Auger
Hi Peter, On 12/18/2015 03:10 PM, Peter Maydell wrote: > On 17 December 2015 at 12:29, Eric Auger wrote: >> This function returns the host device tree blob from sysfs >> (/sys/firmware/devicetree/base). It uses a recursive function >> inspired from dtc read_fstree. >> &

Re: [Qemu-devel] [PATCH 4/6] device_tree: qemu_fdt_getprop converted to use the error API

2016-01-05 Thread Eric Auger
Hi Peter, On 12/18/2015 03:36 PM, Peter Maydell wrote: > On 17 December 2015 at 12:29, Eric Auger wrote: >> Current qemu_fdt_getprop exits if the property is not found. It is >> sometimes needed to read an optional property, in which case we do >> not wish to exit but simply

Re: [Qemu-devel] [PATCH 3/6] device_tree: introduce qemu_fdt_node_path

2016-01-05 Thread Eric Auger
Hi Peter, On 12/18/2015 03:23 PM, Peter Maydell wrote: > On 17 December 2015 at 12:29, Eric Auger wrote: >> This new helper routine returns the node path of a device >> referred to by its node name and compat string. >> >> Signed-off-by: Eric Auger >> >>

Re: [Qemu-devel] [PATCH 5/6] hw/arm/sysbus-fdt: helpers for clock node generation

2016-01-05 Thread Eric Auger
On 12/18/2015 03:54 PM, Peter Maydell wrote: > On 17 December 2015 at 12:29, Eric Auger wrote: >> Some passthrough'ed devices depend on clock nodes. Those need to be >> generated in the guest device tree. This patch introduces some helpers >> to build a clock node fro

Re: [Qemu-devel] [PATCH 3/6] device_tree: introduce qemu_fdt_node_path

2016-01-06 Thread Eric Auger
On 01/05/2016 06:55 PM, Peter Maydell wrote: > On 5 January 2016 at 16:20, Eric Auger wrote: >> Hi Peter, >> On 12/18/2015 03:23 PM, Peter Maydell wrote: >>> On 17 December 2015 at 12:29, Eric Auger wrote: >>>> This new helper routine returns the node path

[Qemu-devel] [PATCH v2 3/7] device_tree: introduce qemu_fdt_node_path

2016-01-06 Thread Eric Auger
This new helper routine returns the node path of a device referred to by its node name and compat string. Signed-off-by: Eric Auger --- v1 -> v2: - move doc comment in header file - do not use a fixed size buffer - break on errors in while loop - use strcmp instead of strncmp RFC -&

[Qemu-devel] [PATCH v2 0/7] AMD XGBE KVM platform passthrough

2016-01-06 Thread Eric Auger
ore on dtc binary: load_device_tree_from_sysfs is self-contained and implements something similar to dtc read_fstree. - take into account Alex' comments - remove qemu_fdt_getprop_optional and use error API instead Best Regards Eric Eric Auger (7): hw/vfio/platform: amd-xgbe device

[Qemu-devel] [PATCH v2 1/7] hw/vfio/platform: amd-xgbe device

2016-01-06 Thread Eric Auger
This patch introduces the amd-xgbe VFIO platform device. It allows the guest to do passthrough on a device exposing an "amd,xgbe-seattle-v1a" compat string. Signed-off-by: Eric Auger Reviewed-by: Alex Benné --- RFC -> v1: - add Alex' R-b --- hw/vfio/Makefile.objs |

[Qemu-devel] [PATCH v2 2/7] device_tree: introduce load_device_tree_from_sysfs

2016-01-06 Thread Eric Auger
This function returns the host device tree blob from sysfs (/proc/device-tree). It uses a recursive function inspired from dtc read_fstree. Signed-off-by: Eric Auger --- v1 -> v2: - do not implement/expose read_fstree and load_device_tree_from_sysfs if CONFIG_LINUX is not defined (lstat

[Qemu-devel] [PATCH v2 4/7] device_tree: qemu_fdt_getprop converted to use the error API

2016-01-06 Thread Eric Auger
atal. This preserves the existing behaviour. Then to use the API with your optional semantic a null parameter can be conveyed. Signed-off-by: Eric Auger --- v1 -> v2: - add a doc comment in the header file RFC -> v1: - get rid of qemu_fdt_getprop_optional and implement Peter's su

[Qemu-devel] [PATCH v2 6/7] hw/arm/sysbus-fdt: enable amd-xgbe dynamic instantiation

2016-01-06 Thread Eric Auger
ifdef CONFIG_LINUX. Signed-off-by: Eric Auger --- v1 -> v2: - add CONFIG_LINUX protection - improves robustness in sysfs_to_dt_name - output messages to end-user on misc failures and self-exits: error management becomes more violent than before assuming if the end-user wants passthroug

[Qemu-devel] [PATCH v2 7/7] hw/arm/sysbus-fdt: remove qemu_fdt_setprop returned value check

2016-01-06 Thread Eric Auger
qemu_fdt_setprop self-exists in case of error hence no need to check the returned value. Signed-off-by: Eric Auger --- hw/arm/sysbus-fdt.c | 15 +++ 1 file changed, 3 insertions(+), 12 deletions(-) diff --git a/hw/arm/sysbus-fdt.c b/hw/arm/sysbus-fdt.c index 66fa766..68d7e53 100644

[Qemu-devel] [PATCH v2 5/7] hw/arm/sysbus-fdt: helpers for clock node generation

2016-01-06 Thread Eric Auger
guest device tree node - fdt_build_clock_node builds a guest clock node and checks the host fellow clock is a fixed one. fdt_build_clock_node will become static as soon as it gets used. A dummy pre-declaration is needed for compilation of this patch. Signed-off-by: Eric Auger --- v1 -> v2: -

Re: [Qemu-devel] [PATCH v2 4/7] device_tree: qemu_fdt_getprop converted to use the error API

2016-01-07 Thread Eric Auger
Hi Peter, On 01/07/2016 01:20 AM, Peter Crosthwaite wrote: > On Wed, Jan 6, 2016 at 7:13 AM, Eric Auger wrote: >> Current qemu_fdt_getprop exits if the property is not found. It is >> sometimes needed to read an optional property, in which case we do >> not wish to exit but

[Qemu-devel] [PATCH v3 6/8] hw/arm/sysbus-fdt: helpers for clock node generation

2016-01-07 Thread Eric Auger
guest device tree node - fdt_build_clock_node builds a guest clock node and checks the host fellow clock is a fixed one. fdt_build_clock_node will become static as soon as it gets used. A dummy pre-declaration is needed for compilation of this patch. Signed-off-by: Eric Auger --- v1 -> v2: -

[Qemu-devel] [PATCH v3 4/8] device_tree: qemu_fdt_getprop converted to use the error API

2016-01-07 Thread Eric Auger
atal. This preserves the existing behaviour. Then to use the API with your optional semantic a null parameter can be conveyed. Signed-off-by: Eric Auger --- v1 -> v2: - add a doc comment in the header file RFC -> v1: - get rid of qemu_fdt_getprop_optional and implement Peter's su

[Qemu-devel] [PATCH v3 7/8] hw/arm/sysbus-fdt: enable amd-xgbe dynamic instantiation

2016-01-07 Thread Eric Auger
ifdef CONFIG_LINUX. Signed-off-by: Eric Auger --- v1 -> v2: - add CONFIG_LINUX protection - improves robustness in sysfs_to_dt_name - output messages to end-user on misc failures and self-exits: error management becomes more violent than before assuming if the end-user wants passthroug

[Qemu-devel] [PATCH v3 8/8] hw/arm/sysbus-fdt: remove qemu_fdt_setprop returned value check

2016-01-07 Thread Eric Auger
qemu_fdt_setprop self-exists in case of error hence no need to check the returned value. Signed-off-by: Eric Auger --- hw/arm/sysbus-fdt.c | 15 +++ 1 file changed, 3 insertions(+), 12 deletions(-) diff --git a/hw/arm/sysbus-fdt.c b/hw/arm/sysbus-fdt.c index 66fa766..68d7e53 100644

[Qemu-devel] [PATCH v4 0/8] AMD XGBE KVM platform passthrough

2016-01-08 Thread Eric Auger
o account Alex' comments - remove qemu_fdt_getprop_optional and use error API instead Best Regards Eric Eric Auger (8): hw/vfio/platform: amd-xgbe device device_tree: introduce load_device_tree_from_sysfs device_tree: introduce qemu_fdt_node_path device_tree: qemu_fdt_getprop conver

[Qemu-devel] [PATCH v4 2/8] device_tree: introduce load_device_tree_from_sysfs

2016-01-08 Thread Eric Auger
This function returns the host device tree blob from sysfs (/proc/device-tree). It uses a recursive function inspired from dtc read_fstree. Signed-off-by: Eric Auger --- v1 -> v2: - do not implement/expose read_fstree and load_device_tree_from_sysfs if CONFIG_LINUX is not defined (lstat

[Qemu-devel] [PATCH v4 1/8] hw/vfio/platform: amd-xgbe device

2016-01-08 Thread Eric Auger
This patch introduces the amd-xgbe VFIO platform device. It allows the guest to do passthrough on a device exposing an "amd,xgbe-seattle-v1a" compat string. Signed-off-by: Eric Auger Reviewed-by: Alex Bennée --- RFC -> v1: - add Alex' R-b --- hw/vfio/Makefile.objs

[Qemu-devel] [PATCH v4 3/8] device_tree: introduce qemu_fdt_node_path

2016-01-08 Thread Eric Auger
This new helper routine returns the node path of a device referred to by its node name and compat string. Signed-off-by: Eric Auger --- v1 -> v2: - move doc comment in header file - do not use a fixed size buffer - break on errors in while loop - use strcmp instead of strncmp RFC -&

[Qemu-devel] [PATCH v4 4/8] device_tree: qemu_fdt_getprop converted to use the error API

2016-01-08 Thread Eric Auger
atal. This preserves the existing behaviour. Then to use the API with your optional semantic a null parameter can be conveyed. Signed-off-by: Eric Auger --- v1 -> v2: - add a doc comment in the header file RFC -> v1: - get rid of qemu_fdt_getprop_optional and implement Peter's su

[Qemu-devel] [PATCH v4 5/8] device_tree: qemu_fdt_getprop_cell converted to use the error API

2016-01-08 Thread Eric Auger
use the new lenp parameter to interpret the error if any. Signed-off-by: Eric Auger --- v3 : creation --- device_tree.c| 21 ++--- hw/arm/boot.c| 6 -- hw/arm/vexpress.c| 6 -- include/sysemu/device_tree.h

[Qemu-devel] [PATCH v4 6/8] hw/arm/sysbus-fdt: helpers for clock node generation

2016-01-08 Thread Eric Auger
guest device tree node - fdt_build_clock_node builds a guest clock node and checks the host fellow clock is a fixed one. fdt_build_clock_node will become static as soon as it gets used. A dummy pre-declaration is needed for compilation of this patch. Signed-off-by: Eric Auger --- v1 -> v2: -

[Qemu-devel] [PATCH v4 8/8] hw/arm/sysbus-fdt: remove qemu_fdt_setprop returned value check

2016-01-08 Thread Eric Auger
qemu_fdt_setprop self-asserts in case of error hence no need to check the returned value. Signed-off-by: Eric Auger --- v3 -> v4: fix returned value --- hw/arm/sysbus-fdt.c | 19 +-- 1 file changed, 5 insertions(+), 14 deletions(-) diff --git a/hw/arm/sysbus-fdt.c b/hw/

[Qemu-devel] [PATCH v4 7/8] hw/arm/sysbus-fdt: enable amd-xgbe dynamic instantiation

2016-01-08 Thread Eric Auger
ifdef CONFIG_LINUX. Signed-off-by: Eric Auger --- v3 -> v4: - add_amd_xgbe_fdt_node explicitly returns 0. Reword comment to emphasize the fact the function self-asserts in case of error v1 -> v2: - add CONFIG_LINUX protection - improves robustness in sysfs_to_dt_name - output messages to e

[Qemu-devel] [PATCH v7 1/8] hw/vfio/platform: amd-xgbe device

2016-02-18 Thread Eric Auger
This patch introduces the amd-xgbe VFIO platform device. It allows the guest to do passthrough on a device exposing an "amd,xgbe-seattle-v1a" compat string. Signed-off-by: Eric Auger Reviewed-by: Alex Bennée --- RFC -> v1: - add Alex' R-b --- hw/vfio/Makefile.objs

[Qemu-devel] [PATCH v7 0/8] AMD XGBE KVM platform passthrough

2016-02-18 Thread Eric Auger
ve qemu_fdt_setprop returned value check - see individual commits for full details RFC -> v1: - no dependency anymore on dtc binary: load_device_tree_from_sysfs is self-contained and implements something similar to dtc read_fstree. - take into account Alex' comments - remove qemu_fdt_get

[Qemu-devel] [PATCH v7 2/8] device_tree: introduce load_device_tree_from_sysfs

2016-02-18 Thread Eric Auger
This function returns the host device tree blob from sysfs (/proc/device-tree). It uses a recursive function inspired from dtc read_fstree. Signed-off-by: Eric Auger Reviewed-by: Peter Maydell --- v6 -> v7: - rebase on d38ea87ac54af64ef611de434d07c12dc0399216: "all: Clean up include

[Qemu-devel] [PATCH v7 4/8] device_tree: qemu_fdt_getprop converted to use the error API

2016-02-18 Thread Eric Auger
atal. This preserves the existing behaviour. Then to use the API with your optional semantic a null parameter can be conveyed. Signed-off-by: Eric Auger Reviewed-by: Peter Crosthwaite --- v4 -> v5: - add Peter's R-b - remove comment about error_fatal v1 -> v2: - add a doc comment in

[Qemu-devel] [PATCH v7 8/8] hw/arm/sysbus-fdt: remove qemu_fdt_setprop returned value check

2016-02-18 Thread Eric Auger
qemu_fdt_setprop asserts in case of error hence no need to check the returned value. Signed-off-by: Eric Auger Reviewed-by: Peter Maydell --- v6 -> v7: - add Peter's R-b v3 -> v4: fix returned value --- hw/arm/sysbus-fdt.c | 19 +-- 1 file changed, 5 insert

[Qemu-devel] [PATCH v7 3/8] device_tree: introduce qemu_fdt_node_path

2016-02-18 Thread Eric Auger
This new helper routine returns a NULL terminated array of node paths matching a node name and a compat string. Signed-off-by: Eric Auger Reviewed-by: Peter Maydell --- v6 -> v7: - add Peter's R-b v5 -> v6: - in case of error, free the resources and return NULL - update the doc

[Qemu-devel] [PATCH v7 6/8] hw/arm/sysbus-fdt: helpers for clock node generation

2016-02-18 Thread Eric Auger
to a guest device tree node - fdt_build_clock_node builds a guest clock node and checks the host fellow clock is a fixed one. fdt_build_clock_node will become static as soon as it gets used. A dummy pre-declaration is needed for compilation of this patch. Signed-off-by: Eric Auger Reviewed-by:

[Qemu-devel] [PATCH v7 5/8] device_tree: qemu_fdt_getprop_cell converted to use the error API

2016-02-18 Thread Eric Auger
use the new lenp parameter to interpret the error if any. Signed-off-by: Eric Auger Reviewed-by: Peter Crosthwaite --- v4 -> v5: - Add Peter's R-b - remove comment about error_fatal v3 : creation --- device_tree.c| 21 ++--- hw/arm/boot.c

[Qemu-devel] [PATCH v7 7/8] hw/arm/sysbus-fdt: enable amd-xgbe dynamic instantiation

2016-02-18 Thread Eric Auger
ifdef CONFIG_LINUX. Signed-off-by: Eric Auger Reviewed-by: Peter Maydell --- v6 -> v7: - add Peter's R-b v5 -> v6: - in sysfs_to_dt_name check substrings[0] before substrings[1] - on qemu_fdt_node_path, check the returned value is not null (new dt parsing error case)

Re: [Qemu-devel] [PATCH v6 0/8] AMD XGBE KVM platform passthrough

2016-02-18 Thread Eric Auger
Hi, On 02/17/2016 08:59 PM, Alex Williamson wrote: > On Tue, 16 Feb 2016 18:40:47 + > Peter Maydell wrote: > >> On 1 February 2016 at 13:51, Eric Auger wrote: >>> This series allows to set up AMD XGBE passthrough. This was tested on AMD >>> Seattle. &g

Re: [Qemu-devel] [RFC v2 3/8] Generic PCIe host bridge INTx determination for INTx routing

2016-02-18 Thread Eric Auger
Hi Peter, On 02/16/2016 07:14 PM, Peter Maydell wrote: > On 29 January 2016 at 16:53, Eric Auger wrote: >> This patch stores information about assigned legacy interrupt numbers in >> GPEX host structure. >> This is used during GPEX INTx number determination from a pin d

Re: [Qemu-devel] [RFC v2 7/8] hw: arm: virt: register reserved IOVA region

2016-02-18 Thread Eric Auger
Hi Peter, On 02/16/2016 07:21 PM, Peter Maydell wrote: > On 29 January 2016 at 16:53, Eric Auger wrote: >> Registers a 16x64kB reserved iova region. Currently this iova >> region is used by the host kernel to map host MSI controller frames >> (GICv2m, GITS_TRANSLATER). The h

Re: [Qemu-devel] [PULL 00/13] VFIO updates 2016-02-18

2016-02-19 Thread Eric Auger
346a68ade46905a17fefe9d: >> >> hw/arm/sysbus-fdt: remove qemu_fdt_setprop returned value check >> (2016-02-18 12:43:13 -0700) >> >> VFIO updates 2016-02-18 >> >> - AER pre-enable and misc fixes (Cao jin and Chen Fan) >> - PCI_CAP_LIST_NEXT clea

[Qemu-devel] [PATCH v8 0/8] AMD XGBE KVM platform passthrough

2016-02-19 Thread Eric Auger
fstree. - take into account Alex' comments - remove qemu_fdt_getprop_optional and use error API instead Best Regards Eric Eric Auger (8): hw/vfio/platform: amd-xgbe device device_tree: introduce load_device_tree_from_sysfs device_tree: introduce qemu_fdt_node_path device_tree: qemu_fd

[Qemu-devel] [PATCH v8 4/8] device_tree: qemu_fdt_getprop converted to use the error API

2016-02-19 Thread Eric Auger
atal. This preserves the existing behaviour. Then to use the API with your optional semantic a null parameter can be conveyed. Signed-off-by: Eric Auger Reviewed-by: Peter Crosthwaite --- v4 -> v5: - add Peter's R-b - remove comment about error_fatal v1 -> v2: - add a doc comment in

[Qemu-devel] [PATCH v8 1/8] hw/vfio/platform: amd-xgbe device

2016-02-19 Thread Eric Auger
This patch introduces the amd-xgbe VFIO platform device. It allows the guest to do passthrough on a device exposing an "amd,xgbe-seattle-v1a" compat string. Signed-off-by: Eric Auger Reviewed-by: Alex Bennée --- RFC -> v1: - add Alex' R-b --- hw/vfio/Makefile.objs

[Qemu-devel] [PATCH v8 3/8] device_tree: introduce qemu_fdt_node_path

2016-02-19 Thread Eric Auger
This new helper routine returns a NULL terminated array of node paths matching a node name and a compat string. Signed-off-by: Eric Auger Reviewed-by: Peter Maydell --- v7 -> v8: - don't use g_slist_free_full anymore (glib 2.28) v6 -> v7: - add Peter's R-b v5 -> v6: - in

[Qemu-devel] [PATCH v8 2/8] device_tree: introduce load_device_tree_from_sysfs

2016-02-19 Thread Eric Auger
This function returns the host device tree blob from sysfs (/proc/device-tree). It uses a recursive function inspired from dtc read_fstree. Signed-off-by: Eric Auger Reviewed-by: Peter Maydell --- v6 -> v7: - rebase on d38ea87ac54af64ef611de434d07c12dc0399216: "all: Clean up include

[Qemu-devel] [PATCH v8 6/8] hw/arm/sysbus-fdt: helpers for clock node generation

2016-02-19 Thread Eric Auger
to a guest device tree node - fdt_build_clock_node builds a guest clock node and checks the host fellow clock is a fixed one. fdt_build_clock_node will become static as soon as it gets used. A dummy pre-declaration is needed for compilation of this patch. Signed-off-by: Eric Auger Reviewed-by:

[Qemu-devel] [PATCH v8 8/8] hw/arm/sysbus-fdt: remove qemu_fdt_setprop returned value check

2016-02-19 Thread Eric Auger
qemu_fdt_setprop asserts in case of error hence no need to check the returned value. Signed-off-by: Eric Auger Reviewed-by: Peter Maydell --- v6 -> v7: - add Peter's R-b v3 -> v4: fix returned value --- hw/arm/sysbus-fdt.c | 19 +-- 1 file changed, 5 insert

[Qemu-devel] [PATCH v8 7/8] hw/arm/sysbus-fdt: enable amd-xgbe dynamic instantiation

2016-02-19 Thread Eric Auger
ifdef CONFIG_LINUX. Signed-off-by: Eric Auger Reviewed-by: Peter Maydell --- v6 -> v7: - add Peter's R-b v5 -> v6: - in sysfs_to_dt_name check substrings[0] before substrings[1] - on qemu_fdt_node_path, check the returned value is not null (new dt parsing error case)

[Qemu-devel] [PATCH v8 5/8] device_tree: qemu_fdt_getprop_cell converted to use the error API

2016-02-19 Thread Eric Auger
use the new lenp parameter to interpret the error if any. Signed-off-by: Eric Auger Reviewed-by: Peter Crosthwaite --- v4 -> v5: - Add Peter's R-b - remove comment about error_fatal v3 : creation --- device_tree.c| 21 ++--- hw/arm/boot.c

Re: [Qemu-devel] [RFC PATCH v3 0/9] vfio: capability chains, sparse mmap, device specific regions, IGD support

2016-03-01 Thread Eric Auger
Hi Gerd, On 03/01/2016 03:49 PM, Gerd Hoffmann wrote: > On Di, 2016-02-16 at 14:31 -0700, Alex Williamson wrote: >> v3: > > Have a new version of this? > Want look at this, but it doesn't apply to qemu master. I think you have subset of this series in: "[Qemu-devel] [PATCH 0/6] vfio: Prep for vGPU

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

2015-06-24 Thread Eric Auger
Hi Paolo On 06/24/2015 11:55 AM, Paolo Bonzini wrote: > > > On 15/06/2015 18:33, 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 al

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

2015-06-26 Thread Eric Auger
Hi Peter, On 06/26/2015 01:41 PM, Peter Maydell wrote: > On 15 June 2015 at 17:33, Eric Auger wrote: >> VFIO platform device needs to setup irqfd but it does not know the >> gsi corresponding to the device qemu_irq. This series proposes to >> store a hash table in kvm_state

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

2015-06-26 Thread Eric Auger
On 06/26/2015 01:43 PM, Peter Maydell wrote: > On 15 June 2015 at 17:33, Eric Auger wrote: >> 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 fr

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

2015-06-26 Thread Eric Auger
On 06/26/2015 01:57 PM, Peter Maydell wrote: > On 15 June 2015 at 17:33, Eric Auger wrote: >> This patch aims at optimizing IRQ handling using irqfd framework. >> >> Instead of handling the eventfds on user-side they are handled on >> kernel side using >> - the K

[Qemu-devel] [PATCH v17 1/6] kvm: rename kvm_irqchip_[add, remove]_irqfd_notifier with gsi suffix

2015-06-26 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 Acked-by: Paolo Bonzini --- v16 -> v17: - added Paolo's A-b v15 -> v16: - added Vikram

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

2015-06-26 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 Acked-by: Paolo Bonzini --- v16 -> v17 - replace GPOINTER_TO_UINT by GPOINTER_TO_INT - add Paolo's ack v1

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

2015-06-26 Thread Eric Auger
ings 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 PCI code change review -

[Qemu-devel] [PATCH v17 5/6] kvm: some fixes to kvm_resamplefds_allowed

2015-06-26 Thread Eric Auger
Commit f41389ae3c54b introduced kvm_resamplefds_enabled() and associated kvm_resamplefds_allowed boolean. This patch adds non-KVM version for kvm_resamplefds_enabled and also declares kvm_resamplefds_allowed in kvm-stub as it is done for fellow kvm_irqfds_allowed. Signed-off-by: Eric Auger

[Qemu-devel] [PATCH v17 3/6] intc: arm_gic_kvm: set the qemu_irq/gsi mapping

2015-06-26 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 Acked-by: Paolo Bonzini --- v16

[Qemu-devel] [PATCH v17 4/6] sysbus: add irq_routing_notifier

2015-06-26 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 v17 6/6] hw/vfio/platform: add irqfd support

2015-06-26 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 --- v16 -> v17: - Take into account Peter's comments - most importantly remove #ifdef CONFIG_

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

2015-06-26 Thread Eric Auger
On 06/26/2015 06:26 PM, Paolo Bonzini wrote: > > > On 26/06/2015 18:21, Alex Williamson wrote: +#ifdef CONFIG_KVM +if (kvm_irqfds_enabled() && kvm_resamplefds_enabled() && +vdev->irqfd_allowed) { +sbc->connect_irq_notifier = vfio_start_irqfd_injection; >> S

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

2015-06-26 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 Acked-by: Paolo Bonzini --- v16 -> v17 - replace GPOINTER_TO_UINT by GPOINTER_TO_INT - add Paolo's ack v1

[Qemu-devel] [PATCH v18 1/6] kvm: rename kvm_irqchip_[add, remove]_irqfd_notifier with gsi suffix

2015-06-26 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 Acked-by: Paolo Bonzini --- v16 -> v17: - added Paolo's A-b v15 -> v16: - added Vikram

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

2015-06-26 Thread Eric Auger
de generation removed from device and handled in hw/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 typ

[Qemu-devel] [PATCH v18 5/6] kvm: some fixes to kvm_resamplefds_allowed

2015-06-26 Thread Eric Auger
Commit f41389ae3c54b introduced kvm_resamplefds_enabled() and associated kvm_resamplefds_allowed boolean. This patch adds non-KVM version for kvm_resamplefds_enabled and also declares kvm_resamplefds_allowed in kvm-stub as it is done for fellow kvm_irqfds_allowed. Signed-off-by: Eric Auger

[Qemu-devel] [PATCH v18 3/6] intc: arm_gic_kvm: set the qemu_irq/gsi mapping

2015-06-26 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 Acked-by: Paolo Bonzini --- v16

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

2015-06-26 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 --- v17 -> v18: - remove found in vfio_start_irqfd_injection - unconditionnally set

[Qemu-devel] [PATCH v18 4/6] sysbus: add irq_routing_notifier

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

Re: [Qemu-devel] [PATCH v18 5/6] kvm: some fixes to kvm_resamplefds_allowed

2015-06-29 Thread Eric Auger
On 06/29/2015 11:47 AM, Peter Maydell wrote: > On 26 June 2015 at 18:29, Eric Auger wrote: >> Commit f41389ae3c54b introduced kvm_resamplefds_enabled() and >> associated kvm_resamplefds_allowed boolean. This patch adds >> non-KVM version for kvm_resamplefds_enab

[Qemu-devel] [RFC 1/6] hw/vfio/platform: amd-xgbe device

2015-10-12 Thread Eric Auger
This patch introduces the amd-xgbe VFIO platform device. It allows the guest to do passthrough on a device exposing an "amd,xgbe-seattle-v1a" compat string. Signed-off-by: Eric Auger --- hw/vfio/Makefile.objs | 1 + hw/vfio/amd-xgbe.c

[Qemu-devel] [RFC 0/6] AMD XGBE KVM platform passthrough

2015-10-12 Thread Eric Auger
g16648.html. - Currently host booted with ACPI is not supported. The patches can be found at https://git.linaro.org/people/eric.auger/qemu.git/shortlog/refs/heads/v2.4.0-xgbe-rfc Best Regards Eric Eric Auger (6): hw/vfio/platform: amd-xgbe device device_tree: introduce load_device_tree_from

[Qemu-devel] [RFC 5/6] hw/arm/sysbus-fdt: helpers for clock node generation

2015-10-12 Thread Eric Auger
guest device tree node - fdt_build_clock_node builds a guest clock node and checks the host fellow clock is a fixed one. fdt_build_clock_node will become static as soon as a they get used Signed-off-by: Eric Auger --- hw/arm/sysbus-fdt.c | 110 1

[Qemu-devel] [RFC 3/6] device_tree: introduce qemu_fdt_node_path

2015-10-12 Thread Eric Auger
This new helper routine returns the node path of a device referred to by its name and compat string. Signed-off-by: Eric Auger --- device_tree.c| 40 include/sysemu/device_tree.h | 3 +++ 2 files changed, 43 insertions(+) diff --git a

[Qemu-devel] [RFC 4/6] device_tree: introduce qemu_fdt_getprop_optional

2015-10-12 Thread Eric Auger
Current qemu_fdt_getprop exits if the property is not found. It is sometimes needed to read an optional property, in which case we do not wish to exit but simply returns a null value. This is what this new qemu_fdt_getprop_optional function does. Signed-off-by: Eric Auger --- device_tree.c

[Qemu-devel] [RFC 6/6] hw/arm/sysbus-fdt: enable amd-xgbe dynamic instantiation

2015-10-12 Thread Eric Auger
d XGBE/PHY representation (>= 4.2 host kernel). 2 clock nodes (dma and ptp) also are created. It is mandated those clocks are fixed on host side. Signed-off-by: Eric Auger --- hw/arm/sysbus-fdt.c | 171 ++-- 1 file changed, 167 insertions(+), 4 delet

[Qemu-devel] [RFC 2/6] device_tree: introduce load_device_tree_from_sysfs

2015-10-12 Thread Eric Auger
. Signed-off-by: Eric Auger --- device_tree.c| 40 include/sysemu/device_tree.h | 1 + 2 files changed, 41 insertions(+) diff --git a/device_tree.c b/device_tree.c index a9f5f8e..58a5329 100644 --- a/device_tree.c +++ b/device_tree.c

[Qemu-devel] [PATCH for-2.5] hw/intc/arm_gic_kvm: set up a flat irqchip routing table

2015-07-31 Thread Eric Auger
KVM_SET_GSI_ROUTING overrides the kernel default irqchip table. If no routing entry exists for the GSI, any IRQFD signaling for this GSI will fail. Signed-off-by: Eric Auger --- gsi routing for ARM is functional but needs to be maturated. The API for MSI routing still is in discussion. See http

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

2015-08-12 Thread Eric Auger
Hi, On 08/12/2015 03:23 PM, Christoffer Dall wrote: > On Wed, Aug 12, 2015 at 2:59 PM, Peter Maydell > wrote: >> On 12 August 2015 at 13:27, Pavel Fedin wrote: >>> Hello! >>> I still think this is the wrong approach -- see my remarks in the previous round of patch review. >>> >>> You

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

2015-08-12 Thread Eric Auger
On 08/12/2015 04:24 PM, Christoffer Dall wrote: > On Wed, Aug 12, 2015 at 4:14 PM, Eric Auger wrote: >> Hi, >> On 08/12/2015 03:23 PM, Christoffer Dall wrote: >>> On Wed, Aug 12, 2015 at 2:59 PM, Peter Maydell >>> wrote: >>>> On 12 August 20

[Qemu-devel] [PATCH v13 4/4] hw/arm/virt: change indentation in a15memmap

2015-06-02 Thread Eric Auger
Re-indent in a15memmap after VIRT_PLATFORM_BUS introduction Signed-off-by: Eric Auger Reviewed-by: Alex Bennée --- v11 -> v12: - Add Alex R-b --- hw/arm/virt.c | 28 ++-- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/hw/arm/virt.c b/hw/arm/vir

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

2015-06-02 Thread Eric Auger
becomes static - load_dtb renamed into arm_load_dtb - add copyright in hw/arm/dyn_sysbus_devtree.c v1 -> v2: - device node generation no more in sysbus device but in dyn_sysbus_devtree - VFIO region shrinked to 4MB and relocated in machvirt to avoid PCI shrink (dynamic vfio-mmio support might come latter

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

2015-06-02 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 Reviewed-by: Alex

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

2015-06-02 Thread Eric Auger
sysbus device nodes are integrated in the dtb. Signed-off-by: Eric Auger Reviewed-by: Shannon Zhao Reviewed-by: Alexander Graf Reviewed-by: Alex Bennée --- v11 -> v12: - Add Alex R-b v8 -> v9: - fix compilation with arm-linux-user - reorder fields in ArmLoadKernelNotifier and use DO_UPCA

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

2015-06-02 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: Eric Auger Reviewed-by: Alex Bennée --- v12 -> v13: - Changed st

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

2015-06-05 Thread Eric Auger
Hi Alex, On 06/04/2015 08:11 PM, Alex Williamson wrote: > On Wed, 2015-05-27 at 10:11 +0100, Eric Auger wrote: >> This series aims at enabling KVM platform device passthrough. >> >> On kernel side, the vfio platform driver is needed, available from >> 4.1-rc1 onwards.

Re: [Qemu-devel] [PULL 0/3] Initial vfio-platform support

2015-06-08 Thread Eric Auger
t;> > >> > >> > git://github.com/awilliam/qemu-vfio.git tags/vfio-update-20150608.0 >> > >> > for you to fetch changes up to 88be7b6bf4c86d89e70585881b6b3326f9bac822: >> > >> > hw/vfio/platform: calxeda xgmac device (2015-06-08 09:25:

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

2015-06-09 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 --- v16 -> v17: - properly attach vfio_platform_calxeda_xgmac_vmstate v15 -> v16: - added Vikram's T-b v10 -> v

Re: [Qemu-devel] [PULL v2 1/3] hw/vfio/platform: vfio-platform skeleton

2015-06-10 Thread Eric Auger
Gonglei, Thanks for the report and please apologize for the inconvenience. I am going to send a fix reverting to simple g_malloc0 then. Best Regards Eric On 06/11/2015 04:21 AM, Gonglei wrote: > On 2015/6/9 23:55, Alex Williamson wrote: >> +static int vfio_populate_device(VFIODevice *vbasedev)

[Qemu-devel] [PATCH] hw/vfio/platform: replace g_malloc0_n by g_malloc0

2015-06-11 Thread Eric Auger
g_malloc0_n() is introduced since glib-2.24 while QEMU currently requires glib-2.22. This may cause a link error on some distributions. Signed-off-by: Eric Auger --- hw/vfio/platform.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/hw/vfio/platform.c b/hw/vfio/platform.c

[Qemu-devel] [PATCH v2] hw/vfio/platform: replace g_malloc0_n by g_new0

2015-06-11 Thread Eric Auger
g_malloc0_n() is introduced since glib-2.24 while QEMU currently requires glib-2.22. This may cause a link error on some distributions. Signed-off-by: Eric Auger --- v1 -> v2: - replace g_malloc0 by g_new0 --- hw/vfio/platform.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) d

Re: [Qemu-devel] [PATCH] hw/vfio/platform: replace g_malloc0_n by g_malloc0

2015-06-11 Thread Eric Auger
Hi Gonglei, On 06/11/2015 09:55 AM, Gonglei wrote: > On 2015/6/11 15:14, Eric Auger wrote: >> g_malloc0_n() is introduced since glib-2.24 while QEMU currently >> requires glib-2.22. This may cause a link error on some distributions. >> >> Signed-off-by: Eric Auger &g

[Qemu-devel] [PATCH] hw/vfio: Use g_new0() where that makes obvious sense

2015-06-11 Thread Eric Auger
Replace g_malloc0 occurences by g_new0 where that makes obvious sense. This looks to be the best practice bringing extra compile-time checking and integer overflow protection. Signed-off-by: Eric Auger --- hw/vfio/common.c | 8 hw/vfio/pci.c | 24 hw

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

2015-06-12 Thread Eric Auger
Hi Peter, On 06/12/2015 04:54 AM, Peter Crosthwaite wrote: > On Tue, Jun 2, 2015 at 9:33 AM, Peter Maydell > wrote: >> From: Eric Auger >> >> Device tree nodes for the platform bus and its children dynamic sysbus >> devices are added in a machine init done

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

2015-06-12 Thread Eric Auger
On 06/12/2015 10:25 AM, Eric Auger wrote: > Hi Peter, > On 06/12/2015 04:54 AM, Peter Crosthwaite wrote: >> On Tue, Jun 2, 2015 at 9:33 AM, Peter Maydell >> wrote: >>> From: Eric Auger >>> >>> Device tree nodes for the platform bus and its child

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

2015-06-12 Thread Eric Auger
commit ac9d32e39664e060cd1b538ff190980d57ad69e4 had the consequence to register the do_cpu_reset after the rom_reset one. Hence they get executed in the wrong order. This commit restores the registration of do_cpu_reset in arm_load_kernel. Signed-off-by: Eric Auger --- hw/arm/boot.c | 20

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