[Qemu-devel] [PATCH v6 1/2] PCI: add missing classes in pci_ids.h to build device tree

2017-02-17 Thread Laurent Vivier
To allow QEMU to add PCI entries in device tree, we must have a more exhaustive list of PCI class IDs. This patch synchronizes as much as possible with pci_ids.h and add some missing IDs from SLOF. Signed-off-by: Laurent Vivier Reviewed-by: Michael S. Tsirkin Reviewed-by: Thomas Huth --- incl

Re: [Qemu-devel] [PATCH 15/17] iotests: add default node-name

2017-02-17 Thread Vladimir Sementsov-Ogievskiy
17.02.2017 15:21, Fam Zheng wrote: On Fri, 02/17 13:20, Vladimir Sementsov-Ogievskiy wrote: 16.02.2017 16:48, Fam Zheng wrote: On Mon, 02/13 12:54, Vladimir Sementsov-Ogievskiy wrote: When testing migration, auto-generated by qemu node-names differs in source and destination qemu and migration

[Qemu-devel] [PATCH v6 2/2] spapr: generate DT node names

2017-02-17 Thread Laurent Vivier
When DT node names for PCI devices are generated by SLOF, they are generated according to the type of the device (for instance, ethernet for virtio-net-pci device). Node name for hotplugged devices is generated by QEMU. This patch adds the mechanic to QEMU to create the node name according to the

Re: [Qemu-devel] [PATCH v8 4/5] target-arm: Add GICv3CPUState in CPUARMState struct

2017-02-17 Thread Peter Maydell
On 17 February 2017 at 06:31, wrote: > From: Vijaya Kumar K > > Add gicv3state void pointer to CPUARMState struct > to store GICv3CPUState. > > In case of usecase like CPU reset, we need to reset > GICv3CPUState of the CPU. In such scenario, this pointer > becomes handy. > > This patch take care

Re: [Qemu-devel] [PATCH v15 08/25] block: introduce auto-loading bitmaps

2017-02-17 Thread Kevin Wolf
Am 17.02.2017 um 14:22 hat Denis V. Lunev geschrieben: > On 02/17/2017 03:48 PM, Kevin Wolf wrote: > > Am 17.02.2017 um 13:40 hat Vladimir Sementsov-Ogievskiy geschrieben: > >> 17.02.2017 15:09, Kevin Wolf wrote: > >>> Am 17.02.2017 um 12:46 hat Vladimir Sementsov-Ogievskiy geschrieben: > 16.0

Re: [Qemu-devel] [PATCH v8 4/8] ACPI: Add Virtual Machine Generation ID support

2017-02-17 Thread Laszlo Ersek
On 02/17/17 14:05, Igor Mammedov wrote: > On Fri, 17 Feb 2017 13:50:40 +0100 > Laszlo Ersek wrote: > >> CC Dave >> >> On 02/17/17 11:43, Igor Mammedov wrote: >>> On Thu, 16 Feb 2017 15:15:36 -0800 >>> b...@skyportsystems.com wrote: >>> From: Ben Warren This implements the VM Gener

Re: [Qemu-devel] [PATCH v8 5/5] hw/intc/arm_gicv3_kvm: Reset GICv3 cpu interface registers

2017-02-17 Thread Peter Maydell
On 17 February 2017 at 06:31, wrote: > From: Vijaya Kumar K > > Reset CPU interface registers of GICv3 when CPU is reset. > For this, ARMCPRegInfo struct is registered with one ICC > register whose resetfn is called when cpu is reset. > > All the ICC registers are reset under one single register

[Qemu-devel] [PATCH] hw/arm/virt: Add a user option to disallow ITS instantiation

2017-02-17 Thread Eric Auger
In 2.9 ITS will block save/restore and migration use cases. As such let's introduce a user option that disallows its instantiation along with the GICv3. With no-its option turned true, migration will be possible, obviously at the expense of MSI support (with GICv3). Signed-off-by: Eric Auger ---

Re: [Qemu-devel] [PATCH v8 2/5] hw/intc/arm_gicv3_kvm: Add ICC_SRE_EL1 register to vmstate

2017-02-17 Thread Peter Maydell
On 17 February 2017 at 06:31, wrote: > From: Vijaya Kumar K > > To Save and Restore ICC_SRE_EL1 register introduce vmstate > subsection and load only if non-zero. > Also initialize icc_sre_el1 with to 0x7 in pre_load > function. > > Signed-off-by: Vijaya Kumar K > --- > hw/intc/arm_gicv3_commo

Re: [Qemu-devel] [PATCH v15 08/25] block: introduce auto-loading bitmaps

2017-02-17 Thread Denis V. Lunev
On 02/17/2017 03:48 PM, Kevin Wolf wrote: > Am 17.02.2017 um 13:40 hat Vladimir Sementsov-Ogievskiy geschrieben: >> 17.02.2017 15:09, Kevin Wolf wrote: >>> Am 17.02.2017 um 12:46 hat Vladimir Sementsov-Ogievskiy geschrieben: 16.02.2017 14:49, Kevin Wolf wrote: > Am 16.02.2017 um 12:25 hat

Re: [Qemu-devel] [PATCH] hw/arm/virt: Add a user option to disallow ITS instantiation

2017-02-17 Thread no-reply
Hi, This 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 Subject: [Qemu-devel] [PATCH] hw/arm/virt: Add a user option to disallow ITS instantiation Message-id: 148733959

Re: [Qemu-devel] [PATCH] bcm2835_rng: Use qcrypto_random_bytes() rather than rand()

