[Qemu-devel] [PATCH v3] tests/boot_linux_console: add a test for riscv64 + virt

2019-07-23 Thread Chih-Min Chao
Similar to the mips + malta test, it boots a Linux kernel on a virt board and verify the serial is working. Also, it relies on the serial device set by the machine itself. If riscv64 is a target being built, "make check-acceptance" will automatically include this test by the use of the "arch:risc

Re: [Qemu-devel] [PATCH] pc-dimm: fix crash when invalid slot number is used

2019-07-23 Thread Pankaj Gupta
> QEMU will crash with: > Segmentation fault (core dumped) > when negative slot number is used, ex: > qemu-system-x86_64 -m 1G,maxmem=20G,slots=256 \ > -object memory-backend-ram,id=mem1,size=1G \ > -device pc-dimm,id=dimm1,memdev=mem1,slot=-2 > > fix it by checking that slot num

Re: [Qemu-devel] [PATCH] pc-dimm: fix crash when invalid slot number is used

2019-07-23 Thread Li Qiang
Igor Mammedov 于2019年7月24日周三 上午12:09写道: > QEMU will crash with: > Segmentation fault (core dumped) > when negative slot number is used, ex: > qemu-system-x86_64 -m 1G,maxmem=20G,slots=256 \ > -object memory-backend-ram,id=mem1,size=1G \ > -device pc-dimm,id=dimm1,memdev=mem1,slot=-

Re: [Qemu-devel] [PATCH v4 3/3] net: tap: replace snprintf with g_strdup_printf calls

2019-07-23 Thread P J P
+-- On Tue, 23 Jul 2019, Li Qiang wrote --+ | Stefan Hajnoczi 于2019年7月23日周二 下午9:03写道: | > On Tue, Jul 23, 2019 at 04:17:54PM +0530, P J P wrote: | > > -snprintf(helper_cmd, sizeof(helper_cmd), "%s %s %s %s", | > > - helper, "--use-vnet", fd_buf, br_buf); | > > +

Re: [Qemu-devel] [RFC v1 05/18] vfio/pci: add pasid alloc/free implementation

2019-07-23 Thread Liu, Yi L
> From: kvm-ow...@vger.kernel.org [mailto:kvm-ow...@vger.kernel.org] On Behalf > Of David Gibson > Sent: Tuesday, July 23, 2019 11:58 AM > To: Liu, Yi L > Subject: Re: [RFC v1 05/18] vfio/pci: add pasid alloc/free implementation > > On Mon, Jul 22, 2019 at 07:02:51AM +, Liu, Yi L wrote: > > >

Re: [Qemu-devel] [PATCH v3] qapi: add dirty-bitmaps to query-named-block-nodes result

2019-07-23 Thread Markus Armbruster
John Snow writes: > From: Vladimir Sementsov-Ogievskiy > > Let's add a possibility to query dirty-bitmaps not only on root nodes. > It is useful when dealing both with snapshots and incremental backups. > > Signed-off-by: Vladimir Sementsov-Ogievskiy > [Added deprecation information. --js] > Si

[Qemu-devel] [Bug 599958] Re: Timedrift problems with Win7: hpet missing time drift fixups

2019-07-23 Thread Launchpad Bug Tracker
[Expired for QEMU because there has been no activity for 60 days.] ** Changed in: qemu Status: Incomplete => Expired -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/599958 Title: Timedrift pr

[Qemu-devel] [Bug 1585971] Re: Host system crashes on qemu with DMA remapping

2019-07-23 Thread Launchpad Bug Tracker
[Expired for QEMU because there has been no activity for 60 days.] ** Changed in: qemu Status: Incomplete => Expired -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1585971 Title: Host system

Re: [Qemu-devel] [PATCH] pc-dimm: fix crash when invalid slot number is used

2019-07-23 Thread David Gibson
On Tue, Jul 23, 2019 at 12:08:59PM -0400, Igor Mammedov wrote: > QEMU will crash with: > Segmentation fault (core dumped) > when negative slot number is used, ex: > qemu-system-x86_64 -m 1G,maxmem=20G,slots=256 \ > -object memory-backend-ram,id=mem1,size=1G \ > -device pc-dimm,id=di

Re: [Qemu-devel] [PATCH] ppc/pnv: Generate phandle for the "interrupt-parent" property

