Re: [Qemu-devel] Do we need a "virt-2.10" machine type before the 2.10 release?

2017-08-07 Thread Auger Eric
Hi Drew, On 07/08/2017 09:06, Andrew Jones wrote: > On Fri, Aug 04, 2017 at 06:42:54PM +0100, Peter Maydell wrote: >> Hi; I noticed today that the virt board doesn't have a virt-2.10 >> machine type defined. Do we need to add it before release? >> >> (I don't know if there have in fact been any cha

Re: [Qemu-devel] Do we need a "virt-2.10" machine type before the 2.10 release?

2017-08-07 Thread Andrew Jones
On Fri, Aug 04, 2017 at 06:42:54PM +0100, Peter Maydell wrote: > Hi; I noticed today that the virt board doesn't have a virt-2.10 > machine type defined. Do we need to add it before release? > > (I don't know if there have in fact been any changes between > 2.9 and 2.10 that would be compatibility

Re: [Qemu-devel] [PATCH f0r 2.11] runstate/migrate: Two more transitions

2017-08-07 Thread Peter Xu
On Fri, Aug 04, 2017 at 06:50:11PM +0100, Dr. David Alan Gilbert (git) wrote: > From: "Dr. David Alan Gilbert" > > There's a race if someone does a 'stop' near the end of migrate; > the migration process goes through two runstates: > 'finish migrate' > 'postmigrate' > > If the user issue

Re: [Qemu-devel] [PATCH qemu v4 1/3] spapr_iommu: Realloc guest visible TCE table when hot(un)plugging vfio-pci

2017-08-07 Thread Alexey Kardashevskiy
On 24/07/17 20:48, Alexey Kardashevskiy wrote: > On 24/07/17 15:53, David Gibson wrote: >> On Thu, Jul 20, 2017 at 05:22:29PM +1000, Alexey Kardashevskiy wrote: >>> This replaces g_malloc() with spapr_tce_alloc_table() as this is >>> the standard way of allocating tables and this allows moving the

Re: [Qemu-devel] [PATCH v4 00/22] Clean up around qmp() and hmp()

2017-08-07 Thread Fam Zheng
On Mon, 08/07 14:43, Fam Zheng wrote: > On Fri, 08/04 20:10, Fam Zheng wrote: > > On Fri, 08/04 06:50, Eric Blake wrote: > > > On 08/03/2017 08:54 PM, no-re...@patchew.org wrote: > > > > Hi, > > > > > > > > This series failed automatic build test. Please find the testing > > > > commands and > >

Re: [Qemu-devel] [PATCH v7 0/6] fsdev: qmp interface for io throttling

2017-08-07 Thread Pradeep Jagadeesh
On 7/7/2017 8:14 AM, Markus Armbruster wrote: Pradeep Jagadeesh writes: These patches provide the qmp interface, to query the io throttle status of the all fsdev devices that are present in a vm. also, it provides an interface to set the io throttle parameters of a fsdev to a required value. s

Re: [Qemu-devel] [PATCH v4 00/22] Clean up around qmp() and hmp()

2017-08-07 Thread Fam Zheng
On Thu, 08/03 18:54, no-re...@patchew.org wrote: > 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. As said in the sub-thread of this message, this is a false posit

[Qemu-devel] [Bug 1709025] [NEW] Disk corrupted after snapshot deletion

2017-08-07 Thread junchi
Public bug reported: I found the vm disk corruption after snapshot deletion sometimes(the probability is very low, I'm afraid i can't reproduce it). And I found there is a patch for it as follow, but I'm not sure whether the patch repaired the bug. Drain disk before snapshot deletion can't

Re: [Qemu-devel] [PATCH 04/17] nbd/client: fix nbd_send_request to return int

2017-08-07 Thread Daniel P. Berrange
On Fri, Aug 04, 2017 at 06:14:27PM +0300, Vladimir Sementsov-Ogievskiy wrote: > Fix nbd_send_request to return int, as it returns a return value > of nbd_write (which is int), and the only user of nbd_send_request's > return value (nbd_co_send_request) consider it as int too. The real problem here

Re: [Qemu-devel] [PATCH 05/17] block/nbd-client: get rid of ssize_t

