[Qemu-devel] [PATCH 1/2] kvm: introduce kvm_arch_msi_data_to_gsi

2015-04-09 Thread Eric Auger
On ARM the MSI data corresponds to the shared peripheral interrupt (SPI) ID. This latter equals to the SPI index + 32. to retrieve the SPI index, matching the gsi, an architecture specific function is introduced. Signed-off-by: Eric Auger --- include/sysemu/kvm.h | 2 ++ kvm-all.c

[Qemu-devel] [PATCH 0/2] ARM adaptations for vhost irqfd setup

2015-04-09 Thread Eric Auger
gards Eric Eric Auger (2): kvm: introduce kvm_arch_msi_data_to_gsi arm_gicv2m: set kvm_gsi_direct_mapping and kvm_msi_via_irqfd_allowed hw/intc/arm_gicv2m.c | 2 ++ include/sysemu/kvm.h | 2 ++ kvm-all.c| 2 +- target-arm/kvm.c | 5 + target-i386/kvm.c| 5 + target

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

2015-04-17 Thread Eric Auger
Hi Alex, On 04/17/2015 12:04 AM, Alex Williamson wrote: > On Thu, 2015-03-19 at 17:16 +0000, Eric Auger wrote: >> Add a reset notify function that enables to start the propagation of >> interrupts to the guest. >> >> Signed-off-by: Eric Auger >> >> --- >

[Qemu-devel] [question] Clean way to retrieve the gsi of a sysbus device qemu_irq?

2015-04-21 Thread Eric Auger
, i); or even changing proto of qdev_init_gpio_in but this has a large impact. Do you think any of this is sensible? Best Regards Eric On 04/17/2015 09:41 PM, Alex Williamson wrote: > On Fri, 2015-04-17 at 17:31 +0200, Eric Auger wrote: >> Hi Alex, >> On 04/17/2015 12:04 AM,

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

2015-04-21 Thread Eric Auger
Hi Alex, On 04/17/2015 09:41 PM, Alex Williamson wrote: > On Fri, 2015-04-17 at 17:31 +0200, Eric Auger wrote: >> Hi Alex, >> On 04/17/2015 12:04 AM, Alex Williamson wrote: >>> On Thu, 2015-03-19 at 17:16 +, Eric Auger wrote: >>>> Add a reset notif

[Qemu-devel] [PATCH 1/2] irq: add get_gsi callback

