[Qemu-devel] [PATCH] virtio-scsi: remove unused argument to virtio_scsi_common_realize

2019-07-17 Thread Paolo Bonzini
The argument is not used and passing it clutters error propagation in the callers. So, get rid of it. Signed-off-by: Paolo Bonzini --- hw/scsi/vhost-scsi.c| 2 +- hw/scsi/vhost-user-scsi.c | 2 +- hw/scsi/virtio-scsi.c | 4 ++-- include/hw/virtio/virtio-scsi.h | 2 +-

Re: [Qemu-devel] [PATCH v2 11/11] iotests/257: test traditional sync modes

2019-07-17 Thread Max Reitz
On 16.07.19 18:58, John Snow wrote: > > > On 7/16/19 8:04 AM, Max Reitz wrote: >> On 16.07.19 02:01, John Snow wrote: >>> Signed-off-by: John Snow >>> --- >>> tests/qemu-iotests/257 | 41 +- >>> tests/qemu-iotests/257.out | 3089 >>> 2 files changed, 3

[Qemu-devel] [PATCH] vhost-user-scsi: Call virtio_scsi_common_unrealize() when device realize failed

2019-07-17 Thread Paolo Bonzini
From: Xie Yongji This avoids memory leak when device hotplug is failed. Signed-off-by: Xie Yongji Message-Id: <20190717004606.12444-2-xieyon...@baidu.com> Signed-off-by: Paolo Bonzini --- hw/scsi/vhost-user-scsi.c | 16 1 file changed, 12 insertions(+), 4 deletions(-) diff -

Re: [Qemu-devel] [Qemu-block] Fwd: virtio_scsi_ctx_check failed when detach virtio_scsi disk

2019-07-17 Thread l00284672
I reproduce it on qemu4.0.0 version again.  The bt is below: (gdb) bt #0  0x86aacbd0 in raise () from /lib64/libc.so.6 #1  0x86aadf7c in abort () from /lib64/libc.so.6 #2  0x86aa6124 in __assert_fail_base () from /lib64/libc.so.6 #3  0x86aa61a4 in __assert_fail ()

Re: [Qemu-devel] [PATCH v2 2/2] vhost-user-scsi: Call virtio_scsi_common_unrealize() when device realize failed

2019-07-17 Thread Paolo Bonzini
On 17/07/19 02:46, elohi...@gmail.com wrote: > From: Xie Yongji > > This avoids memory leak when device hotplug is failed. > > Signed-off-by: Xie Yongji > --- > hw/scsi/vhost-user-scsi.c | 16 > 1 file changed, 12 insertions(+), 4 deletions(-) > > diff --git a/hw/scsi/vhost-u

Re: [Qemu-devel] [RFC PATCH for 4.1?] target/ppc: move opcode decode tables to PowerPCCPU

2019-07-17 Thread Alex Bennée
David Gibson writes: > On Tue, Jul 16, 2019 at 01:13:52PM +0100, Alex Bennée wrote: >> The opcode decode tables aren't really part of the CPUPPCState but an >> internal implementation detail for the translator. This can cause >> problems with memcpy in cpu_copy as any table created during >> pp

Re: [Qemu-devel] [PATCH-for-4.2 1/1] Only enable the halt poll control MSR if it is supported by the host

