Re: [Qemu-devel] master: intermittent acpi-test failures

2014-11-30 Thread Michael S. Tsirkin
On Sun, Nov 30, 2014 at 05:12:55PM +0200, Michael S. Tsirkin wrote: On Sat, Nov 29, 2014 at 05:39:01PM +, Peter Maydell wrote: On 29 November 2014 at 17:36, Michael S. Tsirkin m...@redhat.com wrote: On Fri, Nov 28, 2014 at 01:34:33PM +, Peter Maydell wrote: These failures are back

Re: [Qemu-devel] [PATCH RFC for-2.2] virtio-blk: force 1st s/g to match header

2014-11-30 Thread Michael S. Tsirkin
On Fri, Nov 28, 2014 at 04:14:35PM +, Peter Maydell wrote: On 28 November 2014 at 11:43, Stefan Hajnoczi stefa...@gmail.com wrote: Right, the test case explicitly tests different descriptor layouts, even though virtio-blk-pci does not set the ANY_LAYOUT feature bit. Either the test

[Qemu-devel] [kernel PATCH v2 0/2] devicetree: document ARM bindings for QEMU's Firmware Config interface

2014-11-30 Thread Laszlo Ersek
V2 seeks to address comments raised in the v1 review. Changes are broken out per patch, as git notes. Thanks Laszlo Laszlo Ersek (2): devicetree: document the qemu and virtio vendor prefixes devicetree: document ARM bindings for QEMU's Firmware Config interface

[Qemu-devel] [kernel PATCH v2 1/2] devicetree: document the qemu and virtio vendor prefixes

2014-11-30 Thread Laszlo Ersek
The QEMU open source machine emulator and virtualizer presents firmware and operating systems running in virtual machines (guests) with purely virtual hardware (ie. hardware that has never existed in physical form). Since QEMU exposes some of these devices in a DTB, it makes sense to define qemu

[Qemu-devel] [kernel PATCH v2 2/2] devicetree: document ARM bindings for QEMU's Firmware Config interface

2014-11-30 Thread Laszlo Ersek
Peter Maydell suggested that we describe new devices / DTB nodes in the kernel Documentation tree that we expose to arm virt guests in QEMU. Although the kernel is not required to access the fw_cfg interface, Documentation/devicetree/bindings/arm is probably the best central spot to keep the

[Qemu-devel] [PATCH v2] arm: add fw_cfg to virt board

2014-11-30 Thread Laszlo Ersek
fw_cfg already supports exposure over MMIO (used in ppc/mac_newworld.c, ppc/mac_oldworld.c, sparc/sun4m.c); we can easily add it to the virt board. The mmio register block of fw_cfg is advertized in the device tree. As base address we pick 0x0902, which conforms to the comment preceding

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

2014-11-30 Thread Eric Auger
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 to this platform bus device. The platform bus device registers a machine init done notifier whose role will be to bind the dynamic

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

2014-11-30 Thread Eric Auger
This new C module will be used by ARM machine files to generate platform bus node and their dynamic sysbus device tree nodes. Dynamic sysbus device node addition is done in a machine init done notifier. arm_register_platform_bus_fdt_creator does the registration of this latter and is supposed to

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

2014-11-30 Thread Eric Auger
This patch series enables machvirt to dynamically instantiate sysbus devices from command line (using -device option). All those sysbus devices are plugged onto a platform bus. This latter device is instantiated in machvirt and takes care of the binding of children sysbus devices on a machine

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

2014-11-30 Thread Eric Auger
Two fields are added in arm_boot_info (dtb_start and dtb_limit). The prototype of arm_load_kernel is changed to only use arm_boot_info. The rationale behind introducing that change is when dealing with dynamic sysbus devices, we need to upgrade the device tree with dynamic device nodes after the

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

2014-11-30 Thread Eric Auger
load_dtb is renamed into arm_load_dtb and becomes non static. it will be used by machvirt for dynamic instantiation of platform devices Signed-off-by: Eric Auger eric.au...@linaro.org --- v4 - v5: s/load_dtb/arm_load_dtb in one comment v2 - v3: load_dtb renamed into arm_load_dtb Conflicts:

[Qemu-devel] [PATCH v5 4/6] hw/arm: add a new modify_dtb_opaque field in arm_boot_info

2014-11-30 Thread Eric Auger
This field can be used by any modify_dtb() function to pass additional arguments requested to build the modified dtb. This is needed for creating the platform bus dynamic sysbus nodes. Signed-off-by: Eric Auger eric.au...@linaro.org --- include/hw/arm/arm.h | 4 1 file changed, 4

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

2014-11-30 Thread Eric Auger
Currently arm_load_dtb frees the fdt handle whatever it is allocated from load_device_tree or allocated externally. When adding dynamic sysbus nodes after the first dtb load, we would like to reuse the fdt used during the first load instead of re-creating the whole device tree. If the fdt is