2015-04-23 Thread Eric Auger
-off-by: Eric Auger --- hw/core/irq.c| 20 include/hw/irq.h | 8 2 files changed, 28 insertions(+) diff --git a/hw/core/irq.c b/hw/core/irq.c index 8a62a36..7eeb742 100644 --- a/hw/core/irq.c +++ b/hw/core/irq.c @@ -31,6 +31,7 @@ struct IRQState { Object

[Qemu-devel] [PATCH 0/2] irq: add get_gsi callback

2015-04-23 Thread Eric Auger
setter is introduced. First user is arm_gic_kvm. A public function wraps the callback, qemu_irq_get_gsi. The first user of qemu_irq_get_gsi might be the VFIO platform device. This will come in the "KVM platform device passthrough" series. Eric Auger (2): irq: add get_gsi callb

[Qemu-devel] [PATCH 2/2] intc: arm_gic_kvm: set the get_gsi callback

2015-04-23 Thread Eric Auger
The arm_gic_kvm now sets the get_gsi_cb callback so that the global system interrupt of a qemu_irq can be retrieved. This enables VFIO platform signaling to be setup. Signed-off-by: Eric Auger --- hw/intc/arm_gic_kvm.c | 10 ++ 1 file changed, 10 insertions(+) diff --git a/hw/intc

[Qemu-devel] [PATCH] sysbus: add irq_routing_notifier

2015-04-23 Thread Eric Auger
Add a new irq_routing_notifier notifier and its setter. This notifier is called on sysbus_connect_irq. The same notifier is used for all interrupts. Signed-off-by: Eric Auger --- hw/core/sysbus.c| 9 + include/hw/sysbus.h | 6 ++ 2 files changed, 15 insertions(+) diff --git a

Re: [Qemu-devel] [PATCH 0/2] irq: add get_gsi callback

2015-04-23 Thread Eric Auger
Hi Paolo, On 04/23/2015 11:30 AM, Paolo Bonzini wrote: > > > On 23/04/2015 10:49, Eric Auger wrote: >> This series introduces a new callback function in IRQState, named >> get_gsi_cb. It is supposed to be populated by the interrupt controller >> and its role

Re: [Qemu-devel] [PATCH 0/2] irq: add get_gsi callback

2015-04-23 Thread Eric Auger
Hi Paolo, thanks for taking the time to explain. I will rewrite accordingly. Best Regards Eric On 04/23/2015 11:58 AM, Paolo Bonzini wrote: > > > On 23/04/2015 11:40, Eric Auger wrote: >>>> Why can't you just use a GHashTable? >> You mean implementing

[Qemu-devel] [PATCH v2 0/2] add qemu_irq/gsi hashtable

2015-04-23 Thread Eric Auger
down irqfd directly from a qemu_irq. Those functions now can be used by the VFIO platform device to setup VFIO signaling. v1 -> v2: - series renamed from "irq: add get_gsi callback" - follow implementation suggested by Paolo (hope I fully understood it) Eric Auger (2): kvm-all.c:

[Qemu-devel] [PATCH v2 2/2] intc: arm_gic_kvm: set the qemu_irq/gsi mapping

2015-04-23 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_qemuirq_irqfd_notifier. Signed-off-by: Eric Auger --- hw/intc/arm_gic_kvm.c | 5 + 1 file

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

2015-04-23 Thread Eric Auger
is supposed to use it. kvm_irqchip_[add, remove]_qemuirq_irqfd_notifier allows to setup/tear down irqfd directly from the qemu_irq. Signed-off-by: Eric Auger --- include/sysemu/kvm.h | 6 ++ kvm-all.c| 35 +++ 2 files changed, 41 insertions

Re: [Qemu-devel] [PATCH v11 0/4] machvirt dynamic sysbus device instantiation

2015-04-23 Thread Eric Auger
ndency and overall acceptance is not guaranteed. Best Regards Eric On 04/23/2015 05:05 PM, Baptiste Reynal wrote: > Hi Eric, > > Is there anything still blocking this patch ? Can I get the status ? > > Thanks, > Baptiste > > On Wed, Mar 4, 2015 at 5:18 PM, Eric Au

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

2015-04-23 Thread Eric Auger
On 04/23/2015 05:22 PM, Paolo Bonzini wrote: > > > On 23/04/2015 17:08, Eric Auger wrote: >> int kvm_irqchip_add_irqfd_notifier(KVMState *s, EventNotifier *n, >> EventNotifier *rn, int virq); >> int kvm_irqchip_remove

Re: [Qemu-devel] [PATCH 0/2] irq: add get_gsi callback

2015-04-24 Thread Eric Auger
On 04/23/2015 11:58 AM, Paolo Bonzini wrote: > > > On 23/04/2015 11:40, Eric Auger wrote: >>>> Why can't you just use a GHashTable? >> You mean implementing this hash table in the interrupt controller? > > No, in KVM. Basically the kvm-vgic interrupt cont

Re: [Qemu-devel] [PATCH 0/2] irq: add get_gsi callback

2015-04-24 Thread Eric Auger
On 04/24/2015 11:11 AM, Paolo Bonzini wrote: > > > On 24/04/2015 11:01, Eric Auger wrote: >>>> void sysbus_init_irq(SysBusDevice *dev, qemu_irq *p) >>>> { >>>> SysBusDeviceClass *sdc = SYSBUS_DEVICE_GET_CLASS(dev); >>>> qdev_init

Re: [Qemu-devel] [PATCH 0/2] irq: add get_gsi callback

2015-04-24 Thread Eric Auger
On 04/24/2015 11:29 AM, Paolo Bonzini wrote: > > > On 24/04/2015 11:18, Eric Auger wrote: >>>>>> I implemented this alternative but my concern is the check method is >>>>>> called before the qemu_irq setting. So on this callback I cannot >>&

Re: [Qemu-devel] [PATCH 0/2] irq: add get_gsi callback

2015-04-24 Thread Eric Auger
On 04/24/2015 12:02 PM, Paolo Bonzini wrote: > > > On 24/04/2015 11:48, Eric Auger wrote: >>>> What did the notifier code look like with your patch? >> Currently both notifiers are stored in the VFIOINTp struct. They are >> initialized in vfio_init_intp. VFI

[Qemu-devel] [PATCH v2] sysbus: add irq_routing_notifier

2015-04-24 Thread Eric Auger
Add a new irq_routing_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 v12 2/4] hw/arm/boot: arm_load_kernel implemented as a machine init done notifier

2015-04-24 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 v12 0/4] machvirt dynamic sysbus device instantiation