2019-07-23 Thread David Gibson
On Tue, Jul 23, 2019 at 11:01:38AM +0200, Cédric Le Goater wrote: > Devices such as the BT or serial devices require a valid > "interrupt-parent" phandle in the device tree and it is currently > empty (0x0). It was not a problem until now but since OpenFirmare > started using a recent libdft (>= 1.

[Qemu-devel] [PATCH] migration/postcopy: cleanup multifd after postcopy finish

2019-07-23 Thread Wei Yang
In case we enable multifd, not forget to cleanup it. Signed-off-by: Wei Yang --- migration/savevm.c | 4 1 file changed, 4 insertions(+) diff --git a/migration/savevm.c b/migration/savevm.c index 0105068579..27eef72c9d 100644 --- a/migration/savevm.c +++ b/migration/savevm.c @@ -1738,6 +17

Re: [Qemu-devel] [PATCH 2/2] migration: extract ram_load_precopy

2019-07-23 Thread Wei Yang
On Tue, Jul 23, 2019 at 05:47:03PM +0100, Dr. David Alan Gilbert wrote: >* Wei Yang (richardw.y...@linux.intel.com) wrote: >> After cleanup, it would be clear to audience there are two cases >> ram_load: >> >> * precopy >> * postcopy >> >> And it is not necessary to check postcopy_running on

Re: [Qemu-devel] [PATCH] migration/multifd: multifd_load_cleanup() always return 0

2019-07-23 Thread Wei Yang
On Tue, Jul 23, 2019 at 04:39:08PM +0100, Dr. David Alan Gilbert wrote: >* Wei Yang (richardw.y...@linux.intel.com) wrote: >> multifd_load_cleanup() always return 0 and never use the errp, just >> cleanup a little. >> >> Signed-off-by: Wei Yang > >I'd rather leave this; it wouldn't be that odd fo

Re: [Qemu-devel] [PATCH] migration/postcopy: use mis->bh instead of allocating a QEMUBH

2019-07-23 Thread Wei Yang
On Tue, Jul 23, 2019 at 06:23:53PM +0100, Dr. David Alan Gilbert wrote: >* Wei Yang (richardw.y...@linux.intel.com) wrote: >> For migration incoming side, it either quit in precopy or postcopy. It >> is save to use the mis->bh for both instead of allocating a dedicated > > 'safe' not 'save

[Qemu-devel] [Patch v2] migration/postcopy: make PostcopyDiscardState a static variable

2019-07-23 Thread Wei Yang
In postcopy-ram.c, we provide three functions to discard certain RAMBlock range: * postcopy_discard_send_init() * postcopy_discard_send_range() * postcopy_discard_send_finish() Currently, we allocate/deallocate PostcopyDiscardState for each RAMBlock on sending discard information to destina

Re: [Qemu-devel] [PATCH] migration/postcopy: use static PostcopyDiscardState instead of allocating it for each block

2019-07-23 Thread Wei Yang
On Tue, Jul 23, 2019 at 04:42:12PM +0100, Dr. David Alan Gilbert wrote: >* Wei Yang (richardw.y...@linux.intel.com) wrote: >> On Fri, Jul 19, 2019 at 06:41:28PM +0100, Dr. David Alan Gilbert wrote: >> >* Wei Yang (richardw.y...@linux.intel.com) wrote: >> >> Even we need to do discard for each RAMBl

Re: [Qemu-devel] high-level view of packet processing for virtio NIC?

2019-07-23 Thread Dongli Zhang
Hi Chris, On 7/24/19 12:18 AM, Chris Friesen wrote: > Hi, > > I'm looking for information on what the qemu architecture looks like for > processing virtio network packets in a two-vCPU guest. > > It looks like there's an IO thread doing a decent fraction of the work, > separate > from the vCPU

Re: [Qemu-devel] [ANNOUNCE] QEMU 4.1.0-rc2 is now available

2019-07-23 Thread Michael Roth
Quoting Michael Roth (2019-07-23 17:12:31) > Hello, > > On behalf of the QEMU Team, I'd like to announce the availability of the > third release candidate for the QEMU 4.1 release. This release is meant > for testing purposes and should not be used in a production environment. > > http://downl

[Qemu-devel] [PATCH v3 3/4] block/ide/scsi: Set BLK_PERM_SUPPORT_ZONED

2019-07-23 Thread Dmitry Fomichev
Added a new boolean argument to blkconf_apply_backend_options() to let the common block code know whether the chosen block backend can handle zoned block devices or not. blkconf_apply_backend_options() then sets BLK_PERM_SUPPORT_ZONED permission accordingly. The raw code can then use this permissi

[Qemu-devel] [PATCH v3 0/4] virtio/block: handle zoned backing devices

2019-07-23 Thread Dmitry Fomichev
Currently, attaching zoned block devices (i.e., storage devices compliant to ZAC/ZBC standards) using several virtio methods doesn't work properly as zoned devices appear as regular block devices at the guest. This may cause unexpected i/o errors and, potentially, some data corruption. To be more

[Qemu-devel] [PATCH v3 1/4] block: Add zoned device model property

2019-07-23 Thread Dmitry Fomichev
This commit adds Zoned Device Model (as defined in T10 ZBC and T13 ZAC standards) as a block driver property, along with some useful access functions. A new backend driver permission, BLK_PERM_SUPPORT_ZONED, is also introduced. Only the drivers having this permission will be allowed to open zoned

[Qemu-devel] [PATCH v3 2/4] raw: Recognize zoned backing devices

2019-07-23 Thread Dmitry Fomichev
The purpose of this patch is to recognize a zoned block device (ZBD) when it is opened as a raw file. The new code initializes the zoned model propery introduced by the previous commit. This commit is Linux-specific as it gets the Zoned Block Device Model value (none/host-managed/host-aware) from

[Qemu-devel] [PATCH v3 4/4] raw: Don't open ZBDs if backend can't handle them

2019-07-23 Thread Dmitry Fomichev
Abort opening a zoned device as a raw file in case the chosen block backend driver lacks proper support for this type of storage. Signed-off-by: Dmitry Fomichev --- block/file-posix.c | 14 ++ 1 file changed, 14 insertions(+) diff --git a/block/file-posix.c b/block/file-posix.c inde

[Qemu-devel] [ANNOUNCE] QEMU 4.1.0-rc2 is now available

2019-07-23 Thread Michael Roth
Hello, On behalf of the QEMU Team, I'd like to announce the availability of the third release candidate for the QEMU 4.1 release. This release is meant for testing purposes and should not be used in a production environment. http://download.qemu-project.org/qemu-4.1.0-rc2.tar.xz http://downl

Re: [Qemu-devel] [RFC,v1] Namespace Management Support

2019-07-23 Thread Keith Busch
On Tue, Jul 02, 2019 at 10:39:36AM -0700, Matt Fitzpatrick wrote: > Adding namespace management support to the nvme device. Namespace creation > requires contiguous block space for a simple method of allocation. I guess that means this won't handle creating a large namespace from fragmented unallo

[Qemu-devel] [Bug 1776920] Re: qemu-img convert on Mac OSX creates corrupt images

2019-07-23 Thread Sven R
Hi, I recently ran into problems and after a long time trying to find out the cause landed here, I got in trouble using a CentOs Cloud image: https://cloud.centos.org/centos/7/images/CentOS-7-x86_64-GenericCloud-1905.qcow2.xz which extracts to a .qcow2 image with sha256 of: b376afdc0150601f15e535

Re: [Qemu-devel] [PATCH for 4.2 0/3] require newer glib2 to enable autofree'ing of stack variables exiting scope

2019-07-23 Thread no-reply
Patchew URL: https://patchew.org/QEMU/20190723154856.17348-1-berra...@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/bash mak

Re: [Qemu-devel] [Qemu-block] [PATCH] util/async: hold AioContext ref to prevent use-after-free

2019-07-23 Thread Stefan Hajnoczi
On Tue, Jul 23, 2019 at 8:06 PM Stefan Hajnoczi wrote: > So if co causes ctx to be freed then we're in trouble. Fix this problem > by holding a reference to ctx. For QEMU 4.2. I'm not aware of a way to trigger this bug in QEMU proper. This fix just makes tests/test-bdrv-drain more reliable. S

[Qemu-devel] [PATCH] util/async: hold AioContext ref to prevent use-after-free

2019-07-23 Thread Stefan Hajnoczi
The tests/test-bdrv-drain /bdrv-drain/iothread/drain test case does the following: 1. The preadv coroutine calls aio_bh_schedule_oneshot() and then yields. 2. The one-shot BH executes in another AioContext. All it does is call aio_co_wakeup(preadv_co). 3. The preadv coroutine is re-entered and

Re: [Qemu-devel] [PATCH 01/36] i2c: Move typedef of bitbang_i2c_interface to i2c.h

2019-07-23 Thread Thomas Huth
On 23/07/2019 20.57, BALATON Zoltan wrote: > On Tue, 23 Jul 2019, Michael Roth wrote: >> From: BALATON Zoltan >> >> Clang 3.4 considers duplicate typedef in ppc4xx_i2c.h and >> bitbang_i2c.h an error even if they are identical. Move it to a common >> place to allow building with this clang version

Re: [Qemu-devel] [PATCH 01/36] i2c: Move typedef of bitbang_i2c_interface to i2c.h

2019-07-23 Thread BALATON Zoltan
On Tue, 23 Jul 2019, Michael Roth wrote: From: BALATON Zoltan Clang 3.4 considers duplicate typedef in ppc4xx_i2c.h and bitbang_i2c.h an error even if they are identical. Move it to a common place to allow building with this clang version. Reported-by: Thomas Huth Signed-off-by: BALATON Zolta

Re: [Qemu-devel] [PATCH 00/36] Patch Round-up for stable 3.1.1, freeze on 2019-07-29

2019-07-23 Thread Michael Roth
Quoting Aleksandar Markovic (2019-07-23 12:12:27) > On Tue, Jul 23, 2019 at 7:04 PM Michael Roth > wrote: > > > Hi everyone, > > > > > > The following new patches are queued for QEMU stable v3.1.1: > > > > https://github.com/mdroth/qemu/commits/stable-3.1-staging > > > > > Hello, Michael. > >

Re: [Qemu-devel] [Qemu-stable] [PATCH 00/36] Patch Round-up for stable 3.1.1, freeze on 2019-07-29

2019-07-23 Thread Michael Roth
Quoting Michael Roth (2019-07-23 12:00:28) > Hi everyone, > > > The following new patches are queued for QEMU stable v3.1.1: > > https://github.com/mdroth/qemu/commits/stable-3.1-staging > > The rele

Re: [Qemu-devel] [RFC PATCH] pci: Use PCI aliases when determining device IOMMU address space

2019-07-23 Thread Michael S. Tsirkin
On Tue, Jul 23, 2019 at 11:26:18AM -0600, Alex Williamson wrote: > On Mon, 1 Apr 2019 13:41:39 + > "Singh, Brijesh" wrote: > > > Thanks for adding Alex. > > > > Adding Suravee. > > > > > > On 3/29/19 11:49 AM, Alex Williamson wrote: > > > [Cc +Brijesh] > > > > > > Hi Brijesh, will the cha

Re: [Qemu-devel] [PATCH-for-4.2 2/2] target/riscv/pmp: Convert qemu_log_mask(LOG_TRACE) to trace events

2019-07-23 Thread Alistair Francis
On Tue, Jul 23, 2019 at 5:08 AM Philippe Mathieu-Daudé wrote: > > Use the always-compiled trace events, remove the now unused > RISCV_DEBUG_PMP definition. > > Note pmpaddr_csr_read() could previously do out-of-bound accesses > passing addr_index >= MAX_RISCV_PMPS. > > Signed-off-by: Philippe Math

Re: [Qemu-devel] [PATCH-for-4.2 1/2] target/riscv/pmp: Restrict priviledged PMP to system-mode emulation

2019-07-23 Thread Alistair Francis
On Tue, Jul 23, 2019 at 5:08 AM Philippe Mathieu-Daudé wrote: > > The RISC-V Physical Memory Protection is restricted to privileged > modes. Restrict its compilation to QEMU system builds. > > Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Alistair Francis Alistair > --- > target/riscv/M

Re: [Qemu-devel] [PATCH v4 0/3] restrict bridge interface name to IFNAMSIZ

2019-07-23 Thread no-reply
Patchew URL: https://patchew.org/QEMU/20190723104754.29324-1-ppan...@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/bash make

Re: [Qemu-devel] [PATCH v2 0/2] pc: mmap kernel (ELF image) and initrd

2019-07-23 Thread Montes, Julio
Stefano, Brilliant job! I can confirm that with these patches the memory footprint is smaller and the boot time is the same for kata Here the results using kata metrics https://pasteboard.co/Ipl06Q0.png https://pasteboard.co/Ipl3p4d.png Thanks - Julio On Tue, 2019-07-23 at 16:04 +0200, Stefa

Re: [Qemu-devel] [PATCH v4 3/3] tests/migration: Add a test for auto converge

2019-07-23 Thread Dr. David Alan Gilbert
* Yury Kotov (yury-ko...@yandex-team.ru) wrote: > Signed-off-by: Yury Kotov OK, I think that's worth a go; lets see how it does in heavy CI systems/ Dave > --- > tests/migration-test.c | 103 - > 1 file changed, 92 insertions(+), 11 deletions(-) > > dif

Re: [Qemu-devel] [PATCH v4 3/3] tests/migration: Add a test for auto converge

2019-07-23 Thread Dr. David Alan Gilbert
* Dr. David Alan Gilbert (dgilb...@redhat.com) wrote: > * Yury Kotov (yury-ko...@yandex-team.ru) wrote: > > Signed-off-by: Yury Kotov > > OK, I think that's worth a go; lets see how it does in heavy CI systems/ > > Dave and I meant: Reviewed-by: Dr. David Alan Gilbert > > --- > > tests/mig

[Qemu-devel] [Bug 1837651] [NEW] -netdev socket uses 100% cpu on Windows host

2019-07-23 Thread Randy Rhoads
Public bug reported: On Windows hosts, any `-netdev socket` option (tcp listen, tcp connect, udp passing a fd) causes qemu to use 100% cpu. The guest still runs, but only sluggishly. A simple testcase is: > qemu-system-i386.exe -netdev socket,listen=:8000,id=n And, in another command prompt: >

Re: [Qemu-devel] [PULL v4 00/23 for 4.1-rc2] testing updates

2019-07-23 Thread Peter Maydell
On Tue, 23 Jul 2019 at 17:23, Alex Bennée wrote: > > The following changes since commit 4da6c0f9ebbdaaf4315c71ccd288d02b9087f8af: > > Merge remote-tracking branch > 'remotes/amarkovic2/tags/mips-queue-jul-23-2019' into staging (2019-07-23 > 12:49:39 +0100) > > are available in the Git reposito

Re: [Qemu-devel] [RFC PATCH] pci: Use PCI aliases when determining device IOMMU address space

2019-07-23 Thread Alex Williamson
On Mon, 1 Apr 2019 13:41:39 + "Singh, Brijesh" wrote: > Thanks for adding Alex. > > Adding Suravee. > > > On 3/29/19 11:49 AM, Alex Williamson wrote: > > [Cc +Brijesh] > > > > Hi Brijesh, will the change below require the IVRS to be updated to > > include aliases for all BDF ranges behind

Re: [Qemu-devel] [PATCH] migration/postcopy: use mis->bh instead of allocating a QEMUBH

2019-07-23 Thread Dr. David Alan Gilbert
* Wei Yang (richardw.y...@linux.intel.com) wrote: > For migration incoming side, it either quit in precopy or postcopy. It > is save to use the mis->bh for both instead of allocating a dedicated 'safe' not 'save' > QEMUBH for postcopy. > > Signed-off-by: Wei Yang Yes, I think that's

Re: [Qemu-devel] [PATCH] tests/docker: Refresh APT cache before installing new packages on Debian

2019-07-23 Thread no-reply
Patchew URL: https://patchew.org/QEMU/20190723141528.18023-1-phi...@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/bash make d

[Qemu-devel] [PATCH 23/36] mac_newworld: use node name instead of alias name for hd device in FWPathProvider

2019-07-23 Thread Michael Roth
From: Mark Cave-Ayland When using -drive to configure the hd drive for the New World machine, the node name "disk" should be used instead of the "hd" alias. Signed-off-by: Mark Cave-Ayland Message-Id: <20190307212058.4890-3-mark.cave-ayl...@ilande.co.uk> Signed-off-by: David Gibson (cherry pic

Re: [Qemu-devel] [PATCH 00/36] Patch Round-up for stable 3.1.1, freeze on 2019-07-29

2019-07-23 Thread Aleksandar Markovic
On Tue, Jul 23, 2019 at 7:04 PM Michael Roth wrote: > Hi everyone, > > > The following new patches are queued for QEMU stable v3.1.1: > > https://github.com/mdroth/qemu/commits/stable-3.1-staging > > Hello, Michael. There is usually a breakdown by modified files within a cover letter. Why is

[Qemu-devel] [PATCH 31/36] s390x/cpumodel: ignore csske for expansion

2019-07-23 Thread Michael Roth
From: Christian Borntraeger csske will be removed in a future machine. Ignore it for expanding the cpu model. Otherwise qemu falls back to z9. Signed-off-by: Christian Borntraeger Cc: qemu-sta...@nongnu.org Reviewed-by: David Hildenbrand Message-Id: <20190429090250.7648-3-borntrae...@de.ibm.co

[Qemu-devel] high-level view of packet processing for virtio NIC?

2019-07-23 Thread Chris Friesen
Hi, I'm looking for information on what the qemu architecture looks like for processing virtio network packets in a two-vCPU guest. It looks like there's an IO thread doing a decent fraction of the work, separate from the vCPU threads--is that correct? There's no disk involved in this case,

[Qemu-devel] [PATCH 33/36] iotests: Filter second BLOCK_JOB_ERROR from 229

2019-07-23 Thread Michael Roth
From: Max Reitz Without this filter, this test sometimes fails. Signed-off-by: Max Reitz Reviewed-by: John Snow Signed-off-by: Kevin Wolf (cherry picked from commit fff2388d5d9caecca6200455d0ab6d5e13f4e9bd) Signed-off-by: Michael Roth --- tests/qemu-iotests/229 | 6 +- tests/qemu-io

[Qemu-devel] [PATCH 05/36] pc:piix4: Update smbus I/O space after a migration

2019-07-23 Thread Michael Roth
From: Corey Minyard Otherwise it won't be set up correctly and won't work after miigration. Signed-off-by: Corey Minyard Cc: Igor Mammedov Cc: qemu-sta...@nongnu.org Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin (cherry picked from commit 2b4e573c7c7b9a698ba6931ba456bbd8d

[Qemu-devel] [PATCH 02/36] iotests: make 235 work on s390 (and others)

2019-07-23 Thread Michael Roth
From: Christian Borntraeger "-machine pc" will not work all architectures. Lets fall back to the default machine by not specifying it. In addition we also need to specify -no-shutdown on s390 as qemu will exit otherwise. Cc: qemu-sta...@nongnu.org Signed-off-by: Christian Borntraeger Reviewed-

[Qemu-devel] [PATCH 04/36] pcie: set link state inactive/active after hot unplug/plug

2019-07-23 Thread Michael Roth
From: Zheng Xiang When VM boots from the latest version of linux kernel, after hot-unpluging virtio-blk disks which are hotplugged into pcie-root-port, the VM's dmesg log shows: [ 151.046242] pciehp :00:05.0:pcie004: pending interrupts 0x0001 from Slot Status [ 151.046365] pciehp :00:

[Qemu-devel] [PATCH 07/36] linux-user: make pwrite64/pread64(fd, NULL, 0, offset) return 0

2019-07-23 Thread Michael Roth
From: Peter Maydell Linux returns success if pwrite64() or pread64() are called with a zero length NULL buffer, but QEMU was returning -TARGET_EFAULT. This is the same bug that we fixed in commit 58cfa6c2e6eb51b23cc9 for the write syscall, and long before that in 38d840e6790c29f59 for the read s

[Qemu-devel] [PATCH 06/36] hw/s390x: Fix bad mask in time2tod()

2019-07-23 Thread Michael Roth
From: Thomas Huth Since "s390x/tcg: avoid overflows in time2tod/tod2time", the time2tod() function tries to deal with the 9 uppermost bits in the time value, but uses the wrong mask for this: 0xff80 should be used instead of 0xff10 here. Fixes: 14055ce53c2d901d826ffad7fb7

[Qemu-devel] [PATCH 03/36] Changes requirement for "vsubsbs" instruction

2019-07-23 Thread Michael Roth
From: "Paul A. Clarke" Changes requirement for "vsubsbs" instruction, which has been supported since ISA 2.03. (Please see section 5.9.1.2 of ISA 2.03) Reported-by: Paul A. Clarke Signed-off-by: Paul A. Clarke Signed-off-by: Leonardo Bras Signed-off-by: David Gibson (cherry picked from commi

[Qemu-devel] [PATCH 28/36] cutils: Fix size_to_str() on 32-bit platforms

2019-07-23 Thread Michael Roth
From: Eric Blake When extracting a human-readable size formatter, we changed 'uint64_t div' pre-patch to 'unsigned long div' post-patch. Which breaks on 32-bit platforms, resulting in 'inf' instead of intended values larger than 999GB. Fixes: 22951aaa CC: qemu-sta...@nongnu.org Reported-by: Max

[Qemu-devel] [PATCH 08/36] s390x: Return specification exception for unimplemented diag 308 subcodes

2019-07-23 Thread Michael Roth
From: Janosch Frank The architecture specifies specification exceptions for all unavailable subcodes. The presence of subcodes is indicated by checking some query subcode. For example 6 will indicate that 3-6 are available. So future systems might call new subcodes to check for new features. Thi

[Qemu-devel] [PATCH 35/36] iotests: Test unaligned raw images with O_DIRECT

2019-07-23 Thread Michael Roth
From: Max Reitz We already have 221 for accesses through the page cache, but it is better to create a new file for O_DIRECT instead of integrating those test cases into 221. This way, we can make use of _supported_cache_modes (and _default_cache_mode) so the test is automatically skipped on file

[Qemu-devel] [PATCH 36/36] vhost: fix vhost_log size overflow during migration

2019-07-23 Thread Michael Roth
From: Li Hangjing When a guest which doesn't support multiqueue is migrated with a multi queues vhost-user-blk deivce, a crash will occur like: 0 qemu_memfd_alloc (name=, size=562949953421312, seals=, fd=0x7f87171fe8b4, errp=0x7f87171fe8a8) at util/memfd.c:153 1 0x7f883559d7cf in vhost_log

[Qemu-devel] [PATCH 24/36] qga: update docs with systemd suspend support info

2019-07-23 Thread Michael Roth
From: Daniel Henrique Barboza Commit 067927d62e ("qga: systemd hibernate/suspend/hybrid-sleep support") failed to update qapi-schema.json after adding systemd hibernate/suspend/hybrid-sleep capabilities to guest-suspend-* QGA commands. Signed-off-by: Daniel Henrique Barboza Reviewed-by: Eric Bl

[Qemu-devel] [PATCH 22/36] mac_oldworld: use node name instead of alias name for hd device in FWPathProvider

2019-07-23 Thread Michael Roth
From: Mark Cave-Ayland When using -drive to configure the hd drive for the Old World machine, the node name "disk" should be used instead of the "hd" alias. Signed-off-by: Mark Cave-Ayland Message-Id: <20190307212058.4890-2-mark.cave-ayl...@ilande.co.uk> Signed-off-by: David Gibson (cherry pic

[Qemu-devel] [PATCH 27/36] qcow2: Avoid COW during metadata preallocation

2019-07-23 Thread Michael Roth
From: Kevin Wolf Limiting the allocation to INT_MAX bytes isn't particularly clever because it means that the final cluster will be a partial cluster which will be completed through a COW operation. This results in unnecessary data read and write requests which lead to an unwanted non-sparse file

[Qemu-devel] [PATCH 25/36] usb-mtp: use O_NOFOLLOW and O_CLOEXEC.

2019-07-23 Thread Michael Roth
From: Gerd Hoffmann Open files and directories with O_NOFOLLOW to avoid symlinks attacks. While being at it also add O_CLOEXEC. usb-mtp only handles regular files and directories and ignores everything else, so users should not see a difference. Because qemu ignores symlinks, carrying out a suc

[Qemu-devel] [PATCH 32/36] megasas: fix mapped frame size

2019-07-23 Thread Michael Roth
From: Peter Lieven the current value of 1024 bytes (16 * MFI_FRAME_SIZE) we map is not enough to hold the maximum number of scatter gather elements we advertise. We actually need a maximum of 2048 bytes. This is 128 max sg elements * 16 bytes (sizeof (union mfi_sgl)). Cc: qemu-sta...@nongnu.or

[Qemu-devel] [PATCH 26/36] qemu-img: fix error reporting for -object

2019-07-23 Thread Michael Roth
From: Daniel P. Berrangé Error reporting for user_creatable_add_opts_foreach was changed so that it no longer called 'error_report_err' in: commit 7e1e0c11127bde81cff260fc6859690435c509d6 Author: Markus Armbruster Date: Wed Oct 17 10:26:43 2018 +0200 qom: Clean up error reporting i

[Qemu-devel] [PATCH 34/36] block/file-posix: Unaligned O_DIRECT block-status

2019-07-23 Thread Michael Roth
From: Max Reitz Currently, qemu crashes whenever someone queries the block status of an unaligned image tail of an O_DIRECT image: $ echo > foo $ qemu-img map --image-opts driver=file,filename=foo,cache.direct=on Offset Length Mapped to File qemu-img: block/io.c:2093: bdrv

[Qemu-devel] [PATCH 19/36] json: Fix % handling when not interpolating

2019-07-23 Thread Michael Roth
From: Christophe Fergeau Commit 8bca4613 added support for %% in json strings when interpolating, but in doing so broke handling of % when not interpolating. When parse_string() is fed a string token containing '%', it skips the '%' regardless of ctxt->ap, i.e. even it's not interpolating. If t

[Qemu-devel] [PATCH 01/36] i2c: Move typedef of bitbang_i2c_interface to i2c.h

2019-07-23 Thread Michael Roth
From: BALATON Zoltan Clang 3.4 considers duplicate typedef in ppc4xx_i2c.h and bitbang_i2c.h an error even if they are identical. Move it to a common place to allow building with this clang version. Reported-by: Thomas Huth Signed-off-by: BALATON Zoltan Acked-by: David Gibson Reviewed-by: Phi

[Qemu-devel] [PATCH 29/36] block: Fix AioContext switch for bs->drv == NULL

2019-07-23 Thread Michael Roth
From: Kevin Wolf Even for block nodes with bs->drv == NULL, we can't just ignore a bdrv_set_aio_context() call. Leaving the node in its old context can mean that it's still in an iothread context in bdrv_close_all() during shutdown, resulting in an attempted unlock of the AioContext lock which we

[Qemu-devel] [PATCH 20/36] qga-win: include glib when building VSS DLL

2019-07-23 Thread Michael Roth
Commit 3ebee3b191e defined assert() as g_assert(), but when we build the VSS DLL component of QGA (to handle fsfreeze) we do not include glib, which results in breakage when building with VSS support enabled. Fix this by including glib (along with the -lintl and -lws2_32 dependencies it brings).

[Qemu-devel] [PATCH 18/36] i386: remove the 'INTEL_PT' CPUID bit from named CPU models

2019-07-23 Thread Michael Roth
From: Paolo Bonzini Processor tracing is not yet implemented for KVM and it will be an opt in feature requiring a special module parameter. Disable it, because it is wrong to enable it by default and it is impossible that no one has ever used it. Cc: qemu-sta...@nongnu.org Signed-off-by: Paolo B

[Qemu-devel] [PATCH 30/36] do not call vhost_net_cleanup() on running net from char user event

2019-07-23 Thread Michael Roth
From: Dan Streetman Buglink: https://launchpad.net/bugs/1823458 Currently, a user CHR_EVENT_CLOSED event will cause net_vhost_user_event() to call vhost_user_cleanup(), which calls vhost_net_cleanup() for all its queues. However, vhost_net_cleanup() must never be called like this for fully-init

[Qemu-devel] [PATCH 00/36] Patch Round-up for stable 3.1.1, freeze on 2019-07-29

2019-07-23 Thread Michael Roth
Hi everyone, The following new patches are queued for QEMU stable v3.1.1: https://github.com/mdroth/qemu/commits/stable-3.1-staging The release is planned for 2019-08-01: https://wiki.qemu.org/Pla

[Qemu-devel] [PATCH 10/36] tpm: Make sure new locality passed to tpm_tis_prep_abort() is valid

2019-07-23 Thread Michael Roth
From: Stefan Berger Make sure that the new locality passed to tpm_tis_prep_abort() is valid. Add a comment to aborting_locty that it may be any locality, including TPM_TIS_NO_LOCALITY. Signed-off-by: Stefan Berger Reviewed-by: Marc-André Lureau (cherry picked from commit e92b63ea610201bd74334

[Qemu-devel] [PATCH 16/36] vfio-ap: flag as compatible with balloon

2019-07-23 Thread Michael Roth
From: Cornelia Huck vfio-ap devices do not pin any pages in the host. Therefore, they are compatible with memory ballooning. Flag them as compatible, so both vfio-ap and a balloon can be used simultaneously. Cc: qemu-sta...@nongnu.org Acked-by: Christian Borntraeger Tested-by: Tony Krowiak Re

[Qemu-devel] [PATCH 13/36] hw/rdma: another clang compilation fix

2019-07-23 Thread Michael Roth
From: Marcel Apfelbaum Configuring QEMU with: configure --target-list="x86_64-softmmu" --cc=clang --enable-pvrdma Results in: qemu/hw/rdma/rdma_rm_defs.h:108:3: error: redefinition of typedef 'RdmaDeviceResources' is a C11 feature [-Werror,-Wtypedef-redefinition] } RdmaDeviceResources;

[Qemu-devel] [PATCH 14/36] slirp: check sscanf result when emulating ident

2019-07-23 Thread Michael Roth
From: William Bowling When emulating ident in tcp_emu, if the strchr checks passed but the sscanf check failed, two uninitialized variables would be copied and sent in the reply, so move this code inside the if(sscanf()) clause. Signed-off-by: William Bowling Cc: qemu-sta...@nongnu.org Cc: seca

[Qemu-devel] [PATCH 15/36] tpm_tis: fix loop that cancels any seizure by a lower locality

2019-07-23 Thread Michael Roth
From: Liam Merwick In tpm_tis_mmio_write() if the requesting locality is seizing access, any seizure by a lower locality is cancelled. However the loop doing the seizure had an off-by-one error and the locality immediately preceding the requesting locality was not being cleared. This is fixed by

[Qemu-devel] [PATCH 17/36] i386: remove the new CPUID 'PCONFIG' from Icelake-Server CPU model

2019-07-23 Thread Michael Roth
From: Robert Hoo PCONFIG is not available to guests; it must be specifically enabled using the PCONFIG_ENABLE execution control. Disable it, because no one can ever use it. Signed-off-by: Robert Hoo Message-Id: <1545227081-213696-2-git-send-email-robert...@linux.intel.com> Cc: qemu-sta...@nong

[Qemu-devel] [PATCH 11/36] tpm: Make sure the locality received from backend is valid

2019-07-23 Thread Michael Roth
From: Stefan Berger Make sure that the locality passed from the backend to tpm_tis_request_completed() is valid. Signed-off-by: Stefan Berger Reviewed-by: Marc-André Lureau (cherry picked from commit a639f96111eadb3b8e3021fd3f27e2948ad1c640) Signed-off-by: Michael Roth --- hw/tpm/tpm_tis.c |

[Qemu-devel] [PATCH 21/36] configure: improve usbfs check

2019-07-23 Thread Michael Roth
From: Thomas Petazzoni The current check to test if usbfs support should be compiled or not solely relies on the presence of , without actually checking that all definition used by Qemu are provided by this header file. With sufficiently old kernel headers, may be present, but some of the defin

[Qemu-devel] [PATCH 12/36] block: Fix invalidate_cache error path for parent activation

2019-07-23 Thread Michael Roth
From: Kevin Wolf bdrv_co_invalidate_cache() clears the BDRV_O_INACTIVE flag before actually activating a node so that the correct permissions etc. are taken. In case of errors, the flag must be restored so that the next call to bdrv_co_invalidate_cache() retries activation. Restoring the flag wa

[Qemu-devel] [PATCH 09/36] exec.c: Don't reallocate IOMMUNotifiers that are in use

2019-07-23 Thread Michael Roth
From: Peter Maydell The tcg_register_iommu_notifier() code has a GArray of TCGIOMMUNotifier structs which it has registered by passing memory_region_register_iommu_notifier() a pointer to the embedded IOMMUNotifier field. Unfortunately, if we need to enlarge the array via g_array_set_size() this

Re: [Qemu-devel] [PATCH v4 00/18] bitmaps: introduce 'bitmap' sync mode

2019-07-23 Thread John Snow
On 7/23/19 5:47 AM, Fabian Grünbichler wrote: > On Mon, Jul 22, 2019 at 01:21:02PM -0400, John Snow wrote: >> >> >> On 7/22/19 8:17 AM, Fabian Grünbichler wrote: >>> On Tue, Jul 09, 2019 at 07:25:32PM -0400, John Snow wrote: This series adds a new "BITMAP" sync mode that is meant to replace

Re: [Qemu-devel] [PATCH 2/2] migration: extract ram_load_precopy

2019-07-23 Thread Dr. David Alan Gilbert
* Wei Yang (richardw.y...@linux.intel.com) wrote: > After cleanup, it would be clear to audience there are two cases > ram_load: > > * precopy > * postcopy > > And it is not necessary to check postcopy_running on each iteration for > precopy. > > Signed-off-by: Wei Yang > --- > migration/r

[Qemu-devel] [PULL v4 00/23 for 4.1-rc2] testing updates

2019-07-23 Thread Alex Bennée
The following changes since commit 4da6c0f9ebbdaaf4315c71ccd288d02b9087f8af: Merge remote-tracking branch 'remotes/amarkovic2/tags/mips-queue-jul-23-2019' into staging (2019-07-23 12:49:39 +0100) are available in the Git repository at: https://github.com/stsquad/qemu.git tags/pull-testing-2

Re: [Qemu-devel] [PULL v3 for 4.1 00/23] testing updates

2019-07-23 Thread Alex Bennée
Alex Bennée writes: > The following changes since commit 4da6c0f9ebbdaaf4315c71ccd288d02b9087f8af: > > Merge remote-tracking branch > 'remotes/amarkovic2/tags/mips-queue-jul-23-2019' into staging (2019-07-23 > 12:49:39 +0100) > > are available in the Git repository at: > > https://github.

[Qemu-devel] [Bug 1670170] Re: `qemu-system-sparc64 -M Niagara` Aborted (core dumped)

2019-07-23 Thread Mark Cave-Ayland
It's difficult to tell as you haven't posted your complete command line, however it looks as if you're missing the path to the rom images: https://qemu.weilnetz.de/doc/qemu-doc.html#Sparc64-System-emulator https://wiki.qemu.org/Documentation/Platforms/SPARC#Compatibility ATB, Mark. -- You rec

Re: [Qemu-devel] [PATCH v2 1/2] configure: Define target access alignment in configure

2019-07-23 Thread Aleksandar Markovic
Hello, Tony On Mon, Jul 22, 2019 at 5:27 AM wrote: > Move the define of target access alignment earlier from > target/foo/cpu.h to configure. > > It would be better if the commit message explained WHY the change is needed and HOW it is achieved - not WHAT the change is. Yours, Aleksandar > Si

Re: [Qemu-devel] [PATCH v2 2/2] configure: Cosmetic yes to "yes" for consistency

2019-07-23 Thread Aleksandar Markovic
Hi, Tony On Mon, Jul 22, 2019 at 5:28 AM wrote: > Signed-off-by: Tony Nguyen > --- > configure | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/configure b/configure > index 8316a16..c07687c 100755 > --- a/configure > +++ b/configure > @@ -7433,7 +7433,7 @@ esac > targ

[Qemu-devel] [PATCH] pc-dimm: fix crash when invalid slot number is used

2019-07-23 Thread Igor Mammedov
QEMU will crash with: Segmentation fault (core dumped) when negative slot number is used, ex: qemu-system-x86_64 -m 1G,maxmem=20G,slots=256 \ -object memory-backend-ram,id=mem1,size=1G \ -device pc-dimm,id=dimm1,memdev=mem1,slot=-2 fix it by checking that slot number is within vali

Re: [Qemu-devel] [PATCH for 4.2 1/3] glib: bump min required glib library version to 2.48

2019-07-23 Thread Daniel P . Berrangé
On Tue, Jul 23, 2019 at 06:02:43PM +0200, Thomas Huth wrote: > On 23/07/2019 17.48, Daniel P. Berrangé wrote: > > Per supported platforms doc[1], the various min glib on relevant distros is: > > > > RHEL-8: 2.56.1 > > RHEL-7: 2.50.3 > > Debian (Buster): 2.58.3 > > Debian (Stretch): 2.50.3

Re: [Qemu-devel] [PATCH for 4.2 1/3] glib: bump min required glib library version to 2.48

2019-07-23 Thread Thomas Huth
On 23/07/2019 17.48, Daniel P. Berrangé wrote: > Per supported platforms doc[1], the various min glib on relevant distros is: > > RHEL-8: 2.56.1 > RHEL-7: 2.50.3 > Debian (Buster): 2.58.3 > Debian (Stretch): 2.50.3 > OpenBSD (Ports): 2.58.3 > FreeBSD (Ports): 2.56.3 > OpenSUSE Leap 1

Re: [Qemu-devel] [PULL for 4.1-rc2 00/23] testing updates (green CI!)

2019-07-23 Thread Thomas Huth
On 23/07/2019 15.01, Peter Maydell wrote: > On Tue, 23 Jul 2019 at 13:58, Alex Bennée wrote: >> >> >> Peter Maydell writes: >> >>> On Tue, 23 Jul 2019 at 13:16, Philippe Mathieu-Daudé >>> wrote: On 7/23/19 1:46 PM, Alex Bennée wrote: >> I see Thomas Huth has a patch on-list for th

[Qemu-devel] [PATCH for 4.2 3/3] crypto: use auto cleanup for many stack variables

2019-07-23 Thread Daniel P . Berrangé
Simplify cleanup paths by using glib's auto cleanup macros for stack variables, allowing several goto jumps / labels to be eliminated. Signed-off-by: Daniel P. Berrangé --- crypto/afsplit.c | 28 +--- crypto/block-luks.c | 74 +-- crypto

[Qemu-devel] [PATCH for 4.2 1/3] glib: bump min required glib library version to 2.48

2019-07-23 Thread Daniel P . Berrangé
Per supported platforms doc[1], the various min glib on relevant distros is: RHEL-8: 2.56.1 RHEL-7: 2.50.3 Debian (Buster): 2.58.3 Debian (Stretch): 2.50.3 OpenBSD (Ports): 2.58.3 FreeBSD (Ports): 2.56.3 OpenSUSE Leap 15: 2.54.3 SLE12-SP2: 2.48.2 Ubuntu (Xenial): 2.48.0 macOS (

[Qemu-devel] [PATCH for 4.2 2/3] crypto: define cleanup functions for use with g_autoptr

2019-07-23 Thread Daniel P . Berrangé
Allow crypto structs to be used with g_autoptr, avoiding the need to explicitly call XXX_free() functions when variables go out of scope on the stack. Signed-off-by: Daniel P. Berrangé --- include/crypto/block.h | 2 ++ include/crypto/cipher.h | 2 ++ include/crypto/hmac.h | 2 ++

[Qemu-devel] [PATCH for 4.2 0/3] require newer glib2 to enable autofree'ing of stack variables exiting scope

2019-07-23 Thread Daniel P . Berrangé
Both GCC and CLang support a C extension attribute((cleanup)) which allows you to define a function that is invoked when a stack variable exits scope. This typically used to free the memory allocated to it, though you're not restricted to this. For example it could be used to unlock a mutex. We co

Re: [Qemu-devel] [PATCH v4 3/3] net: tap: replace snprintf with g_strdup_printf calls

2019-07-23 Thread Li Qiang
Stefan Hajnoczi 于2019年7月23日周二 下午9:03写道: > On Tue, Jul 23, 2019 at 04:17:54PM +0530, P J P wrote: > > -snprintf(helper_cmd, sizeof(helper_cmd), "%s %s %s %s", > > - helper, "--use-vnet", fd_buf, br_buf); > > +helper_cmd = g_strdup_printf("%s %s %s %s", h

  1   2   3   >