Re: [Qemu-devel] [v21 RESEND 0/2] virtio-crypto: virtio crypto device specification

2017-11-10 Thread Stefan Hajnoczi
On Mon, Nov 06, 2017 at 10:39:24AM +, Gonglei (Arei) wrote: > Hi guys, > > What a long time iteration it is. > > Hoping this is the final version if no big arguments exist as > discussed with Stefan at KVM Forum 2017 this October. People > can submit patches to fix some grammar issues or litt

Re: [Qemu-devel] [Qemu-block] [PATCH v2 4/5] iotests: Make 083 less flaky

2017-11-10 Thread Alberto Garcia
On Fri 10 Nov 2017 04:18:15 PM CET, Max Reitz wrote: > On 2017-11-10 11:02, Alberto Garcia wrote: >> On Thu 09 Nov 2017 09:30:24 PM CET, Max Reitz wrote: >>> +echo > "$TEST_DIR/nbd-fault-injector.out" >>> $PYTHON nbd-fault-injector.py $extra_args "$nbd_addr" >>> "$TEST_DIR/nbd-fault-in

Re: [Qemu-devel] [PULL 0/3] ppc-for-2.11 queue 20171108

2017-11-10 Thread Peter Maydell
On 8 November 2017 at 08:12, David Gibson wrote: > The following changes since commit b0fbe46ad82982b289a44ee2495b59b0bad8a842: > > Update version for v2.11.0-rc0 release (2017-11-07 16:05:28 +) > > are available in the git repository at: > > git://github.com/dgibson/qemu.git tags/ppc-for-

Re: [Qemu-devel] NBD BLOCK_STATUS

2017-11-10 Thread Eric Blake
On 11/09/2017 06:42 AM, Vladimir Sementsov-Ogievskiy wrote: > Hi! > > Interesting fact: list/set_meta_context options are per-export, > so, in the server we should keep context selection per client per export. > > And it is possible for client to set contexts for one export and than > proceed > t

Re: [Qemu-devel] [PATCH for-2.11] block: Keep strong reference when draining all BDS

2017-11-10 Thread Kevin Wolf
Am 10.11.2017 um 16:23 hat Max Reitz geschrieben: > On 2017-11-10 14:32, Fam Zheng wrote: > > On Fri, 11/10 14:17, Kevin Wolf wrote: > >> Do you actually need to keep references to all BDSes in the whole list > >> while using the iterator or would it be enough to just keep a reference > >> to the c

Re: [Qemu-devel] [PATCH for-2.11] block: Keep strong reference when draining all BDS

2017-11-10 Thread Max Reitz
On 2017-11-10 17:05, Kevin Wolf wrote: > Am 10.11.2017 um 16:23 hat Max Reitz geschrieben: >> On 2017-11-10 14:32, Fam Zheng wrote: >>> On Fri, 11/10 14:17, Kevin Wolf wrote: Do you actually need to keep references to all BDSes in the whole list while using the iterator or would it be eno

Re: [Qemu-devel] [PATCH] fix scripts/update-linux-headers.sh here document

2017-11-10 Thread Roman Kagan
On Fri, Nov 10, 2017 at 10:03:54AM +0100, Gerd Hoffmann wrote: > Signed-off-by: Gerd Hoffmann > --- > scripts/update-linux-headers.sh | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/scripts/update-linux-headers.sh b/scripts/update-linux-headers.sh > index 8b847e279b..e2b

Re: [Qemu-devel] [PATCH for-2.11] block: Keep strong reference when draining all BDS

2017-11-10 Thread Kevin Wolf
Am 10.11.2017 um 17:13 hat Max Reitz geschrieben: > On 2017-11-10 17:05, Kevin Wolf wrote: > > Am 10.11.2017 um 16:23 hat Max Reitz geschrieben: > >> On 2017-11-10 14:32, Fam Zheng wrote: > >>> On Fri, 11/10 14:17, Kevin Wolf wrote: > Do you actually need to keep references to all BDSes in the

Re: [Qemu-devel] [PATCH] qcow2: fix image corruption after committing qcow2 image into base

2017-11-10 Thread Kevin Wolf
Am 03.11.2017 um 15:41 hat Daniel P. Berrange geschrieben: > After committing the qcow2 image contents into the base image, qemu-img > will call bdrv_make_empty to drop the payload in the layered image. > > When this is done for qcow2 images, it blows away the LUKS encryption > header, making the

Re: [Qemu-devel] [PATCH] qcow2: fix image corruption after committing qcow2 image into base

2017-11-10 Thread Eric Blake
On 11/03/2017 09:41 AM, Daniel P. Berrange wrote: > After committing the qcow2 image contents into the base image, qemu-img > will call bdrv_make_empty to drop the payload in the layered image. > > When this is done for qcow2 images, it blows away the LUKS encryption > header, making the resulting

Re: [Qemu-devel] [PATCH for-2.11] block: Keep strong reference when draining all BDS

2017-11-10 Thread Max Reitz
On 2017-11-10 17:22, Kevin Wolf wrote: > Am 10.11.2017 um 17:13 hat Max Reitz geschrieben: >> On 2017-11-10 17:05, Kevin Wolf wrote: >>> Am 10.11.2017 um 16:23 hat Max Reitz geschrieben: On 2017-11-10 14:32, Fam Zheng wrote: > On Fri, 11/10 14:17, Kevin Wolf wrote: >> Do you actually n

Re: [Qemu-devel] NBD BLOCK_STATUS

2017-11-10 Thread Vladimir Sementsov-Ogievskiy
10.11.2017 19:06, Eric Blake wrote: On 11/09/2017 06:42 AM, Vladimir Sementsov-Ogievskiy wrote: Hi! Interesting fact: list/set_meta_context options are per-export, so, in the server we should keep context selection per client per export. And it is possible for client to set contexts for one ex