2015-04-24 Thread Eric Auger
to 4MB and relocated in machvirt to avoid PCI shrink (dynamic vfio-mmio support might come latter) - platform_bus_base removed from PlatformDevtreeData Eric Auger (4): hw/arm/sysbus-fdt: helpers for platform bus nodes addition hw/arm/boot: arm_load_kernel implemented as a machine init do

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

2015-04-24 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 | 26 +- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/hw/arm/virt.c b/hw/arm/virt.c in

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

2015-04-24 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 v12 3/4] hw/arm/virt: add dynamic sysbus device support

2015-04-24 Thread Eric Auger
sysbus devices. Indeed dynamic sysbus devices are created after machine init. machvirt also registers a notifier that will build the device tree nodes for the platform bus and its children dynamic sysbus devices. Signed-off-by: Alexander Graf Signed-off-by: Eric Auger Reviewed-by: Alex Bennée

Re: [Qemu-devel] [PATCH v2] sysbus: add irq_routing_notifier

2015-04-27 Thread Eric Auger
Hi Peter, On 04/27/2015 06:09 AM, Peter Crosthwaite wrote: > On Fri, Apr 24, 2015 at 5:39 AM, Eric Auger wrote: >> Add a new irq_routing_notifier notifier in the SysBusDeviceClass. This >> notifier, if populated, is called after sysbus_connect_irq. >> >> This mech

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

2015-04-27 Thread Eric Auger
Hi Vikram, On 04/25/2015 12:35 AM, Vikram Sethi wrote: > Hi Eric, > > On 03/19/15 12:16, Eric Auger wrote: >> This patch allows the instantiation of the vfio-calxeda-xgmac device >> from the QEMU command line (-device vfio-calxeda-xgmac,host=""). >> >>

Re: [Qemu-devel] [PATCH v2] sysbus: add irq_routing_notifier

2015-04-27 Thread Eric Auger
On 04/27/2015 12:39 PM, Paolo Bonzini wrote: > > > On 27/04/2015 10:26, Eric Auger wrote: >>>> One of my long term goals is to try and get rid of sysbus IRQ >>>> abstraction completely in favor of just qdev gpios. This means >>>> features that apply

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

2015-04-27 Thread Eric Auger
Hi Alex On 04/27/2015 03:41 PM, Alexander Graf wrote: > On 04/24/2015 05:19 PM, Eric Auger wrote: >> Allows sysbus devices to be instantiated from command line by >> using -device option. Machvirt creates a platform bus at init. >> The dynamic sysbus devices are attached

Re: [Qemu-devel] [PATCH v11 0/4] machvirt dynamic sysbus device instantiation

2015-04-27 Thread Eric Auger
On 04/27/2015 04:02 PM, Alexander Graf wrote: > On 04/24/2015 09:36 AM, Baptiste Reynal wrote: >> I think it will be a pity to postpone VFIO support on QEMU and would >> rather introduce the support for VIRT_MMIO later. >> >> Alex, what is your position on it ? > > Ah, sorry, I read this mail too

Re: [Qemu-devel] [PATCH v2] sysbus: add irq_routing_notifier

2015-04-27 Thread Eric Auger
On 04/27/2015 04:39 PM, Peter Crosthwaite wrote: > On Mon, Apr 27, 2015 at 6:37 AM, Paolo Bonzini wrote: >> >> >> On 27/04/2015 14:20, Eric Auger wrote: >>> On 04/27/2015 12:39 PM, Paolo Bonzini wrote: >>>> >>>> >>>> On 27/04/201