2017-02-17 Thread Daniel P. Berrange
On Fri, Feb 17, 2017 at 12:22:39PM +, Peter Maydell wrote: > Switch to using qcrypto_random_bytes() rather than rand() as > our source of randomness for the BCM2835 RNG. > > If qcrypto_random_bytes() fails, we don't want to return the guest a > non-random value in case they're really using it

Re: [Qemu-devel] [PATCH 15/17] iotests: add default node-name

2017-02-17 Thread Fam Zheng
On Fri, 02/17 16:36, Vladimir Sementsov-Ogievskiy wrote: > 17.02.2017 15:21, Fam Zheng wrote: > > On Fri, 02/17 13:20, Vladimir Sementsov-Ogievskiy wrote: > > > 16.02.2017 16:48, Fam Zheng wrote: > > > > On Mon, 02/13 12:54, Vladimir Sementsov-Ogievskiy wrote: > > > > > When testing migration, auto

Re: [Qemu-devel] [PATCH v2 2/7] iscsi: Handle -iscsi user/password in bdrv_parse_filename()

2017-02-17 Thread Fam Zheng
On Fri, 02/17 14:26, Kevin Wolf wrote: > It is the one that it put into the QDict by iscsi_parse_iscsi_option(), > which is supposed to be the value from -iscsi. OK! This is what I was missing. :) Fam

Re: [Qemu-devel] [PATCH v2 2/7] iscsi: Handle -iscsi user/password in bdrv_parse_filename()

2017-02-17 Thread Fam Zheng
On Wed, 01/25 12:42, Jeff Cody wrote: > From: Kevin Wolf > > This splits the logic in the old parse_chap() function into a part that > parses the -iscsi options into the new driver-specific options, and > another part that actually applies those options (called apply_chap() > now). > > Note that

Re: [Qemu-devel] [PATCH] bcm2835_rng: Use qcrypto_random_bytes() rather than rand()

2017-02-17 Thread Peter Maydell
On 17 February 2017 at 14:05, Daniel P. Berrange wrote: > On Fri, Feb 17, 2017 at 12:22:39PM +, Peter Maydell wrote: >> We should probably improve crypto/random-platform.c to use >> getentropy() if available, which would fix the "BSD or OSX >> host and not using gcrypt or gnutls" case which I

Re: [Qemu-devel] [PATCH 1/3] qemu-img: Add tests for raw image preallocation

2017-02-17 Thread Nir Soffer
On Fri, Feb 17, 2017 at 11:14 AM, Kevin Wolf wrote: > Am 17.02.2017 um 01:51 hat Nir Soffer geschrieben: >> Add tests for creating raw image with and without the preallocation >> option. >> >> Signed-off-by: Nir Soffer > > Looks good, but 175 is already (multiply) taken. Not making this a > block

Re: [Qemu-devel] [PATCH v15 08/25] block: introduce auto-loading bitmaps

2017-02-17 Thread Kevin Wolf
Am 17.02.2017 um 14:48 hat Denis V. Lunev geschrieben: > On 02/17/2017 04:34 PM, Kevin Wolf wrote: > > Am 17.02.2017 um 14:22 hat Denis V. Lunev geschrieben: > >> But for sure this is bad from the downtime point of view. > >> On migrate you will have to write to the image and re-read > >> it again

Re: [Qemu-devel] [PATCH 1/3] qemu-img: Add tests for raw image preallocation

2017-02-17 Thread Kevin Wolf
Am 17.02.2017 um 15:20 hat Nir Soffer geschrieben: > On Fri, Feb 17, 2017 at 11:14 AM, Kevin Wolf wrote: > > Am 17.02.2017 um 01:51 hat Nir Soffer geschrieben: > >> Add tests for creating raw image with and without the preallocation > >> option. > >> > >> Signed-off-by: Nir Soffer > > > > Looks g

[Qemu-devel] [PATCH v2] hw/arm/virt: Add a user option to disallow ITS instantiation

2017-02-17 Thread Eric Auger
In 2.9 ITS will block save/restore and migration use cases. As such let's introduce a user option that disallows its instantiation along with the GICv3. With no-its option turned true, migration will be possible, obviously at the expense of MSI support (with GICv3). Signed-off-by: Eric Auger ---

Re: [Qemu-devel] [PATCH v15 08/25] block: introduce auto-loading bitmaps

2017-02-17 Thread Vladimir Sementsov-Ogievskiy
17.02.2017 17:24, Kevin Wolf wrote: Am 17.02.2017 um 14:48 hat Denis V. Lunev geschrieben: On 02/17/2017 04:34 PM, Kevin Wolf wrote: Am 17.02.2017 um 14:22 hat Denis V. Lunev geschrieben: But for sure this is bad from the downtime point of view. On migrate you will have to write to the image a

[Qemu-devel] [PATCH] Makefile: Put VERSION info into version.texi rather than using -D

2017-02-17 Thread Peter Maydell
Unfortunately some older versions of makeinfo don't correctly handle the -D command line option and fail to set the variable. This then causes them to complain docs/qemu-ga-ref.texi:41: warning: undefined flag: VERSION Work around this by doing as the autotools do, and writing the information int

Re: [Qemu-devel] [PATCH] hw/arm/virt: fix cpu object reference leak

2017-02-17 Thread Igor Mammedov
On Fri, 17 Feb 2017 13:32:15 + Peter Maydell wrote: > On 16 February 2017 at 15:11, Igor Mammedov wrote: > > On Thu, 16 Feb 2017 14:18:05 + > > Peter Maydell wrote: > >> I've always found the object reference semantics somewhat > >> confusing (why does realizing a device add a referen

Re: [Qemu-devel] [PATCH v8 4/8] ACPI: Add Virtual Machine Generation ID support