Re: [Qemu-devel] [v21 RESEND 1/2] virtio-crypto: Add virtio crypto device specification

2017-11-10 Thread Stefan Hajnoczi
On Mon, Nov 06, 2017 at 02:58:47PM +0800, Longpeng(Mike) wrote: > From: Gonglei > > The virtio crypto device is a virtual crypto device (ie. hardware > crypto accelerator card). Currently, the virtio crypto device provides > the following crypto services: CIPHER, MAC, HASH, and AEAD. > > In this

Re: [Qemu-devel] [U-Boot] Support of latest qemux86-64

2017-11-10 Thread Anton Gerasimov
New guess: in the most safe configuration of u-boot (CONFIG_SMP=n, lacpi disabled) with Igor's patch applied `qemu-system-i386 -bios /path/to/uboot.rom` fails on the first 'ret' instruction. GDB shows that memory at $esp (0xdfffc at the entrance to board_init_f_mem) and everything around it is zer

Re: [Qemu-devel] [PATCH] qcow2: fix image corruption after committing qcow2 image into base

2017-11-10 Thread Vladimir Sementsov-Ogievskiy
10.11.2017 19:34, Eric Blake wrote: On 11/03/2017 09:41 AM, Daniel P. Berrange wrote: After committing the qcow2 image contents into the base image, qemu-img will call bdrv_make_empty to drop the payload in the layered image. When this is done for qcow2 images, it blows away the LUKS encryption

[Qemu-devel] [ANNOUNCE] SeaBIOS 1.11.0

2017-11-10 Thread Kevin O'Connor
The 1.11.0 version of SeaBIOS has now been released. For more information on the release, please see: http://seabios.org/Releases New in this release: * Initial support for NVME drives * Support for vga emulation over a serial port in SeaBIOS (sercon) * Support for serial debugging using MMIO

Re: [Qemu-devel] [PATCH] qcow2: fix image corruption after committing qcow2 image into base

2017-11-10 Thread Daniel P. Berrange
On Fri, Nov 10, 2017 at 10:34:59AM -0600, Eric Blake wrote: > On 11/03/2017 09:41 AM, Daniel P. Berrange wrote: > > After committing the qcow2 image contents into the base image, qemu-img > > will call bdrv_make_empty to drop the payload in the layered image. > > > > When this is done for qcow2 im

Re: [Qemu-devel] [PULL v1 0/2] Merge qcrypto 2017/11/8

2017-11-10 Thread Peter Maydell
On 8 November 2017 at 13:36, Daniel P. Berrange wrote: > The following changes since commit b0fbe46ad82982b289a44ee2495b59b0bad8a842: > > Update version for v2.11.0-rc0 release (2017-11-07 16:05:28 +) > > are available in the git repository at: > > git://github.com/berrange/qemu tags/pull-

[Qemu-devel] [PATCH v2 for-2.11] block: Make bdrv_next() keep strong references