Re: [Qemu-devel] [PATCH v2] sysbus: add irq_routing_notifier

2015-04-27 Thread Eric Auger
Hi Peter, On 04/27/2015 07:43 PM, Peter Crosthwaite wrote: > On Mon, Apr 27, 2015 at 8:01 AM, Paolo Bonzini wrote: >> >> >> On 27/04/2015 16:56, Eric Auger wrote: >>> Peter, Paolo, >>> >>> After your feedbacks, I feel I need to spend some more

Re: [Qemu-devel] [PATCH v2] sysbus: add irq_routing_notifier

2015-04-28 Thread Eric Auger
On 04/28/2015 08:57 AM, Peter Crosthwaite wrote: > On Mon, Apr 27, 2015 at 11:46 PM, Eric Auger wrote: >> Hi Peter, >> >> On 04/27/2015 07:43 PM, Peter Crosthwaite wrote: >>> On Mon, Apr 27, 2015 at 8:01 AM, Paolo Bonzini wrote: >>>> >>>> &

[Qemu-devel] [PATCH 1/3] qdev: pass the check callback to qdev_init_gpio_out_named

2015-04-28 Thread Eric Auger
sysbus. Signed-off-by: Eric Auger --- hw/core/qdev.c | 8 +--- include/hw/qdev-core.h | 3 ++- include/qom/object.h | 3 +++ 3 files changed, 10 insertions(+), 4 deletions(-) diff --git a/hw/core/qdev.c b/hw/core/qdev.c index 7fa58be..dc82df4 100644 --- a/hw/core/qdev.c +++ b/hw/core

[Qemu-devel] [PATCH 0/3] Extend check callback usability for irq connect notifier

2015-04-28 Thread Eric Auger
Eric Eric Auger (3): qdev: pass the check callback to qdev_init_gpio_out_named qdev: check callback takes Object **target as third argument sysbus: add irq_set_hook hw/core/qdev-properties.c| 2 +- hw/core/qdev.c | 8 +--- hw/core/sysbus.c | 8 +++- in

[Qemu-devel] [PATCH 3/3] sysbus: add irq_set_hook

2015-04-28 Thread Eric Auger
Add a new callback in the SysBusDeviceClass. This callback now can be overriden by devices inheriting from sysbus. By default the callback is set to the dummy object_property_allow_set_link callback. Signed-off-by: Eric Auger --- hw/core/sysbus.c| 8 +++- include/hw/sysbus.h | 1 + 2

[Qemu-devel] [PATCH 2/3] qdev: check callback takes Object **target as third argument

2015-04-28 Thread Eric Auger
left unchanged. This typically makes possible to do checks both on the *child content (for instance a qemu_irq) and also perform some actions/ checks on its container, which was not possible before. This is typically useful for starting irqfd setup in vfio platform use case. Signed-off-by: Eric

[Qemu-devel] [PATCH v13 02/12] hw/vfio/platform: vfio-platform skeleton

2015-04-28 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 --- v12 -> v13: - check device name does not contain any / - handle case where readlink fully fills the buffer - in vfio_map_region decl

[Qemu-devel] [PATCH v13 00/12] KVM platform device passthrough

2015-04-28 Thread Eric Auger
"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->v4 changes (Eric A

[Qemu-devel] [PATCH v13 01/12] linux-headers: update headers according to 4.1-rc0

2015-04-28 Thread Eric Auger
This includes, among other things, VFIO platform driver and irqfd/arm. Signed-off-by: Eric Auger --- v12 -> v13: - update for 4.1-rc0 headers v10 -> v11: - only includes header modifications related to vfio platform driver v14 and not those related to "vfio: type1: support fo

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

2015-04-28 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 v13 04/12] hw/vfio/platform: calxeda xgmac device

2015-04-28 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 v13 12/12] hw/vfio/platform: add irqfd support