2017-02-17 Thread Ben Warren
> On Feb 17, 2017, at 2:43 AM, Igor Mammedov wrote: > > On Thu, 16 Feb 2017 15:15:36 -0800 > b...@skyportsystems.com wrote: > >> From: Ben Warren >> >> This implements the VM Generation ID feature by passing a 128-bit >> GUID to the guest via a fw_cfg blob. >> Any time the GUID changes, an AC

Re: [Qemu-devel] Fix build break during configuration on musl-libc based Linux systems.

2017-02-17 Thread Eric Blake
On 02/17/2017 03:28 AM, Peter Maydell wrote: > On 17 February 2017 at 06:43, Fam Zheng wrote: >> But your point is taken, we should make the first (or a one-shot) >> contribution as easy as possible. > > Yes; we could do with providing a "This page seems very long..." > introduction section. The

Re: [Qemu-devel] [PATCH v2] target-arm: Implement BCM2835 hardware RNG

2017-02-17 Thread Peter Maydell
On 17 February 2017 at 12:54, Peter Maydell wrote: > On 10 February 2017 at 21:08, Marcin Chojnacki wrote: >> Recent vanilla Raspberry Pi kernels started to make use of >> the hardware random number generator in BCM2835 SoC. As a >> result, those kernels wouldn't work anymore under QEMU >> but ra

[Qemu-devel] (no subject)

2017-02-17 Thread Pranith Kumar
Subject: [PATCH] aarch64: Change ext type to TCGType to fix warnings To fix the following warnings: In file included from /users/pranith/qemu/tcg/tcg.c:255: /users/pranith/qemu/tcg/aarch64/tcg-target.inc.c:879:24: warning: implicit conversion from enumeration type 'TCGMemOp' (aka 'enum TCGMemOp'

[Qemu-devel] [PATCH RESEND] aarch64: Change ext type to TCGType to fix warnings

2017-02-17 Thread Pranith Kumar
To fix the following warnings: In file included from /users/pranith/qemu/tcg/tcg.c:255: /users/pranith/qemu/tcg/aarch64/tcg-target.inc.c:879:24: warning: implicit conversion from enumeration type 'TCGMemOp' (aka 'enum TCGMemOp') to different enumeration type 'TCGType' (aka 'enum TCGType')

Re: [Qemu-devel] [PATCH] Makefile: Put VERSION info into version.texi rather than using -D

2017-02-17 Thread Marc-André Lureau
Hi - Original Message - > Unfortunately some older versions of makeinfo don't correctly > handle the -D command line option and fail to set the variable. > This then causes them to complain > docs/qemu-ga-ref.texi:41: warning: undefined flag: VERSION > > Work around this by doing as the

Re: [Qemu-devel] [PATCH v15 25/25] qcow2-bitmap: improve check_constraints_on_bitmap

2017-02-17 Thread Eric Blake
On 02/17/2017 04:18 AM, Vladimir Sementsov-Ogievskiy wrote: > 16.02.2017 17:21, Kevin Wolf wrote: >> Am 15.02.2017 um 11:10 hat Vladimir Sementsov-Ogievskiy geschrieben: >>> Add detailed error messages. >>> >>> Signed-off-by: Vladimir Sementsov-Ogievskiy >> Why not merge this patch into the one th

Re: [Qemu-devel] [PATCH] Makefile: Put VERSION info into version.texi rather than using -D

2017-02-17 Thread Eric Blake
On 02/17/2017 09:12 AM, Peter Maydell wrote: > Unfortunately some older versions of makeinfo don't correctly > handle the -D command line option and fail to set the variable. > This then causes them to complain > docs/qemu-ga-ref.texi:41: warning: undefined flag: VERSION > > Work around this by d

Re: [Qemu-devel] [PATCH] Makefile: Put VERSION info into version.texi rather than using -D

2017-02-17 Thread Peter Maydell
On 17 February 2017 at 15:50, Eric Blake wrote: > On 02/17/2017 09:12 AM, Peter Maydell wrote: >> Unfortunately some older versions of makeinfo don't correctly >> handle the -D command line option and fail to set the variable. >> This then causes them to complain >> docs/qemu-ga-ref.texi:41: warn

Re: [Qemu-devel] [PATCH] Makefile: Put VERSION info into version.texi rather than using -D

2017-02-17 Thread Eric Blake
On 02/17/2017 09:52 AM, Peter Maydell wrote: >>> Makefile | 17 ++--- >>> docs/qemu-ga-ref.texi | 2 ++ >>> docs/qemu-qmp-ref.texi | 2 ++ >>> 3 files changed, 14 insertions(+), 7 deletions(-) >> >> Missing a change to .gitignore for version.texi. > > Should be > ---

[Qemu-devel] [RFC PATCH V4] qemu-img: make convert async

2017-02-17 Thread Peter Lieven
this is something I have been thinking about for almost 2 years now. we heavily have the following two use cases when using qemu-img convert. a) reading from NFS and writing to iSCSI for deploying templates b) reading from iSCSI and writing to NFS for backups In both processes we use libiscsi and

Re: [Qemu-devel] [PATCH v8 4/8] ACPI: Add Virtual Machine Generation ID support

2017-02-17 Thread Laszlo Ersek
On 02/17/17 16:33, Ben Warren wrote: > >> On Feb 17, 2017, at 2:43 AM, Igor Mammedov > > wrote: >> >> On Thu, 16 Feb 2017 15:15:36 -0800 >> b...@skyportsystems.com wrote: >> >>> From: Ben Warren mailto:b...@skyportsystems.com>> >>> >>> T

[Qemu-devel] [PATCH 0/2] block/nfs optimizations