2017-11-10 Thread Max Reitz
On one hand, it is a good idea for bdrv_next() to return a strong reference because ideally nearly every pointer should be refcounted. This fixes intermittent failure of iotest 194. On the other, it is absolutely necessary for bdrv_next() itself to keep a strong reference to both the BB (in its fi

Re: [Qemu-devel] [U-Boot] Support of latest qemux86-64

2017-11-10 Thread Anton Gerasimov
Yes, apparently 0xdfffc is in ROM area for QEMU (0xc -- 0xe, defined in include/hw/loader.h). The next thing to figure out is why u-boot uses it as a stack area. Best regards, Anton Gerasimov On 11/10/2017 06:04 PM, Anton Gerasimov wrote: > New guess: > > in the most safe configuration of

Re: [Qemu-devel] [Qemu-block] [PATCH v2 4/5] iotests: Make 083 less flaky

2017-11-10 Thread Max Reitz
On 2017-11-10 16:51, Alberto Garcia wrote: > On Fri 10 Nov 2017 04:18:15 PM CET, Max Reitz wrote: >> On 2017-11-10 11:02, Alberto Garcia wrote: >>> On Thu 09 Nov 2017 09:30:24 PM CET, Max Reitz wrote: +echo > "$TEST_DIR/nbd-fault-injector.out" $PYTHON nbd-fault-injector.py $ext

[Qemu-devel] [PATCH 1/3] ivshmem: Don't update non-existent MSI routes

2017-11-10 Thread Ladi Prosek
As of commit 660c97eef6f8 ("ivshmem: use kvm irqfd for msi notifications"), QEMU crashes with: kvm_irqchip_commit_routes: Assertion `ret == 0' failed. if the ivshmem device is configured with more vectors than what the server supports. This is caused by the ivshmem_vector_unmask() being called

[Qemu-devel] [PATCH 0/3] ivshmem: MSI bug fixes

2017-11-10 Thread Ladi Prosek
Fixes bugs in the ivshmem device implementation uncovered with the new Windows ivshmem driver: https://github.com/virtio-win/kvm-guest-drivers-windows/tree/master/ivshmem Ladi Prosek (3): ivshmem: Don't update non-existent MSI routes ivshmem: Always remove irqfd notifiers ivshmem: Improve MS

[Qemu-devel] [PATCH 3/3] ivshmem: Improve MSI irqfd error handling

2017-11-10 Thread Ladi Prosek
Adds a rollback path to ivshmem_enable_irqfd() and fixes ivshmem_disable_irqfd() to bail if irqfd has not been enabled. Signed-off-by: Ladi Prosek --- hw/misc/ivshmem.c | 37 - 1 file changed, 24 insertions(+), 13 deletions(-) diff --git a/hw/misc/ivshmem.c b

[Qemu-devel] [PATCH 2/3] ivshmem: Always remove irqfd notifiers

2017-11-10 Thread Ladi Prosek
As of commit 660c97eef6f8 ("ivshmem: use kvm irqfd for msi notifications"), QEMU crashes with: ivshmem: msix_set_vector_notifiers failed msix_unset_vector_notifiers: Assertion `dev->msix_vector_use_notifier && dev->msix_vector_release_notifier' failed. if MSI-X is repeatedly enabled and disabled

Re: [Qemu-devel] [U-Boot] Support of latest qemux86-64

2017-11-10 Thread Anton Gerasimov
Hooray, changing SYS_CAR_ADDR to 0x1 in arch/x86/cpu/qemu/Kconfig does the trick. Bin, what do you think about it? Best regards, Anton Gerasimov On 11/10/2017 06:25 PM, Anton Gerasimov wrote: > Yes, apparently 0xdfffc is in ROM area for QEMU (0xc -- 0xe, > defined in include/hw/loader

Re: [Qemu-devel] [PATCH v6 0/6] block: Don't compare strings in bdrv_reopen_prepare()

2017-11-10 Thread Max Reitz
On 2017-11-10 10:16, Markus Armbruster wrote: > Max Reitz writes: > >> bdrv_reopen_prepare() assumes that all BDS options are strings, which is >> not necessarily correct. This series introduces a new qobject_is_equal() >> function which can be used to test whether any options have changed, >> in

Re: [Qemu-devel] [PATCH v6 0/6] block: Don't compare strings in bdrv_reopen_prepare()

2017-11-10 Thread Kevin Wolf
Am 10.11.2017 um 18:36 hat Max Reitz geschrieben: > On 2017-11-10 10:16, Markus Armbruster wrote: > > Max Reitz writes: > > > >> bdrv_reopen_prepare() assumes that all BDS options are strings, which is > >> not necessarily correct. This series introduces a new qobject_is_equal() > >> function whi

Re: [Qemu-devel] Intermittent hang of iotest 194 (bdrv_drain_all after non-shared storage migration)

2017-11-10 Thread Max Reitz
On 2017-11-10 03:36, Fam Zheng wrote: > On Thu, 11/09 20:31, Max Reitz wrote: >> On 2017-11-09 16:30, Fam Zheng wrote: >>> On Thu, 11/09 16:14, Max Reitz wrote: [...] *sigh* OK, I'll look into it... >>> >>> OK, I'll let you.. Just one more thing: could it relate to the >>> use-aft

[Qemu-devel] [PATCH] iotests: test clearing unknown autoclear_features by qcow2

2017-11-10 Thread Vladimir Sementsov-Ogievskiy
Test clearing unknown autoclear_features by qcow2 on incoming migration. Signed-off-by: Vladimir Sementsov-Ogievskiy --- Hi all! This patch shows degradation, added in 2.10 in commit commit 9c5e6594f15b7364624a3ad40306c396c93a2145 Author: Kevin Wolf Date: Thu May 4 18:52:40 2017 +0200

Re: [Qemu-devel] [PATCH v6 0/6] block: Don't compare strings in bdrv_reopen_prepare()

2017-11-10 Thread Max Reitz
On 2017-11-10 18:47, Kevin Wolf wrote: > Am 10.11.2017 um 18:36 hat Max Reitz geschrieben: >> On 2017-11-10 10:16, Markus Armbruster wrote: >>> Max Reitz writes: >>> bdrv_reopen_prepare() assumes that all BDS options are strings, which is not necessarily correct. This series introduces a

Re: [Qemu-devel] [PATCH for 2.11 v2 2/2] xlnx-zcu102: Add an info message deprecating the EP108

2017-11-10 Thread Emilio G. Cota
On Thu, Nov 09, 2017 at 13:49:35 -0800, Alistair Francis wrote: > The EP108 was an early access development board that is no longer used. > Add an info message to convert any users to the ZCU102 instead. On QEMU > they are both identical. > > This patch also updated the qemu-doc.texi file to indic

Re: [Qemu-devel] [PATCH 1/3] ivshmem: Don't update non-existent MSI routes

2017-11-10 Thread Marc-André Lureau
- Original Message - > As of commit 660c97eef6f8 ("ivshmem: use kvm irqfd for msi notifications"), > QEMU crashes with: > > kvm_irqchip_commit_routes: Assertion `ret == 0' failed. > > if the ivshmem device is configured with more vectors than what the server > supports. This is caused

Re: [Qemu-devel] [PATCH for 2.11 v2 1/2] xlnx-zynqmp: Properly support the smp command line option

2017-11-10 Thread Emilio G. Cota
On Thu, Nov 09, 2017 at 13:49:33 -0800, Alistair Francis wrote: > Allow the -smp command line option to control the number of CPUs we > create. > > Signed-off-by: Alistair Francis > Reviewed-by: Eduardo Habkost Reviewed-by: Emilio G. Cota Tested-by: Emilio G. Cota As I said in the other thre

Re: [Qemu-devel] [PATCH 0/1] qcow2: Check that corrupted images can be repaired in iotest 060

2017-11-10 Thread Max Reitz
On 2017-11-08 13:13, Alberto Garcia wrote: > Hi, > > I sent the 'Misc qcow2 corruption checks' series the other day, and > Kevin suggested that we check that the corrupted images can be > repaired using qemu-img. > > This patch extends the tests that I wrote in order to do just > that. Since the

Re: [Qemu-devel] [Qemu-block] [PATCH v2 4/5] iotests: Make 083 less flaky

2017-11-10 Thread Eric Blake
On 11/10/2017 11:29 AM, Max Reitz wrote: It seems that in this patch you're indenting with spaces but this file uses tabs. >>> >>> Yes, but tabs are wrong. :-) >> >> I actually agree with you, but don't mix them in the file :-) > > I can whistle and say here, too, that Eric liked it. O:

Re: [Qemu-devel] [PATCH for 2.11 v2 2/2] xlnx-zcu102: Add an info message deprecating the EP108

2017-11-10 Thread Emilio G. Cota
On Fri, Nov 10, 2017 at 13:07:22 -0500, Emilio G. Cota wrote: > On Thu, Nov 09, 2017 at 13:49:35 -0800, Alistair Francis wrote: > > The EP108 was an early access development board that is no longer used. > > Add an info message to convert any users to the ZCU102 instead. On QEMU > > they are both i

Re: [Qemu-devel] [PATCH for 2.11 v2 0/2] Xilinx ZCU102 fixes for 2.11

2017-11-10 Thread Emilio G. Cota
On Thu, Nov 09, 2017 at 13:49:30 -0800, Alistair Francis wrote: > These are two small fixes for 2.11. > > V2: > - Update qemu-doc.texi > > Alistair Francis (2): > xlnx-zynqmp: Properly support the smp command line option > xlnx-zcu102: Add an info message deprecating the EP108 Peter: please

[Qemu-devel] [PATCH 0/3] Fix throttling crashes in BlockBackend with no BlockDriverState

2017-11-10 Thread Alberto Garcia
Hi, this series fixes the problems reported by Sochin Jiang in BlockBackend when there's a valid throttling configuration but the BDS has been removed. The patches apply on top of Li Zhengui's "all I/O should be completed before removing throttle timers" and I tested this on top of Stefan's block

[Qemu-devel] [PATCH 1/3] block: Check for inserted BlockDriverState in blk_io_limits_disable()

2017-11-10 Thread Alberto Garcia
When you set I/O limits using block_set_io_throttle or the command line throttling.* options they are kept in the BlockBackend regardless of whether a BlockDriverState is attached to the backend or not. Therefore when removing the limits using blk_io_limits_disable() we need to check if there's a

[Qemu-devel] [PATCH 2/3] block: Leave valid throttle timers when removing a BDS from a backend

2017-11-10 Thread Alberto Garcia
If a BlockBackend has I/O limits set then its ThrottleGroupMember structure uses the AioContext from its attached BlockDriverState. Those two contexts must be kept in sync manually. This is not ideal and will be fixed in the future by removing the throttling configuration from the BlockBackend and

[Qemu-devel] [PATCH 3/3] qemu-iotests: Test I/O limits with removable media

2017-11-10 Thread Alberto Garcia
This test hotplugs a CD drive to a VM and checks that I/O limits can be set only when the drive has media inserted and that they are kept when the media is replaced. This also tests the removal of a device with valid I/O limits set but no media inserted. This involves deleting and disabling the li

Re: [Qemu-devel] [PATCH V4] hw/pci-host: Fix x86 Host Bridges 64bit PCI hole

2017-11-10 Thread Marcel Apfelbaum
On 10/11/2017 11:26, Laszlo Ersek wrote: Hi Marcel, On 11/09/17 18:27, Marcel Apfelbaum wrote: Currently there is no MMIO range over 4G reserved for PCI hotplug. Since the 32bit PCI hole depends on the number of cold-plugged PCI devices and other factors, it is very possible is too small to hot

Re: [Qemu-devel] [PATCH] hw: add .min_cpus and .default_cpus fields to machine_class

2017-11-10 Thread Emilio G. Cota
On Tue, Nov 07, 2017 at 18:15:45 -0200, Eduardo Habkost wrote: > On Fri, Nov 03, 2017 at 02:47:33PM -0400, Emilio G. Cota wrote: > > @@ -4330,12 +4330,34 @@ int main(int argc, char **argv, char **envp) > > smp_parse(qemu_opts_find(qemu_find_opts("smp-opts"), NULL)); > > > > machine_clas

[Qemu-devel] [PATCH] linux-user, s390x: ignore OS ABI value in ELF header

2017-11-10 Thread Laurent Vivier
I have this error: bash: /sbin/ldconfig: cannot execute binary file: Exec format error because /sbin/ldconfig is: ELF 64-bit MSB executable, IBM S/390, version 1 (GNU/Linux), statically linked, for GNU/Linux 3.2.0, BuildID[sha1]=90b64604014aafac9c1a0623b1cf447281d1a382, stripped OS ABI is GNU/lin

Re: [Qemu-devel] [PATCH] linux-user, s390x: ignore OS ABI value in ELF header

2017-11-10 Thread no-reply
Hi, This series seems to have some coding style problems. See output below for more information: Subject: [Qemu-devel] [PATCH] linux-user, s390x: ignore OS ABI value in ELF header Type: series Message-id: 20171110194935.17541-1-laur...@vivier.eu === TEST SCRIPT BEGIN === #!/bin/bash BASE=base

[Qemu-devel] [PATCH for 2.11 2/5] xlnx-zynqmp: Properly support the smp command line option

2017-11-10 Thread Emilio G. Cota
From: Alistair Francis Allow the -smp command line option to control the number of CPUs we create. Signed-off-by: Alistair Francis Reviewed-by: Eduardo Habkost Reviewed-by: Emilio G. Cota Tested-by: Emilio G. Cota --- hw/arm/xlnx-zcu102.c | 3 ++- hw/arm/xlnx-zynqmp.c | 26

[Qemu-devel] [PATCH for 2.11 5/5] hw: add .min_cpus and .default_cpus fields to machine_class

2017-11-10 Thread Emilio G. Cota
max_cpus needs to be an upper bound on the number of vCPUs initialized; otherwise TCG region initialization breaks. Some boards initialize a hard-coded number of vCPUs, which is not captured by the global max_cpus and therefore breaks TCG initialization. Fix it by adding the .min_cpus field to mac

[Qemu-devel] [PATCH for 2.11 0/5] TCG/ARM fixes for 2.11

2017-11-10 Thread Emilio G. Cota
Some MachineClass changes to fix TCG initialization of some ARM boards for 2.11. This was originally reported by Thomas Huth in [1], where Peter suggested a way to fix it. Further discussion in another thread [2] followed up on this. As a result of that follow-up discussion we also got some Zynq c

[Qemu-devel] [PATCH for 2.11 4/5] xlnx-zcu102: Specify the max number of CPUs for the EP108

2017-11-10 Thread Emilio G. Cota
Just like the zcu102, the ep108 can instantiate several CPUs. Signed-off-by: Emilio G. Cota --- hw/arm/xlnx-zcu102.c | 1 + 1 file changed, 1 insertion(+) diff --git a/hw/arm/xlnx-zcu102.c b/hw/arm/xlnx-zcu102.c index a23..190eb69 100644 --- a/hw/arm/xlnx-zcu102.c +++ b/hw/arm/xlnx-zcu102.c

[Qemu-devel] [PATCH for 2.11 1/5] qom: move CPUClass.tcg_initialize to a global

2017-11-10 Thread Emilio G. Cota
55c3cee ("qom: Introduce CPUClass.tcg_initialize", 2017-10-24) introduces a per-CPUClass bool that we check so that the target CPU is initialized for TCG only once. This works well except when we end up creating more than one CPUClass, in which case we end up incorrectly initializing TCG more than

[Qemu-devel] [PATCH for 2.11 3/5] xlnx-zcu102: Add an info message deprecating the EP108

2017-11-10 Thread Emilio G. Cota
From: Alistair Francis The EP108 was an early access development board that is no longer used. Add an info message to convert any users to the ZCU102 instead. On QEMU they are both identical. This patch also updated the qemu-doc.texi file to indicate that the EP108 has been deprecated. Signed-o

Re: [Qemu-devel] [PATCH] iotests: test clearing unknown autoclear_features by qcow2

2017-11-10 Thread Kevin Wolf
Am 10.11.2017 um 18:54 hat Vladimir Sementsov-Ogievskiy geschrieben: > Test clearing unknown autoclear_features by qcow2 on incoming > migration. > > Signed-off-by: Vladimir Sementsov-Ogievskiy > --- > > Hi all! > > This patch shows degradation, added in 2.10 in commit > > commit 9c5e6594f15b7

Re: [Qemu-devel] [PATCH 1/3] ivshmem: Don't update non-existent MSI routes

2017-11-10 Thread geoff--- via Qemu-devel
Thanks Ladi, I had not yet had time to dig into these, this patch set resolves all issues I was aware of. Tested-by: Geoffrey McRae On 2017-11-11 04:34, Ladi Prosek wrote: As of commit 660c97eef6f8 ("ivshmem: use kvm irqfd for msi notifications"), QEMU crashes with: kvm_irqchip_commit_rou

Re: [Qemu-devel] [PATCH 1/3] block: Check for inserted BlockDriverState in blk_io_limits_disable()

2017-11-10 Thread Max Reitz
On 2017-11-10 19:54, Alberto Garcia wrote: > When you set I/O limits using block_set_io_throttle or the command > line throttling.* options they are kept in the BlockBackend regardless > of whether a BlockDriverState is attached to the backend or not. > > Therefore when removing the limits using b

Re: [Qemu-devel] [PATCH for 2.11 1/5] qom: move CPUClass.tcg_initialize to a global

2017-11-10 Thread Eduardo Habkost
On Fri, Nov 10, 2017 at 02:53:42PM -0500, Emilio G. Cota wrote: > 55c3cee ("qom: Introduce CPUClass.tcg_initialize", 2017-10-24) > introduces a per-CPUClass bool that we check so that the target CPU > is initialized for TCG only once. This works well except when > we end up creating more than one C

[Qemu-devel] [PATCH v2 0/1] Add 8-byte wide AMD flash support, partial interleaving

2017-11-10 Thread Mike Nawrocki
This patch set does a few things. First, it switches the AMD CFI flash MMIO operations from the old MMIO API to the new one. Second, it enables 8-byte wide flash arrays. Finally, it adds flash interleaving using the "device-width" and "max-device-width" properties, using the same interface as pflas

[Qemu-devel] [PATCH v2 1/1] Add 8-byte access, interleaving to AMD CFI devices

2017-11-10 Thread Mike Nawrocki
This adds 8-byte wide access support to AMD CFI flash devices. Additionally, it migrates the MMIO operations from old_mmio to the new API. Finally, it mirrors the interleaving support already in place in pflash_cfi01.c, using the max_device_width and device_width properties. Signed-off-by: Mike Na

Re: [Qemu-devel] [PATCH 2/3] block: Leave valid throttle timers when removing a BDS from a backend

2017-11-10 Thread Max Reitz
On 2017-11-10 19:54, Alberto Garcia wrote: > If a BlockBackend has I/O limits set then its ThrottleGroupMember > structure uses the AioContext from its attached BlockDriverState. > Those two contexts must be kept in sync manually. This is not > ideal and will be fixed in the future by removing the

[Qemu-devel] [PATCH for-2.11 0/5] qcow2: Fixes for corrupted images

2017-11-10 Thread Max Reitz
This series contains fixes for another batch of qcow2-related crashes reported on Launchpad by Nageswara (the first batch was http://lists.nongnu.org/archive/html/qemu-block/2017-11/msg00082.html by Berto). Patch 4 fixes an out-of-bounds array access in memory which is not really a security issue

[Qemu-devel] [PATCH for-2.11 5/5] qcow2: Refuse to get unaligned offsets from cache

2017-11-10 Thread Max Reitz
Instead of using an assertion, it is better to emit a corruption event here. Checking all offsets for correct alignment can be tedious and it is easily possible to forget to do so. qcow2_cache_do_get() is a function every L2 and refblock access has to go through, so this is a good central point t

[Qemu-devel] [PATCH for-2.11 1/5] qcow2: check_errors are fatal

2017-11-10 Thread Max Reitz
When trying to repair a dirty image, qcow2_check() may apparently succeed (no really fatal error occurred that would prevent the check from continuing), but if check_errors in the result object is non-zero, we cannot trust the image to be usable. Reported-by: R. Nageswara Sastry Buglink: https://

[Qemu-devel] [PATCH for-2.11 4/5] qcow2: Add bounds check to get_refblock_offset()

2017-11-10 Thread Max Reitz
Reported-by: R. Nageswara Sastry Buglink: https://bugs.launchpad.net/qemu/+bug/1728661 Signed-off-by: Max Reitz --- block/qcow2.h | 6 -- block/qcow2-refcount.c | 26 +- tests/qemu-iotests/060 | 46 ++

Re: [Qemu-devel] [PATCH for 2.11 5/5] hw: add .min_cpus and .default_cpus fields to machine_class

2017-11-10 Thread Eduardo Habkost
On Fri, Nov 10, 2017 at 02:53:46PM -0500, Emilio G. Cota wrote: > max_cpus needs to be an upper bound on the number of vCPUs > initialized; otherwise TCG region initialization breaks. > > Some boards initialize a hard-coded number of vCPUs, which is not > captured by the global max_cpus and theref

[Qemu-devel] [PATCH for-2.11 2/5] qcow2: Unaligned zero cluster in handle_alloc()

2017-11-10 Thread Max Reitz
We should check whether the cluster offset we are about to use is actually valid; that is, whether it is aligned to cluster boundaries. Reported-by: R. Nageswara Sastry Buglink: https://bugs.launchpad.net/qemu/+bug/1728643 Buglink: https://bugs.launchpad.net/qemu/+bug/1728657 Signed-off-by: Max R

[Qemu-devel] [PATCH v1] migration/ram.c: do not set 'postcopy_running' in POSTCOPY_INCOMING_END

2017-11-10 Thread Daniel Henrique Barboza
When migrating a VM with 'migrate_set_capability postcopy-ram on' a postcopy_state is set during the process, ending up with the state POSTCOPY_INCOMING_END when the migration is over. This postcopy_state is taken into account inside ram_load to check how it will load the memory pages. This same ra

Re: [Qemu-devel] [PATCH 3/3] qemu-iotests: Test I/O limits with removable media

2017-11-10 Thread Max Reitz
On 2017-11-10 19:54, Alberto Garcia wrote: > This test hotplugs a CD drive to a VM and checks that I/O limits can > be set only when the drive has media inserted and that they are kept > when the media is replaced. > > This also tests the removal of a device with valid I/O limits set but > no medi

[Qemu-devel] [PATCH for-2.11 3/5] block: Guard against NULL bs->drv

2017-11-10 Thread Max Reitz
We currently do not guard everywhere against a NULL bs->drv where we should be doing so. Most of the places fixed here just do not care about that case at all. Some care implicitly, e.g. through a prior function call to bdrv_getlength() which would always fail for an ejected BDS. Add an assert t

[Qemu-devel] [PATCH for-2.12 1/1] qcow2: Repair unaligned preallocated zero clusters

2017-11-10 Thread Max Reitz
We can easily repair unaligned preallocated zero clusters by discarding them, so why not do it? Signed-off-by: Max Reitz --- block/qcow2-refcount.c | 70 ++ tests/qemu-iotests/060 | 3 +- tests/qemu-iotests/060.out | 9 ++ 3 files changed

Re: [Qemu-devel] [PATCH] virtio: fix descriptor counting in virtqueue_pop

2017-11-10 Thread Michael S. Tsirkin
On Fri, Nov 10, 2017 at 03:41:37PM +, Stefan Hajnoczi wrote: > On Thu, Oct 05, 2017 at 08:03:35PM +0200, Alexandre DERUMIER wrote: > > Hi, > > > > has somebody reviewed this patch ? > > > > I'm also able de reproduce the vm crash like the proxmox user. > > This patch is fixing it for me too.

[Qemu-devel] [PATCH for-2.12 0/1] qcow2: Repair unaligned preallocated zero clusters

2017-11-10 Thread Max Reitz
This is a follow-up to patch 2 of my "qcow2: Unaligned zero cluster in handle_alloc()" series. That patch adds a way to correctly deal with such clusters, this patch here adds a way to repair them. Naturally, this patch is therefore based on that series: Based-on: <20171110203111.7666-1-mre...@r

Re: [Qemu-devel] [PATCH for-2.11 0/5] qcow2: Fixes for corrupted images

2017-11-10 Thread Max Reitz
On 2017-11-10 21:31, Max Reitz wrote: > This series contains fixes for another batch of qcow2-related crashes > reported on Launchpad by Nageswara (the first batch was > http://lists.nongnu.org/archive/html/qemu-block/2017-11/msg00082.html by > Berto). > > Patch 4 fixes an out-of-bounds array acce

Re: [Qemu-devel] [PATCH for-2.12 1/1] qcow2: Repair unaligned preallocated zero clusters

2017-11-10 Thread Eric Blake
On 11/10/2017 02:37 PM, Max Reitz wrote: > We can easily repair unaligned preallocated zero clusters by discarding > them, so why not do it? > > Signed-off-by: Max Reitz > --- > block/qcow2-refcount.c | 70 > ++ > tests/qemu-iotests/060 | 3 +

Re: [Qemu-devel] [PATCH for-2.11 1/5] qcow2: check_errors are fatal

2017-11-10 Thread Eric Blake
On 11/10/2017 02:31 PM, Max Reitz wrote: > When trying to repair a dirty image, qcow2_check() may apparently > succeed (no really fatal error occurred that would prevent the check > from continuing), but if check_errors in the result object is non-zero, > we cannot trust the image to be usable. >

Re: [Qemu-devel] [PATCH for-2.11 2/5] qcow2: Unaligned zero cluster in handle_alloc()

2017-11-10 Thread Eric Blake
On 11/10/2017 02:31 PM, Max Reitz wrote: > We should check whether the cluster offset we are about to use is > actually valid; that is, whether it is aligned to cluster boundaries. > > Reported-by: R. Nageswara Sastry > Buglink: https://bugs.launchpad.net/qemu/+bug/1728643 > Buglink: https://bugs

Re: [Qemu-devel] [PATCH] iotests: Add test for failing qemu-img commit

2017-11-10 Thread Max Reitz
On 2017-06-16 15:58, Max Reitz wrote: > Signed-off-by: Max Reitz > --- > In order to pass, this depends on "fix: avoid an infinite loop or a > dangling pointer problem in img_commit" > (http://lists.nongnu.org/archive/html/qemu-block/2017-06/msg00443.html) > and on the "block: Don't compare string

Re: [Qemu-devel] [PATCH v2] linux-user: fix is_proc_myself to check the paths via realpath

2017-11-10 Thread Zach Riggle
Day 17 Ping :) *Zach Riggle* On Tue, Nov 7, 2017 at 2:06 PM, Riku Voipio wrote: > Hi, > > On Mon, Nov 06, 2017 at 08:17:44PM +, Zach Riggle wrote: > > Ping! What needs to be done to move this forward? My current > implementation > > is compatible with musl. > > I'll have a look at it soon

Re: [Qemu-devel] [PATCH for-2.11 3/5] block: Guard against NULL bs->drv

2017-11-10 Thread Eric Blake
On 11/10/2017 02:31 PM, Max Reitz wrote: > We currently do not guard everywhere against a NULL bs->drv where we > should be doing so. Most of the places fixed here just do not care > about that case at all. > > Some care implicitly, e.g. through a prior function call to > bdrv_getlength() which w

Re: [Qemu-devel] [PATCH for-2.11 4/5] qcow2: Add bounds check to get_refblock_offset()

2017-11-10 Thread Eric Blake
On 11/10/2017 02:31 PM, Max Reitz wrote: > Reported-by: R. Nageswara Sastry > Buglink: https://bugs.launchpad.net/qemu/+bug/1728661 > Signed-off-by: Max Reitz > --- > block/qcow2.h | 6 -- > block/qcow2-refcount.c | 26 +- > tests/qemu-iotests/060

Re: [Qemu-devel] [PATCH for-2.11 5/5] qcow2: Refuse to get unaligned offsets from cache

2017-11-10 Thread Eric Blake
On 11/10/2017 02:31 PM, Max Reitz wrote: > Instead of using an assertion, it is better to emit a corruption event > here. Checking all offsets for correct alignment can be tedious and it > is easily possible to forget to do so. qcow2_cache_do_get() is a > function every L2 and refblock access has

Re: [Qemu-devel] [PATCH for-2.11 5/5] qcow2: Refuse to get unaligned offsets from cache

2017-11-10 Thread Max Reitz
On 2017-11-10 22:54, Eric Blake wrote: > On 11/10/2017 02:31 PM, Max Reitz wrote: >> Instead of using an assertion, it is better to emit a corruption event >> here. Checking all offsets for correct alignment can be tedious and it >> is easily possible to forget to do so. qcow2_cache_do_get() is a

Re: [Qemu-devel] [PATCH 2/3] block: Leave valid throttle timers when removing a BDS from a backend

2017-11-10 Thread Alberto Garcia
On Fri 10 Nov 2017 07:54:47 PM CET, Alberto Garcia wrote: I just noticed a typo in the commit message: > There'a a couple of problems with this: "There's a couple" If there's no v2 of this series you can correct this when committing. Berto

Re: [Qemu-devel] [PATCH 2/3] block: Leave valid throttle timers when removing a BDS from a backend

2017-11-10 Thread Max Reitz
On 2017-11-10 23:06, Alberto Garcia wrote: > On Fri 10 Nov 2017 07:54:47 PM CET, Alberto Garcia wrote: > > I just noticed a typo in the commit message: > >> There'a a couple of problems with this: > > "There's a couple" > > If there's no v2 of this series you can correct this when committing.

[Qemu-devel] [PATCH for-2.12 0/3] block: Handle null backing link

2017-11-10 Thread Max Reitz
Currently, we try to rewrite every occurrence of "backing": null into "backing": "" in qmp_blockdev_add(). However, that breaks using the same "backing": null construction in json:{} file names (which do not go through qmp_blockdev_add()). Currently, these then just behave as if the option has no

[Qemu-devel] [PATCH for-2.12 3/3] block: Deprecate "backing": ""

2017-11-10 Thread Max Reitz
We have a clear replacement, so let's deprecate it. Signed-off-by: Max Reitz --- qapi/block-core.json | 4 ++-- block.c | 4 qemu-doc.texi| 7 +++ qemu-options.hx | 4 ++-- 4 files changed, 15 insertions(+), 4 deletions(-) diff --git a/qapi/block-core.json b/q

[Qemu-devel] [PATCH for-2.12 1/3] qapi: Add qdict_is_null()

2017-11-10 Thread Max Reitz
Signed-off-by: Max Reitz --- include/qapi/qmp/qdict.h | 1 + qobject/qdict.c | 10 ++ 2 files changed, 11 insertions(+) diff --git a/include/qapi/qmp/qdict.h b/include/qapi/qmp/qdict.h index fc218e7be6..c65ebfc748 100644 --- a/include/qapi/qmp/qdict.h +++ b/include/qapi/qmp/qdi

[Qemu-devel] [PATCH for-2.12 2/3] block: Handle null backing link

2017-11-10 Thread Max Reitz
Instead of converting all "backing": null instances into "backing": "", handle a null value directly in bdrv_open_inherit(). This enables explicitly null backing links for json:{} filenames. Signed-off-by: Max Reitz --- block.c| 2 +- blockdev.c | 14 ---

Re: [Qemu-devel] [PATCH for-2.11 5/5] qcow2: Refuse to get unaligned offsets from cache

2017-11-10 Thread Eric Blake
On 11/10/2017 04:00 PM, Max Reitz wrote: >> Trying to understand this: we have a double corruption, because we >> encountered a refblock that points outside of the image, but fixing the >> refblock in turn encounters a second refblock that points within the >> image but to an unaligned area. > > N

Re: [Qemu-devel] [PATCH for-2.11 5/5] qcow2: Refuse to get unaligned offsets from cache

2017-11-10 Thread Max Reitz
On 2017-11-10 23:15, Eric Blake wrote: > On 11/10/2017 04:00 PM, Max Reitz wrote: >>> Trying to understand this: we have a double corruption, because we >>> encountered a refblock that points outside of the image, but fixing the >>> refblock in turn encounters a second refblock that points within t

Re: [Qemu-devel] [PATCH for-2.12 3/3] block: Deprecate "backing": ""

2017-11-10 Thread Eric Blake
On 11/10/2017 04:13 PM, Max Reitz wrote: > We have a clear replacement, so let's deprecate it. > > Signed-off-by: Max Reitz > --- > qapi/block-core.json | 4 ++-- > block.c | 4 > qemu-doc.texi| 7 +++ > qemu-options.hx | 4 ++-- > 4 files changed, 15 insertion

Re: [Qemu-devel] [PATCH for-2.12 1/3] qapi: Add qdict_is_null()

2017-11-10 Thread Eric Blake
On 11/10/2017 04:13 PM, Max Reitz wrote: > Signed-off-by: Max Reitz > --- > include/qapi/qmp/qdict.h | 1 + > qobject/qdict.c | 10 ++ > 2 files changed, 11 insertions(+) > Reviewed-by: Eric Blake -- Eric Blake, Principal Software Engineer Red Hat, Inc. +1-919-301

Re: [Qemu-devel] [PATCH 3/3] qemu-iotests: Test I/O limits with removable media

2017-11-10 Thread Max Reitz
On 2017-11-10 19:54, Alberto Garcia wrote: > This test hotplugs a CD drive to a VM and checks that I/O limits can > be set only when the drive has media inserted and that they are kept > when the media is replaced. > > This also tests the removal of a device with valid I/O limits set but > no medi

Re: [Qemu-devel] [PATCH for-2.12 2/3] block: Handle null backing link

2017-11-10 Thread Eric Blake
On 11/10/2017 04:13 PM, Max Reitz wrote: > Instead of converting all "backing": null instances into "backing": "", > handle a null value directly in bdrv_open_inherit(). > > This enables explicitly null backing links for json:{} filenames. > > Signed-off-by: Max Reitz > --- > block.c

Re: [Qemu-devel] [PATCH for-2.12 2/3] block: Handle null backing link

2017-11-10 Thread Max Reitz
On 2017-11-10 23:22, Eric Blake wrote: > On 11/10/2017 04:13 PM, Max Reitz wrote: >> Instead of converting all "backing": null instances into "backing": "", >> handle a null value directly in bdrv_open_inherit(). >> >> This enables explicitly null backing links for json:{} filenames. >> >> Signed-o

Re: [Qemu-devel] [PATCH 2/3] block: Leave valid throttle timers when removing a BDS from a backend

2017-11-10 Thread Alberto Garcia
On Fri 10 Nov 2017 11:08:20 PM CET, Max Reitz wrote: >> I just noticed a typo in the commit message: >> >>> There'a a couple of problems with this: >> >> "There's a couple" >> >> If there's no v2 of this series you can correct this when committing. > > Well, the issue is that it's going to be i

[Qemu-devel] [PATCH for-2.12 0/4] blockdev: Mark BD-{remove, insert}-medium stable

2017-11-10 Thread Max Reitz
Berto's "Test I/O limits with removable media" patch proves that throttling survives a blockdev-remove-medium/blockdev-insert-medium pair now, so let's mark them stable (because that was the reason they were considered experimental, see commit 6e0abc251dd4f8eba1f53656dfede12e5840e83b for more). Bu

[Qemu-devel] [PATCH for-2.12 2/4] tests/ahci: Switch tray and medium commands to @id

2017-11-10 Thread Max Reitz
Currently, the tray and medium commands in the AHCI test use the deprecated @device parameter. This patch switches all invocations over to use @id. Signed-off-by: Max Reitz --- tests/ahci-test.c | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/tests/ahci-test.c b

[Qemu-devel] [PATCH for-2.12 3/4] blockdev: Drop BD-{remove, insert}-medium's @device

2017-11-10 Thread Max Reitz
This is an incompatible change, which is fine as the commands are experimental. Signed-off-by: Max Reitz --- qapi/block-core.json | 10 ++ blockdev.c | 30 +++--- 2 files changed, 25 insertions(+), 15 deletions(-) diff --git a/qapi/block-core.json b/qap

[Qemu-devel] [PATCH for-2.12 1/4] iotests: Make BD-{remove, insert}-medium use @id

2017-11-10 Thread Max Reitz
In some cases, these commands still use the deprecated @device parameter. Fix that so we can later drop that parameter from their interface. Signed-off-by: Max Reitz --- tests/qemu-iotests/118 | 184 +++-- tests/qemu-iotests/155 | 60

[Qemu-devel] [PATCH for-2.12 4/4] blockdev: Mark BD-{remove, insert}-medium stable

2017-11-10 Thread Max Reitz
Now that iotest 093 test proves that the throttling configuration survives a blockdev-remove-medium/blockdev-insert-medium pair, the original reason for declaring these commands experimental is gone (see commit 6e0abc251dd4f8eba1f53656dfede12e5840e83b). Signed-off-by: Max Reitz --- qapi/block-co

<    1   2   3   >