2015-04-28 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 --- v12 -> v13: - setup the new mechanism for starting irqfd, based on LinkPropertySetter override - use kvm_irqchip_[add,rem

[Qemu-devel] [PATCH v13 03/12] hw/vfio/platform: add irq assignment

2015-04-28 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 --- v12 -> v13: - start user-side eventfd handling at realize time - remove start_irq_fn v10 -> v11: - use block declaratio

[Qemu-devel] [PATCH v13 11/12] sysbus: add irq_set_hook

2015-04-28 Thread Eric Auger
Add a new callback in the SysBusDeviceClass. This callback now can be overriden by devices inheriting from sysbus. By default the callback is set to the dummy object_property_allow_set_link callback. Signed-off-by: Eric Auger --- v1 -> v2: - use new LinkPropertySetter type --- hw/c

[Qemu-devel] [PATCH v13 09/12] qdev: pass the check callback to qdev_init_gpio_out_named

2015-04-28 Thread Eric Auger
specialize this callback. A subsequent patch will implement that for sysbus. Signed-off-by: Eric Auger --- v1 -> v2: - fix qdev_init_gpio_out_named call in sysbus_init_irq - rewording of commit message --- hw/core/qdev.c | 8 +--- hw/core/sysbus.c | 3 ++- include/hw/qdev-core.h

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

2015-04-28 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 v13 07/12] kvm-all.c: add qemu_irq/gsi hash table and utility routines

2015-04-28 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 --- v2 -> v3: - rename kvm_irqchip_[add, remove]_qemuirq_irqfd_notifier into kvm_irqchip_[add, remove]_irqfd_notifier. Possible since leg

[Qemu-devel] [PATCH v13 10/12] qdev: check callback takes the property child as third argument

2015-04-28 Thread Eric Auger
-by: Eric Auger --- v1 -> v2: - Object ** becomes Object * const* - rename patch title --- hw/core/qdev-properties.c| 3 ++- include/hw/qdev-properties.h | 3 ++- include/qom/object.h | 4 ++-- qom/object.c | 16 +--- 4 files changed, 15 insertions(+),

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

2015-04-28 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

Re: [Qemu-devel] [PATCH 0/3] Extend check callback usability for irq connect notifier

2015-04-29 Thread Eric Auger
Hi Peter, On 04/28/2015 08:21 PM, Peter Crosthwaite wrote: > On Tue, Apr 28, 2015 at 2:18 AM, Eric Auger wrote: >> The VFIO platform device gets connected to the platform bus >> on a machine init done notifier. Only at that point irqfd can be >> setup. An irq connect notifie

Re: [Qemu-devel] [PATCH v13 10/12] qdev: check callback takes the property child as third argument

2015-04-29 Thread Eric Auger
On 04/29/2015 10:22 AM, Paolo Bonzini wrote: > > > On 28/04/2015 18:51, Eric Auger wrote: >> -prop->check(obj, name, new_target, &local_err); >> +object_ref(new_target); >> +*child = new_target; >> + >> +prop->check(obj

Re: [Qemu-devel] [PATCH v13 10/12] qdev: check callback takes the property child as third argument

2015-04-29 Thread Eric Auger
On 04/29/2015 01:12 PM, Paolo Bonzini wrote: > I think reverting is better since you need a respin and Peter offered to > touch the code later. OK Thanks Eric > > Paolo

Re: [Qemu-devel] [PATCH v13 01/12] linux-headers: update headers according to 4.1-rc0

2015-04-29 Thread Eric Auger
On 04/29/2015 12:36 PM, Christian Borntraeger wrote: > Am 28.04.2015 um 18:51 schrieb Eric Auger: >> This includes, among other things, VFIO platform driver and >> irqfd/arm. >> >> Signed-off-by: Eric Auger >> >> --- >> >> v12 -> v13: >&g

Re: [Qemu-devel] [PATCH v2 06/10] linux-headers: update

2015-04-29 Thread Eric Auger
On 04/27/2015 10:55 AM, Cornelia Huck wrote: > 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

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

2015-04-29 Thread Eric Auger
qfd must be setup in machine file when virtual IRQ is known - create the GSI routing table on qemu side v2->v3 changes (Alvise Rigo, Eric Auger): - Following Alex W recommandations, further efforts to factorize the code between PCI:introduction of VFIODevice and VFIORegion as base classes

[Qemu-devel] [PATCH v14 01/10] linux-headers: update headers according to 4.1-rc1

2015-04-29 Thread Eric Auger
This updates linux-headers against master 4.1-rc1 (commit b787f68c36d49bb1d9236f403813641efa74a031). This includes, among other things, VFIO platform driver and irqfd/arm. Signed-off-by: Eric Auger --- v13 -> v14: - update to precise 4.1-rc1, precise the commit and change the title v12 -&g

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

2015-04-29 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 --- v13 -> v14: - fix ENAMETOOLONG error path sign v12 -> v13: - check device name does not contain any / - handle case where re

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

2015-04-29 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 v14 07/10] kvm-all.c: add qemu_irq/gsi hash table and utility routines

