Re: [Qemu-devel] [PATCH v4 RESEND 0/3] IOMMU: intel_iommu support map and unmap notifications

2016-10-17 Thread David Gibson
On Mon, Oct 17, 2016 at 10:47:02PM -0600, Alex Williamson wrote: > On Tue, 18 Oct 2016 15:06:55 +1100 > David Gibson wrote: > > > On Mon, Oct 17, 2016 at 10:07:36AM -0600, Alex Williamson wrote: > > > On Mon, 17 Oct 2016 18:44:21 +0300 > > > "Aviv B.D" wrote: > > > > > > > From: "Aviv Ben-Dav

Re: [Qemu-devel] [RFC v5 0/8] KVM PCI/MSI passthrough with mach-virt

2016-10-17 Thread Fam Zheng
On Mon, 10/17 22:56, Auger Eric wrote: > Hi, > On 17/10/2016 22:16, no-re...@ec2-52-6-146-230.compute-1.amazonaws.com > wrote: > > Hi, > > > > Your series failed automatic build test. Please find the testing commands > > and > > their output below. If you have docker installed, you can probably

[Qemu-devel] [PATCH] docs/rcu.txt: Fix minor typo

2016-10-17 Thread Pranith Kumar
s/presented/prevented/ Signed-off-by: Pranith Kumar --- docs/rcu.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/rcu.txt b/docs/rcu.txt index a70b72c..c84e7f4 100644 --- a/docs/rcu.txt +++ b/docs/rcu.txt @@ -145,7 +145,7 @@ The core RCU API is small: and the

Re: [Qemu-devel] [PATCH v4 RESEND 0/3] IOMMU: intel_iommu support map and unmap notifications

2016-10-17 Thread Alex Williamson
On Tue, 18 Oct 2016 15:06:55 +1100 David Gibson wrote: > On Mon, Oct 17, 2016 at 10:07:36AM -0600, Alex Williamson wrote: > > On Mon, 17 Oct 2016 18:44:21 +0300 > > "Aviv B.D" wrote: > > > > > From: "Aviv Ben-David" > > > > > > * Advertize Cache Mode capability in iommu cap register. > > >

Re: [Qemu-devel] [PATCH v4 RESEND 2/3] IOMMU: change iommu_op->translate's is_write to flags, add support to NO_FAIL flag mode

2016-10-17 Thread David Gibson
On Mon, Oct 17, 2016 at 06:44:23PM +0300, Aviv B.D wrote: > From: "Aviv Ben-David" > > Supports translation trials without reporting error to guest on > translation failure. > > Signed-off-by: Aviv Ben-David > --- > exec.c| 3 ++- > hw/i386/amd_iommu.c | 4 +-- > hw/i386/in

Re: [Qemu-devel] [PATCH v4 RESEND 3/3] IOMMU: enable intel_iommu map and unmap notifiers

2016-10-17 Thread David Gibson
On Mon, Oct 17, 2016 at 06:44:24PM +0300, Aviv B.D wrote: > From: "Aviv Ben-David" > > Adds a list of registered vtd_as's to intel iommu state to save > iteration over each PCI device in a search of the corrosponding domain. > > Signed-off-by: Aviv Ben-David > --- > hw/i386/intel_iommu.c

Re: [Qemu-devel] [PATCH v4 RESEND 0/3] IOMMU: intel_iommu support map and unmap notifications

2016-10-17 Thread David Gibson
On Mon, Oct 17, 2016 at 10:07:36AM -0600, Alex Williamson wrote: > On Mon, 17 Oct 2016 18:44:21 +0300 > "Aviv B.D" wrote: > > > From: "Aviv Ben-David" > > > > * Advertize Cache Mode capability in iommu cap register. > > This capability is controlled by "cache-mode" property of intel-iommu >

Re: [Qemu-devel] [V2,1/7] nios2: Add disas entries

2016-10-17 Thread Marek Vasut
On 10/15/2016 03:15 PM, Romain Naour wrote: > Hi Marek, Hi! > Le 28/09/2016 à 01:30, Marek Vasut a écrit : >> Add nios2 disassembler support. This patch is composed from binutils files >> from commit "Opcodes and assembler support for Nios II R2". The files from >> binutils used in this patch are

Re: [Qemu-devel] [PATCH 2/7] nios2: Add architecture emulation support

2016-10-17 Thread Marek Vasut
On 09/29/2016 03:05 AM, Richard Henderson wrote: >> hw/nios2/cpu_pic.c | 70 +++ > > Why is this in this patch? Ah, good catch, moved to 10m50 support patch. >> target-nios2/instruction.c | 1427 >> >> target-nios2/instruction.h | 279

Re: [Qemu-devel] [PATCH v9 12/12] docs: Sample driver to demonstrate how to use Mediated device framework.

