[Qemu-devel] [PATCH v4 6/9] sockets: check that the named file descriptor is a socket

2018-02-05 Thread Daniel P . Berrangé
From: "Daniel P. Berrange" The SocketAddress struct has an "fd" type, which references the name of a file descriptor passed over the monitor using the "getfd" command. We currently blindly assume the FD is a socket, which can lead to hard to diagnose errors later. This adds an explicit check that

[Qemu-devel] [PATCH v8 05/26] block: Respect backing bs in bdrv_refresh_filename

2018-02-05 Thread Max Reitz
Basically, bdrv_refresh_filename() should respect all children of a BlockDriverState. However, generally those children are driver-specific, so this function cannot handle the general case. On the other hand, there are only few drivers which use other children than @file and @backing (that being vm

[Qemu-devel] [PATCH v4 8/9] char: refactor parsing of socket address information

2018-02-05 Thread Daniel P . Berrangé
From: "Daniel P. Berrange" To prepare for handling more address types, refactor the parsing of socket address information to make it more robust and extensible. Reviewed-by: Marc-André Lureau Signed-off-by: Daniel P. Berrange --- chardev/char-socket.c | 22 ++ 1 file chang

[Qemu-devel] [PATCH v4 5/9] sockets: move fd_is_socket() into common sockets code

2018-02-05 Thread Daniel P . Berrangé
From: "Daniel P. Berrange" The fd_is_socket() helper method is useful in a few places, so put it in the common sockets code. Make the code more compact while moving it. Signed-off-by: Daniel P. Berrange --- include/qemu/sockets.h| 1 + io/channel-util.c | 13 tests/.gitig

Re: [Qemu-devel] [RFC 0/2] virtio-vhost-user: add virtio-vhost-user device

2018-02-05 Thread Stefan Hajnoczi
On Mon, Feb 05, 2018 at 09:57:23AM +, Wang, Wei W wrote: > On Friday, February 2, 2018 11:26 PM, Stefan Hajnoczi wrote: > > On Tue, Jan 30, 2018 at 08:09:19PM +0800, Wei Wang wrote: > > > Background: > > > The vhost-user negotiation is split into 2 phases currently. The 1st > > > phase happens

[Qemu-devel] [PATCH v8 11/26] block: Add bdrv_dirname()

2018-02-05 Thread Max Reitz
This function may be implemented by block drivers to derive a directory name from a BDS. Concatenating this g_free()-able string with a relative filename must result in a valid (not necessarily existing) filename, so this is a function that should generally be not implemented by format drivers, bec

[Qemu-devel] [PATCH v4 9/9] char: allow passing pre-opened socket file descriptor at startup

2018-02-05 Thread Daniel P . Berrangé
From: "Daniel P. Berrange" When starting QEMU management apps will usually setup a monitor socket, and then open it immediately after startup. If not using QEMU's own -daemonize arg, this process can be troublesome to handle correctly. The mgmt app will need to repeatedly call connect() until it

Re: [Qemu-devel] [PATCH RFC 02/21] qapi: Generate up-to-date copyright notice

2018-02-05 Thread Eric Blake
On 02/05/2018 07:44 AM, Marc-Andre Lureau wrote: > Hi > > On Fri, Feb 2, 2018 at 2:03 PM, Markus Armbruster wrote: >> Each generator carries a copyright notice for the generator itself, >> and another one for the files it generates. Only the former have been >> updated along the way, the latter

[Qemu-devel] [PATCH v8 15/26] block/nfs: Implement bdrv_dirname()

2018-02-05 Thread Max Reitz
While the basic idea is obvious and could be handled by the default bdrv_dirname() implementation, we cannot generate a directory name if the gid or uid are set, so we have to explicitly return NULL in those cases. Signed-off-by: Max Reitz Reviewed-by: Alberto Garcia --- block/nfs.c | 14 ++

Re: [Qemu-devel] [PATCH RFC 02/21] qapi: Generate up-to-date copyright notice

2018-02-05 Thread Markus Armbruster
Marc-Andre Lureau writes: > Hi > > On Fri, Feb 2, 2018 at 2:03 PM, Markus Armbruster wrote: >> Each generator carries a copyright notice for the generator itself, >> and another one for the files it generates. Only the former have been >> updated along the way, the latter have not, and are all

Re: [Qemu-devel] Qemu Trace

2018-02-05 Thread Stefan Hajnoczi
On Fri, Feb 02, 2018 at 03:53:45PM +, Peter Maydell wrote: > On 2 February 2018 at 10:08, Stefan Hajnoczi wrote: > > On Thu, Feb 01, 2018 at 04:30:10PM +0100, Nesrine Zouari wrote: > >> I am a computer engineering student and I am actually working on my > >> graduation project at Lauterbach co

[Qemu-devel] [PATCH v8 14/26] block/nbd: Make bdrv_dirname() return NULL

2018-02-05 Thread Max Reitz
The generic bdrv_dirname() implementation would be able to generate some form of directory name for many NBD nodes, but it would be always wrong. Therefore, we have to explicitly make it an error (until NBD has some form of specification for export paths, if it ever will). Signed-off-by: Max Reitz

Re: [Qemu-devel] [PATCH v4 17/39] qcow2: Update l2_allocate() to support L2 slices

2018-02-05 Thread Max Reitz
On 2018-02-05 15:33, Alberto Garcia wrote: > This patch updates l2_allocate() to support the qcow2 cache returning > L2 slices instead of full L2 tables. > > The old code simply gets an L2 table from the cache and initializes it > with zeroes or with the contents of an existing table. With a cache

[Qemu-devel] [PATCH] qemu-img: Make resize error message more general

2018-02-05 Thread Max Reitz
The issue: $ qemu-img resize -f qcow2 foo.qcow2 qemu-img: Expecting one image file name Try 'qemu-img --help' for more information So we gave an image file name, but we omitted the length. qemu-img thinks the last argument is always the size and removes it immediately from argv (by decreme

[Qemu-devel] [PATCH v8 21/26] block: Purify .bdrv_refresh_filename()

2018-02-05 Thread Max Reitz
Currently, BlockDriver.bdrv_refresh_filename() is supposed to both refresh the filename (BDS.exact_filename) and set BDS.full_open_options. Now that we have generic code in the central bdrv_refresh_filename() for creating BDS.full_open_options, we can drop the latter part from all BlockDriver.bdrv_

Re: [Qemu-devel] [PATCH 1/2] ipmi: Use proper struct reference for KCS vmstate

2018-02-05 Thread Dr. David Alan Gilbert
* miny...@acm.org (miny...@acm.org) wrote: > From: Corey Minyard Hi Corey, > The vmstate for isa_ipmi_kcs was referencing into the kcs structure, > instead create a kcs structure separate and use that. > > There was also some issues in the state transfer. The inlen field > was not being transf

Re: [Qemu-devel] [PATCH v4 27/39] qcow2: Update qcow2_update_snapshot_refcount() to support L2 slices

2018-02-05 Thread Max Reitz
On 2018-02-05 15:33, Alberto Garcia wrote: > qcow2_update_snapshot_refcount() increases the refcount of all > clusters of a given snapshot. In order to do that it needs to load all > its L2 tables and iterate over their entries. Since we'll be loading > L2 slices instead of full tables we need to a

[Qemu-devel] [PATCH v8 24/26] block/curl: Harmonize option defaults

2018-02-05 Thread Max Reitz
Both of the defaults we currently have in the curl driver are named based on a slightly different schema, let's unify that and call both CURL_BLOCK_OPT_${NAME}_DEFAULT. While at it, we can add a macro for the third option for which a default exists, namely "sslverify". Signed-off-by: Max Reitz -

[Qemu-devel] [PATCH v8 23/26] block: Fix FIXME from "Add BDS.backing_overridden"

2018-02-05 Thread Max Reitz
Said commit introduced a FIXME stating that bdrv_open_backing_file() should set bs->backing_overridden to true not only if the file.filename option was set, but if the "options" QDict contained any option that is significant for any node in the BDS tree emerging from the backing BDS. This behavior

Re: [Qemu-devel] [Qemu-arm] [PATCH 8/8] hw/intc/armv7m_nvic: Fix byte-to-interrupt number conversions

2018-02-05 Thread Peter Maydell
On 5 February 2018 at 16:16, Philippe Mathieu-Daudé wrote: > Hi Peter, > > On 02/05/2018 07:57 AM, Peter Maydell wrote: >> In many of the NVIC registers relating to interrupts, we >> have to convert from a byte offset within a register set >> into the number of the first interrupt which is affecte

Re: [Qemu-devel] [RFC] exec: eliminate ram naming issue as migration

2018-02-05 Thread no-reply
Hi, This series failed docker-mingw@fedora 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: 1517842735-9011-1-git-send-email-jianfeng@intel.com Subject: [Qemu-devel] [RFC] exec:

[Qemu-devel] [PATCH v8 26/26] block/null: Generate filename even with latency-ns

2018-02-05 Thread Max Reitz
While we cannot represent the latency-ns option in a filename, it is not a significant option so not being able to should not stop us from generating a filename nonetheless. Signed-off-by: Max Reitz Reviewed-by: Alberto Garcia --- block/null.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletio

Re: [Qemu-devel] [RFC] exec: eliminate ram naming issue as migration

2018-02-05 Thread Tan, Jianfeng
Hi Paolo, On 2/5/2018 11:53 PM, Paolo Bonzini wrote: On 05/02/2018 15:58, Jianfeng Tan wrote: Here are some options to fix this: 1. When we do ram name comparison, we truncate the prefix as this patch shows. It cannot cover the corner case: the source VM could have two ram blocks with name of

[Qemu-devel] [PATCH v4 0/9] Enable passing pre-opened chardev socket FD

2018-02-05 Thread Daniel P . Berrangé
An update of: v1: https://lists.gnu.org/archive/html/qemu-devel/2017-12/msg04618.html v2: https://lists.gnu.org/archive/html/qemu-devel/2017-12/msg04706.html v3: https://lists.gnu.org/archive/html/qemu-devel/2017-12/msg04892.html This enables fixing a long standing problem that libvirt has

Re: [Qemu-devel] [PATCH v4 5/9] sockets: move fd_is_socket() into common sockets code

2018-02-05 Thread Marc-Andre Lureau
On Mon, Feb 5, 2018 at 4:24 PM, Daniel P. Berrangé wrote: > From: "Daniel P. Berrange" > > The fd_is_socket() helper method is useful in a few places, so put it in > the common sockets code. Make the code more compact while moving it. > > Signed-off-by: Daniel P. Berrange Reviewed-by: Marc-Andr

[Qemu-devel] [PATCH v4 2/9] cutils: add qemu_strtoi & qemu_strtoui parsers for int/unsigned int types

2018-02-05 Thread Daniel P . Berrangé
From: "Daniel P. Berrange" There are qemu_strtoNN functions for various sized integers. This adds two more for plain int & unsigned int types, with suitable range checking. Reviewed-by: Marc-André Lureau Signed-off-by: Daniel P. Berrange --- include/qemu/cutils.h | 4 + tests/test-cutils.c

Re: [Qemu-devel] Functional tests (AKA Avocado-based tests)

2018-02-05 Thread Cleber Rosa
On 01/25/2018 09:11 AM, Stefan Hajnoczi wrote: > On Wed, Jan 17, 2018 at 03:05:54AM -0500, Cleber Rosa wrote: >> This is about how QEMU developers can get started with functional >> tests that are built on top of the Avocado libraries (and meant to be >> run with the Avocado test runner). > > He

Re: [Qemu-devel] rate limiting issues

2018-02-05 Thread Stefan Hajnoczi
On Fri, Feb 02, 2018 at 12:10:22PM +0100, Wolfgang Bumiller wrote: > Summary: > Rate limit is effectively halved when the size of written chunks adds up to > exceeding the quota of a slice only slightly. This is surprisingly reliable. > > Explanation: > The ratelimiting code in include/qemu/rateli

Re: [Qemu-devel] [Qemu-arm] [PATCH 8/8] hw/intc/armv7m_nvic: Fix byte-to-interrupt number conversions

2018-02-05 Thread Philippe Mathieu-Daudé
Hi Peter, On 02/05/2018 07:57 AM, Peter Maydell wrote: > In many of the NVIC registers relating to interrupts, we > have to convert from a byte offset within a register set > into the number of the first interrupt which is affected. > We were getting this wrong for: > * reads of NVIC_ISPR, NVIC_I

Re: [Qemu-devel] [PATCH RFC 03/21] qapi: New classes QAPIGenC, QAPIGenH, QAPIGenDoc

2018-02-05 Thread Markus Armbruster
Marc-Andre Lureau writes: > Hi > > On Fri, Feb 2, 2018 at 2:03 PM, Markus Armbruster wrote: >> These classes encapsulate accumulating and writing output. >> >> Convert C code generation to QAPIGenC and QAPIGenH. The conversion is >> rather shallow: most of the output accumulation is not convert

Re: [Qemu-devel] [RFC] exec: eliminate ram naming issue as migration

2018-02-05 Thread Tan, Jianfeng
On 2/6/2018 12:29 AM, Igor Mammedov wrote: On Mon, 5 Feb 2018 14:58:55 + Jianfeng Tan wrote: Existing VMs with virtio devices and vhost-kernel as the backend are always started with mem config: "-m xG" (with a ram block named "pc.ram") while new VMs with virtio devices and vhost

Re: [Qemu-devel] [RFC] exec: eliminate ram naming issue as migration

2018-02-05 Thread Paolo Bonzini
On 05/02/2018 17:12, Tan, Jianfeng wrote: > Hi Paolo, > > On 2/5/2018 11:53 PM, Paolo Bonzini wrote: >> On 05/02/2018 15:58, Jianfeng Tan wrote: >>> Here are some options to fix this: >>> >>> 1. When we do ram name comparison, we truncate the prefix as this >>> patch shows. >>> It cannot cover the

Re: [Qemu-devel] [PATCH RFC 06/21] qapi-gen: New common driver for code and doc generators

2018-02-05 Thread Markus Armbruster
Marc-Andre Lureau writes: > On Fri, Feb 2, 2018 at 2:03 PM, Markus Armbruster wrote: >> Whenever qapi-schema.json changes, we run six programs eleven times to >> update eleven files. This is silly. Replace the six programs by a >> single program that spits out all eleven files. >> > > Now we w

Re: [Qemu-devel] [PATCH 2/2] ipmi: Use proper struct reference for BT vmstate

2018-02-05 Thread Dr. David Alan Gilbert
* miny...@acm.org (miny...@acm.org) wrote: > From: Corey Minyard > > The vmstate for isa_ipmi_bt was referencing into the bt structure, > instead create a bt structure separate and use that. > > The version 1 of the BT transfer was fairly broken, if a migration > occured during an IPMI operation

Re: [Qemu-devel] [PATCH v4 31/39] qcow2: Update qcow2_truncate() to support L2 slices

2018-02-05 Thread Max Reitz
On 2018-02-05 15:33, Alberto Garcia wrote: > The qcow2_truncate() code is mostly independent from whether > we're using L2 slices or full L2 tables, but in full and > falloc preallocation modes new L2 tables are allocated using > qcow2_alloc_cluster_link_l2(). Therefore the code needs to be > modi

Re: [Qemu-devel] [PATCH v3 25/25] cpu: get rid of cpu_generic_init()

2018-02-05 Thread Igor Mammedov
On Tue, 23 Jan 2018 09:08:24 +0100 Igor Mammedov wrote: > There aren't any users of the helper left, remove it. after rebase this patch nor longer does what subj says and it should be squashed into 23/25 where cpu_generic_init() is removed, so pls ignore this patch I'll post v4 for 23/25 with thi

Re: [Qemu-devel] [PATCH RFC 06/21] qapi-gen: New common driver for code and doc generators

2018-02-05 Thread Eric Blake
On 02/03/2018 03:03 AM, Markus Armbruster wrote: > Eric Blake writes: > >> On 02/02/2018 07:03 AM, Markus Armbruster wrote: >>> Whenever qapi-schema.json changes, we run six programs eleven times to >>> update eleven files. This is silly. Replace the six programs by a >>> single program that sp

[Qemu-devel] [PATCH v4 23/25] Use cpu_create(type) instead of cpu_init(cpu_model)

2018-02-05 Thread Igor Mammedov
With all targets defining CPU_RESOLVING_TYPE, refactor cpu_parse_cpu_model(type, cpu_model) to parse_cpu_model(cpu_model) so that callers won't have to know internal resolving cpu type. Place it in exec.c so it could be called from both target independed vl.c and *-user/main.c. That allows us to s

Re: [Qemu-devel] [RFC] exec: eliminate ram naming issue as migration

2018-02-05 Thread Tan, Jianfeng
On 2/6/2018 12:19 AM, Paolo Bonzini wrote: On 05/02/2018 17:12, Tan, Jianfeng wrote: Hi Paolo, On 2/5/2018 11:53 PM, Paolo Bonzini wrote: On 05/02/2018 15:58, Jianfeng Tan wrote: Here are some options to fix this: 1. When we do ram name comparison, we truncate the prefix as this patch show

Re: [Qemu-devel] [RFC] exec: eliminate ram naming issue as migration

2018-02-05 Thread Paolo Bonzini
On 05/02/2018 15:58, Jianfeng Tan wrote: > Here are some options to fix this: > > 1. When we do ram name comparison, we truncate the prefix as this patch shows. > It cannot cover the corner case: the source VM could have two ram blocks > with name of "pc.ram" and "/object/pc.ram". That shouldn't

Re: [Qemu-devel] [PATCH] kvm: check dev parameter when updating msi route

2018-02-05 Thread Paolo Bonzini
On 05/02/2018 07:18, P J P wrote: > From: Prasad J Pandit > > When updating message signalled interrupt(MSI) route in routine > kvm_irqchip_update_msi_route, device parameter could be null. > Add check to avoid null dereference. > > Reported-by: Guoxiang Niu > Signed-off-by: Prasad J Pandit P

Re: [Qemu-devel] Qemu Trace

2018-02-05 Thread Peter Maydell
On 5 February 2018 at 15:51, Stefan Hajnoczi wrote: > The point of the instrumentation plugin API is for online analysis > (stuff that cannot be post-processed offline) with the ability for the > plugin to control QEMU (e.g. affect translation during a run). That is > not necessary for Nesrine's

Re: [Qemu-devel] [PATCH v4 41/51] qapi: add -i/--include filename.h

2018-02-05 Thread Markus Armbruster
Marc-André Lureau writes: > Add a new option to add user-specified #include lines in the generated > headers. This will help to split a schema, where one generated header > will depend on another. > > Fix some pycodestyle on the way. > > Signed-off-by: Marc-André Lureau With my alternative way

Re: [Qemu-devel] [PATCH RFC 09/21] qapi: Don't absolutize include file name in error messages

2018-02-05 Thread Eric Blake
On 02/03/2018 03:08 AM, Markus Armbruster wrote: > Eric Blake writes: > >> On 02/02/2018 07:03 AM, Markus Armbruster wrote: >>> Error messages print absolute filenames of included files even gave a >> >> s/even gave/even when given/ > > I meant to write "even if the user gave". Is that okay? Y

Re: [Qemu-devel] [PATCH v4 1/9] char: don't silently skip tn3270 protocol init when TLS is enabled

2018-02-05 Thread Cornelia Huck
On Mon, 5 Feb 2018 15:24:47 + Daniel P. Berrangé wrote: > From: "Daniel P. Berrange" > > Even if common tn3270 implementations do not support TLS, it is trivial to > have them proxied over a proxy like stunnel which adds TLS at the sockets > layer. We should thus not silently skip tn3270 p

Re: [Qemu-devel] [RFC] exec: eliminate ram naming issue as migration

2018-02-05 Thread Igor Mammedov
On Mon, 5 Feb 2018 17:19:09 +0100 Paolo Bonzini wrote: > On 05/02/2018 17:12, Tan, Jianfeng wrote: > > Hi Paolo, > > > > On 2/5/2018 11:53 PM, Paolo Bonzini wrote: > >> On 05/02/2018 15:58, Jianfeng Tan wrote: > >>> Here are some options to fix this: > >>> > >>> 1. When we do ram name compar

Re: [Qemu-devel] [RFC 0/2] virtio-vhost-user: add virtio-vhost-user device

2018-02-05 Thread Stefan Hajnoczi
On Fri, Feb 02, 2018 at 09:08:44PM +0800, Wei Wang wrote: > On 02/02/2018 01:08 AM, Michael S. Tsirkin wrote: > > On Tue, Jan 30, 2018 at 08:09:19PM +0800, Wei Wang wrote: > > > Issues: > > > Suppose we have both the vhost and virtio-net set up, and vhost pmd <-> > > > virtio-net pmd communication

Re: [Qemu-devel] [RFC] exec: eliminate ram naming issue as migration

2018-02-05 Thread Paolo Bonzini
On 05/02/2018 18:15, Igor Mammedov wrote: >>> >>> Then we would have both ram block named pc.ram: >>>   Block Name    PSize >>>   pc.ram 4 KiB >>>   /objects/pc.ram    2 MiB >>> >>> But I assume it's a corner case which not really happen. >> Yeah, you're ri

Re: [Qemu-devel] [RFC] exec: eliminate ram naming issue as migration

2018-02-05 Thread Igor Mammedov
On Mon, 5 Feb 2018 14:58:55 + Jianfeng Tan wrote: > Existing VMs with virtio devices and vhost-kernel as the backend > are always started with mem config: > > "-m xG" > (with a ram block named "pc.ram") > > while new VMs with virtio devices and vhost-user as the backend > are always st

Re: [Qemu-devel] [PATCH v4 00/39] Allow configuring the qcow2 L2 cache entry size

2018-02-05 Thread Max Reitz
On 2018-02-05 15:33, Alberto Garcia wrote: > this is the new revision of the patch series to allow configuring the > entry size of the qcow2 L2 cache. Follow this link for the full > description from the first version: > >https://lists.gnu.org/archive/html/qemu-block/2017-10/msg00458.html > >

Re: [Qemu-devel] Functional tests (AKA Avocado-based tests)

2018-02-05 Thread Cleber Rosa
On 02/01/2018 07:10 PM, Alistair Francis wrote: > On Wed, Jan 17, 2018 at 4:47 PM, Cleber Rosa wrote: >> >> >> On 01/17/2018 06:41 PM, Alistair Francis wrote: >>> On Wed, Jan 17, 2018 at 12:05 AM, Cleber Rosa wrote: TL;DR = This is about how QEMU developers can get start

Re: [Qemu-devel] [RFC] exec: eliminate ram naming issue as migration

2018-02-05 Thread Paolo Bonzini
On 05/02/2018 17:44, Tan, Jianfeng wrote: >>> >> I understand.  However it's not as bad as "there's no possibility at all >> to migrate from vhost-kernel to vhost-user".  There are cases that are >> more problematic: for example, there's no possibility at all to add >> memory NUMA policy during a l

Re: [Qemu-devel] [virtio-dev] [PATCH v1 6/6] vhost-user: add VFIO based accelerators support

2018-02-05 Thread Paolo Bonzini
On 25/01/2018 05:03, Tiwei Bie wrote: > The key difference with PCI passthru is that, in this case only > the data path of the device (e.g. DMA ring, notify region and > queue interrupt) is pass-throughed to the VM, the device control > path (e.g. PCI configuration space and MMIO regions) is still

Re: [Qemu-devel] [PATCH v4 0/9] Enable passing pre-opened chardev socket FD

2018-02-05 Thread no-reply
Hi, This series seems to have some coding style problems. See output below for more information: Type: series Message-id: 20180205152455.12088-1-berra...@redhat.com Subject: [Qemu-devel] [PATCH v4 0/9] Enable passing pre-opened chardev socket FD === TEST SCRIPT BEGIN === #!/bin/bash BASE=base n

Re: [Qemu-devel] [PATCH] hw/core/generic-loader: Allow PC to be set on command line

2018-02-05 Thread Alistair Francis
On Mon, Feb 5, 2018 at 7:04 AM, Peter Maydell wrote: > The documentation for the generic loader claims that you can > set the PC for a CPU with an option of the form > -device loader,cpu-num=0,addr=0x1004 > > However if you try this QEMU complains: > cpu_num must be specified when setting

Re: [Qemu-devel] [PATCH] tests/migration: Add source to PC boot block

2018-02-05 Thread Dr. David Alan Gilbert
* Wei Huang (w...@redhat.com) wrote: > > > On 01/31/2018 02:16 PM, Dr. David Alan Gilbert (git) wrote: > > From: "Dr. David Alan Gilbert" > > > > The boot block used in the migration test is currently only > > shipped as a hex (with the source in the git commit message), > > change this to actu

Re: [Qemu-devel] [PATCH v8 14/14] target: Use qemu_log() instead of fprintf(stderr, ...)

2018-02-05 Thread Alistair Francis
On Mon, Feb 5, 2018 at 6:31 AM, Markus Armbruster wrote: > Thomas Huth writes: > >> On 05.02.2018 07:33, Markus Armbruster wrote: >>> Thomas Huth writes: >>> On 03.02.2018 09:43, Markus Armbruster wrote: > From: Alistair Francis > > Convert fprintf(stderr, ...) to use qemu_log(

Re: [Qemu-devel] [PATCH v4 42/51] qapi: add a 'unit' pragma

2018-02-05 Thread Markus Armbruster
Marc-André Lureau writes: > Hi > > On Thu, Jan 11, 2018 at 10:32 PM, Marc-André Lureau > wrote: >> Add a pragma that allows to tag the following expressions in the >> schema with a unit name. By default, an expression has no unit name. >> >> See the docs/devel/qapi-code-gen.txt for more details.

[Qemu-devel] [PATCH v2] tests/migration: Add source to PC boot block

2018-02-05 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" The boot block used in the migration test is currently only shipped as a hex (with the source in the git commit message), change this to actually include the source. A script is added to rebuild the header but the expectation is that the generated hex is shipped as

Re: [Qemu-devel] [RFC] exec: eliminate ram naming issue as migration

2018-02-05 Thread Dr. David Alan Gilbert
* Tan, Jianfeng (jianfeng@intel.com) wrote: > > > On 2/6/2018 12:29 AM, Igor Mammedov wrote: > > On Mon, 5 Feb 2018 14:58:55 + > > Jianfeng Tan wrote: > > > > > Existing VMs with virtio devices and vhost-kernel as the backend > > > are always started with mem config: > > > > > >"-

Re: [Qemu-devel] [RFC] exec: eliminate ram naming issue as migration

2018-02-05 Thread Dr. David Alan Gilbert
* Igor Mammedov (imamm...@redhat.com) wrote: > On Mon, 5 Feb 2018 17:19:09 +0100 > Paolo Bonzini wrote: > > > On 05/02/2018 17:12, Tan, Jianfeng wrote: > > > Hi Paolo, > > > > > > On 2/5/2018 11:53 PM, Paolo Bonzini wrote: > > >> On 05/02/2018 15:58, Jianfeng Tan wrote: > > >>> Here are some

[Qemu-devel] [PATCH v2 1/1] hw: register: Run post_write hook on reset

2018-02-05 Thread Alistair Francis
Ensure that the post write hook is called during reset. This allows us to rely on the post write functions instead of having to call them from the reset() function. Signed-off-by: Alistair Francis Reviewed-by: Philippe Mathieu-Daudé --- V2: - Update the header documentation include/hw/regist

Re: [Qemu-devel] [Qemu-block] [PATCH] qemu-img: Make resize error message more general

2018-02-05 Thread John Snow
On 02/05/2018 11:27 AM, Max Reitz wrote: > The issue: > > $ qemu-img resize -f qcow2 foo.qcow2 > qemu-img: Expecting one image file name > Try 'qemu-img --help' for more information > > So we gave an image file name, but we omitted the length. qemu-img > thinks the last argument is alway

[Qemu-devel] [PULL 00/11] VFIO updates 2018-02-05

2018-02-05 Thread Alex Williamson
The following changes since commit f24ee107a07f093bd7ed475dd48d7ba57ea3d8fe: Merge remote-tracking branch 'remotes/kraxel/tags/ui-20180202-pull-request' into staging (2018-02-02 18:54:11 +) are available in the Git repository at: git://github.com/awilliam/qemu-vfio.git tags/vfio-update-

[Qemu-devel] [PULL 01/11] memory/iommu: Add get_attr()

2018-02-05 Thread Alex Williamson
From: Alexey Kardashevskiy This adds get_attr() to IOMMUMemoryRegionClass, like iommu_ops::domain_get_attr in the Linux kernel. This defines the first attribute - IOMMU_ATTR_SPAPR_TCE_FD - which will be used between the pSeries machine and VFIO-PCI. Signed-off-by: Alexey Kardashevskiy Acked-by

[Qemu-devel] [PULL 06/11] vfio/pci: Emulate BARs

2018-02-05 Thread Alex Williamson
The kernel provides similar emulation of PCI BAR register access to QEMU, so up until now we've used that for things like BAR sizing and storing the BAR address. However, if we intend to resize BARs or add BARs that don't exist on the physical device, we need to switch to the pure QEMU emulation o

[Qemu-devel] [PULL 02/11] vfio/spapr: Use iommu memory region's get_attr()

2018-02-05 Thread Alex Williamson
From: Alexey Kardashevskiy In order to enable TCE operations support in KVM, we have to inform the KVM about VFIO groups being attached to specific LIOBNs. The KVM already knows about VFIO groups, the only bit missing is which in-kernel TCE table (the one with user visible TCEs) should update the

[Qemu-devel] [PULL 03/11] spapr/iommu: Enable in-kernel TCE acceleration via VFIO KVM device

2018-02-05 Thread Alex Williamson
From: Alexey Kardashevskiy In order to enable TCE operations support in KVM, we have to inform the KVM about VFIO groups being attached to specific LIOBNs; the necessary bits are implemented already by IOMMU MR and VFIO. This defines get_attr() for the SPAPR TCE IOMMU MR which makes VFIO call th

[Qemu-devel] [PULL 09/11] hw/vfio/platform: Init the interrupt mutex

2018-02-05 Thread Alex Williamson
From: Eric Auger Add the initialization of the mutex protecting the interrupt list. Signed-off-by: Eric Auger Signed-off-by: Alex Williamson --- hw/vfio/platform.c |2 ++ 1 file changed, 2 insertions(+) diff --git a/hw/vfio/platform.c b/hw/vfio/platform.c index da84abf4fc4c..0d4bc0aae889

[Qemu-devel] [PULL 04/11] vfio/pci: Fixup VFIOMSIXInfo comment

2018-02-05 Thread Alex Williamson
The fields were removed in the referenced commit, but the comment still mentions them. Fixes: 2fb9636ebf24 ("vfio-pci: Remove unused fields from VFIOMSIXInfo") Tested-by: Alexey Kardashevskiy Reviewed-by: Eric Auger Tested-by: Eric Auger Signed-off-by: Alex Williamson --- hw/vfio/pci.h |2

[Qemu-devel] [PULL 05/11] vfio/pci: Add base BAR MemoryRegion

2018-02-05 Thread Alex Williamson
Add one more layer to our stack of MemoryRegions, this base region allows us to register BARs independently of the vfio region or to extend the size of BARs which do map to a region. This will be useful when we want hypervisor defined BARs or sections of BARs, for purposes such as relocating MSI-X

[Qemu-devel] [PULL 10/11] vfio/common: Remove redundant copy of local variable

2018-02-05 Thread Alex Williamson
From: Alexey Kardashevskiy There is already @hostwin in vfio_listener_region_add() so there is no point in having the other one. Fixes: 2e4109de8e58 ("vfio/spapr: Create DMA window dynamically (SPAPR IOMMU v2)") Signed-off-by: Alexey Kardashevskiy Signed-off-by: Alex Williamson --- hw/vfio/c

[Qemu-devel] [PULL 11/11] vfio/pci: Add option to disable GeForce quirks

2018-02-05 Thread Alex Williamson
These quirks are necessary for GeForce, but not for Quadro/GRID/Tesla assignment. Leaving them enabled is fully functional and provides the most compatibility, but due to the unique NVIDIA MSI ACK behavior[1], it also introduces latency in re-triggering the MSI interrupt. This overhead is typical

[Qemu-devel] [PULL 07/11] qapi: Create DEFINE_PROP_OFF_AUTO_PCIBAR

2018-02-05 Thread Alex Williamson
Add an option which allows the user to specify a PCI BAR number, including an 'off' and 'auto' selection. Cc: Markus Armbruster Cc: Eric Blake Tested-by: Alexey Kardashevskiy Reviewed-by: Eric Auger Tested-by: Eric Auger Reviewed-by: Markus Armbruster Signed-off-by: Alex Williamson --- hw/

[Qemu-devel] [PULL 08/11] vfio/pci: Allow relocating MSI-X MMIO

2018-02-05 Thread Alex Williamson
Recently proposed vfio-pci kernel changes (v4.16) remove the restriction preventing userspace from mmap'ing PCI BARs in areas overlapping the MSI-X vector table. This change is primarily intended to benefit host platforms which make use of system page sizes larger than the PCI spec recommendation

Re: [Qemu-devel] [PATCH] qemu-img: Make resize error message more general

2018-02-05 Thread Eric Blake
On 02/05/2018 10:27 AM, Max Reitz wrote: The issue: $ qemu-img resize -f qcow2 foo.qcow2 qemu-img: Expecting one image file name Try 'qemu-img --help' for more information So we gave an image file name, but we omitted the length. qemu-img thinks the last argument is always the size an

Re: [Qemu-devel] [PATCH] block/mirror: change the semantic of 'force' of block-job-cancel

2018-02-05 Thread John Snow
On 01/31/2018 09:19 PM, Liang Li wrote: > On Tue, Jan 30, 2018 at 03:18:31PM -0500, John Snow wrote: >> >> >> On 01/30/2018 03:38 AM, Liang Li wrote: >>> When doing drive mirror to a low speed shared storage, if there was heavy >>> BLK IO write workload in VM after the 'ready' event, drive mirror

[Qemu-devel] [PULL 02/47] qdev: rename typedef qdev_resetfn() -> DeviceReset()

2018-02-05 Thread Paolo Bonzini
From: Philippe Mathieu-Daudé following the DeviceRealize and DeviceUnrealize typedefs, this unify a bit the new QOM API. Signed-off-by: Philippe Mathieu-Daudé Message-Id: <20180114020412.26160-2-f4...@amsat.org> Reviewed-by: Laurent Vivier Signed-off-by: Paolo Bonzini --- include/hw/qdev-cor

[Qemu-devel] [PULL 00/47] Misc patches for 2018-02-05

2018-02-05 Thread Paolo Bonzini
The following changes since commit f24ee107a07f093bd7ed475dd48d7ba57ea3d8fe: Merge remote-tracking branch 'remotes/kraxel/tags/ui-20180202-pull-request' into staging (2018-02-02 18:54:11 +) are available in the git repository at: git://github.com/bonzini/qemu.git tags/for-upstream for

[Qemu-devel] [PULL 04/47] qdev: use device_class_set_parent_realize/unrealize/reset()

2018-02-05 Thread Paolo Bonzini
From: Philippe Mathieu-Daudé changes generated using the following Coccinelle patch: @@ type DeviceParentClass; DeviceParentClass *pc; DeviceClass *dc; identifier parent_fn; identifier child_fn; @@ ( +device_class_set_parent_realize(dc, child_fn, &pc->parent_fn); -pc->parent_

[Qemu-devel] [PULL 03/47] qdev: add helpers to be more explicit when using abstract QOM parent functions

2018-02-05 Thread Paolo Bonzini
From: Philippe Mathieu-Daudé QOM API learning curve is quite hard, in particular when devices inherit from abstract parent. To be more explicit about when a device class change the parent hooks, add few helpers hoping a device class_init() will be easier to understand. Signed-off-by: Philippe Ma

[Qemu-devel] [PULL 05/47] kvm: Add kvm_set_user_memory tracepoint

2018-02-05 Thread Paolo Bonzini
From: Alexey Kardashevskiy This adds a tracepoint to trace the KVM_SET_USER_MEMORY_REGION ioctl parameters which is quite useful for debugging VFIO memory regions being actually registered with KVM. Signed-off-by: Alexey Kardashevskiy Message-Id: <20171215052326.21386-1-...@ozlabs.ru> Signed-of

[Qemu-devel] [PULL 01/47] memory: update comments and fix some typos

2018-02-05 Thread Paolo Bonzini
From: Jay Zhou Signed-off-by: Jay Zhou Message-Id: <1515043788-38300-1-git-send-email-jianjay.z...@huawei.com> Signed-off-by: Paolo Bonzini --- include/exec/memory.h | 27 +++ 1 file changed, 15 insertions(+), 12 deletions(-) diff --git a/include/exec/memory.h b/includ

[Qemu-devel] [PULL 08/47] scsi-generic: Simplify error handling code

2018-02-05 Thread Paolo Bonzini
From: Fam Zheng Coverity doesn't like the ignored return value introduced in 9d3b155186c278 (hw/block: Fix the return type), and other callers are converted already in ceff3e1f01. This one was added lately in d9bcd6f7f23a and missed the train. Do it now. Signed-off-by: Fam Zheng Message-Id: <2

[Qemu-devel] [PULL 06/47] qemu: improve hugepage allocation failure message

2018-02-05 Thread Paolo Bonzini
From: Marcelo Tosatti Improve hugepage allocation failure message, indicating what is happening to the user. Signed-off-by: Marcelo Tosatti Message-Id: <20180115201700.ga4...@amt.cnet> Signed-off-by: Paolo Bonzini --- numa.c | 1 + 1 file changed, 1 insertion(+) diff --git a/numa.c b/numa.c

[Qemu-devel] [PULL 10/47] readline: don't free completions in readline_free()

2018-02-05 Thread Paolo Bonzini
From: Greg Kurz Since commit e5dc1a6c6c43, QEMU aborts on exit if completion was used in the monitor: *** Error in `obj/ppc64-softmmu/qemu-system-ppc64': double free or corruption (fasttop): 0x0100331069d0 *** /home/greg/Work/qemu/qemu-spapr/util/readline.c:514 /home/greg/Work/qemu/qemu-

[Qemu-devel] [PULL 07/47] memory: set ioeventfd_update_pending after address_space_update_ioeventfds

2018-02-05 Thread Paolo Bonzini
From: linzhecheng We should set ioeventfd_update_pending same as memory_region_update_pending. Signed-off-by: linzhecheng Message-Id: <1515934519-16158-1-git-send-email-li...@zju.edu.cn> Cc: qemu-sta...@nongnu.org Fixes: ade9c1aac5292ff698fa550adebe794c37d86cc9 Signed-off-by: Paolo Bonzini ---

[Qemu-devel] [PULL 18/47] exynos4210: workaround UBSAN compilation error

2018-02-05 Thread Paolo Bonzini
From: Marc-André Lureau gcc 5.4.0-6ubuntu1~16.04.5 build with UBSAN enabled error: CC hw/display/exynos4210_fimd.o /home/petmay01/linaro/qemu-for-merges/hw/display/exynos4210_fimd.c: In function ‘fimd_get_buffer_id’: /home/petmay01/linaro/qemu-for-merges/hw/display/exynos4210_fimd.c:1105:

[Qemu-devel] [PULL 16/47] Drop remaining bits of ia64 host support

2018-02-05 Thread Paolo Bonzini
From: Peter Maydell We dropped support for ia64 host CPUs in the 2.11 release (removing the TCG backend for it, and advertising the support as being completely removed in the changelog). However there are a few bits and pieces of code still floating about. Remove those, too. We can drop the ch

[Qemu-devel] [PULL 12/47] memory-internal.h: Remove obsolete claim that header is obsolete

2018-02-05 Thread Paolo Bonzini
From: Peter Maydell The memory-internal.h header claims that it is for "obsolete exec.c functions" which "will be removed soon". This statement was added in 2011, six years ago, but the header is still here. (Admittedly none of the prototypes added in commit 67d95c153bef55f6 are still in the head

[Qemu-devel] [PULL 19/47] build-sys: add --enable-sanitizers

2018-02-05 Thread Paolo Bonzini
From: Marc-André Lureau Typical slowdown introduced by AddressSanitizer is 2x. UBSan shouldn't have much impact on runtime cost. Enable it by default when --enable-debug, unless --disable-sanitizers. Signed-off-by: Marc-André Lureau Message-Id: <20180116151152.4040-3-marcandre.lur...@redhat.co

[Qemu-devel] [PULL 09/47] chardev: fix incorrect unref of source

2018-02-05 Thread Paolo Bonzini
From: Peter Xu glib reported error when pty chardev used: $ ./qemu-system-x86_64 -chardev pty,id=foo -device isa-serial,chardev=foo qemu-system-x86_64: -chardev pty,id=foo: char device redirected to /dev/pts/2 (label foo) (qemu-system-x86_64:27885): GLib-CRITICAL **: g_source_unref: assertion '

[Qemu-devel] [PULL 23/47] vfio: listener unregister before unset container

2018-02-05 Thread Paolo Bonzini
From: Peter Xu After next patch, listener unregister will need the container to be alive. Let's move this unregister phase to be before unset container, since that operation will free the backend container in kernel, otherwise we'll get these after next patch: qemu-system-x86_64: VFIO_UNMAP_DMA

[Qemu-devel] [PULL 11/47] scripts/qemu-gdb/timers.py: define encoding in header comment

2018-02-05 Thread Paolo Bonzini
From: Greg Kurz This is required otherwise python complains because of the accentuated letter in Alex's last name: Traceback (most recent call last): File "scripts/qemu-gdb.py", line 29, in from qemugdb import aio, mtree, coroutine, tcg, timers File "scripts/qemugdb/timers.py", line 1 S

[Qemu-devel] [PULL 17/47] sockets: fix parsing of ipv4/ipv6 opts in parse_socket_addr

2018-02-05 Thread Paolo Bonzini
From: "Daniel P. Berrange" The inet_parse() function looks for 'ipv4' and 'ipv6' flags, but only treats them as bare bool flags. The normal QemuOpts parsing would allow on/off values to be set too. This updates inet_parse() so that its handling of the 'ipv4' and 'ipv6' flags matches that done by

[Qemu-devel] [PULL 13/47] i2c: Add a CONFIG_I2C master switch to the configuration files

2018-02-05 Thread Paolo Bonzini
From: Thomas Huth The i2c core and the at24c EEPROM should only be compiled and linked on the machines that support i2c. Otherwise it's quite strange to see the at24c-eeprom to be "available" on qemu-system-s390x for example. Signed-off-by: Thomas Huth Message-Id: <1516634853-15883-1-git-send-e

[Qemu-devel] [PULL 26/47] ivshmem: Don't update non-existent MSI routes

2018-02-05 Thread Paolo Bonzini
From: Ladi Prosek As of commit 660c97eef6f8 ("ivshmem: use kvm irqfd for msi notifications"), QEMU crashes with: kvm_irqchip_commit_routes: Assertion `ret == 0' failed. if the ivshmem device is configured with more vectors than what the server supports. This is caused by the ivshmem_vector_un

[Qemu-devel] [PULL 15/47] hvf: ept_emulation_fault() needs NetApp BSD attribution

2018-02-05 Thread Paolo Bonzini
Add the BSD license there. Reported-by: Izik Eidus Message-Id: <20180123123639.35255-3-i...@veertu.com> Signed-off-by: Paolo Bonzini --- target/i386/hvf/hvf.c | 24 1 file changed, 24 insertions(+) diff --git a/target/i386/hvf/hvf.c b/target/i386/hvf/hvf.c index ab4820

[Qemu-devel] [PULL 21/47] vhost: add traces for memory listeners

2018-02-05 Thread Paolo Bonzini
From: Peter Xu Trace these operations on two memory listeners. It helps to verify the new memory listener fix, and good to keep them there. Signed-off-by: Peter Xu Message-Id: <20180122060244.29368-2-pet...@redhat.com> Acked-by: Michael S. Tsirkin Reviewed-by: Paolo Bonzini Signed-off-by: Pa

[Qemu-devel] [PULL 14/47] Add missing hvdos public domain attribution:

2018-02-05 Thread Paolo Bonzini
From: Izik Eidus hvf.c and vmx.h contain code from hvdos.c that is released as public domain: from hvdos github: https://github.com/mist64/hvdos "License See LICENSE.txt (2-clause-BSD). In order to simplify use of this code as a template, you can consider any parts from "hvdos.c" and "interf

<    1   2   3   4   5   >