2015-04-29 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,

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

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

2015-04-29 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 v14 04/10] hw/vfio/platform: calxeda xgmac device

2015-04-29 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 v14 06/10] kvm: rename kvm_irqchip_[add, remove]_irqfd_notifier with gsi suffix

2015-04-29 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 v14 10/10] hw/vfio/platform: add irqfd support

2015-04-29 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 v14 03/10] hw/vfio/platform: add irq assignment

2015-04-29 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_

Re: [Qemu-devel] [PATCH v14 01/10] linux-headers: update headers according to 4.1-rc1

2015-04-29 Thread Eric Auger
On 04/29/2015 05:19 PM, Cornelia Huck wrote: > On Wed, 29 Apr 2015 15:51:58 +0100 > Eric Auger wrote: > >> This updates linux-headers against master 4.1-rc1 (commit >> b787f68c36d49bb1d9236f403813641efa74a031). >> >> This includes, among other things, VFIO

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

2015-05-18 Thread Eric Auger
ric, > > I rebased amba patches on this serie. Everything is working fine with > the PL330 device. > > Regards, > Baptiste > > On Wed, May 6, 2015 at 8:37 AM, Eric Auger wrote: >> Dear All, >> >> Please ignore the previous void message. For unknown reason th

Re: [Qemu-devel] [RFC PATCH] hw/arm/virt: Added preliminary GICv3 support for kvm mode

2015-05-18 Thread Eric Auger
Hi Ashok, On 05/14/2015 07:27 PM, Ashok Kumar wrote: > Added -M virt,gicversion=2,3 property to configure GICv2 or GICv3. > GICv3 save/restore is not supported as vgic-v3-emul.c is yet to support > them. > > Signed-off-by: Ashok Kumar > --- > Tested KVM/GICv3 in ARM fastmodel. > Tested TCG/GICv2.

Re: [Qemu-devel] [RFC PATCH] hw/arm/virt: Added preliminary GICv3 support for kvm mode

2015-05-19 Thread Eric Auger
Dear all, On 05/15/2015 08:42 AM, Pavel Fedin wrote: > Hello! > >> Added -M virt,gicversion=2,3 property to configure GICv2 or GICv3. >> GICv3 save/restore is not supported as vgic-v3-emul.c is yet to support >> them. >> >> Signed-off-by: Ashok Kumar > > I also work on this, just not published

Re: [Qemu-devel] [RFC PATCH] hw/arm/virt: Added preliminary GICv3 support for kvm mode

2015-05-19 Thread Eric Auger
On 05/18/2015 05:44 PM, Eric Auger wrote: > Hi Ashok, > On 05/14/2015 07:27 PM, Ashok Kumar wrote: >> Added -M virt,gicversion=2,3 property to configure GICv2 or GICv3. >> GICv3 save/restore is not supported as vgic-v3-emul.c is yet to support >> them. >>

Re: [Qemu-devel] [PATCH RFC V2 4/4] Add virtv2 machine that uses GIC-500

2015-05-19 Thread Eric Auger
Hi Shlomo, On 05/06/2015 04:04 PM, shlomopongr...@gmail.com wrote: > From: Shlomo Pongratz > > There is a need to support flexible clusters size. The GIC-500 can support > up to 128 cores, up to 32 clusters and up to 8 cores is a cluster. > So for example, if one wishes to have 16 cores, the opti

Re: [Qemu-devel] [RFC PATCH] hw/arm/virt: Added preliminary GICv3 support for kvm mode