2017-02-17 Thread Peter Lieven
Peter Lieven (2): block/nfs: convert to preadv / pwritev block/nfs: try to avoid the bounce buffer in pwritev block/nfs.c | 50 -- 1 file changed, 28 insertions(+), 22 deletions(-) -- 1.9.1

[Qemu-devel] [PATCH 2/2] block/nfs: try to avoid the bounce buffer in pwritev

2017-02-17 Thread Peter Lieven
if the passed qiov contains exactly one iov we can pass the buffer directly. Signed-off-by: Peter Lieven --- block/nfs.c | 23 --- 1 file changed, 16 insertions(+), 7 deletions(-) diff --git a/block/nfs.c b/block/nfs.c index ab5dcc2..bb4b75f 100644 --- a/block/nfs.c +++ b/bl

[Qemu-devel] [PATCH 1/2] block/nfs: convert to preadv / pwritev

2017-02-17 Thread Peter Lieven
Signed-off-by: Peter Lieven --- block/nfs.c | 33 +++-- 1 file changed, 15 insertions(+), 18 deletions(-) diff --git a/block/nfs.c b/block/nfs.c index 689eaa7..ab5dcc2 100644 --- a/block/nfs.c +++ b/block/nfs.c @@ -256,9 +256,9 @@ nfs_co_generic_cb(int ret, struct nfs

Re: [Qemu-devel] [PATCH v2 00/16] Postcopy: Hugepage support

2017-02-17 Thread Andrea Arcangeli
Hello Alexey, On Tue, Feb 14, 2017 at 05:48:25PM +0300, Alexey Perevalov wrote: > On Mon, Feb 13, 2017 at 06:57:22PM +0100, Andrea Arcangeli wrote: > > Hello, > > > > On Mon, Feb 13, 2017 at 08:11:06PM +0300, Alexey Perevalov wrote: > > > Another one request. > > > QEMU could use mem_path in huge

Re: [Qemu-devel] Fix build break during configuration on musl-libc based Linux systems.

2017-02-17 Thread Chad Joan
Wow, that is some quick turn-around. Well done! My thoughts: - I find this summary info very helpful! On behalf of the N people trying to heal paper cuts: thank you! - I still recommend an example snippet for shell/bash interaction that demonstrates the workflow you expect from a fi

Re: [Qemu-devel] Fix build break during configuration on musl-libc based Linux systems.

2017-02-17 Thread Peter Maydell
On 17 February 2017 at 16:54, Chad Joan wrote: > Regarding the signature: IIRC, setting up certificates on a machine using > gpg can be quite time consuming and learning-intensive if you've never > needed to do it before. There is no requirement for gpg (except for maintainers submitting pull req

Re: [Qemu-devel] Fix build break during configuration on musl-libc based Linux systems.

2017-02-17 Thread Paolo Bonzini
On 17/02/2017 17:54, Chad Joan wrote: > Regarding the signature: IIRC, setting up certificates on a machine > using gpg can be quite time consuming and learning-intensive if you've > never needed to do it before. Having that example will go a long way to > help with this. There is still a possi

Re: [Qemu-devel] Fix build break during configuration on musl-libc based Linux systems.

2017-02-17 Thread Peter Maydell
On 17 February 2017 at 11:20, Paolo Bonzini wrote: > > > On 17/02/2017 11:18, Peter Maydell wrote: >> Defining _XOPEN_SOURCE is easy enough, and I think we should >> do it unconditionally. We should check what effect this has >> on the BSD hosts though I guess. (You could argue that we >> should b

Re: [Qemu-devel] Fix build break during configuration on musl-libc based Linux systems.

2017-02-17 Thread Chad Joan
How wonderful! Problem solved. Now I think that just having an example could kill the misconception forever ;) On Fri, Feb 17, 2017 at 11:57 AM, Paolo Bonzini wrote: > > > On 17/02/2017 17:54, Chad Joan wrote: > > Regarding the signature: IIRC, setting up certificates on a machine > > using gp

Re: [Qemu-devel] Fix build break during configuration on musl-libc based Linux systems.

2017-02-17 Thread Peter Maydell
On 17 February 2017 at 16:54, Chad Joan wrote: > so if we can test and > approve even /some/ of the more popular mail clients (ex: gmail, > thunderbird, outlook, etc) for use, it would help newbies A LOT. Pretty sure we've seen mangled emails from all of those. The problem is that most email clie

Re: [Qemu-devel] Fix build break during configuration on musl-libc based Linux systems.

2017-02-17 Thread Eric Blake
On 02/17/2017 10:54 AM, Chad Joan wrote: > Wow, that is some quick turn-around. Well done! > > My thoughts: > >- I find this summary info very helpful! On behalf of the N people >trying to heal paper cuts: thank you! >- I still recommend an example snippet for shell/bash interaction

Re: [Qemu-devel] [PATCH v7 00/17] VT-d: vfio enablement and misc enhances

2017-02-17 Thread Alex Williamson
On Tue, 7 Feb 2017 16:28:02 +0800 Peter Xu wrote: > This is v7 of vt-d vfio enablement series. [snip] > = > Test Done > = > > Build test passed for x86_64/arm/ppc64. > > Simply tested with x86_64, assigning two PCI devices to a single VM, > boot the VM using: > > bin=x86_64-so

Re: [Qemu-devel] [PATCH v12 21/24] target-arm: don't generate WFE/YIELD calls for MTTCG

2017-02-17 Thread Pranith Kumar
On Mon, Feb 13, 2017 at 7:10 AM, Alex Bennée wrote: > The WFE and YIELD instructions are really only hints and in TCG's case > they were useful to move the scheduling on from one vCPU to the next. In > the parallel context (MTTCG) this just causes an unnecessary cpu_exit > and contention of the BQ

Re: [Qemu-devel] [PATCH v15 08/25] block: introduce auto-loading bitmaps

2017-02-17 Thread Denis V. Lunev
On 02/17/2017 04:34 PM, Kevin Wolf wrote: > Am 17.02.2017 um 14:22 hat Denis V. Lunev geschrieben: >> On 02/17/2017 03:48 PM, Kevin Wolf wrote: >>> Am 17.02.2017 um 13:40 hat Vladimir Sementsov-Ogievskiy geschrieben: 17.02.2017 15:09, Kevin Wolf wrote: > Am 17.02.2017 um 12:46 hat Vladimir

[Qemu-devel] [PATCH] Changing error message of QMP 'migrate_set_downtime' to seconds

2017-02-17 Thread Daniel Henrique Barboza
The previous error message was displaying the values in miliseconds, being misleading with the command that accepts the value in seconds: { "execute": "migrate_set_downtime", "arguments": {"value": 3000}} {"error": {"class": "GenericError", "desc": "Parameter 'downtime_limit' expects an integer in

Re: [Qemu-devel] [PATCH] Changing error message of QMP 'migrate_set_downtime' to seconds

2017-02-17 Thread Paolo Bonzini
On 17/02/2017 18:26, Daniel Henrique Barboza wrote: > The previous error message was displaying the values in miliseconds, > being misleading with the command that accepts the value in seconds: > > { "execute": "migrate_set_downtime", "arguments": {"value": 3000}} > {"error": {"class": "GenericE

Re: [Qemu-devel] Fix build break during configuration on musl-libc based Linux systems.

2017-02-17 Thread John Snow
On 02/17/2017 10:34 AM, Eric Blake wrote: > On 02/17/2017 03:28 AM, Peter Maydell wrote: >> On 17 February 2017 at 06:43, Fam Zheng wrote: >>> But your point is taken, we should make the first (or a one-shot) >>> contribution as easy as possible. >> >> Yes; we could do with providing a "This pag

Re: [Qemu-devel] [PATCH] Add missing fp_access_check() to aarch64 crypto instructions

2017-02-17 Thread Peter Maydell
On 17 February 2017 at 17:58, Nick Reilly wrote: > The aarch64 crypto instructions for AES and SHA are missing the > check for if the FPU is enabled. > > Signed-off-by: Nick Reilly Oops, nice catch. Applied to target-arm.next, thanks. -- PMM

Re: [Qemu-devel] [PATCH v8 4/8] ACPI: Add Virtual Machine Generation ID support

2017-02-17 Thread Ben Warren
> On Feb 17, 2017, at 8:03 AM, Laszlo Ersek wrote: > > On 02/17/17 16:33, Ben Warren wrote: >> >>> On Feb 17, 2017, at 2:43 AM, Igor Mammedov >> >>> >> wrote: >>> >>> On Thu, 16 Feb 2017 15:15:36 -0800 >>> b..

[Qemu-devel] [RFC 0/3] generalize parsing of cpu_model

2017-02-17 Thread Igor Mammedov
Some callers call CPUClass->parse_features manually to convert '-cpu cpufoo,featurestr' string to cpu type and featurestr into a set of global properties. And theni do controlled cpu creation with setting properties and completing it with realize. That's a lot of code duplication as they are pract

[Qemu-devel] [RFC 3/3] machine: generilize cpu_model parsing

2017-02-17 Thread Igor Mammedov
Parse cpu_model string into cpu_type and [=-]foo features in common machine code instead of doing the same on every board. TODO: patch handles only virt-arm/spapr/pc boards, but to avoid bisection breakage it should take care of all boards. Signed-off-by: Igor Mammedov --- include/hw/boards.h

[Qemu-devel] [RFC 2/3] machine: generalize handling of default cpu_model

2017-02-17 Thread Igor Mammedov
currently all boards have opencoded default cpu_model selection. I most cases it's just a string and in others it's a 'function'. Add to machine callback that returns default cpu_model and make boards return it as const string. That allows to move detection of non specified cpu_model i.e. missing

Re: [Qemu-devel] [PATCH v8 4/8] ACPI: Add Virtual Machine Generation ID support

2017-02-17 Thread Michael S. Tsirkin
On Fri, Feb 17, 2017 at 10:34:29AM -0800, Ben Warren wrote: > > On Feb 17, 2017, at 8:03 AM, Laszlo Ersek wrote: > > On 02/17/17 16:33, Ben Warren wrote: > > > > On Feb 17, 2017, at 2:43 AM, Igor Mammedov > wrote: > > O

[Qemu-devel] [RFC 1/3] machine: call machine init from wrapper

2017-02-17 Thread Igor Mammedov
add machine_run_board_init() wrapper that calls machine init for now but in follow up patches it will be used to run generic code that should run before machine init. Signed-off-by: Igor Mammedov --- include/hw/boards.h | 1 + hw/core/machine.c | 6 ++ vl.c| 2 +- 3 files c

Re: [Qemu-devel] [PATCH] Changing error message of QMP 'migrate_set_downtime' to seconds

2017-02-17 Thread Daniel Henrique Barboza
On 02/17/2017 03:37 PM, Paolo Bonzini wrote: On 17/02/2017 18:26, Daniel Henrique Barboza wrote: The previous error message was displaying the values in miliseconds, being misleading with the command that accepts the value in seconds: { "execute": "migrate_set_downtime", "arguments": {"value

[Qemu-devel] [PATCH v2] Makefile: Put VERSION info into version.texi rather than using -D

2017-02-17 Thread Peter Maydell
Unfortunately some older versions of makeinfo don't correctly handle the -D command line option and fail to set the variable. This then causes them to complain docs/qemu-ga-ref.texi:41: warning: undefined flag: VERSION Work around this by doing as the autotools do, and writing the information int

Re: [Qemu-devel] [RFC 0/3] generalize parsing of cpu_model

2017-02-17 Thread Peter Maydell
On 17 February 2017 at 18:56, Igor Mammedov wrote: > Some callers call CPUClass->parse_features manually to convert > '-cpu cpufoo,featurestr' string to cpu type and featurestr > into a set of global properties. And theni do controlled > cpu creation with setting properties and completing it with

Re: [Qemu-devel] [PATCH 0/4] cpu: Implement cpu_generic_new()

2017-02-17 Thread Igor Mammedov
On Mon, 13 Feb 2017 14:28:15 + Peter Maydell wrote: > This patchset adds a new function cpu_generic_new() > which is similar to cpu_generic_init() except that it > does not realize the created CPU object. This means that > board code can do a "new cpu; set QOM properties; realize" > sequence

Re: [Qemu-devel] [PATCH v2] Makefile: Put VERSION info into version.texi rather than using -D

2017-02-17 Thread Marc-André Lureau
- Original Message - > Unfortunately some older versions of makeinfo don't correctly > handle the -D command line option and fail to set the variable. > This then causes them to complain > docs/qemu-ga-ref.texi:41: warning: undefined flag: VERSION > > Work around this by doing as the au

Re: [Qemu-devel] [PATCH 5/6] target-ppc: support for 32-bit carry and overflow

2017-02-17 Thread Richard Henderson
On 02/17/2017 03:47 PM, Nikunj A Dadhania wrote: Why do you want to extract these bits? Convinient to copy that to XER later. Ideally you make the most common operation cheapest, and the more rare operation more expensive. That said, I suppose even using ADDO is rare in the first place. S

Re: [Qemu-devel] [PATCH] Changing error message of QMP 'migrate_set_downtime' to seconds

2017-02-17 Thread Eric Blake
On 02/17/2017 01:01 PM, Daniel Henrique Barboza wrote: >>> 200)) { >>> +(params->downtime_limit < 0 || >>> + params->downtime_limit > MAX_MIGRATE_SET_DOWNTIME)) { >>> error_setg(errp, QERR_INVALID_PARAMETER_VALUE, >>> "downtime_limit", >>> -

[Qemu-devel] [PATCH 0/3] do not use aio_context_acquire/release in AIO-based drivers

2017-02-17 Thread Paolo Bonzini
aio_context_acquire/release are only going away as soon as the block layer becomes thread-safe, but we can already move away to other finer-grained mutex whenever possible. These three drivers don't use coroutines, hence a QemuMutex is a fine primitive to use for protecting any per-BDS data in the

[Qemu-devel] [PATCH 1/3] curl: do not use aio_context_acquire/release

2017-02-17 Thread Paolo Bonzini
Now that all bottom halves and callbacks take care of taking the AioContext lock, we can migrate some users away from it and to a specific QemuMutex or CoMutex. Protect BDRVCURLState access with a QemuMutex. Signed-off-by: Paolo Bonzini --- block/curl.c | 24 +++- 1 file cha

[Qemu-devel] [PATCH 3/3] iscsi: do not use aio_context_acquire/release

2017-02-17 Thread Paolo Bonzini
Now that all bottom halves and callbacks take care of taking the AioContext lock, we can migrate some users away from it and to a specific QemuMutex or CoMutex. Protect libiscsi calls with a QemuMutex. Callbacks are invoked using bottom halves, so we don't even have to drop it around callback inv

Re: [Qemu-devel] [PATCH 3/5] migration/vmstate: fix array of ptr with nullptrs

2017-02-17 Thread Dr. David Alan Gilbert
* Halil Pasic (pa...@linux.vnet.ibm.com) wrote: > Make VMS_ARRAY_OF_POINTER cope with null pointers. Previously the > reward for trying to migrate an array with some null pointers in it was > an illegal memory access, that is a swift and painless death of the > process. Let's make vmstate cope wit

[Qemu-devel] [PATCH 2/3] nfs: do not use aio_context_acquire/release

2017-02-17 Thread Paolo Bonzini
Now that all bottom halves and callbacks take care of taking the AioContext lock, we can migrate some users away from it and to a specific QemuMutex or CoMutex. Protect libnfs calls with a QemuMutex. Callbacks are invoked using bottom halves, so we don't even have to drop it around callback invoc

[Qemu-devel] [PULL 02/23] virtio: Report real progress in VQ aio poll handler

2017-02-17 Thread Michael S. Tsirkin
From: Fam Zheng In virtio_queue_host_notifier_aio_poll, not all "!virtio_queue_empty()" cases are making true progress. Currently the offending one is virtio-scsi event queue, whose handler does nothing if no event is pending. As a result aio_poll() will spin on the "non-empty" VQ and take 100%

[Qemu-devel] [PULL 12/23] virtio: use VRingMemoryRegionCaches for avail and used rings

2017-02-17 Thread Michael S. Tsirkin
From: Paolo Bonzini The virtio-net change is necessary because it uses virtqueue_fill and virtqueue_flush instead of the more convenient virtqueue_push. Reviewed-by: Stefan Hajnoczi Signed-off-by: Paolo Bonzini Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin --- hw/net/vir

[Qemu-devel] [PULL 11/23] virtio: check for vring setup in virtio_queue_update_used_idx

2017-02-17 Thread Michael S. Tsirkin
From: Paolo Bonzini If the vring has not been set up, it is not necessary for vring_used_idx to do anything (as is already the case when the caller is virtio_load). This is harmless for now, but it will be a problem when the MemoryRegionCache has not been set up. Signed-off-by: Paolo Bonzini Re

[Qemu-devel] [PULL 05/23] virtio: add virtio_*_phys_cached

2017-02-17 Thread Michael S. Tsirkin
From: Paolo Bonzini Reviewed-by: Stefan Hajnoczi Signed-off-by: Paolo Bonzini Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin --- include/hw/virtio/virtio-access.h | 52 +++ 1 file changed, 52 insertions(+) diff --git a/include/hw/virtio

Re: [Qemu-devel] [PATCH 15/17] iotests: add default node-name

2017-02-17 Thread Dr. David Alan Gilbert
* Fam Zheng (f...@redhat.com) wrote: > On Fri, 02/17 16:36, Vladimir Sementsov-Ogievskiy wrote: > > 17.02.2017 15:21, Fam Zheng wrote: > > > On Fri, 02/17 13:20, Vladimir Sementsov-Ogievskiy wrote: > > > > 16.02.2017 16:48, Fam Zheng wrote: > > > > > On Mon, 02/13 12:54, Vladimir Sementsov-Ogievski

[Qemu-devel] [PULL 21/23] intel_iommu: convert dbg macros to traces for inv

2017-02-17 Thread Michael S. Tsirkin
From: Peter Xu VT-d codes are still using static DEBUG_INTEL_IOMMU macro. That's not good, and we should end the day when we need to recompile the code before getting useful debugging information for vt-d. Time to switch to the trace system. This is the first patch to do it. Signed-off-by: Peter

[Qemu-devel] [PULL 13/23] virtio: Fix no interrupt when not creating msi controller

2017-02-17 Thread Michael S. Tsirkin
For ARM virt machine, if we use virt-2.7 which will not create ITS node, the virtio-net can not recieve interrupts so it can't get ip address through dhcp. This fixes commit 83d768b(virtio: set ISR on dataplane notifications). Signed-off-by: Shannon Zhao Reviewed-by: Michael S. Tsirkin Signed-of

[Qemu-devel] [PULL 07/23] exec: make address_space_cache_destroy idempotent

2017-02-17 Thread Michael S. Tsirkin
From: Paolo Bonzini Clear cache->mr so that address_space_cache_destroy does nothing the second time it is called. Reviewed-by: Stefan Hajnoczi Signed-off-by: Paolo Bonzini Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin --- exec.c | 1

[Qemu-devel] [PULL 23/23] intel_iommu: vtd_slpt_level_shift check level

2017-02-17 Thread Michael S. Tsirkin
From: Peter Xu This helps in debugging incorrect level passed in. Reviewed-by: Jason Wang Signed-off-by: Peter Xu Reviewed-by: David Gibson Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin --- hw/i386/intel_iommu.c | 1 + 1 file changed, 1 insertion(+) diff --git a/hw/i38

[Qemu-devel] [PULL 01/23] pci/pcie: don't assume cap id 0 is reserved

2017-02-17 Thread Michael S. Tsirkin
VFIO actually wants to create a capability with ID == 0. This is done to make guest drivers skip the given capability. pcie_add_capability then trips up on this capability when looking for end of capability list. To support this use-case, it's easy enough to switch to e.g. 0x for these com

[Qemu-devel] [PULL 09/23] virtio: add MemoryListener to cache ring translations

2017-02-17 Thread Michael S. Tsirkin
From: Paolo Bonzini The cached translations are RCU-protected to allow efficient use when processing virtqueues. Reviewed-by: Stefan Hajnoczi Signed-off-by: Paolo Bonzini Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin --- include/hw/virtio/virtio.h | 1 + hw/virtio/virt

[Qemu-devel] [PULL 00/23] virtio, pci: fixes, features

2017-02-17 Thread Michael S. Tsirkin
The following changes since commit ad584d37f2a86b392c25f3f00cc1f1532676c2d1: Merge remote-tracking branch 'remotes/bonzini/tags/for-upstream' into staging (2017-02-16 17:46:52 +) are available in the git repository at: git://git.kernel.org/pub/scm/virt/kvm/mst/qemu.git tags/for_upstream

Re: [Qemu-devel] [PATCH v8 4/8] ACPI: Add Virtual Machine Generation ID support

2017-02-17 Thread Laszlo Ersek
On 02/17/17 17:03, Laszlo Ersek wrote: > On 02/17/17 16:33, Ben Warren wrote: >> >>> On Feb 17, 2017, at 2:43 AM, Igor Mammedov >> > wrote: >>> >>> On Thu, 16 Feb 2017 15:15:36 -0800 >>> b...@skyportsystems.com wrote: >>> From: Ben W

[Qemu-devel] [PULL 15/23] vfio: trace map/unmap for notify as well

2017-02-17 Thread Michael S. Tsirkin
From: Peter Xu We traces its range, but we don't know whether it's a MAP/UNMAP. Let's dump it as well. Acked-by: Alex Williamson Reviewed-by: David Gibson Signed-off-by: Peter Xu Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin --- hw/vfio/common.c | 3 ++- hw/vfio/tra

[Qemu-devel] [PATCH V2 2/7] cputlb: move get_page_addr_code

2017-02-17 Thread fred . konrad
From: KONRAD Frederic This just moves the code before VICTIM_TLB_HIT macro definition so we can use it. Signed-off-by: KONRAD Frederic --- cputlb.c | 72 1 file changed, 36 insertions(+), 36 deletions(-) diff --git a/cputlb.c b/

[Qemu-devel] [PULL 03/23] docs: add document to explain the usage of vNVDIMM

2017-02-17 Thread Michael S. Tsirkin
From: Haozhong Zhang Signed-off-by: Haozhong Zhang Reviewed-by: Xiao Guangrong Reviewed-by: Stefan Hajnoczi Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin --- docs/nvdimm.txt | 124 1 file changed, 124 insertions(+)

[Qemu-devel] [PATCH V2 4/7] exec: allow to get a pointer for some mmio memory region

2017-02-17 Thread fred . konrad
From: KONRAD Frederic This introduces a special callback which allows to run code from some MMIO devices. SysBusDevice with a MemoryRegion which implements the request_ptr callback will be notified when the guest try to execute code from their offset. Then it will be able to eg: pre-load some co

[Qemu-devel] [PULL 17/23] vfio: allow to notify unmap for very large region

2017-02-17 Thread Michael S. Tsirkin
From: Peter Xu Linux vfio driver supports to do VFIO_IOMMU_UNMAP_DMA for a very big region. This can be leveraged by QEMU IOMMU implementation to cleanup existing page mappings for an entire iova address space (by notifying with an IOTLB with extremely huge addr_mask). However current vfio_iommu_

[Qemu-devel] [PATCH V2 3/7] cputlb: fix the way get_page_addr_code fills the tlb

2017-02-17 Thread fred . konrad
From: KONRAD Frederic get_page_addr_code(..) does a cpu_ldub_code to fill the tlb: This can lead to some side effects if a device is mapped at this address. So this patch replaces the cpu_memory_ld by a tlb_fill. Signed-off-by: KONRAD Frederic --- cputlb.c | 6 -- 1 file changed, 4 insert

[Qemu-devel] [PULL 04/23] memory: make memory_listener_unregister idempotent

2017-02-17 Thread Michael S. Tsirkin
From: Paolo Bonzini Make it easy to unregister a MemoryListener without tracking whether it had been registered before. Signed-off-by: Paolo Bonzini Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin --- memory.c | 5 + 1 file changed,

[Qemu-devel] [PULL 20/23] intel_iommu: renaming gpa to iova where proper

2017-02-17 Thread Michael S. Tsirkin
From: Peter Xu There are lots of places in current intel_iommu.c codes that named "iova" as "gpa". It is really confusing to use a name "gpa" in these places (which is very easily to be understood as "Guest Physical Address", while it's not). To make the codes (much) easier to be read, I decided

[Qemu-devel] [PATCH V2 7/7] xilinx_spips: allow mmio execution

2017-02-17 Thread fred . konrad
From: KONRAD Frederic This allows to execute from the lqspi area. When the request_ptr is called the device loads 1024bytes from the SPI device. Then this code can be executed by the guest. Signed-off-by: KONRAD Frederic --- hw/ssi/xilinx_spips.c | 74 ++---

[Qemu-devel] [PULL 06/23] virtio: use address_space_map/unmap to access descriptors

2017-02-17 Thread Michael S. Tsirkin
From: Paolo Bonzini This makes little difference, but it makes the code change smaller for the next patch that introduces MemoryRegionCache. This is because map/unmap are similar to MemoryRegionCache init/destroy. Reviewed-by: Stefan Hajnoczi Signed-off-by: Paolo Bonzini Reviewed-by: Michael

[Qemu-devel] [PULL 08/23] virtio: use MemoryRegionCache to access descriptors

2017-02-17 Thread Michael S. Tsirkin
From: Paolo Bonzini For now, the cache is created on every virtqueue_pop. Later on, direct descriptors will be able to reuse it. Reviewed-by: Stefan Hajnoczi Signed-off-by: Paolo Bonzini Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin --- include/exec/memory.h | 2 ++ hw

[Qemu-devel] [PATCH] tests: Use error_free_or_abort() where appropriate

2017-02-17 Thread Markus Armbruster
Done with this Coccinelle semantic patch: @@ expression E; @@ -g_assert(E); -error_free(E); +error_free_or_abort(&E); Signed-off-by: Markus Armbruster --- tests/test-qemu-opts.c | 3 +-- tests/test-qobject-output-visitor.c | 6 ++ 2 files cha

[Qemu-devel] [PATCH V2 5/7] qdev: add MemoryRegion property

2017-02-17 Thread fred . konrad
From: KONRAD Frederic We need to pass a pointer to a MemoryRegion for mmio_interface. So this just adds that. Signed-off-by: KONRAD Frederic --- include/hw/qdev-properties.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/include/hw/qdev-properties.h b/include/hw/qdev-properties.h index

[Qemu-devel] [PULL 10/23] virtio: use VRingMemoryRegionCaches for descriptor ring

2017-02-17 Thread Michael S. Tsirkin
From: Paolo Bonzini Reviewed-by: Stefan Hajnoczi Signed-off-by: Paolo Bonzini Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin --- hw/virtio/virtio.c | 26 -- 1 file changed, 12 insertions(+), 14 deletions(-) diff --git a/hw/virtio/virtio.c b/hw/virt

[Qemu-devel] [PULL 14/23] pcie: simplify pcie_add_capability()

2017-02-17 Thread Michael S. Tsirkin
From: Peter Xu When we add PCIe extended capabilities, we should be following the rule that we add the head extended cap (at offset 0x100) first, then the rest of them. Meanwhile, we are always adding new capability bits at the end of the list. Here the "next" looks meaningless in all cases since

[Qemu-devel] [PATCH V2 1/7] cputlb: cleanup get_page_addr_code to use VICTIM_TLB_HIT

2017-02-17 Thread fred . konrad
From: KONRAD Frederic This replaces env1 and page_index variables by env and index so we can use VICTIM_TLB_HIT macro later. Signed-off-by: KONRAD Frederic --- cputlb.c | 18 +- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/cputlb.c b/cputlb.c index 6c39927..665

<    1   2   3   >