[Qemu-devel] [PATCH v8 05/19] hw/vfio/pci: add type, name and group fields in VFIODevice

2014-11-30 Thread Eric Auger
Add 3 new fields in the VFIODevice struct. Type is set to VFIO_DEVICE_TYPE_PCI. The type enum value will later be used to discriminate between VFIO PCI and platform devices. The name is set to domain:bus:slot:function. Currently used to test whether the device already is attached to the group.

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

2014-11-30 Thread Eric Auger
This prepares for the introduction of VFIOPlatformDevice Signed-off-by: Eric Auger eric.au...@linaro.org --- hw/vfio/pci.c | 210 +- 1 file changed, 106 insertions(+), 104 deletions(-) diff --git a/hw/vfio/pci.c b/hw/vfio/pci.c index

[Qemu-devel] [PATCH v8 01/19] vfio: move hw/misc/vfio.c to hw/vfio/pci.c Move vfio.h into include/hw/vfio

2014-11-30 Thread Eric Auger
From: Kim Phillips kim.phill...@linaro.org This is done in preparation for the addition of VFIO platform device support. Signed-off-by: Kim Phillips kim.phill...@linaro.org --- LICENSE | 2 +- MAINTAINERS | 2 +- hw/Makefile.objs | 1

[Qemu-devel] [PATCH v8 04/19] hw/vfio/pci: introduce minimalist VFIODevice with fd

2014-11-30 Thread Eric Auger
Introduce a new base VFIODevice strcut that will be used by both PCI and Platform VFIO device. Move VFIOPCIDevice fd field there. Obviously other fields from VFIOPCIDevice will be moved there but this patch file is introduced to ease the review. Also vfio_mask_single_irqindex,

[Qemu-devel] [PATCH v8 11/19] hw/vfio: create common module

2014-11-30 Thread Eric Auger
A new common module is created. It implements all functions that have no device specificity (PCI, Platform). This patch only consists in move (no functional changes) Signed-off-by: Kim Phillips kim.phill...@linaro.org Signed-off-by: Eric Auger eric.au...@linaro.org --- v7 - v8: - integrate Add

[Qemu-devel] [PATCH v8 03/19] hw/vfio/pci: generalize mask/unmask to any IRQ index

2014-11-30 Thread Eric Auger
To prepare for platform device introduction, rename vfio_mask_intx and vfio_unmask_intx into vfio_mask_single_irqindex and respectively unmask_single_irqindex. Also use a nex index parameter. With that name and prototype the function will be usable for other indexes than VFIO_PCI_INTX_IRQ_INDEX.

[Qemu-devel] [PATCH v8 06/19] hw/vfio/pci: handle reset at VFIODevice