2015-05-19 Thread Eric Auger
On 05/15/2015 08:42 AM, Pavel Fedin wrote: > Hello! > >> Added -M virt,gicversion=2,3 property to configure GICv2 or GICv3. >> GICv3 save/restore is not supported as vgic-v3-emul.c is yet to support >> them. >> >> Signed-off-by: Ashok Kumar > > I also work on this, just not published yet. Some

Re: [Qemu-devel] [RFC PATCH] hw/arm/virt: Added preliminary GICv3 support for kvm mode

2015-05-21 Thread Eric Auger
Hi Pavel, On 05/21/2015 08:47 AM, Pavel Fedin wrote: > Hello! Sorry, missed this message, catching up... > >> After a closer look, kvm_arch_irqchip_create is called here with test >> mode = true. With that option, at kernel level, we only check the kvm >> device registered its ops and do not go f

Re: [Qemu-devel] [RFC PATCH] hw/arm/virt: Added preliminary GICv3 support for kvm mode

2015-05-21 Thread Eric Auger
On 05/21/2015 04:10 PM, Pavel Fedin wrote: > Hello! > >> So to me it is sensible to instantiate GICV2 through legacy >> KVM_CREATE_IRQCHIP API if both KVM_CREATE_DEVICE(test mode=true) failed. > > I disagree because at this point we already know which GIC version the user > wants. This > is be

Re: [Qemu-devel] [PATCH RFC V2 2/4] Implment GIC-500

2015-05-22 Thread Eric Auger
Hi Shlomo, On 05/06/2015 04:04 PM, shlomopongr...@gmail.com wrote: > From: Shlomo Pongratz > > Implement GIC-500 from GICv3 family for arm64 > > This patch is a first step toward 128 cores support for arm64. > > At first only 64 cores are supported for two reasons: > First the largest integer t

Re: [Qemu-devel] [PATCH RFC 4/4] Initial implementation of vGICv3.

2015-05-22 Thread Eric Auger
On 05/22/2015 12:58 PM, Pavel Fedin wrote: > Get/put routines are missing. Live migration is not possible. > > Signed-off-by: Pavel Fedin > --- > hw/intc/Makefile.objs | 1 + > hw/intc/arm_gicv3_kvm.c | 283 > > 2 files changed, 284 insertion

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

2015-05-25 Thread Eric Auger
Vikram > On 05/06/15 01:37, Eric Auger wrote: >> Dear All, >> >> Please ignore the previous void message. For unknown reason the reply >> systematically ignores the content of the message? Retrying breaking the >> history... Content was: >> >> I am lo

Re: [Qemu-devel] [PATCH RFC 1/4] Add virt-v3 machine that uses GIC-500

2015-05-25 Thread Eric Auger
Hi Pavel, On 05/22/2015 12:58 PM, Pavel Fedin wrote: > This patch introduces kernel_irqchip_type member in Machine class. Currently > it it used only by virt machine for its internal purposes, however in future > it is to be passed to KVM in kvm_irqchip_create(). The variable is defined as > int

Re: [Qemu-devel] [PATCH RFC 2/4] Set kernel_irqchip_type for other ARM boards which use GIC

2015-05-25 Thread Eric Auger
On 05/22/2015 12:58 PM, Pavel Fedin wrote: missing commit msg. > Signed-off-by: Pavel Fedin > --- > hw/arm/exynos4_boards.c | 1 + > hw/arm/realview.c | 1 + > hw/arm/vexpress.c | 1 + > 3 files changed, 3 insertions(+) > > diff --git a/hw/arm/exynos4_boards.c b/hw/arm/exynos4_boards

Re: [Qemu-devel] [PATCH RFC 3/4] First bits of vGICv3 support:

2015-05-25 Thread Eric Auger
On 05/22/2015 12:58 PM, Pavel Fedin wrote: > - Make use of kernel_irqchip_type in kvm_arch_irqchip_create() > - Instantiate "kvm-arm-gicv3" class (not implemented yet) for GICv3 with KVM > acceleration I think this patch file should rather be the last one of the series. > > Signed-off-by: Pavel F

Re: [Qemu-devel] [PATCH v3 4/4] target-arm: Add the GICv2m to the virt board