2017-08-07 Thread Daniel P. Berrange
On Mon, Aug 07, 2017 at 09:57:30AM +0300, Vladimir Sementsov-Ogievskiy wrote: > 04.08.2017 19:11, Daniel P. Berrange wrote: > > On Fri, Aug 04, 2017 at 06:14:28PM +0300, Vladimir Sementsov-Ogievskiy > > wrote: > > > Use int variable for nbd_co_send_request return value (as > > > nbd_co_send_reques

Re: [Qemu-devel] Editing qemu source code

2017-08-07 Thread Stefan Hajnoczi
On Sun, Aug 06, 2017 at 01:44:52PM +0200, Stefan Weil wrote: > Am 06.08.2017 um 13:25 schrieb Shantanu Agarwal: > > Hello all, > > I was reading about qemu, trying to understand the source code. I found > > that vl.c is considered the main file of qemu source code from where all > > the execution s

Re: [Qemu-devel] [Qemu-block] [PATCH] block: drop bdrv_set_key from BlockDriver

2017-08-07 Thread Stefan Hajnoczi
On Fri, Aug 04, 2017 at 05:26:55PM +0200, Paolo Bonzini wrote: > This is not used anymore since c01c214b69 ("block: remove all encryption > handling APIs", 2017-07-11). > > Signed-off-by: Paolo Bonzini > --- > include/block/block_int.h | 1 - > 1 file changed, 1 deletion(-) Reviewed-by: Stefan

Re: [Qemu-devel] [PATCH v6 3/4] sockets: factor out create_fast_reuse_socket

2017-08-07 Thread Daniel P. Berrange
On Sat, Jul 29, 2017 at 11:18:17PM +0200, Knut Omang wrote: > Another refactoring step to prepare for fixing the problem > exposed with the test-listen test in the previous commit > > Signed-off-by: Knut Omang > --- > util/qemu-sockets.c | 15 --- > 1 file changed, 12 insertions(+),

Re: [Qemu-devel] [PATCH v6 4/4] sockets: Handle race condition between binds to the same port

2017-08-07 Thread Daniel P. Berrange
On Sat, Jul 29, 2017 at 11:18:18PM +0200, Knut Omang wrote: > If an offset of ports is specified to the inet_listen_saddr function(), > and two or more processes tries to bind from these ports at the same time, > occasionally more than one process may be able to bind to the same > port. The conditi

Re: [Qemu-devel] [PATCH for-2.10] quorum: Handle bdrv_getlength() failures in quorum_co_flush()

2017-08-07 Thread Alberto Garcia
On Fri 04 Aug 2017 05:44:00 PM CEST, Eric Blake wrote: >> --- a/block/quorum.c >> +++ b/block/quorum.c >> @@ -785,8 +785,9 @@ static coroutine_fn int quorum_co_flush(BlockDriverState >> *bs) >> for (i = 0; i < s->num_children; i++) { >> result = bdrv_co_flush(s->children[i]->bs); >>

Re: [Qemu-devel] [PATCH v6 1/4] tests: Add test-listen - a stress test for QEMU socket listen

2017-08-07 Thread Daniel P. Berrange
On Sat, Jul 29, 2017 at 11:18:15PM +0200, Knut Omang wrote: > There's a potential race condition between multiple bind()'s > attempting to bind to the same port, which occasionally > allows more than one bind to succeed against the same port. > > When a subsequent listen() call is made with the sa

[Qemu-devel] [PATCH v2 3/4] i386/kvm: introduce tsc_is_stable_and_known()

2017-08-07 Thread Ladi Prosek
Move the "is TSC stable and known" condition to a reusable helper. Signed-off-by: Ladi Prosek --- target/i386/kvm.c | 13 ++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/target/i386/kvm.c b/target/i386/kvm.c index 15d56ae..2dc01c9 100644 --- a/target/i386/kvm.c +++ b

[Qemu-devel] [PATCH v2 1/4] i386/kvm: use a switch statement for MSR detection

2017-08-07 Thread Ladi Prosek
Switch is easier on the eye and might lead to better codegen. Signed-off-by: Ladi Prosek --- target/i386/kvm.c | 75 +++ 1 file changed, 31 insertions(+), 44 deletions(-) diff --git a/target/i386/kvm.c b/target/i386/kvm.c index 6db7783..b14a0d

[Qemu-devel] [PATCH v2 0/4] i386/kvm: advertise Hyper-V frequency MSRs

2017-08-07 Thread Ladi Prosek
This is the QEMU part of the changes required for nested Hyper-V to read timestamps with RDTSC + TSC page. Without exposing the frequency MSRs, Windows with the Hyper-V role enabled use the much slower HV_X64_MSR_TIME_REF_COUNT (0x4020) RDMSR to read timestamps. The new registers are exposed o

[Qemu-devel] [PATCH v2 2/4] i386/kvm: set tsc_khz before configuring Hyper-V CPUID

2017-08-07 Thread Ladi Prosek
Timing-related Hyper-V enlightenments will benefit from knowing the final tsc_khz value. This commit just moves the code in preparation for further changes. Signed-off-by: Ladi Prosek --- target/i386/kvm.c | 38 +++--- 1 file changed, 19 insertions(+), 19 deletion

[Qemu-devel] [PATCH v2 4/4] i386/kvm: advertise Hyper-V frequency MSRs

2017-08-07 Thread Ladi Prosek
As of kernel commit eb82feea59d6 ("KVM: hyperv: support HV_X64_MSR_TSC_FREQUENCY and HV_X64_MSR_APIC_FREQUENCY"), KVM supports two new MSRs which are required for nested Hyper-V to read timestamps with RDTSC + TSC page. This commit makes QEMU advertise the MSRs with CPUID.4003H:EAX[11] and CPU

Re: [Qemu-devel] [Qemu-ppc] [PATCH] target/ppc: Only set PCR in kvm if actually in a compat mode

2017-08-07 Thread Greg Kurz
On Fri, 4 Aug 2017 12:35:30 +1000 David Gibson wrote: > On Thu, Aug 03, 2017 at 07:28:06PM +0200, Greg Kurz wrote: > > On Thu, 13 Jul 2017 11:21:18 +1000 > > David Gibson wrote: > > > > > On Wed, Jul 12, 2017 at 04:45:17PM +1000, Suraj Jitindar Singh wrote: > > > > On Mon, 2017-07-03 at 19:

Re: [Qemu-devel] [PATCH 04/17] nbd/client: fix nbd_send_request to return int

2017-08-07 Thread Vladimir Sementsov-Ogievskiy
07.08.2017 11:23, Daniel P. Berrange wrote: On Fri, Aug 04, 2017 at 06:14:27PM +0300, Vladimir Sementsov-Ogievskiy wrote: Fix nbd_send_request to return int, as it returns a return value of nbd_write (which is int), and the only user of nbd_send_request's return value (nbd_co_send_request) consi

Re: [Qemu-devel] [RFC 22/29] migration: new message MIG_RP_MSG_RECV_BITMAP

2017-08-07 Thread Dr. David Alan Gilbert
* Peter Xu (pet...@redhat.com) wrote: > On Fri, Aug 04, 2017 at 10:49:42AM +0100, Dr. David Alan Gilbert wrote: > > * Peter Xu (pet...@redhat.com) wrote: > > > On Thu, Aug 03, 2017 at 11:50:22AM +0100, Dr. David Alan Gilbert wrote: > > > > > +/* Size of the bitmap, in bytes */ > > > > > +si

Re: [Qemu-devel] [PULL for-2.10 0/3] TCG misc patches

2017-08-07 Thread Peter Maydell
On 3 August 2017 at 19:12, Richard Henderson wrote: > Two of these have been posted before. The third I discovered in > testing on a Sparc host yesterday. > > > r~ > > > The following changes since commit aaaec6acad7cf97372d48c1b09126a09697519c8: > > Update version for v2.10.0-rc1 release (2017

Re: [Qemu-devel] [PATCH v6 1/4] tests: Add test-listen - a stress test for QEMU socket listen

2017-08-07 Thread Knut Omang
On Mon, 2017-08-07 at 09:45 +0100, Daniel P. Berrange wrote: > On Sat, Jul 29, 2017 at 11:18:15PM +0200, Knut Omang wrote: > > There's a potential race condition between multiple bind()'s > > attempting to bind to the same port, which occasionally > > allows more than one bind to succeed against th

Re: [Qemu-devel] [PATCH v7 6/6] fsdev: QMP interface for throttling

2017-08-07 Thread Pradeep Jagadeesh
On 7/6/2017 8:47 PM, Markus Armbruster wrote: Pradeep Jagadeesh writes: This patch introduces qmp interfaces for the fsdev devices. This provides two interfaces one for querying info of all the fsdev devices. The second one to set the IO limits for the required fsdev device. Signed-off-by: Pr

Re: [Qemu-devel] [PATCH v7 1/6] throttle: factor out duplicate code

2017-08-07 Thread Pradeep Jagadeesh
On 7/10/2017 4:41 PM, Eric Blake wrote: On 07/04/2017 10:30 AM, Pradeep Jagadeesh wrote: This patch factor out the duplicate throttle code that was present in s/This patch factor/Factor/ It's okay to write commit messages in the imperative tense; the easiest way I know to start a good message

Re: [Qemu-devel] [PATCH v7 5/6] fsdev: hmp interface for throttling

2017-08-07 Thread Pradeep Jagadeesh
On 7/6/2017 8:15 PM, Markus Armbruster wrote: Pradeep Jagadeesh writes: This patch introduces hmp interfaces for the fsdev devices. Signed-off-by: Pradeep Jagadeesh Fails to compile, first error: /work/armbru/qemu/hmp.c: In function ‘hmp_fsdev_set_io_throttle’: /work/armbru/qemu/hmp.c:179

Re: [Qemu-devel] [PATCH v4 5/9] s390x/ccw: create s390 phb conditionally

2017-08-07 Thread Cornelia Huck
On Fri, 4 Aug 2017 15:20:26 +0200 David Hildenbrand wrote: > On 04.08.2017 13:29, Cornelia Huck wrote: > > Don't create the s390 pci host bridge if we do not provide the zpci > > facility. > > > > Reviewed-by: Thomas Huth > > Acked-by: Christian Borntraeger > > Signed-off-by: Cornelia Huck

Re: [Qemu-devel] [PATCH v4 8/9] s390x/kvm: msi route fixup for non-pci

2017-08-07 Thread Cornelia Huck
On Fri, 4 Aug 2017 15:18:14 +0200 David Hildenbrand wrote: > On 04.08.2017 13:29, Cornelia Huck wrote: > > If we don't provide pci, we cannot have a pci device for which we > > have to translate to adapter routes: just return -ENODEV. > > > > Signed-off-by: Cornelia Huck > > --- > > target/s39

Re: [Qemu-devel] [PATCH v4 7/9] s390x/pci: fence off instructions for non-pci

2017-08-07 Thread Cornelia Huck
On Fri, 4 Aug 2017 15:17:25 +0200 David Hildenbrand wrote: > On 04.08.2017 13:29, Cornelia Huck wrote: > > If a guest running on a machine without zpci issues a pci instruction, > > throw them an exception. > > > > Reviewed-by: Thomas Huth > > Signed-off-by: Cornelia Huck > > --- > > target/s

Re: [Qemu-devel] [PATCH v7 2/6] qmp: Create IOThrottle structure

2017-08-07 Thread Pradeep Jagadeesh
On 7/6/2017 7:55 PM, Markus Armbruster wrote: Pradeep Jagadeesh writes: This patch enables qmp interfaces for the fsdev devices. This provides two interfaces one for querying info of all the fsdev devices. The second one to set the IO limits for the required fsdev device. Signed-off-by: Prade

Re: [Qemu-devel] [PULL 02/17] cpu_physical_memory_sync_dirty_bitmap: Fix alignment check

2017-08-07 Thread Alex Bennée
Dr. David Alan Gilbert writes: > * Peter Maydell (peter.mayd...@linaro.org) wrote: >> On 1 August 2017 at 17:17, Paolo Bonzini wrote: >> > From: "Dr. David Alan Gilbert" >> > >> > This code has an optimised, word aligned version, and a boring >> > unaligned version. Recently 084140bd498909 fi

Re: [Qemu-devel] [PATCH v6 1/4] tests: Add test-listen - a stress test for QEMU socket listen

2017-08-07 Thread Daniel P. Berrange
On Mon, Aug 07, 2017 at 11:21:25AM +0200, Knut Omang wrote: > On Mon, 2017-08-07 at 09:45 +0100, Daniel P. Berrange wrote: > > On Sat, Jul 29, 2017 at 11:18:15PM +0200, Knut Omang wrote: > > > There's a potential race condition between multiple bind()'s > > > attempting to bind to the same port, wh

Re: [Qemu-devel] [PATCH v4 5/9] s390x/ccw: create s390 phb conditionally

2017-08-07 Thread David Hildenbrand
On 07.08.2017 12:00, Cornelia Huck wrote: > On Fri, 4 Aug 2017 15:20:26 +0200 > David Hildenbrand wrote: > >> On 04.08.2017 13:29, Cornelia Huck wrote: >>> Don't create the s390 pci host bridge if we do not provide the zpci >>> facility. >>> >>> Reviewed-by: Thomas Huth >>> Acked-by: Christian B

Re: [Qemu-devel] [PATCH v6 1/4] tests: Add test-listen - a stress test for QEMU socket listen

2017-08-07 Thread Knut Omang
On Mon, 2017-08-07 at 11:27 +0100, Daniel P. Berrange wrote: > On Mon, Aug 07, 2017 at 11:21:25AM +0200, Knut Omang wrote: > > On Mon, 2017-08-07 at 09:45 +0100, Daniel P. Berrange wrote: > > > On Sat, Jul 29, 2017 at 11:18:15PM +0200, Knut Omang wrote: > > > > There's a potential race condition be

Re: [Qemu-devel] [Qemu-block] [PATCH 1/2] block/vhdx: check error return of bdrv_getlength()

2017-08-07 Thread Kevin Wolf
Am 07.08.2017 um 05:08 hat Jeff Cody geschrieben: > Calls to bdrv_getlength() were not checking for error. In vhdx.c, this > can lead to truncating an image file, so it is a definite bug. In > vhdx-log.c, the path for improper behavior is less clear, but it is best > to check in any case. > > Re

Re: [Qemu-devel] [Qemu-block] [PATCH 2/2] block/vhdx: check for offset overflow to bdrv_truncate()

2017-08-07 Thread Kevin Wolf
Am 07.08.2017 um 05:08 hat Jeff Cody geschrieben: > VHDX uses uint64_t types for most offsets, following the VHDX spec. > However, bdrv_truncate() takes an int64_t value for the truncating > offset. Check for overflow before calling bdrv_truncate(). > > N.B.: For a compliant image this is not an

Re: [Qemu-devel] [Qemu-block] [PATCH 0/2] VHDX cleanup

2017-08-07 Thread Kevin Wolf
Am 07.08.2017 um 05:08 hat Jeff Cody geschrieben: > Two VHDX items cleaned up: > > 1. Check for error when calling bdrv_getlength() [Markus] > > 2. Check for overflow in offset prior to calling bdrv_truncate(). This doesn't look like cleanups to me, but like proper fixes. I think it would still

[Qemu-devel] [PATCH v7 0/4] Unit test+fix for problem with QEMU handling of multiple bind()s to the same port

2017-08-07 Thread Knut Omang
This series contains: * a unit test that exposes a race condition which causes QEMU to fail to find a port even when there is plenty of available ports. * a refactor of the qemu-sockets inet_listen_saddr() function to better handle this situation. Changes from v6: * Changed license of the (new

[Qemu-devel] [PATCH v7 3/4] sockets: factor out create_fast_reuse_socket

2017-08-07 Thread Knut Omang
Another refactoring step to prepare for fixing the problem exposed with the test-listen test in the previous commit Signed-off-by: Knut Omang Reviewed-by: Daniel P. Berrange --- util/qemu-sockets.c | 15 --- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/util/qemu-so

[Qemu-devel] [PATCH v7 1/4] tests: Add test-listen - a stress test for QEMU socket listen

2017-08-07 Thread Knut Omang
There's a potential race condition between multiple bind()'s attempting to bind to the same port, which occasionally allows more than one bind to succeed against the same port. When a subsequent listen() call is made with the same socket only one will succeed. The current QEMU code does however n

[Qemu-devel] [PATCH v7 4/4] sockets: Handle race condition between binds to the same port

2017-08-07 Thread Knut Omang
If an offset of ports is specified to the inet_listen_saddr function(), and two or more processes tries to bind from these ports at the same time, occasionally more than one process may be able to bind to the same port. The condition is detected by listen() but too late to avoid a failure. This fu

[Qemu-devel] [PATCH v7 2/4] sockets: factor out a new try_bind() function

2017-08-07 Thread Knut Omang
A refactoring step to prepare for the problem exposed by the test-listen test in the previous commit. Simplify and reorganize the IPv6 specific extra measures and move it out of the for loop to increase code readability. No semantic changes. Signed-off-by: Knut Omang Reviewed-by: Daniel P. Berra

Re: [Qemu-devel] [PATCH v2 10/13] vvfat: correctly generate numeric-tail of short file names

2017-08-07 Thread Eric Blake
On 08/05/2017 01:52 PM, Pranith Kumar wrote: > FYI, > > This commit breaks the build with gcc-7: > > CC block/vvfat.o > qemu/block/vvfat.c: In function ‘read_directory’: > qemu/block/vvfat.c:605:37: error: ‘__builtin___sprintf_chk’ may write > a terminating nul past the end of the destinat

Re: [Qemu-devel] [PATCH v4 5/9] s390x/ccw: create s390 phb conditionally

2017-08-07 Thread Cornelia Huck
On Mon, 7 Aug 2017 12:21:30 +0200 David Hildenbrand wrote: > On 07.08.2017 12:00, Cornelia Huck wrote: > > On Fri, 4 Aug 2017 15:20:26 +0200 > > David Hildenbrand wrote: > > > >> On 04.08.2017 13:29, Cornelia Huck wrote: > >>> Don't create the s390 pci host bridge if we do not provide the z

[Qemu-devel] [PULL 0/1] Tracing patches

2017-08-07 Thread Stefan Hajnoczi
The following changes since commit ac44ed2afb7c60255e989b163301479f5b4ecd04: Merge remote-tracking branch 'remotes/ehabkost/tags/machine-pull-request' into staging (2017-08-04 13:46:22 +0100) are available in the git repository at: git://github.com/stefanha/qemu.git tags/tracing-pull-reques

Re: [Qemu-devel] [PATCH] kvm: workaround build break on gcc-7.1.1 / fedora26

2017-08-07 Thread Greg Kurz
On Thu, 3 Aug 2017 13:56:45 -0500 Eric Blake wrote: > On 08/03/2017 01:38 PM, Greg Kurz wrote: > > The following code snippet spits a warning with gcc-7.1.1-3.fc26 and -Wall > > on > > ppc64le AND x86_64: > > > > int foo(void) > > { > > char empty_array[] = { }; > > int i, ret = 0; > >

[Qemu-devel] [PULL 1/1] block: move trace probes into bdrv_co_preadv|pwritev

2017-08-07 Thread Stefan Hajnoczi
From: "Daniel P. Berrange" There are trace probes in bdrv_co_readv|writev, however, the block drivers are being gradually moved over to using the bdrv_co_preadv|pwritev functions instead. As a result some block drivers miss the current probes. Move the probes into bdrv_co_preadv|pwritev instead,

Re: [Qemu-devel] [PATCH 2/2] block/vhdx: check for offset overflow to bdrv_truncate()

2017-08-07 Thread Eric Blake
On 08/06/2017 10:08 PM, Jeff Cody wrote: > VHDX uses uint64_t types for most offsets, following the VHDX spec. > However, bdrv_truncate() takes an int64_t value for the truncating > offset. Check for overflow before calling bdrv_truncate(). > > N.B.: For a compliant image this is not an issue, as

Re: [Qemu-devel] [PATCH 1/2] block/vhdx: check error return of bdrv_getlength()

2017-08-07 Thread Eric Blake
On 08/06/2017 10:08 PM, Jeff Cody wrote: > Calls to bdrv_getlength() were not checking for error. In vhdx.c, this > can lead to truncating an image file, so it is a definite bug. In > vhdx-log.c, the path for improper behavior is less clear, but it is best > to check in any case. > > Reported-by

Re: [Qemu-devel] [PATCH for-2.10] quorum: Handle bdrv_getlength() failures in quorum_co_flush()

2017-08-07 Thread Eric Blake
On 08/07/2017 03:43 AM, Alberto Garcia wrote: > On Fri 04 Aug 2017 05:44:00 PM CEST, Eric Blake wrote: >>> --- a/block/quorum.c >>> +++ b/block/quorum.c >>> @@ -785,8 +785,9 @@ static coroutine_fn int >>> quorum_co_flush(BlockDriverState *bs) >>> for (i = 0; i < s->num_children; i++) { >>>

Re: [Qemu-devel] [PATCH 01/17] nbd/client: fix nbd_opt_go

2017-08-07 Thread Eric Blake
On 08/04/2017 10:14 AM, Vladimir Sementsov-Ogievskiy wrote: > Do not send NBD_OPT_ABORT to the broken server. After sending > NBD_REP_ACK on NBD_OPT_GO server is most probably in transmission > phase, when option sending is finished. > > Signed-off-by: Vladimir Sementsov-Ogievskiy > --- > nbd/cl

[Qemu-devel] [PATCH v2] kvm: workaround build break on gcc-7.1.1 / fedora26

2017-08-07 Thread Greg Kurz
Building QEMU on fedora26 with the latest gcc package fails: CC ppc64-softmmu/target/ppc/kvm.o In file included from include/sysemu/hw_accel.h:16:0, from target/ppc/kvm.c:31: target/ppc/kvm.c: In function ‘kvmppc_booke_watchdog_enable’: include/sysemu/kvm.h:449:35: error: ‘

Re: [Qemu-devel] [PATCH 02/17] nbd/client: refactor nbd_read_eof

2017-08-07 Thread Eric Blake
On 08/04/2017 10:14 AM, Vladimir Sementsov-Ogievskiy wrote: > Refactor nbd_read_eof to return 1 on success, 0 on eof, when no > data was read and <0 for other cases, because returned size of > read data is not actually used. > > Signed-off-by: Vladimir Sementsov-Ogievskiy > --- > nbd/nbd-interna

[Qemu-devel] [PATCH for-2.10] hw/arm/virt: Add 2.10 machine type

2017-08-07 Thread Eric Auger
Add virt-2.10 machine type. Signed-off-by: Eric Auger --- --- hw/arm/virt.c | 19 +-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/hw/arm/virt.c b/hw/arm/virt.c index 31739d7..6b7a0fe 100644 --- a/hw/arm/virt.c +++ b/hw/arm/virt.c @@ -1639,7 +1639,7 @@ static v

Re: [Qemu-devel] [PATCH 04/17] nbd/client: fix nbd_send_request to return int

2017-08-07 Thread Eric Blake
On 08/07/2017 03:57 AM, Vladimir Sementsov-Ogievskiy wrote: > 07.08.2017 11:23, Daniel P. Berrange wrote: >> On Fri, Aug 04, 2017 at 06:14:27PM +0300, Vladimir Sementsov-Ogievskiy >> wrote: >>> Fix nbd_send_request to return int, as it returns a return value >>> of nbd_write (which is int), and the

Re: [Qemu-devel] [PATCH 06/17] block/nbd-client: fix nbd_read_reply_entry

2017-08-07 Thread Eric Blake
On 08/04/2017 10:14 AM, Vladimir Sementsov-Ogievskiy wrote: > Set reply.handle to 0 on error path to prevent normal path of > nbd_co_receive_reply. > > Signed-off-by: Vladimir Sementsov-Ogievskiy > --- > block/nbd-client.c | 1 + > 1 file changed, 1 insertion(+) Can you document a case where no

Re: [Qemu-devel] [PATCH v2] kvm: workaround build break on gcc-7.1.1 / fedora26

2017-08-07 Thread Paolo Bonzini
On 07/08/2017 13:36, Greg Kurz wrote: > Building QEMU on fedora26 with the latest gcc package fails: > > CC ppc64-softmmu/target/ppc/kvm.o > In file included from include/sysemu/hw_accel.h:16:0, > from target/ppc/kvm.c:31: > target/ppc/kvm.c: In function ‘kvmppc_booke_watch

Re: [Qemu-devel] [PATCH 11/17] block/nbd-client: fix nbd_co_request: set s->reply.handle to 0 on error

2017-08-07 Thread Eric Blake
On 08/04/2017 10:14 AM, Vladimir Sementsov-Ogievskiy wrote: > We set s->reply.handle to 0 on one error path and don't set on another. > For consistancy and to avoid assert in nbd_read_reply_entry let's > set s->reply.handle to 0 in case of wrong handle too. > > Signed-off-by: Vladimir Sementsov-Og

Re: [Qemu-devel] [PATCH 04/17] nbd/client: fix nbd_send_request to return int

2017-08-07 Thread Daniel P. Berrange
On Mon, Aug 07, 2017 at 11:57:12AM +0300, Vladimir Sementsov-Ogievskiy wrote: > 07.08.2017 11:23, Daniel P. Berrange wrote: > > On Fri, Aug 04, 2017 at 06:14:27PM +0300, Vladimir Sementsov-Ogievskiy > > wrote: > > > Fix nbd_send_request to return int, as it returns a return value > > > of nbd_writ

Re: [Qemu-devel] [PATCH 02/17] nbd/client: refactor nbd_read_eof

2017-08-07 Thread Vladimir Sementsov-Ogievskiy
07.08.2017 14:42, Eric Blake wrote: On 08/04/2017 10:14 AM, Vladimir Sementsov-Ogievskiy wrote: Refactor nbd_read_eof to return 1 on success, 0 on eof, when no data was read and <0 for other cases, because returned size of read data is not actually used. Signed-off-by: Vladimir Sementsov-Ogievs

Re: [Qemu-devel] [PATCH v4 08/15] qcow2: set inactive flag

2017-08-07 Thread Anton Nefedov
On 08/04/2017 11:00 PM, Eric Blake wrote: On 08/01/2017 09:19 AM, Anton Nefedov wrote: Qcow2State and BlockDriverState flags have to be in sync Signed-off-by: Anton Nefedov --- block/qcow2.c | 1 + 1 file changed, 1 insertion(+) Is this a bug fix needed for 2.10? I don't think this bi

Re: [Qemu-devel] [PATCH for-2.10] quorum: Handle bdrv_getlength() failures in quorum_co_flush()

2017-08-07 Thread Alberto Garcia
On Mon 07 Aug 2017 01:29:09 PM CEST, Eric Blake wrote: > On 08/07/2017 03:43 AM, Alberto Garcia wrote: >> On Fri 04 Aug 2017 05:44:00 PM CEST, Eric Blake wrote: --- a/block/quorum.c +++ b/block/quorum.c @@ -785,8 +785,9 @@ static coroutine_fn int quorum_co_flush(BlockDriverStat

Re: [Qemu-devel] [PATCH 2/2] block/vhdx: check for offset overflow to bdrv_truncate()

2017-08-07 Thread Jeff Cody
On Mon, Aug 07, 2017 at 06:24:30AM -0500, Eric Blake wrote: > On 08/06/2017 10:08 PM, Jeff Cody wrote: > > VHDX uses uint64_t types for most offsets, following the VHDX spec. > > However, bdrv_truncate() takes an int64_t value for the truncating > > offset. Check for overflow before calling bdrv_t

Re: [Qemu-devel] [PATCH for-2.10] hw/arm/virt: Add 2.10 machine type

2017-08-07 Thread Andrew Jones
On Mon, Aug 07, 2017 at 11:49:41AM +, Eric Auger wrote: > Add virt-2.10 machine type. > > Signed-off-by: Eric Auger > > --- > --- > hw/arm/virt.c | 19 +-- > 1 file changed, 17 insertions(+), 2 deletions(-) > > diff --git a/hw/arm/virt.c b/hw/arm/virt.c > index 31739d7..6b7

Re: [Qemu-devel] [PATCH v2] kvm: workaround build break on gcc-7.1.1 / fedora26

2017-08-07 Thread Cornelia Huck
On Mon, 07 Aug 2017 13:36:44 +0200 Greg Kurz wrote: > Building QEMU on fedora26 with the latest gcc package fails: > > CC ppc64-softmmu/target/ppc/kvm.o > In file included from include/sysemu/hw_accel.h:16:0, > from target/ppc/kvm.c:31: > target/ppc/kvm.c: In function ‘kv

Re: [Qemu-devel] [Qemu-block] [PATCH 1/2] block/vhdx: check error return of bdrv_getlength()

2017-08-07 Thread Jeff Cody
On Mon, Aug 07, 2017 at 12:46:30PM +0200, Kevin Wolf wrote: > Am 07.08.2017 um 05:08 hat Jeff Cody geschrieben: > > Calls to bdrv_getlength() were not checking for error. In vhdx.c, this > > can lead to truncating an image file, so it is a definite bug. In > > vhdx-log.c, the path for improper be

Re: [Qemu-devel] [PATCH v4 02/15] blkverify: set supported write/zero flags

2017-08-07 Thread Anton Nefedov
On 08/04/2017 06:23 PM, Eric Blake wrote: On 08/01/2017 09:18 AM, Anton Nefedov wrote: Signed-off-by: Anton Nefedov --- block/blkverify.c | 9 + 1 file changed, 9 insertions(+) Basically, blkverify supports a flag if BOTH of its underlying files also support the flag; if either sid

Re: [Qemu-devel] [PATCH f0r 2.11] runstate/migrate: Two more transitions

2017-08-07 Thread Dr. David Alan Gilbert
* Peter Xu (pet...@redhat.com) wrote: > On Fri, Aug 04, 2017 at 06:50:11PM +0100, Dr. David Alan Gilbert (git) wrote: > > From: "Dr. David Alan Gilbert" > > > > There's a race if someone does a 'stop' near the end of migrate; > > the migration process goes through two runstates: > > 'finish m

[Qemu-devel] [PATCH for-2.10] quorum: Set sectors-count to 0 when reporting a flush error

2017-08-07 Thread Alberto Garcia
The QUORUM_REPORT_BAD event has fields to report the sector in which the error was detected and the number of affected sectors starting from that one. This is important for read and write errors, but not for flush errors. For flush errors the current code reports the total size of the disk image.

[Qemu-devel] [PATCH V8 2/6] qmp: Create IOThrottle structure

2017-08-07 Thread Pradeep Jagadeesh
This patch enables qmp interfaces for the fsdev devices. This provides two interfaces one for querying info of all the fsdev devices. The second one to set the IO limits for the required fsdev device. Signed-off-by: Pradeep Jagadeesh Reviewed-by: Greg Kurz Reviewed-by: Eric Blake Reviewed-by: A

[Qemu-devel] [PATCH V8 3/6] throttle: move out function to reuse the code

2017-08-07 Thread Pradeep Jagadeesh
This patch move out the throttle code to util/throttle.c to maximize the reusability of the code.The same code is also used by fsdev. Signed-off-by: Pradeep Jagadeesh --- blockdev.c | 53 +++- include/qemu/throttle-options.h | 3 +++ util/thr

[Qemu-devel] [PATCH v8 0/6] fsdev: qmp interface for io throttling

2017-08-07 Thread Pradeep Jagadeesh
These patches provide the qmp interface, to query the io throttle status of the all fsdev devices that are present in a vm. also, it provides an interface to set the io throttle parameters of a fsdev to a required value. some of the patches also remove the duplicate code that was present in block

[Qemu-devel] [PATCH V8 4/6] hmp: create a throttle initialization function for code reusability

2017-08-07 Thread Pradeep Jagadeesh
This patch creates a throttle initialization function to maximize the code reusability. The same code is also used by fsdev. Acked-by: Dr. David Alan Gilbert Signed-off-by: Pradeep Jagadeesh --- hmp.c | 19 +-- 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/hmp.c

[Qemu-devel] [PATCH V8 5/6] fsdev: QMP interface for throttling

2017-08-07 Thread Pradeep Jagadeesh
This patch introduces qmp interfaces for the fsdev devices. This provides two interfaces one for querying info of all the fsdev devices. The second one to set the IO limits for the required fsdev device. Signed-off-by: Pradeep Jagadeesh --- Makefile| 4 +++ fsdev/qemu-fsdev-

[Qemu-devel] [PATCH V8 1/6] throttle: factor out duplicate code

2017-08-07 Thread Pradeep Jagadeesh
This patch factor out the duplicate throttle code that was present in block and fsdev devices. Signed-off-by: Pradeep Jagadeesh Reviewed-by: Alberto Garcia --- blockdev.c | 44 +-- fsdev/qemu-fsdev-throttle.c | 44 ++--

[Qemu-devel] [PATCH v2 for-2.10 0/4] VHDX bugfixes

2017-08-07 Thread Jeff Cody
Some VHDX bug fixes, including: 1. Checking bdrv_getlength(), bdrv_flush(), and bdrv_truncate() return values Changes from v1->v2: git-backport-diff -r qemu/master.. -u vhdx-fixes-v1 Key: [] : patches are identical [] : number of functional differences between upstream/downstream patch

[Qemu-devel] [PATCH V8 6/6] fsdev: hmp interface for throttling

2017-08-07 Thread Pradeep Jagadeesh
This patch introduces hmp interfaces for the fsdev devices. Signed-off-by: Pradeep Jagadeesh --- hmp-commands-info.hx | 18 +++ hmp-commands.hx | 19 hmp.c| 62 hmp.h| 4

[Qemu-devel] [PATCH v2 for-2.10 2/4] block/vhdx: check for offset overflow to bdrv_truncate()

2017-08-07 Thread Jeff Cody
VHDX uses uint64_t types for most offsets, following the VHDX spec. However, bdrv_truncate() takes an int64_t value for the truncating offset. Check for overflow before calling bdrv_truncate(). While we are here, replace the bit shifting with QEMU_ALIGN_UP as well. N.B.: For a compliant image th

Re: [Qemu-devel] [PATCH V8 2/6] qmp: Create IOThrottle structure

2017-08-07 Thread Eric Blake
On 08/07/2017 07:37 AM, Pradeep Jagadeesh wrote: > This patch enables qmp interfaces for the fsdev > devices. This provides two interfaces one > for querying info of all the fsdev devices. The second one > to set the IO limits for the required fsdev device. > > Signed-off-by: Pradeep Jagadeesh >

[Qemu-devel] [PATCH v2 for-2.10 1/4] block/vhdx: check error return of bdrv_getlength()

2017-08-07 Thread Jeff Cody
Calls to bdrv_getlength() were not checking for error. In vhdx.c, this can lead to truncating an image file, so it is a definite bug. In vhdx-log.c, the path for improper behavior is less clear, but it is best to check in any case. Some minor code movement of the log_guid intialization, as well.

[Qemu-devel] [PATCH v2 for-2.10 4/4] block/vhdx: check error return of bdrv_truncate()

2017-08-07 Thread Jeff Cody
Signed-off-by: Jeff Cody --- block/vhdx-log.c | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/block/vhdx-log.c b/block/vhdx-log.c index a27dc05..14b724e 100644 --- a/block/vhdx-log.c +++ b/block/vhdx-log.c @@ -558,7 +558,11 @@ static int vhdx_log_flush(BlockDriverState *b

[Qemu-devel] [PATCH v2 for-2.10 3/4] block/vhdx: check error return of bdrv_flush()

2017-08-07 Thread Jeff Cody
Reported-by: Kevin Wolf Signed-off-by: Jeff Cody --- block/vhdx-log.c | 17 ++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/block/vhdx-log.c b/block/vhdx-log.c index 9597223..a27dc05 100644 --- a/block/vhdx-log.c +++ b/block/vhdx-log.c @@ -565,7 +565,10 @@ static

Re: [Qemu-devel] [PATCH V8 5/6] fsdev: QMP interface for throttling

2017-08-07 Thread Eric Blake
On 08/07/2017 07:37 AM, Pradeep Jagadeesh wrote: > This patch introduces qmp interfaces for the fsdev > devices. This provides two interfaces one > for querying info of all the fsdev devices. The second one > to set the IO limits for the required fsdev device. > > Signed-off-by: Pradeep Jagadeesh

Re: [Qemu-devel] [PATCH for-2.10] quorum: Set sectors-count to 0 when reporting a flush error

2017-08-07 Thread Eric Blake
On 08/07/2017 07:36 AM, Alberto Garcia wrote: > The QUORUM_REPORT_BAD event has fields to report the sector in which > the error was detected and the number of affected sectors starting > from that one. This is important for read and write errors, but not > for flush errors. > > For flush errors t

Re: [Qemu-devel] [PATCH V8 5/6] fsdev: QMP interface for throttling

2017-08-07 Thread Pradeep Jagadeesh
On 8/7/2017 2:44 PM, Eric Blake wrote: On 08/07/2017 07:37 AM, Pradeep Jagadeesh wrote: This patch introduces qmp interfaces for the fsdev devices. This provides two interfaces one for querying info of all the fsdev devices. The second one to set the IO limits for the required fsdev device. Sig

Re: [Qemu-devel] [Qemu-ppc] [RFC PATCH] booke206: fix MAS update on tlb miss

2017-08-07 Thread KONRAD Frederic
On 08/03/2017 03:13 PM, Thomas Huth wrote: On 03.08.2017 14:08, KONRAD Frederic wrote: On 08/03/2017 01:37 PM, Thomas Huth wrote: On 01.08.2017 10:44, KONRAD Frederic wrote: When a tlb instruction miss happen, rw is set to 0 at the bottom of cpu_ppc_handle_mmu_fault which cause the MAS upd

Re: [Qemu-devel] [PATCH v2 for-2.10 3/4] block/vhdx: check error return of bdrv_flush()

2017-08-07 Thread Eric Blake
On 08/07/2017 07:38 AM, Jeff Cody wrote: > Reported-by: Kevin Wolf > Signed-off-by: Jeff Cody > --- > block/vhdx-log.c | 17 ++--- > 1 file changed, 14 insertions(+), 3 deletions(-) > Reviewed-by: Eric Blake -- Eric Blake, Principal Software Engineer Red Hat, Inc. +1-9

Re: [Qemu-devel] [PATCH v2 for-2.10 4/4] block/vhdx: check error return of bdrv_truncate()

2017-08-07 Thread Eric Blake
On 08/07/2017 07:38 AM, Jeff Cody wrote: > Signed-off-by: Jeff Cody > --- > block/vhdx-log.c | 6 +- > 1 file changed, 5 insertions(+), 1 deletion(-) > Reviewed-by: Eric Blake > diff --git a/block/vhdx-log.c b/block/vhdx-log.c > index a27dc05..14b724e 100644 > --- a/block/vhdx-log.c > +++

Re: [Qemu-devel] [PATCH 06/17] block/nbd-client: fix nbd_read_reply_entry

2017-08-07 Thread Vladimir Sementsov-Ogievskiy
07.08.2017 14:52, Eric Blake wrote: On 08/04/2017 10:14 AM, Vladimir Sementsov-Ogievskiy wrote: Set reply.handle to 0 on error path to prevent normal path of nbd_co_receive_reply. Signed-off-by: Vladimir Sementsov-Ogievskiy --- block/nbd-client.c | 1 + 1 file changed, 1 insertion(+) Can y

Re: [Qemu-devel] About virtio device hotplug in Q35! 【外域邮件.谨慎查阅】

2017-08-07 Thread Bob Chen
Bad news... The performance had dropped dramatically when using emulated switches. I was referring to the PCIe doc at https://github.com/qemu/qemu/blob/master/docs/pcie.txt # qemu-system-x86_64_2.6.2 -enable-kvm -cpu host,kvm=off -machine q35,accel=kvm -nodefaults -nodefconfig \ -device ioh3420,i

Re: [Qemu-devel] About virtio device hotplug in Q35! 【外域邮件.谨慎查阅】

2017-08-07 Thread Bob Chen
Besides, I checked the lspci -vvv output, no capabilities of Access Control are seen. 2017-08-01 23:01 GMT+08:00 Alex Williamson : > On Tue, 1 Aug 2017 17:35:40 +0800 > Bob Chen wrote: > > > 2017-08-01 13:46 GMT+08:00 Alex Williamson : > > > > > On Tue, 1 Aug 2017 13:04:46 +0800 > > > Bob Chen

Re: [Qemu-devel] [Qemu-ppc] [PATCH v2 1/1] ppc: spapr: Make VCPU ID handling private to SPAPR

2017-08-07 Thread Greg Kurz
On Mon, 7 Aug 2017 16:33:29 +1000 Sam Bobroff wrote: > The concept of a VCPU ID that differs from the CPU's index > (cpu->cpu_index) exists only within SPAPR machines so, move the > functions ppc_get_vcpu_id() and ppc_get_cpu_by_vcpu_id() into spapr.c > and rename them appropriately. > > Signed-

Re: [Qemu-devel] [PULL 0/1] Tracing patches

2017-08-07 Thread Peter Maydell
On 7 August 2017 at 12:04, Stefan Hajnoczi wrote: > The following changes since commit ac44ed2afb7c60255e989b163301479f5b4ecd04: > > Merge remote-tracking branch 'remotes/ehabkost/tags/machine-pull-request' > into staging (2017-08-04 13:46:22 +0100) > > are available in the git repository at: >

Re: [Qemu-devel] [PATCH 11/17] block/nbd-client: fix nbd_co_request: set s->reply.handle to 0 on error

2017-08-07 Thread Vladimir Sementsov-Ogievskiy
07.08.2017 14:55, Eric Blake wrote: On 08/04/2017 10:14 AM, Vladimir Sementsov-Ogievskiy wrote: We set s->reply.handle to 0 on one error path and don't set on another. For consistancy and to avoid assert in nbd_read_reply_entry let's set s->reply.handle to 0 in case of wrong handle too. Signed-

Re: [Qemu-devel] [Qemu-block] [PATCH for-2.10] quorum: Set sectors-count to 0 when reporting a flush error

2017-08-07 Thread Kevin Wolf
Am 07.08.2017 um 14:36 hat Alberto Garcia geschrieben: > The QUORUM_REPORT_BAD event has fields to report the sector in which > the error was detected and the number of affected sectors starting > from that one. This is important for read and write errors, but not > for flush errors. > > For flush

Re: [Qemu-devel] [PATCH for-2.10] hw/arm/virt: Add 2.10 machine type

2017-08-07 Thread Peter Maydell
On 7 August 2017 at 13:14, Andrew Jones wrote: > On Mon, Aug 07, 2017 at 11:49:41AM +, Eric Auger wrote: >> Add virt-2.10 machine type. >> >> Signed-off-by: Eric Auger >> >> --- Applied to master, thanks. -- PMM

Re: [Qemu-devel] [PATCH v2 for-2.10 0/4] VHDX bugfixes

2017-08-07 Thread Kevin Wolf
Am 07.08.2017 um 14:38 hat Jeff Cody geschrieben: > > Some VHDX bug fixes, including: > > 1. Checking bdrv_getlength(), bdrv_flush(), and bdrv_truncate() return values Thanks, applied to the block branch. Kevin

  1   2   3   4   >