2014-11-30 Thread Eric Auger
Since we can potentially have both PCI and platform devices in the same VFIO group, this latter now owns a list of VFIODevices. A unified reset handler, vfio_reset_handler, is registered, looping through this VFIODevice list. 2 specialized operations are introduced (vfio_compute_needs_reset and

[Qemu-devel] [PATCH v8 07/19] hw/vfio/pci: Introduce VFIORegion

2014-11-30 Thread Eric Auger
This structure is going to be shared by VFIOPCIDevice and VFIOPlatformDevice. VFIOBAR includes it. vfio_eoi becomes an ops of VFIODevice specialized by parent device. This makes possible to transform vfio_bar_write/read into generic vfio_region_write/read that will be used by VFIOPlatformDevice

[Qemu-devel] [PATCH v8 08/19] hw/vfio/pci: split vfio_get_device

2014-11-30 Thread Eric Auger
vfio_get_device now takes a VFIODevice as argument. The function is split into 2 parts: vfio_get_device which is generic and vfio_populate_device which is bus specific. 3 new fields are introduced in VFIODevice to store dev_info. vfio_put_base_device is created. --- v5-v6: - simplifies the

[Qemu-devel] [PATCH v8 16/19] hw/vfio/platform: Add irqfd support

2014-11-30 Thread Eric Auger
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 KVM irqfd framework, - the VFIO driver virqfd framework. the virtual IRQ completion is trapped at interrupt controller This removes the need

[Qemu-devel] [PATCH v8 09/19] hw/vfio/pci: rename group_list into vfio_group_list

2014-11-30 Thread Eric Auger
better fit in the rest of the namespace Signed-off-by: Eric Auger eric.au...@linaro.org --- hw/vfio/pci.c | 22 +++--- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/hw/vfio/pci.c b/hw/vfio/pci.c index 60ff22b..d4a0e0f 100644 --- a/hw/vfio/pci.c +++

[Qemu-devel] [PATCH v8 10/19] hw/vfio/pci: use name field in format strings

2014-11-30 Thread Eric Auger
Signed-off-by: Eric Auger eric.au...@linaro.org Conflicts: trace-events --- hw/vfio/pci.c | 213 -- trace-events | 109 -- 2 files changed, 116 insertions(+), 206 deletions(-) diff --git a/hw/vfio/pci.c

[Qemu-devel] [PATCH v8 12/19] hw/vfio/platform: add vfio-platform support

2014-11-30 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 kim.phill...@linaro.org Signed-off-by: Eric Auger eric.au...@linaro.org ---

[Qemu-devel] [PATCH v8 14/19] hw/arm/virt: add support for VFIO devices

2014-11-30 Thread Eric Auger
VFIO devices are dynamic sysbus devices. They could already be instantiated. However for them to be functional, IRQ injection must be programmed and started. This programming must happen after the sysbus devices are attached to the platform bus and IRQ are bound. Only at that time the GSI they are

[Qemu-devel] [PATCH v8 18/19] hw/vfio/common: vfio_kvm_device_fd moved in the common header

2014-11-30 Thread Eric Auger
the device is now used in platform for forwarded IRQ setup Signed-off-by: Eric Auger eric.au...@linaro.org --- hw/vfio/common.c | 3 ++- include/hw/vfio/vfio-common.h | 5 + 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/hw/vfio/common.c b/hw/vfio/common.c index

[Qemu-devel] [PATCH v8 17/19] linux-headers: Update KVM headers from linux-next tag ToBeFilled

2014-11-30 Thread Eric Auger
Syncup KVM related linux headers from linux-next tree using scripts/update-linux-headers.sh. Integrate updated KVM-VFIO API related to forwarded IRQ Signed-off-by: Eric Auger eric.au...@linaro.org --- linux-headers/linux/kvm.h | 10 ++ 1 file changed, 10 insertions(+) diff --git

[Qemu-devel] [PATCH v8 13/19] hw/vfio: calxeda xgmac device

2014-11-30 Thread Eric Auger
The platform device class has become abstract. This patch introduces a calxeda xgmac device that can be be instantiated on command line using such option. -device vfio-calxeda-xgmac,host=fff51000.ethernet Signed-off-by: Eric Auger eric.au...@linaro.org --- v7 - v8: - add a comment in the header

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

2014-11-30 Thread Eric Auger
vfio-calxeda-xgmac now can be instantiated using the -device option. The node creation function generates a very basic dt node composed of the compat, reg and interrupts properties Signed-off-by: Eric Auger eric.au...@linaro.org --- v7 - v8: - move the add_fdt_node_functions array declaration

[Qemu-devel] [PATCH v8 19/19] hw/vfio/platform: add forwarded irq support

2014-11-30 Thread Eric Auger
Tests whether the forwarded IRQ modality is available. In the positive device IRQs are forwarded. This control is achieved with KVM-VFIO device. with such a modality injection still is handled through irqfds. However end of interrupt is not trapped anymore. As soon as the guest completes its

[Qemu-devel] [PATCH v8 00/19] KVM platform device passthrough

2014-11-30 Thread Eric Auger
This RFC series aims at enabling KVM platform device passthrough. It implements a VFIO platform device, derived from VFIO PCI device. The VFIO platform device uses the host VFIO platform driver which must be bound to the assigned device prior to the QEMU system start. - the guest can directly

[Qemu-devel] dtb support on x86 machines

2014-11-30 Thread João Henrique Ferreira de Freitas
Hi, I would like to share my work-in-progress about device-tree on qemux x86 machine. The patch is not fully functional but works as a proof of concept. It is based on qemu stable-2.1 and when I solve my questions I will do using master branch. Besides that device-tree on x86 machines is

Re: [Qemu-devel] [PATCH] i6300esb: fix reading config registers and accept writes of all length

2014-11-30 Thread Richard W.M. Jones
On Wed, Oct 29, 2014 at 02:42:51PM +0100, Adam Hoka wrote: Don't require configuration register write to be off a certain length, as some PCI implementations always access them in 32bit only. This is because it's in fact the only kind of access supported by the standard, anything else is

Re: [Qemu-devel] How does qemu know the virtual memory of the guest os?

2014-11-30 Thread Richard W.M. Jones
On Fri, Nov 28, 2014 at 04:17:10PM -0800, Jidong Xiao wrote: Hi, I notice that Qemu supports dump virtual memory of Guest OS. As this page suggests: http://doc.opensuse.org/products/draft/SLES/SLES-kvm_sd_draft/cha.qemu.monitor.html To save the content of the virtual machine

Re: [Qemu-devel] Better Cortex-M support?

2014-11-30 Thread Alistair Francis
On Fri, Nov 14, 2014 at 5:32 PM, Liviu Ionescu i...@livius.net wrote: On 14 Nov 2014, at 03:01, Alistair Francis alistai...@gmail.com wrote: I haven't looked into CMSIS or using SysTick, so I can't confirm that they work. I don't have any experience with using either, so I can't really be of

Re: [Qemu-devel] [PATCH 3/7] test-coroutine: avoid overflow on 32-bit systems

2014-11-30 Thread Ming Lei
On Fri, Nov 28, 2014 at 10:12 PM, Paolo Bonzini pbonz...@redhat.com wrote: unsigned long is not large enough to represent 10 * duration there. Just use floating point. Signed-off-by: Paolo Bonzini pbonz...@redhat.com --- tests/test-coroutine.c | 2 +- 1 file changed, 1

Re: [Qemu-devel] [PATCH 04/12] spapr_pci: add set-indicator RTAS interface

2014-11-30 Thread Bharata B Rao
On Wed, Nov 26, 2014 at 11:57 AM, Michael Roth mdr...@linux.vnet.ibm.com wrote: https://github.com/mdroth/qemu/commits/spapr-pci-hotplug-ppc-next-cleanup4.2 The sPAPRDREntry stuff is now modeled by the sPAPRDRConnector QOM object in hw/ppc/spapr_drc.c, which manages the device's life-cycle

Re: [Qemu-devel] [PATCH] vhost: Fix vhostfd leak in error branch

2014-11-30 Thread Jason Wang
On Fri, Nov 28, 2014 at 5:26 PM, arei.gong...@huawei.com wrote: From: Gonglei arei.gong...@huawei.com Signed-off-by: Gonglei arei.gong...@huawei.com --- hw/scsi/vhost-scsi.c | 1 + hw/virtio/vhost.c| 2 ++ 2 files changed, 3 insertions(+) diff --git a/hw/scsi/vhost-scsi.c

Re: [Qemu-devel] [PATCH 0/7] coroutine: optimizations

2014-11-30 Thread Ming Lei
On Fri, Nov 28, 2014 at 10:12 PM, Paolo Bonzini pbonz...@redhat.com wrote: As discussed in the other thread, this brings speedups from dropping the coroutine mutex (which serializes multiple iothreads, too) and using ELF thread-local storage. The speedup in perf/cost is about 30% (190-145).

Re: [Qemu-devel] [PATCH] vhost: Fix vhostfd leak in error branch

2014-11-30 Thread Gonglei
On 2014/12/1 13:03, Jason Wang wrote: On Fri, Nov 28, 2014 at 5:26 PM, arei.gong...@huawei.com wrote: From: Gonglei arei.gong...@huawei.com Signed-off-by: Gonglei arei.gong...@huawei.com --- hw/scsi/vhost-scsi.c | 1 + hw/virtio/vhost.c| 2 ++ 2 files changed, 3 insertions(+)

Re: [Qemu-devel] [PATCH 0/7] coroutine: optimizations

2014-11-30 Thread Peter Lieven
On 01.12.2014 06:55, Ming Lei wrote: On Fri, Nov 28, 2014 at 10:12 PM, Paolo Bonzini pbonz...@redhat.com wrote: As discussed in the other thread, this brings speedups from dropping the coroutine mutex (which serializes multiple iothreads, too) and using ELF thread-local storage. The speedup in

[Qemu-devel] [Bug 1363641] Re: Build of v2.1.0 fails on armv7l due to undeclared __NR_select

2014-11-30 Thread Ben Gelb
Hi Eduardo - your above commit doesn't update the version in the error message (a few lines below, still says = 2.1.0). Sorry if this isn't the right place to comment on your patch, but it would be nice to fix (just spent a while trying to figure out why having 2.1.0 installed wasn't

Re: [Qemu-devel] [PATCH 0/7] coroutine: optimizations

2014-11-30 Thread Ming Lei
On Mon, 01 Dec 2014 08:05:17 +0100 Peter Lieven p...@kamp.de wrote: On 01.12.2014 06:55, Ming Lei wrote: On Fri, Nov 28, 2014 at 10:12 PM, Paolo Bonzini pbonz...@redhat.com wrote: As discussed in the other thread, this brings speedups from dropping the coroutine mutex (which serializes

Re: [Qemu-devel] [PATCH] vhost: Fix vhostfd leak in error branch

2014-11-30 Thread Jason Wang
On Mon, Dec 1, 2014 at 2:27 PM, Gonglei arei.gong...@huawei.com wrote: On 2014/12/1 13:03, Jason Wang wrote: On Fri, Nov 28, 2014 at 5:26 PM, arei.gong...@huawei.com wrote: From: Gonglei arei.gong...@huawei.com Signed-off-by: Gonglei arei.gong...@huawei.com ---