2016-10-17 Thread Dong Jia Shi
* Kirti Wankhede [2016-10-18 02:52:12 +0530]: ...snip... > +static ssize_t mdev_access(struct mdev_device *mdev, char *buf, > + size_t count, loff_t pos, bool is_write) > +{ > + struct mdev_state *mdev_state; > + unsigned int index; > + loff_t offset; > + int ret = 0;

Re: [Qemu-devel] [PATCH] vfio: fix duplicate function call

2016-10-17 Thread Cao jin
On 10/17/2016 11:01 PM, Alex Williamson wrote: On Mon, 17 Oct 2016 16:57:08 +0800 Cao jin wrote: Hi, On 10/14/2016 11:50 PM, Alex Williamson wrote: On Fri, 14 Oct 2016 19:16:59 +0800 Cao jin wrote: When vfio device is reset(encounter FLR, or bus reset), if need to do bus reset(vfio_pci_

Re: [Qemu-devel] [PATCH v8 09/11] virtio-crypto: add data queue processing handler

2016-10-17 Thread Gonglei (Arei)
> +static CryptoDevBackendSymOpInfo * > +virtio_crypto_sym_op_helper(VirtIODevice *vdev, > + struct virtio_crypto_cipher_para *cipher_para, > + struct virtio_crypto_alg_chain_data_para *alg_chain_para, > + struct iovec *iov, unsigned int out_num) > +{ > +CryptoDevB

Re: [Qemu-devel] [PATCH qemu] sysemu: support up to 1024 vCPUs

2016-10-17 Thread David Gibson
On Tue, Oct 18, 2016 at 12:07:20PM +1100, Alexey Kardashevskiy wrote: > Ping, anyone? > > I rather expected floods of mails on such a controversial topic :) I think it's the reverse of the bike-shed problem. Hardly anyone feels qualified to comment on it. It looks ok to me, but I just don't kno

Re: [Qemu-devel] [PATCH qemu] sysemu: support up to 1024 vCPUs

2016-10-17 Thread Alexey Kardashevskiy
Ping, anyone? I rather expected floods of mails on such a controversial topic :) On 11/10/16 09:19, Alexey Kardashevskiy wrote: > Ping, anyone? > > > On 04/10/16 11:33, Alexey Kardashevskiy wrote: >> From: Greg Kurz >> >> Some systems can already provide more than 255 hardware threads. >> >>

Re: [Qemu-devel] [Qemu-ppc] [PATCH v5 0/6] tests: enable virtio tests on SPAPR

2016-10-17 Thread David Gibson
On Mon, Oct 17, 2016 at 12:30:18PM +0200, Laurent Vivier wrote: > This series enables virtio tests on SPAPR by starting > machines using qtest_pc_boot() or qtest_spapr_boot() to > use the good libqos PCI framework (pc or spapr). > > It adds also some byte-swapping in virtio-pci.c as > PCI is alway

Re: [Qemu-devel] [PATCH] ppc/xics: Add xics to the monitor "info pic" command

2016-10-17 Thread David Gibson
On Mon, Oct 17, 2016 at 10:33:14PM +0200, Cédric Le Goater wrote: > From: Benjamin Herrenschmidt > > Useful to debug interrupt problems. > > Signed-off-by: Benjamin Herrenschmidt > [clg: - updated for qemu-2.7 > - added a test on ->irqs as it is not necessarily allocated > (PHB3_M

Re: [Qemu-devel] invtsc + migration + TSC scaling

2016-10-17 Thread Marcelo Tosatti
On Mon, Oct 17, 2016 at 07:11:01PM -0200, Eduardo Habkost wrote: > On Mon, Oct 17, 2016 at 06:24:38PM +0200, Paolo Bonzini wrote: > > On 17/10/2016 16:50, Radim Krčmář wrote: > > > 2016-10-17 07:47-0200, Marcelo Tosatti: > [...] > > >> since Linux guests use kvmclock and Windows guests use Hyper-V

Re: [Qemu-devel] [PATCH v3 0/3] Split cpu_exec_init() into an init and a realize part

2016-10-17 Thread David Gibson
On Mon, Oct 17, 2016 at 04:47:34PM -0200, Eduardo Habkost wrote: > On Mon, Oct 17, 2016 at 02:44:04PM +1100, David Gibson wrote: > > On Sat, Oct 15, 2016 at 12:52:46AM +0200, Laurent Vivier wrote: > > > Since commit 42ecaba ("target-i386: Call cpu_exec_init() on realize"), > > > , commit 6dd0f83 ("

[Qemu-devel] [PATCH v2] raw_bsd: add offset and size options

2016-10-17 Thread Tomáš Golembiovský
Added two new options 'offset' and 'size'. This makes it possible to use only part of the file as a device. This can be used e.g. to limit the access only to single partition in a disk image or use a disk inside a tar archive (like OVA). When 'size' is specified we do our best to honour it. Signe

[Qemu-devel] [PATCH v2] Add 'offset' and 'size' options

2016-10-17 Thread Tomáš Golembiovský
This is a follow-up to the patch: [PATCH] raw-posix: add 'offset' and 'size' options The main changes are: - options were moved from 'file' driver into 'raw' driver as suggested - added support for writing, reopen and truncate when possible If I forgot to address somebody's comments feel

Re: [Qemu-devel] [PATCH 0/6] qdev class properties + abstract class support on device-list-properties

2016-10-17 Thread Andreas Färber
Am 17.10.2016 um 23:04 schrieb Eduardo Habkost: > On Tue, Oct 11, 2016 at 05:41:13PM -0300, Eduardo Habkost wrote: >> Eduardo Habkost (6): >> qdev: qdev_class_set_props() function s/qdev_/device_/? Regards, Andreas >> qdev: Extract property-default code to qdev_property_set_to_default() >>

Re: [Qemu-devel] [PATCH 0/2] tests: A few check-qom-proplist fixes

2016-10-17 Thread Andreas Färber
Am 17.10.2016 um 23:02 schrieb Eduardo Habkost: > Ping? > > Markus, do you want to merge this through your tree? > > On Tue, Oct 11, 2016 at 09:37:45AM -0300, Eduardo Habkost wrote: >> A few fixes on check-qom-proplist that will ensure we test both >> class properties and object properties, and c

Re: [Qemu-devel] [PATCH v3 09/13] pc: kvm_apic: pass APIC ID depending on xAPIC/x2APIC mode

2016-10-17 Thread Eduardo Habkost
On Thu, Oct 13, 2016 at 11:52:43AM +0200, Igor Mammedov wrote: > Signed-off-by: Igor Mammedov > --- > v4: > - drop kvm_has_x2apic_api() and reuse kvm_enable_x2apic() instead > --- > hw/i386/kvm/apic.c | 12 ++-- > 1 file changed, 10 insertions(+), 2 deletions(-) > > diff --git a/hw/i386

Re: [Qemu-devel] [Qemu-stable] [Qemu-ppc] [PULL 0/4] ppc patches for qemu-2.7 stable branch

2016-10-17 Thread Peter Maydell
On 17 October 2016 at 22:24, Michael Roth wrote: > Quoting Peter Maydell (2016-10-17 13:45:21) >> On 17 October 2016 at 19:13, Michael Roth wrote: >> > We could do both though: use some ad-hoc way to tag for a particular >> > sub-maintainer tree/stable branch, as well as an explicit "not for >> >

Re: [Qemu-devel] [PATCH v3 05/13] pc: leave max apic_id_limit only in legacy cpu hotplug code

2016-10-17 Thread Eduardo Habkost
On Thu, Oct 13, 2016 at 11:52:39AM +0200, Igor Mammedov wrote: [...] > @@ -236,7 +237,11 @@ void build_legacy_cpu_hotplug_aml(Aml *ctx, MachineState > *machine, > /* The current AML generator can cover the APIC ID range [0..255], > * inclusive, for VCPU hotplug. */ > QEMU_BUILD_BUG

Re: [Qemu-devel] [PATCH v9 00/12] Add Mediated device support

2016-10-17 Thread Alex Williamson
On Tue, 18 Oct 2016 02:52:00 +0530 Kirti Wankhede wrote: > This series adds Mediated device support to Linux host kernel. Purpose > of this series is to provide a common interface for mediated device > management that can be used by different devices. This series introduces > Mdev core module tha

Re: [Qemu-devel] [PATCH 2/3] migrate: Share common MigrationParameters struct

2016-10-17 Thread Eric Blake
On 09/08/2016 10:14 PM, Eric Blake wrote: > It is rather verbose, and slightly error-prone, to repeat > the same set of parameters for input (migrate-set-parameters) > as for output (query-migrate-parameters), where the only > difference is whether the members are optional. We can just > document

[Qemu-devel] [PATCH] trivial: Restore blank line in qapi-schema

2016-10-17 Thread Eric Blake
Commit de63ab6 accidentally undid part of commit a43edcf, because the two patches were written in parallel, and the blank line was not noticed as a casualty of merge conflicts. Signed-off-by: Eric Blake --- qapi-schema.json | 1 + 1 file changed, 1 insertion(+) diff --git a/qapi-schema.json b/q

Re: [Qemu-devel] [Qemu-stable] [Qemu-ppc] [PULL 0/4] ppc patches for qemu-2.7 stable branch

2016-10-17 Thread Michael Roth
Quoting Peter Maydell (2016-10-17 13:45:21) > On 17 October 2016 at 19:13, Michael Roth wrote: > > We could do both though: use some ad-hoc way to tag for a particular > > sub-maintainer tree/stable branch, as well as an explicit "not for > > master" in the cover letter ensure it doesn't go into m

[Qemu-devel] [PATCH v9 12/12] docs: Sample driver to demonstrate how to use Mediated device framework.

2016-10-17 Thread Kirti Wankhede
The Sample driver creates mdev device that simulates serial port over PCI card. Signed-off-by: Kirti Wankhede Signed-off-by: Neo Jia Change-Id: I857f8f12f8b275f2498dfe8c628a5cdc7193b1b2 --- Documentation/vfio-mdev/Makefile | 13 + Documentation/vfio-mdev/mtty.c

[Qemu-devel] [PATCH v9 06/12] vfio_pci: Update vfio_pci to use vfio_info_add_capability()

2016-10-17 Thread Kirti Wankhede
Update msix_sparse_mmap_cap() to use vfio_info_add_capability() Update region type capability to use vfio_info_add_capability() Can't split this commit for MSIx and region_type cap since there is a common code which need to be updated for both the cases. Signed-off-by: Kirti Wankhede Signed-off-b

[Qemu-devel] [PATCH v9 07/12] vfio: Introduce vfio_set_irqs_validate_and_prepare()

2016-10-17 Thread Kirti Wankhede
Vendor driver using mediated device framework would use same mechnism to validate and prepare IRQs. Introducing this function to reduce code replication in multiple drivers. Signed-off-by: Kirti Wankhede Signed-off-by: Neo Jia Change-Id: Ie201f269dda0713ca18a07dc4852500bd8b48309 --- drivers/vfi

[Qemu-devel] [PATCH v9 11/12] docs: Add Documentation for Mediated devices

2016-10-17 Thread Kirti Wankhede
Add file Documentation/vfio-mediated-device.txt that include details of mediated device framework. Signed-off-by: Kirti Wankhede Signed-off-by: Neo Jia Change-Id: I137dd646442936090d92008b115908b7b2c7bc5d --- Documentation/vfio-mdev/vfio-mediated-device.txt | 289 +++ 1 file

[Qemu-devel] [PATCH v9 08/12] vfio_pci: Updated to use vfio_set_irqs_validate_and_prepare()

2016-10-17 Thread Kirti Wankhede
Updated vfio_pci.c file to use vfio_set_irqs_validate_and_prepare() Signed-off-by: Kirti Wankhede Signed-off-by: Neo Jia Change-Id: I9f3daba89d8dba5cb5b01a8cff420412f30686c7 --- drivers/vfio/pci/vfio_pci.c | 29 + 1 file changed, 9 insertions(+), 20 deletions(-) dif

[Qemu-devel] [PATCH v9 09/12] vfio_platform: Updated to use vfio_set_irqs_validate_and_prepare()

2016-10-17 Thread Kirti Wankhede
Updated vfio_platform_common.c file to use vfio_set_irqs_validate_and_prepare() Signed-off-by: Kirti Wankhede Signed-off-by: Neo Jia Change-Id: Id87cd6b78ae901610b39bf957974baa6f40cd7b0 --- drivers/vfio/platform/vfio_platform_common.c | 31 +++- 1 file changed, 8 inserti

[Qemu-devel] [PATCH v9 05/12] vfio: Introduce common function to add capabilities

2016-10-17 Thread Kirti Wankhede
Vendor driver using mediated device framework should use vfio_info_add_capability() to add capabilities. Introduced this function to reduce code duplication in vendor drivers. Signed-off-by: Kirti Wankhede Signed-off-by: Neo Jia Change-Id: I6fca329fa2291f37a2c859d0bc97574d9e2ce1a6 --- drivers/v

[Qemu-devel] [PATCH v9 10/12] vfio: Add function to get device_api string from vfio_device_info.flags

2016-10-17 Thread Kirti Wankhede
Function vfio_device_api_string() returns string based on flag set in vfio_device_info's flag. This should be used by vendor driver to get string based on flag for device_api attribute. Signed-off-by: Kirti Wankhede Signed-off-by: Neo Jia Change-Id: I42d29f475f02a7132ce13297fbf2b48f1da10995 ---

[Qemu-devel] [PATCH v9 01/12] vfio: Mediated device Core driver

2016-10-17 Thread Kirti Wankhede
Design for Mediated Device Driver: Main purpose of this driver is to provide a common interface for mediated device management that can be used by different drivers of different devices. This module provides a generic interface to create the device, add it to mediated bus, add device to IOMMU grou

[Qemu-devel] [PATCH v9 04/12] vfio iommu: Add support for mediated devices

2016-10-17 Thread Kirti Wankhede
VFIO IOMMU drivers are designed for the devices which are IOMMU capable. Mediated device only uses IOMMU APIs, the underlying hardware can be managed by an IOMMU domain. Aim of this change is: - To use most of the code of TYPE1 IOMMU driver for mediated devices - To support direct assigned device

[Qemu-devel] [PATCH v9 03/12] vfio: Rearrange functions to get vfio_group from dev

2016-10-17 Thread Kirti Wankhede
Rearrange functions to have common function to increment container_users. Signed-off-by: Kirti Wankhede Signed-off-by: Neo Jia Change-Id: I1f93262bdbab75094bc24b087b29da35ba70c4c6 --- drivers/vfio/vfio.c | 57 ++--- 1 file changed, 37 insertions(+

[Qemu-devel] [PATCH v9 00/12] Add Mediated device support

2016-10-17 Thread Kirti Wankhede
This series adds Mediated device support to Linux host kernel. Purpose of this series is to provide a common interface for mediated device management that can be used by different devices. This series introduces Mdev core module that creates and manages mediated devices, VFIO based driver for media

[Qemu-devel] [PATCH v9 02/12] vfio: VFIO based driver for Mediated devices

2016-10-17 Thread Kirti Wankhede
vfio_mdev driver registers with mdev core driver. MDEV core driver creates mediated device and calls probe routine of vfio_mdev driver for each device. Probe routine of vfio_mdev driver adds mediated device to VFIO core module This driver forms a shim layer that pass through VFIO devices operation

Re: [Qemu-devel] invtsc + migration + TSC scaling

2016-10-17 Thread Eduardo Habkost
On Mon, Oct 17, 2016 at 06:24:38PM +0200, Paolo Bonzini wrote: > On 17/10/2016 16:50, Radim Krčmář wrote: > > 2016-10-17 07:47-0200, Marcelo Tosatti: [...] > >> since Linux guests use kvmclock and Windows guests use Hyper-V > >> enlightenment, it should be fine to disable 2). > > ... and 1 too. >

Re: [Qemu-devel] [PATCH 0/6] qdev class properties + abstract class support on device-list-properties

2016-10-17 Thread Eduardo Habkost
Ping? On Tue, Oct 11, 2016 at 05:41:13PM -0300, Eduardo Habkost wrote: > This series allows abstract classes to be used on > device-list-properties, which will return all class properties > registered for the class. > > Patches 1-3 change qdev to register all static properties as > class properti

Re: [Qemu-devel] qemu master tests/vmstate prints "Failed to load simple/primitive:b_1" etc

2016-10-17 Thread Paolo Bonzini
On 17/10/2016 21:15, Dr. David Alan Gilbert wrote: > * Peter Maydell (peter.mayd...@linaro.org) wrote: >> On 17 October 2016 at 19:51, Dr. David Alan Gilbert >> wrote: >>> * Peter Maydell (peter.mayd...@linaro.org) wrote: I've just noticed that qemu master running 'make check' prints

Re: [Qemu-devel] [PATCH] nvic: allow to set pending status for not active interrupts

2016-10-17 Thread Krzeminski, Marcin (Nokia - PL/Wroclaw)
Hi Peter > -Original Message- > From: Peter Maydell [mailto:peter.mayd...@linaro.org] > Sent: Thursday, October 13, 2016 6:59 PM > To: Krzeminski, Marcin (Nokia - PL/Wroclaw) > > Cc: QEMU Developers ; qemu-arm a...@nongnu.org>; rfsw-patc...@mlist.nokia.com > Subject: Re: [PATCH] nvic: al

Re: [Qemu-devel] [PATCH 0/2] tests: A few check-qom-proplist fixes

2016-10-17 Thread Eduardo Habkost
Ping? Markus, do you want to merge this through your tree? On Tue, Oct 11, 2016 at 09:37:45AM -0300, Eduardo Habkost wrote: > A few fixes on check-qom-proplist that will ensure we test both > class properties and object properties, and catch errors when > registering properties in test code. > >

Re: [Qemu-devel] [RFC v5 0/8] KVM PCI/MSI passthrough with mach-virt

2016-10-17 Thread Auger Eric
Hi, On 17/10/2016 22:16, no-re...@ec2-52-6-146-230.compute-1.amazonaws.com wrote: > Hi, > > Your series failed automatic build test. Please find the testing commands and > their output below. If you have docker installed, you can probably reproduce > it > locally. > > Subject: [Qemu-devel] [RFC

[Qemu-devel] [PATCH] ppc/xics: Add xics to the monitor "info pic" command

2016-10-17 Thread Cédric Le Goater
From: Benjamin Herrenschmidt Useful to debug interrupt problems. Signed-off-by: Benjamin Herrenschmidt [clg: - updated for qemu-2.7 - added a test on ->irqs as it is not necessarily allocated (PHB3_MSI) - removed static variable g_xics and replace with a loop on all

Re: [Qemu-devel] [RFC v5 0/8] KVM PCI/MSI passthrough with mach-virt

2016-10-17 Thread no-reply
Hi, Your series failed automatic build test. Please find the testing commands and their output below. If you have docker installed, you can probably reproduce it locally. Subject: [Qemu-devel] [RFC v5 0/8] KVM PCI/MSI passthrough with mach-virt Type: series Message-id: 1476733110-14293-1-git-send

[Qemu-devel] [PULL 19/19] vfio: fix duplicate function call

2016-10-17 Thread Alex Williamson
From: Cao jin When vfio device is reset(encounter FLR, or bus reset), if need to do bus reset(vfio_pci_hot_reset_one is called), vfio_pci_pre_reset & vfio_pci_post_reset will be called twice. Signed-off-by: Cao jin Signed-off-by: Alex Williamson --- hw/vfio/pci.c |8 ++-- 1 file chang

Re: [Qemu-devel] [kvm-unit-tests PATCH v3 10/10] arm/arm64: gic: don't just use zero

2016-10-17 Thread Andrew Jones
On Fri, Sep 02, 2016 at 11:43:33AM +0200, Auger Eric wrote: > Hi Drew, > > On 15/07/2016 15:00, Andrew Jones wrote: > > Allow user to select who sends ipis and with which irq, > > rather than just always sending irq=0 from cpu0. > > > > Signed-off-by: Andrew Jones > > > > --- > > v2: actually c

[Qemu-devel] [PULL 18/19] vfio/pci: Fix vfio_rtl8168_quirk_data_read address offset

2016-10-17 Thread Alex Williamson
From: Thorsten Kohfeldt Introductory comment for rtl8168 VFIO MSI-X quirk states: At BAR2 offset 0x70 there is a dword data register, offset 0x74 is a dword address register. vfio: vfio_bar_read(:05:00.0:BAR2+0x70, 4) = 0xfee00398 // read data Thus, correct offset for data read is 0

[Qemu-devel] [PULL 12/19] vfio/platform: fix a wrong returned value in vfio_populate_device

2016-10-17 Thread Alex Williamson
From: Eric Auger In case the vfio_init_intp fails we currently do not return an error value. This patch fixes the bug. The returned value is not explicit but in practice the error object is the one used to report the error to the end-user and the actual returned error value is not used. Signed-o

[Qemu-devel] [PULL 13/19] vfio/platform: Pass an error object to vfio_base_device_init

2016-10-17 Thread Alex Williamson
From: Eric Auger This patch propagates errors encountered during vfio_base_device_init up to the realize function. In case the host value is not set or badly formed we now report an error. Signed-off-by: Eric Auger Reviewed-by: Markus Armbruster Signed-off-by: Alex Williamson --- hw/vfio/pl

[Qemu-devel] [PULL 17/19] vfio/pci: Handle host oversight

2016-10-17 Thread Alex Williamson
From: Eric Auger In case the end-user calls qemu with -vfio-pci option without passing either sysfsdev or host property value, the device is interpreted as :00:00.0. Let's create a specific error message to guide the end-user. Signed-off-by: Eric Auger Reviewed-by: Markus Armbruster Signed

[Qemu-devel] [PULL 11/19] vfio/platform: Pass an error object to vfio_populate_device

2016-10-17 Thread Alex Williamson
From: Eric Auger Propagate the vfio_populate_device errors up to vfio_base_device_init. The error object also is passed to vfio_init_intp. At the moment we only report the error. Subsequent patches will propagate the error up to the realize function. Signed-off-by: Eric Auger Reviewed-by: Marku

[Qemu-devel] [PULL 14/19] vfio/pci: Conversion to realize

2016-10-17 Thread Alex Williamson
From: Eric Auger This patch converts VFIO PCI to realize function. Also original initfn errors now are propagated using QEMU error objects. All errors are formatted with the same pattern: "vfio: %s: the error description" Signed-off-by: Eric Auger Reviewed-by: Markus Armbruster Signed-off-by:

[Qemu-devel] [PULL 10/19] vfio: Pass an error object to vfio_get_device

2016-10-17 Thread Alex Williamson
From: Eric Auger Pass an error object to prepare for migration to VFIO-PCI realize. In vfio platform vfio_base_device_init we currently just report the error. Subsequent patches will propagate the error up to the realize function. Signed-off-by: Eric Auger Reviewed-by: Markus Armbruster Signe

[Qemu-devel] [PULL 09/19] vfio: Pass an error object to vfio_get_group

2016-10-17 Thread Alex Williamson
From: Eric Auger Pass an error object to prepare for migration to VFIO-PCI realize. For the time being let's just simply report the error in vfio platform's vfio_base_device_init(). A subsequent patch will duly propagate the error up to vfio_platform_realize. Signed-off-by: Eric Auger Reviewed

Re: [Qemu-devel] [PATCH V1 03/10] qemu-clk: allow to bind two clocks together

2016-10-17 Thread KONRAD Frederic
Le 17/10/2016 à 20:19, Peter Maydell a écrit : On 5 October 2016 at 23:10, wrote: From: KONRAD Frederic This introduces the clock binding and the update part. When the qemu_clk_rate_update(qemu_clk, int) function is called: * The clock callback is called on the qemu_clk so it can change

[Qemu-devel] [PULL 07/19] vfio/pci: Pass an error object to vfio_pci_igd_opregion_init

2016-10-17 Thread Alex Williamson
From: Eric Auger Pass an error object to prepare for migration to VFIO-PCI realize. In vfio_probe_igd_bar4_quirk, simply report the error. Signed-off-by: Eric Auger Reviewed-by: Markus Armbruster Signed-off-by: Alex Williamson --- hw/vfio/pci-quirks.c | 10 +- hw/vfio/pci.c

[Qemu-devel] [PULL 08/19] vfio: Pass an Error object to vfio_connect_container

2016-10-17 Thread Alex Williamson
From: Eric Auger The error is currently simply reported in vfio_get_group. Don't bother too much with the prefix which will be handled at upper level, later on. Also return an error value in case container->error is not 0 and the container is teared down. On vfio_spapr_remove_window failure, we

[Qemu-devel] [PULL 01/19] vfio/pci: Use local error object in vfio_initfn

2016-10-17 Thread Alex Williamson
From: Eric Auger To prepare for migration to realize, let's use a local error object in vfio_initfn. Also let's use the same error prefix for all error messages. On top of the 1-1 conversion, we start using a common error prefix for all error messages. We also introduce a similar warning prefix

[Qemu-devel] [PULL 04/19] vfio/pci: Pass an error object to vfio_msix_early_setup

2016-10-17 Thread Alex Williamson
From: Eric Auger Pass an error object to prepare for migration to VFIO-PCI realize. The returned value will be removed later on. We now format an error in case of reading failure for - the MSIX flags - the MSIX table, - the MSIX PBA. Signed-off-by: Eric Auger Reviewed-by: Markus Armbruster Si

[Qemu-devel] [PULL 02/19] vfio/pci: Pass an error object to vfio_populate_vga

2016-10-17 Thread Alex Williamson
From: Eric Auger Pass an error object to prepare for the same operation in vfio_populate_device. Eventually this contributes to the migration to VFIO-PCI realize. We now report an error on vfio_get_region_info failure. vfio_probe_igd_bar4_quirk is not involved in the migration to realize and si

[Qemu-devel] [PULL 16/19] vfio/pci: Remove vfio_populate_device returned value

2016-10-17 Thread Alex Williamson
From: Eric Auger The returned value (either -errno or -1) is not used anymore by the caller, vfio_realize, since the error now is stored in the error object. So let's remove it. Signed-off-by: Eric Auger Reviewed-by: Markus Armbruster Signed-off-by: Alex Williamson --- hw/vfio/pci.c | 23 +

[Qemu-devel] [RFC v5 6/8] hw: platform-bus: Add platform bus stub

2016-10-17 Thread Eric Auger
platform_bus_map_region is bound to be called in VFIO common code. Let's compile this stub in case CONFIG_SOFTMMU is set (VFIO requirement) and CONFIG_PLATFORM_BUS is not set. Signed-off-by: Eric Auger --- hw/core/Makefile.objs | 2 +- hw/core/platform-bus-stub.c | 27 +++

[Qemu-devel] [PULL 03/19] vfio/pci: Pass an error object to vfio_populate_device

2016-10-17 Thread Alex Williamson
From: Eric Auger Pass an error object to prepare for migration to VFIO-PCI realize. The returned value will be removed later on. The case where error recovery cannot be enabled is not converted into an error object but directly reported through error_report, as before. Populating an error instea

[Qemu-devel] [PATCH v7] timer: a9gtimer: remove loop to auto-increment comparator

2016-10-17 Thread P J P
From: Prasad J Pandit ARM A9MP processor has a peripheral timer with an auto-increment register, which holds an increment step value. A user could set this value to zero. When auto-increment control bit is enabled, it leads to an infinite loop in 'a9_gtimer_update' while updating comparator value

[Qemu-devel] [RFC v5 5/8] hw: platform-bus: Enable to map any memory region onto the platform-bus

2016-10-17 Thread Eric Auger
The platform bus is currently used to map dynamically instantiable platform device MMIO regions. The platform bus also can be seen as a pool of free guest physical addresses. We would like to use that pool to allocate a contiguous reserved IOVA region usable for MSI message address IOMMU mapping.

[Qemu-devel] [PULL 15/19] vfio/pci: Remove vfio_msix_early_setup returned value

2016-10-17 Thread Alex Williamson
From: Eric Auger The returned value is not used anymore by the caller, vfio_realize, since the error now is stored in the error object. So let's remove it. Signed-off-by: Eric Auger Reviewed-by: Markus Armbruster Signed-off-by: Alex Williamson --- hw/vfio/pci.c | 20 ++-- 1

[Qemu-devel] [PULL 00/19] VFIO updates 2016-10-17

2016-10-17 Thread Alex Williamson
The following changes since commit 0975b8b823a888d474fa33821dfe84e6904db197: Merge remote-tracking branch 'remotes/gkurz/tags/for-upstream' into staging (2016-10-17 16:17:51 +0100) are available in the git repository at: git://github.com/awilliam/qemu-vfio.git tags/vfio-updates-20161017.0

[Qemu-devel] [RFC v5 8/8] hw: vfio: common: Adapt vfio_listeners for reserved_iova region

2016-10-17 Thread Eric Auger
In case of reserved iova region, let's declare this region to the kernel so that it can use it for IOVA/HPA bindings. This is achieved through the new vfio_register_msi_iova helper. Signed-off-by: Eric Auger --- v4 -> v5: - squashed "hw: vfio: common: Introduce vfio_register_msi_iova" into t

[Qemu-devel] [RFC v5 0/8] KVM PCI/MSI passthrough with mach-virt

2016-10-17 Thread Eric Auger
On ARM, MSI transactions emitted by passthrough'ed devices are translated by the IOMMU. So the host must allocate IOVAs and map them to the host MSI frame physical addresses. Those IOVAs must be allocated within safe GPA slots, unused by the guest. The QEMU VFIO device retrieves the size if the I

[Qemu-devel] [PULL 06/19] vfio/pci: Pass an error object to vfio_add_capabilities

2016-10-17 Thread Alex Williamson
From: Eric Auger Pass an error object to prepare for migration to VFIO-PCI realize. The error is cascaded downto vfio_add_std_cap and then vfio_msi(x)_setup, vfio_setup_pcie_cap. vfio_add_ext_cap does not return anything else than 0 so let's transform it into a void function. Also use pci_add_c

[Qemu-devel] [RFC v5 2/8] hw: vfio: common: vfio_get_iommu_type1_info

2016-10-17 Thread Eric Auger
Introduce vfio_get_iommu_type1_info helper that allows to handle variable size vfio_iommu_type1_info allocation with capability chain support. Besides, fixes a checkpatch warning on vfio_host_win_add's call. Signed-off-by: Eric Auger --- hw/vfio/common.c | 33 +++--

[Qemu-devel] [RFC v5 3/8] memory: Add reserved_iova region type

2016-10-17 Thread Eric Auger
Introduce a new reserved_iova region type. This type of iova region is bound to be used by the kernel to map some host physical addresses (typically MSI frames). A new initializer, memory_region_init_reserved_iova is introduced, as well as a test function, memory_region_is_reserved_iova. Signed-o

[Qemu-devel] [RFC v5 7/8] hw: vfio: common: vfio_prepare_msi_mapping

2016-10-17 Thread Eric Auger
Introduce an helper function to retrieve the iommu type1 capability chain info. The first capability ready to be exploited is the msi resv capability. vfio_prepare_msi_mapping allocates a MemoryRegion dedicated to host MSI IOVA mapping. Its size matches the host needs. This region is mapped on gue

[Qemu-devel] [PATCH v7] timer: a9gtimer: remove loop to auto-increment comparator

2016-10-17 Thread P J P
=== From 632498fa33248bb990b08f246c98f3f318aa631c Mon Sep 17 00:00:00 2001 From: Prasad J Pandit Date: Mon, 17 Oct 2016 23:56:01 +0530 Subject: [PATCH v7] timer: a9gtimer: remove loop to auto-increment comparator ARM A9MP processor has a peripheral timer with an auto-increment register, which

[Qemu-devel] [PULL 05/19] vfio/pci: Pass an error object to vfio_intx_enable

2016-10-17 Thread Alex Williamson
From: Eric Auger Pass an error object to prepare for migration to VFIO-PCI realize. The error object is propagated down to vfio_intx_enable_kvm(). The three other callers, vfio_intx_enable_kvm(), vfio_msi_disable_common() and vfio_pci_post_reset() do not propagate the error and simply call erro

Re: [Qemu-devel] [very-WIP 1/7] migration: Add VMSTATE_WITH_TMP

2016-10-17 Thread Jianjun Duan
On 10/17/2016 12:16 PM, Dr. David Alan Gilbert wrote: > * Jianjun Duan (du...@linux.vnet.ibm.com) wrote: >> >> >> On 10/17/2016 11:52 AM, Dr. David Alan Gilbert wrote: >>> * Jianjun Duan (du...@linux.vnet.ibm.com) wrote: On 10/16/2016 08:31 PM, David Gibson wrote: > On Tue, Oct

[Qemu-devel] [RFC v5 4/8] memory: memory_region_find_by_name

2016-10-17 Thread Eric Auger
This new helper makes possible to search for a MemoryRegion matching a given name within a root MemoryRegion. Signed-off-by: Eric Auger --- include/exec/memory.h | 11 +++ memory.c | 16 2 files changed, 27 insertions(+) diff --git a/include/exec/memory.h b

Re: [Qemu-devel] [very-WIP 1/7] migration: Add VMSTATE_WITH_TMP

2016-10-17 Thread Dr. David Alan Gilbert
* Jianjun Duan (du...@linux.vnet.ibm.com) wrote: > > > On 10/17/2016 11:52 AM, Dr. David Alan Gilbert wrote: > > * Jianjun Duan (du...@linux.vnet.ibm.com) wrote: > >> > >> > >> On 10/16/2016 08:31 PM, David Gibson wrote: > >>> On Tue, Oct 11, 2016 at 06:18:30PM +0100, Dr. David Alan Gilbert (git)

Re: [Qemu-devel] [Qemu-block] block/nfs: Fine grained runtime options in nfs

2016-10-17 Thread Eric Blake
On 10/17/2016 01:00 PM, Ashijeet Acharya wrote: > One more relatively easy question though, will we include @port as an > option in runtime_opts while converting NFS to use several > runtime_opts? The reason I ask this because the uri syntax for NFS in > QEMU looks like this: > >nfs:[

Re: [Qemu-devel] [very-WIP 1/7] migration: Add VMSTATE_WITH_TMP

2016-10-17 Thread Dr. David Alan Gilbert
* Jianjun Duan (du...@linux.vnet.ibm.com) wrote: > > > On 10/16/2016 08:31 PM, David Gibson wrote: > > On Tue, Oct 11, 2016 at 06:18:30PM +0100, Dr. David Alan Gilbert (git) > > wrote: > >> From: "Dr. David Alan Gilbert" > >> > >> VMSTATE_WITH_TMP is for handling structures where some calculati

Re: [Qemu-devel] [PATCH v3 2/3] exec: rename cpu_exec_init() as cpu_exec_realizefn()

2016-10-17 Thread Eduardo Habkost
On Sat, Oct 15, 2016 at 12:52:48AM +0200, Laurent Vivier wrote: > Modify all CPUs to call it from XXX_cpu_realizefn() function. > > Remove all the cannot_destroy_with_object_finalize_yet as > unsafe references have been moved to cpu_exec_realizefn(). > (tested with QOM command provided by commit 4

Re: [Qemu-devel] qemu master tests/vmstate prints "Failed to load simple/primitive:b_1" etc

2016-10-17 Thread Dr. David Alan Gilbert
* Peter Maydell (peter.mayd...@linaro.org) wrote: > On 17 October 2016 at 19:51, Dr. David Alan Gilbert > wrote: > > * Peter Maydell (peter.mayd...@linaro.org) wrote: > >> I've just noticed that qemu master running 'make check' prints > >> GTESTER tests/test-vmstate > >> Failed to load simple/p

[Qemu-devel] [RFC v5 1/8] linux-headers: Partial update for MSI IOVA handling

2016-10-17 Thread Eric Auger
This is a partial update aiming at enhancing the VFIO user API with IOMMU info capability chain, msi_resv reporting and MSI IOVA window registration. The kernel code is not yet upstreamed. It is available at https://github.com/eauger/linux/tree/generic-v7-passthrough-v14 [PATCH v14 00/16] KVM PCIe

Re: [Qemu-devel] [PATCH v3 0/5] Allow blockdev-add for SSH

2016-10-17 Thread no-reply
Hi, Your series failed automatic build test. Please find the testing commands and their output below. If you have docker installed, you can probably reproduce it locally. Type: series Message-id: 1476725535-3350-1-git-send-email-ashijeetacha...@gmail.com Subject: [Qemu-devel] [PATCH v3 0/5] Allow

Re: [Qemu-devel] [kvm-unit-tests PATCH v3 08/10] arm/arm64: gicv2: add an IPI test

2016-10-17 Thread Andrew Jones
On Thu, Sep 01, 2016 at 06:42:50PM +0200, Auger Eric wrote: > Hi Drew, > > On 15/07/2016 15:00, Andrew Jones wrote: > > Signed-off-by: Andrew Jones > > --- > > v2: add more details in the output if a test fails, > > report spurious interrupts if we get them > > --- > > arm/Makefile.common |

Re: [Qemu-devel] [very-WIP 3/4] slirp: VMStatify sbuf

2016-10-17 Thread Dr. David Alan Gilbert
* Halil Pasic (pa...@linux.vnet.ibm.com) wrote: > > > On 10/17/2016 05:36 AM, David Gibson wrote: > > On Tue, Oct 11, 2016 at 06:18:32PM +0100, Dr. David Alan Gilbert (git) > > wrote: > >> From: "Dr. David Alan Gilbert" > >> > >> Convert the sbuf structure to a VMStateDescription. > >> Note thi

Re: [Qemu-devel] [Qemu-block] block/nfs: Fine grained runtime options in nfs

2016-10-17 Thread Ashijeet Acharya
On Tue, Oct 18, 2016 at 12:59 AM, Eric Blake wrote: > On 10/17/2016 01:00 PM, Ashijeet Acharya wrote: > >> One more relatively easy question though, will we include @port as an >> option in runtime_opts while converting NFS to use several >> runtime_opts? The reason I ask this because the uri synt

Re: [Qemu-devel] [very-WIP 1/7] migration: Add VMSTATE_WITH_TMP

2016-10-17 Thread Jianjun Duan
On 10/17/2016 11:52 AM, Dr. David Alan Gilbert wrote: > * Jianjun Duan (du...@linux.vnet.ibm.com) wrote: >> >> >> On 10/16/2016 08:31 PM, David Gibson wrote: >>> On Tue, Oct 11, 2016 at 06:18:30PM +0100, Dr. David Alan Gilbert (git) >>> wrote: From: "Dr. David Alan Gilbert" VMSTA

Re: [Qemu-devel] [very-WIP 1/7] migration: Add VMSTATE_WITH_TMP

2016-10-17 Thread Jianjun Duan
On 10/16/2016 08:31 PM, David Gibson wrote: > On Tue, Oct 11, 2016 at 06:18:30PM +0100, Dr. David Alan Gilbert (git) wrote: >> From: "Dr. David Alan Gilbert" >> >> VMSTATE_WITH_TMP is for handling structures where some calculation >> or rearrangement of the data needs to be performed before the

Re: [Qemu-devel] [PATCH v10 00/10] Dirty bitmap changes for migration/persistence work

2016-10-17 Thread Max Reitz
On 13.10.2016 23:58, John Snow wrote: > Key: > [] : patches are identical > [] : number of functional differences between upstream/downstream patch > [down] : patch is downstream-only > The flags [FC] indicate (F)unctional and (C)ontextual differences, > respectively > > 001/10:[] [--

Re: [Qemu-devel] [PATCH v3 1/3] exec: split cpu_exec_init()

2016-10-17 Thread Eduardo Habkost
On Sat, Oct 15, 2016 at 12:52:47AM +0200, Laurent Vivier wrote: > Put in cpu_exec_initfn() what initializes the CPU, > and let in cpu_exec_init() what adds it to the environment. > > As cpu_exec_initfn() is called by all XX_cpu_initfn() call it > directly in cpu_common_initfn(). > cpu_exec_init()

Re: [Qemu-devel] qemu master tests/vmstate prints "Failed to load simple/primitive:b_1" etc

2016-10-17 Thread Dr. David Alan Gilbert
* Peter Maydell (peter.mayd...@linaro.org) wrote: > I've just noticed that qemu master running 'make check' prints > GTESTER tests/test-vmstate > Failed to load simple/primitive:b_1 > Failed to load simple/primitive:i64_2 > Failed to load simple/primitive:i32_1 > Failed to load simple/primitive:i

[Qemu-devel] [PULL 23/25] target-arm: Add trace events for the generic timers

2016-10-17 Thread Peter Maydell
Add some useful trace events for the ARM generic timers (notably the various register writes and the resulting IRQ line state). Signed-off-by: Peter Maydell Reviewed-by: Edgar E. Iglesias Message-id: 1476294876-12340-3-git-send-email-peter.mayd...@linaro.org --- Makefile.objs | 1 +

[Qemu-devel] [PULL 18/25] target-arm: Infrastucture changes to enable handling of tagged address loading into PC

2016-10-17 Thread Peter Maydell
From: Thomas Hanson When capturing the current CPU state for the TB, extract the TBI0 and TBI1 values from the correct TCR for the current EL and then add them to the TB flags field. Then, at the start of code generation for the block, copy the TBI fields into the DisasContext structure. Signed

  1   2   3   4   >