2019-07-17 Thread Paolo Bonzini
On 16/07/19 23:44, Mark Kanda wrote: > diff --git a/target/i386/cpu.c b/target/i386/cpu.c > index a8bafdb8b9..dacbf7a9fe 100644 > --- a/target/i386/cpu.c > +++ b/target/i386/cpu.c > @@ -2838,7 +2838,6 @@ static PropValue kvm_default_props[] = { > { "kvm-asyncpf", "on" }, > { "kvm-steal-ti

Re: [Qemu-devel] [PATCH v2 3/4] tests: Run the iotests during "make check" again

2019-07-17 Thread Thomas Huth
On 16/07/2019 17.37, Max Reitz wrote: > On 16.07.19 14:28, Thomas Huth wrote: >> People often forget to run the iotests before submitting patches or pull >> requests - this is likely due to the fact that we do not run the tests >> during our mandatory "make check" tests yet. Now that we've got a pr

Re: [Qemu-devel] [PATCH v2 10/14] target/arm/kvm64: Add kvm_arch_get/put_sve

2019-07-17 Thread Andrew Jones
On Wed, Jun 26, 2019 at 05:22:34PM +0200, Richard Henderson wrote: > On 6/21/19 6:34 PM, Andrew Jones wrote: > > +/* > > + * If ARM_MAX_VQ is increased to be greater than 16, then we can no > > + * longer hard code slices to 1 in kvm_arch_put/get_sve(). > > + */ > > +QEMU_BUILD_BUG_ON(ARM_MAX_VQ >

Re: [Qemu-devel] [qemu-s390x] [PATCH for-4.1 1/2] s390x/pci: add some fallthrough annotations

2019-07-17 Thread Christian Borntraeger
On 17.07.19 10:54, Cornelia Huck wrote: > On Tue, 16 Jul 2019 14:34:22 -0400 > Collin Walling wrote: > >> On 7/16/19 11:20 AM, Cornelia Huck wrote: >>> On Wed, 10 Jul 2019 10:20:41 +0200 >>> Cornelia Huck wrote: >>> On Tue, 9 Jul 2019 18:55:34 -0400 Collin Walling wrote:

Re: [Qemu-devel] [PATCH v2 10/14] target/arm/kvm64: Add kvm_arch_get/put_sve

2019-07-17 Thread Andrew Jones
On Thu, Jun 27, 2019 at 04:02:24PM +0100, Dave Martin wrote: > Either way, it's entirely reasonable for userspace not to try to support > additional slices for now. We'll have plenty of time to plan away > across that bridge when we spot it on the horizon... Which makes me inclined to keep the ge

Re: [Qemu-devel] [PULL 08/10] target/arm: Conditionalize some asserts on aarch32 support

2019-07-17 Thread Laszlo Ersek
On 07/17/19 11:22, Laszlo Ersek wrote: > On 07/17/19 10:36, Laszlo Ersek wrote: >> On 07/16/19 22:10, Philippe Mathieu-Daudé wrote: >>> On 7/16/19 8:42 PM, Laszlo Ersek wrote: On 07/16/19 18:59, Peter Maydell wrote: > On Tue, 16 Jul 2019 at 17:51, Laszlo Ersek > wrote: >> The issu

Re: [Qemu-devel] [PULL 08/10] target/arm: Conditionalize some asserts on aarch32 support

2019-07-17 Thread Laszlo Ersek
On 07/17/19 10:36, Laszlo Ersek wrote: > On 07/16/19 22:10, Philippe Mathieu-Daudé wrote: >> On 7/16/19 8:42 PM, Laszlo Ersek wrote: >>> On 07/16/19 18:59, Peter Maydell wrote: On Tue, 16 Jul 2019 at 17:51, Laszlo Ersek wrote: > The issue still reproduces, so it makes sense for me to

Re: [Qemu-devel] [PATCH 3/3] ram: RAMBlock->offset is always aligned to a word

2019-07-17 Thread Paolo Bonzini
On 30/04/19 05:44, Wei Yang wrote: > RAMBlock->offset is calculated by find_ram_offset, which makes sure the > offset is aligned to a word. > > This patch removes the alignment check on offset and unnecessary > variable *word*. > > Signed-off-by: Wei Yang I would add an assertion instead, but o

Re: [Qemu-devel] [PATCH 2/3] migration/ram.c: start of cpu_physical_memory_sync_dirty_bitmap is always 0

2019-07-17 Thread Paolo Bonzini
On 17/07/19 03:13, Wei Yang wrote: > On Tue, May 14, 2019 at 03:21:08PM +0100, Dr. David Alan Gilbert wrote: >> * Wei Yang (richardw.y...@linux.intel.com) wrote: >>> Since start of cpu_physical_memory_sync_dirty_bitmap is always 0, we can >>> remove this parameter and simplify the calculation a bit

Re: [Qemu-devel] [PATCH v7 04/13] vfio: Add save and load functions for VFIO PCI devices

2019-07-17 Thread Dr. David Alan Gilbert
* Alex Williamson (alex.william...@redhat.com) wrote: > On Tue, 9 Jul 2019 15:19:11 +0530 > Kirti Wankhede wrote: > > > These functions save and restore PCI device specific data - config > > space of PCI device. > > Tested save and restore with MSI and MSIX type. > > > > Signed-off-by: Kirti Wan

Re: [Qemu-devel] [PATCH v2 06/12] block: Deep-clear inherits_from

2019-07-17 Thread Max Reitz
On 17.07.19 10:17, Kevin Wolf wrote: > Am 17.07.2019 um 09:47 hat Max Reitz geschrieben: >> On 16.07.19 19:01, Kevin Wolf wrote: >>> Am 03.07.2019 um 19:28 hat Max Reitz geschrieben: BDS.inherits_from does not always point to an immediate parent node. When launching a block job with a fil

Re: [Qemu-devel] [qemu-s390x] [PATCH for-4.1 1/2] s390x/pci: add some fallthrough annotations

2019-07-17 Thread Cornelia Huck
On Tue, 16 Jul 2019 14:34:22 -0400 Collin Walling wrote: > On 7/16/19 11:20 AM, Cornelia Huck wrote: > > On Wed, 10 Jul 2019 10:20:41 +0200 > > Cornelia Huck wrote: > > > >> On Tue, 9 Jul 2019 18:55:34 -0400 > >> Collin Walling wrote: > >> > >>> On 7/8/19 9:23 AM, Christian Borntraeger wro

Re: [Qemu-devel] [PATCH] chardev: race condition with tcp_chr_disconnect

2019-07-17 Thread Andrey Shinkevich
On 16/07/2019 17:24, Paolo Bonzini wrote: > On 16/07/19 15:08, Andrey Shinkevich wrote: >> The test check-qtest-x86_64: tests/qos-test hangs with the >> QTEST_VHOST_USER_FIXME set even without applying the series: > > Hmm it must have bitrot. :(( I hope I can look at it on Thursday. > > Paolo

Re: [Qemu-devel] [PATCH v2 00/14] target/arm/kvm: enable SVE in guests

2019-07-17 Thread Andrew Jones
On Thu, Jul 04, 2019 at 10:20:16AM +, Zhang, Lei wrote: > Hi Andrew, > > This patch series works fine for my use cases. > Please feel free to add. > >Tested-by: Zhang, Lei Thank you, Lei. > > I suppose v3 patches will be released. I'm looking forward to the v3 patches. I'm starting t

[Qemu-devel] [PATCH-for-4.1] virtio-balloon: fix QEMU crashes on pagesize > BALLOON_PAGE_SIZE

2019-07-17 Thread David Hildenbrand
We are using the wrong functions to set/clear bits, effectively touching multiple bits, writing out of range of the bitmap, resulting in memory corruptions. We have to use set_bit()/clear_bit() instead. Can easily be reproduced by starting a qemu guest on hugetlbfs memory, inflating the balloon. Q

Re: [Qemu-devel] [PATCH v2 13/14] target/arm/cpu64: max cpu: Support sve properties with KVM

2019-07-17 Thread Andrew Jones
On Fri, Jun 28, 2019 at 05:55:50PM +0200, Auger Eric wrote: > Hi Drew, > > On 6/21/19 6:34 PM, Andrew Jones wrote: > > Extend the SVE vq map initialization and validation with KVM's > > supported vector lengths when KVM is enabled. In order to determine > > and select supported lengths we add two

Re: [Qemu-devel] [Qemu-block] Fwd: virtio_scsi_ctx_check failed when detach virtio_scsi disk

2019-07-17 Thread Kevin Wolf
Am 16.07.2019 um 04:06 hat l00284672 geschrieben: > Forwarded Message > Subject: virtio_scsi_ctx_check failed when detach virtio_scsi disk > Date: Mon, 15 Jul 2019 23:34:24 +0800 > From: l00284672 > To: kw...@redhat.com, be...@igalia.com, Stefan Hajnoczi >

Re: [Qemu-devel] [PATCH for-4.1? 1/4] qcow2: Fix .bdrv_has_zero_init()

2019-07-17 Thread Max Reitz
On 16.07.19 18:54, Kevin Wolf wrote: > Am 15.07.2019 um 12:45 hat Max Reitz geschrieben: >> If a qcow2 file is preallocated, it can no longer guarantee that it >> initially appears as filled with zeroes. >> >> So implement .bdrv_has_zero_init() by checking whether the file is >> preallocated; if so

Re: [Qemu-devel] [PULL 08/10] target/arm: Conditionalize some asserts on aarch32 support

2019-07-17 Thread Laszlo Ersek
On 07/16/19 22:10, Philippe Mathieu-Daudé wrote: > On 7/16/19 8:42 PM, Laszlo Ersek wrote: >> On 07/16/19 18:59, Peter Maydell wrote: >>> On Tue, 16 Jul 2019 at 17:51, Laszlo Ersek wrote: The issue still reproduces, so it makes sense for me to look at the host kernel version... Well, I'm

Re: [Qemu-devel] [PATCH 08/10] ppc/xive: Extend XiveTCTX with an router object pointer

2019-07-17 Thread Cédric Le Goater
On 17/07/2019 04:08, David Gibson wrote: > On Mon, Jul 15, 2019 at 05:45:38PM +0200, Cédric Le Goater wrote: >> On 12/07/2019 03:15, David Gibson wrote: >>> On Wed, Jul 03, 2019 at 07:54:57AM +0200, Cédric Le Goater wrote: On 03/07/2019 04:07, David Gibson wrote: > On Sun, Jun 30, 2019 at

[Qemu-devel] [Bug 1836855] [NEW] virtio_scsi_ctx_check failed when detach virtio_scsi disk

2019-07-17 Thread 贞贵李
Public bug reported: I found a problem that virtio_scsi_ctx_check failed when detaching virtio_scsi disk. The bt is below: (gdb) bt #0 0xb02e1bd0 in raise () from /lib64/libc.so.6 #1 0xb02e2f7c in abort () from /lib64/libc.so.6 #2 0xb02db124 in __assert_fail_base ()

Re: [Qemu-devel] [PATCH] chardev: race condition with tcp_chr_disconnect

2019-07-17 Thread Andrey Shinkevich
On 15/07/2019 21:27, Paolo Bonzini wrote: > On 15/07/19 19:23, Max Reitz wrote: >> On 12.07.19 21:17, Andrey Shinkevich wrote: >>> When tcp_chr_disconnect() is called, other thread may be still writing >>> to the channel. This patch protects only read operations that initiate >>> the disconnectio

[Qemu-devel] [PATCH v2 4/4] ppc: dont overwrite initialized idle_timer

2019-07-17 Thread Shivaprasad G Bhat
The check to see if the idle_timer is already initialized is missing. Every vcpu thread would call kvm_arch_init_vcpu() and overwrite the idle_timer resulting in a memory leak. Patch fixes that. Signed-off-by: Shivaprasad G Bhat --- target/ppc/kvm.c |3 ++- 1 file changed, 2 insertions(+), 1

[Qemu-devel] [PATCH v2 2/4] ppc: fix memory leak in spapr_dt_drc()

2019-07-17 Thread Shivaprasad G Bhat
Leaking the drc_name while preparing the DT properties. Fixing that. Also, remove the const qualifier from spapr_drc_name(). Signed-off-by: Shivaprasad G Bhat --- hw/ppc/spapr_drc.c |7 +-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/hw/ppc/spapr_drc.c b/hw/ppc/spapr_d

[Qemu-devel] [PATCH v2 3/4] ppc: fix leak in h_client_architecture_support

2019-07-17 Thread Shivaprasad G Bhat
Free all SpaprOptionVector local pointers after use. Signed-off-by: Shivaprasad G Bhat --- hw/ppc/spapr_hcall.c |2 ++ 1 file changed, 2 insertions(+) diff --git a/hw/ppc/spapr_hcall.c b/hw/ppc/spapr_hcall.c index 6808d4cda8..71cfe7c41d 100644 --- a/hw/ppc/spapr_hcall.c +++ b/hw/ppc/spapr_h

[Qemu-devel] [PATCH v2 1/4] ppc: fix memory leak in spapr_caps_add_properties

2019-07-17 Thread Shivaprasad G Bhat
Free the capability name string after setting the capability. Signed-off-by: Shivaprasad G Bhat --- hw/ppc/spapr_caps.c |4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/hw/ppc/spapr_caps.c b/hw/ppc/spapr_caps.c index bbb001f84a..0263c78d69 100644 --- a/hw/ppc/spapr_caps.

[Qemu-devel] [PATCH v2 0/4] ppc: Fix some memory leaks

2019-07-17 Thread Shivaprasad G Bhat
Valgrind showed some memory leaks while running qemu-system-ppc64. Fixing them in this series. --- Shivaprasad G Bhat (4): ppc: fix memory leak in spapr_caps_add_properties ppc: fix memory leak in spapr_dt_drc() ppc: fix leak in h_client_architecture_support ppc: dont over

Re: [Qemu-devel] [PATCH v2 06/12] block: Deep-clear inherits_from

2019-07-17 Thread Kevin Wolf
Am 17.07.2019 um 09:47 hat Max Reitz geschrieben: > On 16.07.19 19:01, Kevin Wolf wrote: > > Am 03.07.2019 um 19:28 hat Max Reitz geschrieben: > >> BDS.inherits_from does not always point to an immediate parent node. > >> When launching a block job with a filter node, for example, the node > >> dir

Re: [Qemu-devel] [PATCH v2 07/14] target/arm/cpu64: max cpu: Introduce sve properties

2019-07-17 Thread Andrew Jones
On Sat, Jun 29, 2019 at 02:10:28AM +0200, Richard Henderson wrote: > On 6/28/19 9:27 AM, Andrew Jones wrote: > > Also, while it's true we can always > > get the max vq with next-smaller(ARM_MAX_VQ + 1), having it cached in > > cpu->sve_max_vq is convenient. That said, I think we'd rather keep it. >

Re: [Qemu-devel] [PATCH] nbd: fix uninitialized variable warning

2019-07-17 Thread no-reply
Patchew URL: https://patchew.org/QEMU/20190716084240.17594-1-marcandre.lur...@redhat.com/ Hi, This series failed the asan build test. Please find the testing commands and their output below. If you have Docker installed, you can probably reproduce it locally. === TEST SCRIPT BEGIN === #!/bin/

Re: [Qemu-devel] [PATCH v2 2/2] test-bitmap: add test for bitmap_set

2019-07-17 Thread Wei Yang
On Wed, Jul 17, 2019 at 03:43:11PM +0800, Peter Xu wrote: >On Wed, Jul 17, 2019 at 03:11:14PM +0800, Wei Yang wrote: >> Add a test for bitmap_set. There are three cases: >> >> * Both start and end is BITS_PER_LONG aligned >> * Only start is BITS_PER_LONG aligned >> * Only end is BITS_PER_LON

Re: [Qemu-devel] [QEMU] crypto/random: Fall back to /dev/random when getrandom returns EAGAIN

2019-07-17 Thread Daniel P . Berrangé
On Wed, Jul 17, 2019 at 04:58:06PM +1000, Suraj Jitindar Singh wrote: > Hi, > > I'm trying to use qemu inside a a guest, however since there isn't > enough entropy for the rng getrandom() blocks. This means I am unable > to even get output from 'qemu --help' for example. This is annoying at > best

Re: [Qemu-devel] [PATCH v2 06/12] block: Deep-clear inherits_from

2019-07-17 Thread Max Reitz
On 16.07.19 19:01, Kevin Wolf wrote: > Am 03.07.2019 um 19:28 hat Max Reitz geschrieben: >> BDS.inherits_from does not always point to an immediate parent node. >> When launching a block job with a filter node, for example, the node >> directly below the filter will not point to the filter, but kee

Re: [Qemu-devel] [PATCH v2 2/2] test-bitmap: add test for bitmap_set

2019-07-17 Thread Peter Xu
On Wed, Jul 17, 2019 at 03:11:14PM +0800, Wei Yang wrote: > Add a test for bitmap_set. There are three cases: > > * Both start and end is BITS_PER_LONG aligned > * Only start is BITS_PER_LONG aligned > * Only end is BITS_PER_LONG aligned > > Signed-off-by: Wei Yang Hi, Wei, Thanks for do

Re: [Qemu-devel] [PATCH] iotests: Set read-zeroes on in null block driver for Valgrind

2019-07-17 Thread Andrey Shinkevich
On 16/07/2019 14:19, Kevin Wolf wrote: > Am 15.07.2019 um 18:07 hat Andrey Shinkevich geschrieben: >> The Valgrind tool reports about the uninitialised buffer 'buf' >> instantiated on the stack of the function guess_disk_lchs(). >> Pass 'read-zeroes=on' to the null block driver to make it determi

[Qemu-devel] [PATCH v2 2/2] test-bitmap: add test for bitmap_set

2019-07-17 Thread Wei Yang
Add a test for bitmap_set. There are three cases: * Both start and end is BITS_PER_LONG aligned * Only start is BITS_PER_LONG aligned * Only end is BITS_PER_LONG aligned Signed-off-by: Wei Yang --- tests/test-bitmap.c | 33 + 1 file changed, 33 insertions(+

Re: [Qemu-devel] Fwd: virtio_scsi_ctx_check failed when detach virtio_scsi disk

2019-07-17 Thread l00284672
ping? On 2019/7/16 10:06, l00284672 wrote: Forwarded Message Subject:virtio_scsi_ctx_check failed when detach virtio_scsi disk Date: Mon, 15 Jul 2019 23:34:24 +0800 From: l00284672 To: kw...@redhat.com, be...@igalia.com, Stefan Hajnoczi , Paolo Bonzini CC:

[Qemu-devel] [PATCH v2 1/2] bitmap: get last word mask from nr directly

2019-07-17 Thread Wei Yang
The value left in nr is the number of bits for the last word, which could be calculate the last word mask directly. Remove the unnecessary size. Signed-off-by: Wei Yang --- v2: refine bitmap_set_atomic too, suggested from Peter --- util/bitmap.c | 9 +++-- 1 file changed, 3 insertions(+),

[Qemu-devel] [PATCH v2 0/2] bitmap: refine bitmap_set

2019-07-17 Thread Wei Yang
Patch 1 refine bitmap_set a little. Patch 2 add related test case to bitmap_set. v2: * refine bitmap_set_atomic * add a test case Wei Yang (2): bitmap: get last word mask from nr directly test-bitmap: add test for bitmap_set tests/test-bitmap.c | 33 + ut

[Qemu-devel] [PATCH qemu v2] spapr_pci: Advertise BAR reallocation capability

2019-07-17 Thread Alexey Kardashevskiy
The pseries guests do not normally allocate PCI resources and rely on the system firmware doing so. Furthermore at least at some point in the past the pseries guests won't even allowed to change BARs, probably it is still the case for phyp. So since the initial commit we have [1] which prevents res

<    1   2   3