2015-05-25 Thread Eric Auger
On 05/25/2015 05:01 PM, Peter Maydell wrote: > On 25 May 2015 at 14:09, Pavel Fedin wrote: >> Hello! >> >>> typedef struct MemMapEntry { >>> @@ -88,6 +90,7 @@ typedef struct VirtBoardInfo { >>> int fdt_size; >>> uint32_t clock_phandle; >>> uint32_t gic_phandle; >>> +uint32_t v

Re: [Qemu-devel] [PATCH v3 2/4] arm_gicv2m: Add GICv2m widget to support MSIs

2015-05-26 Thread Eric Auger
Reviewed-by: Eric Auger On 05/24/2015 12:51 PM, Christoffer Dall wrote: > The ARM GICv2m widget is a little device that handles MSI interrupt > writes to a trigger register and ties them to a range of interrupt lines > wires to the GIC. It has a few status/id registers and the interr

Re: [Qemu-devel] [PATCH v3 1/4] target-arm: Add GIC phandle to VirtBoardInfo

2015-05-26 Thread Eric Auger
Reviewed-by: Eric Auger On 05/24/2015 12:51 PM, Christoffer Dall wrote: > Instead of passing the GIC phandle around between functions, add it to > the VirtBoardInfo just like we do for the clock_phandle. We are about > to add the v2m phandle as well, and it's easier not having to

Re: [Qemu-devel] [PATCH v3 4/4] target-arm: Add the GICv2m to the virt board

2015-05-26 Thread Eric Auger
Reviewed-by: Eric Auger The only question I have is related to mid-term virt strategy about GICv3 integration. Are we going to reuse that memory map for the machine instantiating the GICv3? If yes, shouldn't we put the GICv2M somewhere else to leave space for GICv3 redistributors, assumi

Re: [Qemu-devel] [PATCH v3 3/4] target-arm: Extend the gic node properties

2015-05-26 Thread Eric Auger
Reviewed-by: Eric Auger only minor things below On 05/24/2015 12:51 PM, Christoffer Dall wrote: > From: Shanker Donthineni > > In preparation for adding the GICv2m which requires address specifiers > and is a subnode of the gic, we extend the gic DT definition to specify > the

Re: [Qemu-devel] [PATCH v3 4/4] target-arm: Add the GICv2m to the virt board

2015-05-26 Thread Eric Auger
On 05/26/2015 02:55 PM, Peter Maydell wrote: > On 26 May 2015 at 13:54, Eric Auger wrote: >> Reviewed-by: Eric Auger >> >> The only question I have is related to mid-term virt strategy about >> GICv3 integration. Are we going to reuse that memory map for the machine

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

2015-05-27 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] [RESEND PATCH v12 0/4] machvirt dynamic sysbus device instantiation

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

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

2015-05-27 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] [RESEND PATCH v12 3/4] hw/arm/virt: add dynamic sysbus device support

2015-05-27 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 --- v11 -> v12: - res

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

2015-05-27 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 | 26 +- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/hw/arm/virt.c b/hw/arm/virt.c in

[Qemu-devel] [PATCH v16 1/9] hw/vfio/platform: vfio-platform skeleton

2015-05-27 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 Tested-by: Vikram Sethi --- v15 -> v16: - added Vikram's T-b v14 -> v15: - vfio_platform_compute_needs_reset now returns

[Qemu-devel] [PATCH v16 5/9] kvm: rename kvm_irqchip_[add, remove]_irqfd_notifier with gsi suffix

2015-05-27 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] [PATCH v16 2/9] hw/vfio/platform: add irq assignment

2015-05-27 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 Tested-by: Vikram Sethi --- v15 -> v16: - added Vikram's T-b v13 -> v14: - remove virtualID field in header v12 -> v13

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

2015-05-27 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

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

2015-05-27 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 --- v15 -> v16: - added Vikram's T-b v10 -> v11: - add Alex Reviewed-by - move virt modifications in a separate patc

[Qemu-devel] [PATCH v16 8/9] sysbus: add irq_routing_notifier

2015-05-27 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 v16 0/9] KVM platform device passthrough

2015-05-27 Thread Eric Auger
;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->v4 changes (Eric Auger, Alvis

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