Re: [Qemu-devel] latest rc: virtio-blk hangs forever after migration

2014-08-08 Thread Paolo Bonzini
> > Yeah, I need to sit down and look at the code more closely... Perhaps a > > cpu_mark_all_dirty() is enough. > > Hi Paolo, > > cpu_clean_all_dirty, you mean? Has the same effect. > > Marcin's patch to add cpu_synchronize_state_always() has the same > effect. > > What do you prefer ? I'd p

[Qemu-devel] [RFC PATCH v3 6/6] VMState test: cancel mechanism for an already running vmstate testing process

2014-08-08 Thread Sanidhya Kashyap
Signed-off-by: Sanidhya Kashyap --- hmp-commands.hx | 14 ++ hmp.c| 6 ++ hmp.h| 1 + qapi-schema.json | 9 + qmp-commands.hx | 20 savevm.c | 16 ++-- 6 files changed, 64 insertions(+), 2 deletions(-)

[Qemu-devel] [RFC PATCH v3 3/6] VMstate test: basic VMState testing mechanism

2014-08-08 Thread Sanidhya Kashyap
This patch implements the basic way of testing the VMStates' information whether it is correct or not while saving and loading the states. The qmp interface - test-vmstates can take three parameters as an input to test the device states. Now, one can check for any of the devices that have been regi

[Qemu-devel] [RFC PATCH v3 0/6] VMState testing

2014-08-08 Thread Sanidhya Kashyap
Hi, The following patch introduce a mechanism to test the correctness of the vmstate's information. This is achieved by saving the device states' information to a memory buffer and then clearing the states, followed by loading the data from the saved memory buffer. v2 --> v3 * Made the devices l

[Qemu-devel] [RFC PATCH v3 4/6] VMState test: querying the vmstate testing process

2014-08-08 Thread Sanidhya Kashyap
This patch has been updated to provide the following information: * Added a new return value in the form of devices' info that provides the device name as well as the version number. * provides the hmp interface - info test_vmstates and qmp interface - query-test-vmstates to obtain the information

[Qemu-devel] [RFC PATCH v3 5/6] VMState test: update period of vmstate testing process

2014-08-08 Thread Sanidhya Kashyap
Signed-off-by: Sanidhya Kashyap --- hmp-commands.hx | 15 +++ hmp.c| 14 ++ hmp.h| 1 + qapi-schema.json | 12 qmp-commands.hx | 21 + savevm.c | 13 + 6 files changed, 76 insertions(+) diff -

[Qemu-devel] [RFC PATCH v3 2/6] VMState test: get information about the registered devices

2014-08-08 Thread Sanidhya Kashyap
Added both qmp and hmp interface to get the information about the devices that have been qdevified and are registered with the SaveVMHandlers. I have not used any format to print the device information for the hmp interface. It would be great if anyone can give me some pointers about this about th

[Qemu-devel] [RFC PATCH v3 1/6] QEMUSizedBuffer/QEMUFile

2014-08-08 Thread Sanidhya Kashyap
From: "Dr. David Alan Gilbert" Stefan Berger's to create a QEMUFile that goes to a memory buffer; from: http://lists.gnu.org/archive/html/qemu-devel/2013-03/msg05036.html Using the QEMUFile interface, this patch adds support functions for operating on in-memory sized buffers that can be written

[Qemu-devel] [Bug 1042388] Re: qemu: Unsupported syscall: 257 (timer_create)

2014-08-08 Thread Erik de Castro Lopo
I've been looking at it over the last week or so and I have submitted a patch toe the qemu-devel mailing list to fix another timer_create() problem sometime in the last week. Unfortunately the test case @pittit submitted is far harder to support than the original test case. In this case the timer_

[Qemu-devel] [patch] qcow2: double free snapshots

2014-08-08 Thread Zhang Haoyu
In qcow2_open(), if qcow2_read_snapshots() failed, qcow2_open() -> qcow2_free_snapshots() will be called, NULL snapshots dereference happened. because qcow2_free_snapshots has been performed before in the fail case of qcow2_read_snapshots(). shown as below callstack, qcow2_open |- qcow2_read_snap

[Qemu-devel] [Bug 1317090] Re: qemu fails on ELF files with no section headers

2014-08-08 Thread Michael Tokarev
Hmm. Speaking of "wrong" executables. We have another bugreport in debian, -- https://bugs.debian.org/754336 -- which might be related. But I tried qemu-2.1-rc and it didn't run these binaries. Is it not the same thing? (The debian bugreport has sample files attached). ** Bug watch added: Debi

[Qemu-devel] [Bug 1350435] Re: tcg.c:1693: tcg fatal error

2014-08-08 Thread Serge Hallyn
https://launchpad.net/~serge-hallyn/+archive/ubuntu/qemu-user-thread contains a package with this patch applied (built for trusty). Please let us know how much it helps. -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.la

[Qemu-devel] [Bug 1317090] Re: qemu fails on ELF files with no section headers

2014-08-08 Thread Serge Hallyn
I see this patch now applied in the git tree around June time frame, so marking Fix Released ** Changed in: qemu (Ubuntu) Importance: Undecided => Medium ** Changed in: qemu (Ubuntu) Status: New => Triaged ** Changed in: qemu (Ubuntu) Status: Triaged => Fix Released ** Changed

[Qemu-devel] [Bug 1289527] Re: qemu-aarch64-static: java dies with SIGILL

2014-08-08 Thread Serge Hallyn
Hi Dann, would you be able to provide the information requested in comment #1? ** Changed in: qemu (Ubuntu) Status: Confirmed => Incomplete -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/128952

[Qemu-devel] [Bug 1042388] Re: qemu: Unsupported syscall: 257 (timer_create)

2014-08-08 Thread Serge Hallyn
Have you had any more time to look into this? Should the QEMU (project) task also be re-marked open? ** Changed in: qemu (Ubuntu) Importance: Undecided => Wishlist -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.laun

Re: [Qemu-devel] [PATCH v1 4/4] virtio_rng: replace custom backend API with UserCreatable.complete() callback

2014-08-08 Thread Amos Kong
On Thu, Jan 16, 2014 at 05:34:39PM +0100, Igor Mammedov wrote: > in addition fix default backend leak by releasing it if its > initialization failed. > > Signed-off-by: Igor Mammedov Hi Igor, This patch introduced a regression. x86_64-softmmu/qemu-system-x86_64 -monitor stdio -vnc :0 \ -cha

[Qemu-devel] [PATCH] qemu-nbd: NULL nbd export pointer dereference after kill (TERMINATE)

2014-08-08 Thread Zhang Haoyu
After receive TERMINATE signal, qemu nbd state is set to TERMINATE, then in the main loop, nbd_export_close -> nbd_export_put is performed, but sometimes exp->refcount still greater than zero after nbd_export_put, so the qemu nbd state has not been set to TERMINATED, then in next cycle, NULL e

Re: [Qemu-devel] [PATCH 3/3] block: Catch !bs->drv in bdrv_check()

2014-08-08 Thread Max Reitz
On 08.08.2014 23:11, Max Reitz wrote: On 08.08.2014 11:15, Kevin Wolf wrote: Am 07.08.2014 um 22:47 hat Max Reitz geschrieben: qemu-img check calls bdrv_check() twice if the first run repaired some inconsistencies. If the first run however again triggered corruption prevention (on qcow2) due to

[Qemu-devel] [Bug 1354529] Re: qemu-io: Assert failure on the fuzzed qcow2 image

2014-08-08 Thread Max Reitz
Hi, The problem here is that an L2 table contains an offset which is not aligned on cluster boundaries. To turn the failed assertion into an EIO (and probably we also want to mark the image corrupt), we'd have to verify every single L2 entry when it is read. We can (and should) most certainly do

Re: [Qemu-devel] [PULL 17/19] target-i386: Support "invariant tsc" flag

2014-08-08 Thread Marcelo Tosatti
Chen Liang, On Fri, Aug 08, 2014 at 07:07:59AM +, chenliang (T) wrote: > Hi, > We found that value of host cpus tsc are same to echo other when host has > invariant tsc flag. What you mean exactly? Do you have a test program? > But it is not in vm. The problem is that offset of vcpus tsc

Re: [Qemu-devel] latest rc: virtio-blk hangs forever after migration

2014-08-08 Thread Marcelo Tosatti
On Mon, Aug 04, 2014 at 08:30:48PM +0200, Paolo Bonzini wrote: > Il 04/08/2014 18:30, Marcin Gibuła ha scritto: > > > > > > is this analysis deep enough for you? I don't know if that can be fixed > > with existing api as cpu_synchronize_all_states() is all or nothing kind > > of stuff. > > > > K

Re: [Qemu-devel] [PATCH 3/3] block: Catch !bs->drv in bdrv_check()

2014-08-08 Thread Max Reitz
On 08.08.2014 11:15, Kevin Wolf wrote: Am 07.08.2014 um 22:47 hat Max Reitz geschrieben: qemu-img check calls bdrv_check() twice if the first run repaired some inconsistencies. If the first run however again triggered corruption prevention (on qcow2) due to very bad inconsistencies, bs->drv may

[Qemu-devel] [PATCH] target-sparc64: implement Short Floating-Point Store Instructions

2014-08-08 Thread Artyom Tarasenko
Implement Short Floating-Point Store Instructions as described in the chapter 13.5.2 of UltraSPARC-IIi User's Manual. Particularly this instructions are used by NetBSD 4.0.1+ /sparc64 Signed-off-by: Artyom Tarasenko --- With this patch applied on top of cmd646 patches it's possible to install

[Qemu-devel] [PULL 9/9] build-sys: Move qapi-{types, visit, event}.o into util-obj-y

2014-08-08 Thread Michael Tokarev
From: Fam Zheng These three objects are repeated in multiple times in Makefiles. Let's just add them to libqemuutil.a, and don't list explicitly elsewhere. Signed-off-by: Fam Zheng Signed-off-by: Michael Tokarev --- Makefile |2 +- Makefile.objs | 10 ++ tests/Makefile |

[Qemu-devel] [PULL 3/9] target-i386/cpu.c: Fix two error output indentation

2014-08-08 Thread Michael Tokarev
From: chenfan Signed-off-by: Chen Fan Reviewed-by: Igor Mammedov Signed-off-by: Michael Tokarev --- target-i386/cpu.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/target-i386/cpu.c b/target-i386/cpu.c index 6d008ab..217500c 100644 --- a/target-i386/cpu.c ++

[Qemu-devel] [PULL 5/9] virtio: Move extern declaration to header file

2014-08-08 Thread Michael Tokarev
From: Stefan Weil This fixes a warning from smatch (static code analyser). Signed-off-by: Stefan Weil Signed-off-by: Michael Tokarev --- hw/virtio/vhost-backend.c |2 -- include/hw/virtio/vhost-backend.h |2 ++ 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/hw/

[Qemu-devel] [PULL 2/9] l2tpv3 (configure): it is linux-specific

2014-08-08 Thread Michael Tokarev
Some non-linux systems, for example a system with FreeBSD kernel and glibc, may declare struct mmsghdr (in glibc) but may not have linux-specific header file linux/ip.h. The actual implementation in qemu includes this linux-specific header file unconditionally, so compilation fails if it is not pr

[Qemu-devel] [PULL 4/9] Show length mismatch error is hex

2014-08-08 Thread Michael Tokarev
From: Alex Bligh When live migrate fails due to a section length mismatch we currently see an error message like: Length mismatch: :00:03.0/virtio-net-pci.rom: 1 in != 2 The section lengths are in fact in hex, so this should read Length mismatch: :00:03.0/virtio-net-pci.rom: 0x

[Qemu-devel] [PULL 0/9] Trivial patches for 2014-08-09

2014-08-08 Thread Michael Tokarev
There's a next pull request for the -trivial tree. Nothing exciting in there this time. Small things left from pre-2.1 time, small new things here and there, and 2 portability fixes on top of 2.1. Please consider applying. /mjt The following changes since commit 2d591ce2aeebf9620ff527c7946844a3

[Qemu-devel] [PULL 1/9] hw/timer/imx_*: fix TIMER_MAX clash with system symbol

2014-08-08 Thread Michael Tokarev
The symbol TIMER_MAX used in imx_epit.c and imx_gpt.c clashes with system symbol with the same name. Because all qemu source files includes qemu-common.h which, in turn, includes limits.h, which is not unusual to define it. Rename local symbol to have a reasonable prefix. Signed-off-by: Michael

[Qemu-devel] [PULL 7/9] qemu-img: Check getchar() return value in read_password() for WIN32

2014-08-08 Thread Michael Tokarev
From: Chen Gang getchar() is a standard c library function which may return with failure (e.g. -1), so like another platforms, also need check it under WIN32. And make the related code match current qemu code styles, too. Signed-off-by: Chen Gang Signed-off-by: Michael Tokarev --- qemu-img.c

[Qemu-devel] [PULL 8/9] po: Add Chinese translation

2014-08-08 Thread Michael Tokarev
From: Fam Zheng Signed-off-by: Fam Zheng Reviewed-by: Amos Kong Reviewed-by: Dongsheng Song Reviewed-by: Wei Huang Signed-off-by: Michael Tokarev --- po/zh_CN.po | 86 +++ 1 file changed, 86 insertions(+) create mode 100644 po/zh_CN

[Qemu-devel] [PULL 6/9] hw/timer: Move extern declaration from .c to .h file

2014-08-08 Thread Michael Tokarev
From: Stefan Weil This fixes a warning from smatch (static code analyser). Fix also the comment with the renamed source file name. Signed-off-by: Stefan Weil hw/timer/tusb6010.c |3 --- include/hw/usb.h|7 ++- 2 files changed, 6 insertions(+), 4 deletions(-) Signed-off-by: Mi

Re: [Qemu-devel] [PATCH v2 0/2] Add machine type pc-1.0-qemu-kvm for live migrate compatibility with qemu-kvm

2014-08-08 Thread Serge E. Hallyn
Quoting Alex Bligh (a...@alex.org.uk): > > On 7 Aug 2014, at 20:26, Serge E. Hallyn wrote: > > > A-ha, acpi wasn't a problem. I actually had a general migration > > problem even when coming from other utopic hosts. With that fixed, > > I've got successful migration from qemu-kvm 1.0 in precise

Re: [Qemu-devel] [Qemu-trivial] [PATCH] build-sys: Move qapi-{types, visit, event}.o into util-obj-y

2014-08-08 Thread Michael Tokarev
07.08.2014 06:34, Fam Zheng wrote: > These three objects are repeated in multiple times in Makefiles. Let's > just add them to libqemuutil.a, and don't list explicitly elsewhere. I think it is a good idea. I wondered about these too when come across them in makefiles several times. I'm applying

Re: [Qemu-devel] [Qemu-trivial] [PATCH v3] po: Add Chinese translation

2014-08-08 Thread Michael Tokarev
06.08.2014 13:50, Fam Zheng wrote: > Signed-off-by: Fam Zheng > Reviewed-by: Amos Kong > Reviewed-by: Dongsheng Song > Reviewed-by: Wei Huang Thanks, applied to -trivial. I can't verify it however :) /mjt

Re: [Qemu-devel] [PATCH 0/2] tpm: acpi generation tweaks

2014-08-08 Thread Stefan Berger
On 07/30/2014 07:34 AM, Michael S. Tsirkin wrote: This tweaks tpm code slightly for readability and robustness. On top of Stefen's patches. Are you going to upstream my patches and yours ? Stefan

[Qemu-devel] [PATCH v7 0/2] aarch64: Allow -kernel option to take a gzip-compressed kernel.

2014-08-08 Thread Richard W.M. Jones
Since v6: - No changes to the code. - Rebased against HEAD. - Retested on aarch64. - Added Reviewed-by tag. Rich.

[Qemu-devel] [PATCH v7 1/2] loader: Add load_image_gzipped function.

2014-08-08 Thread Richard W.M. Jones
As the name suggests this lets you load a ROM/disk image that is gzipped. It is uncompressed before storing it in guest memory. Signed-off-by: Richard W.M. Jones Reviewed-by: Alex Bennée --- hw/core/loader.c| 48 include/hw/loader.h | 1 +

[Qemu-devel] [PATCH v7 2/2] aarch64: Allow -kernel option to take a gzip-compressed kernel.

2014-08-08 Thread Richard W.M. Jones
On aarch64 it is the bootloader's job to uncompress the kernel. UEFI and u-boot bootloaders do this automatically when the kernel is gzip-compressed. However the qemu -kernel option does not do this. The following command does not work: qemu-system-aarch64 [...] -kernel /boot/vmlinuz because

[Qemu-devel] [PATCH v3 5/6] qdev: Rename qdev_prop_check_global() to qdev_prop_check_globals()

2014-08-08 Thread Eduardo Habkost
Signed-off-by: Eduardo Habkost --- hw/core/qdev-properties.c | 2 +- include/hw/qdev-properties.h | 2 +- tests/test-qdev-global-props.c | 2 +- vl.c | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/hw/core/qdev-properties.c b/hw/core/qdev-pr

[Qemu-devel] [PATCH v3 3/6] test-qdev-global-props: Initialize not_used=true for all props

2014-08-08 Thread Eduardo Habkost
This will ensure we are actually testing the code which sets not_used=false when the property is used. Signed-off-by: Eduardo Habkost --- tests/test-qdev-global-props.c | 7 +-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/tests/test-qdev-global-props.c b/tests/test-qdev-glo

[Qemu-devel] [PATCH v3 6/6] qdev: Move global validation to a single function

2014-08-08 Thread Eduardo Habkost
Currently GlobalProperty.not_used=false has multiple meanings: * It may be a property for a hotpluggable device, which may or may not have been used by a device; * It may be a machine-type-provided property, which may or may not have been used by a device. * It may be a user-provided property

[Qemu-devel] [PATCH v3 2/6] test-qdev-global-props: Run tests on subprocess

2014-08-08 Thread Eduardo Habkost
There are multiple reasons for running the global property tests on a subprocess: * We need the global_props lists to be empty for each test case, so global properties from the previous test won't affect the next one; * We don't want the qdev_prop_check_global() warnings to pollute test output

[Qemu-devel] [PATCH v3 4/6] test-qdev-global-props: Test handling of hotpluggable and non-device types

2014-08-08 Thread Eduardo Habkost
Ensure no warning will be printed for hotpluggable types, and warnings will be printed for non-device types. Signed-off-by: Eduardo Habkost --- tests/test-qdev-global-props.c | 55 ++ 1 file changed, 55 insertions(+) diff --git a/tests/test-qdev-global-pr

[Qemu-devel] [PATCH v3 0/6] Improve global validation test cases, move validation to a single function

2014-08-08 Thread Eduardo Habkost
New version of what was previously a single patch, submitted as: Subject: [PATCH v2] qdev: Move global validation to a single function Now the test cases run in a subprocess, and we are ensuring the warning messages are actually printed. Eduardo Habkost (6): test-qdev-global-props: Trivial co

[Qemu-devel] [PATCH v3 1/6] test-qdev-global-props: Trivial comment fix

2014-08-08 Thread Eduardo Habkost
Signed-off-by: Eduardo Habkost --- tests/test-qdev-global-props.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/test-qdev-global-props.c b/tests/test-qdev-global-props.c index 2bef04c..e1a1317 100644 --- a/tests/test-qdev-global-props.c +++ b/tests/test-qdev-global-pro

[Qemu-devel] [PULL 60/62] qcow2: Catch !*host_offset for data allocation

2014-08-08 Thread Kevin Wolf
From: Max Reitz qcow2_alloc_cluster_offset() uses host_offset == 0 as "no preferred offset" for the (data) cluster range to be allocated. However, this offset is actually valid and may be allocated on images with a corrupted refcount table or first refcount block. In this case, the corruption pr

[Qemu-devel] [PULL 56/62] vmdk: Handle failure for potentially large allocations

2014-08-08 Thread Kevin Wolf
Some code in the block layer makes potentially huge allocations. Failure is not completely unexpected there, so avoid aborting qemu and handle out-of-memory situations gracefully. This patch addresses the allocations in the vmdk block driver. Signed-off-by: Kevin Wolf Reviewed-by: Stefan Hajnocz

[Qemu-devel] [PULL 54/62] vdi: Handle failure for potentially large allocations

2014-08-08 Thread Kevin Wolf
Some code in the block layer makes potentially huge allocations. Failure is not completely unexpected there, so avoid aborting qemu and handle out-of-memory situations gracefully. This patch addresses the allocations in the vdi block driver. Signed-off-by: Kevin Wolf Reviewed-by: Stefan Hajnoczi

[Qemu-devel] [PULL 49/62] qcow2: Handle failure for potentially large allocations

2014-08-08 Thread Kevin Wolf
Some code in the block layer makes potentially huge allocations. Failure is not completely unexpected there, so avoid aborting qemu and handle out-of-memory situations gracefully. This patch addresses the allocations in the qcow2 block driver. Signed-off-by: Kevin Wolf Reviewed-by: Stefan Hajnoc

[Qemu-devel] [PULL 61/62] iotests: Add test for image header overlap

2014-08-08 Thread Kevin Wolf
From: Max Reitz Add a test for an image with an unallocated image header; instead of an assertion, this should result in the image being marked corrupt. Signed-off-by: Max Reitz Reviewed-by: Eric Blake Signed-off-by: Kevin Wolf --- tests/qemu-iotests/060 | 9 + tests/qemu-iotests

[Qemu-devel] [PULL 51/62] raw-posix: Handle failure for potentially large allocations

2014-08-08 Thread Kevin Wolf
Some code in the block layer makes potentially huge allocations. Failure is not completely unexpected there, so avoid aborting qemu and handle out-of-memory situations gracefully. This patch addresses the allocations in the raw-posix block driver. Signed-off-by: Kevin Wolf Reviewed-by: Stefan Ha

[Qemu-devel] [PULL 57/62] vpc: Handle failure for potentially large allocations

2014-08-08 Thread Kevin Wolf
Some code in the block layer makes potentially huge allocations. Failure is not completely unexpected there, so avoid aborting qemu and handle out-of-memory situations gracefully. This patch addresses the allocations in the vpc block driver. Signed-off-by: Kevin Wolf Reviewed-by: Stefan Hajnoczi

[Qemu-devel] [PULL 53/62] rbd: Handle failure for potentially large allocations

2014-08-08 Thread Kevin Wolf
Some code in the block layer makes potentially huge allocations. Failure is not completely unexpected there, so avoid aborting qemu and handle out-of-memory situations gracefully. This patch addresses the allocations in the rbd block driver. Signed-off-by: Kevin Wolf Reviewed-by: Stefan Hajnoczi

[Qemu-devel] [PULL 41/62] bochs: Handle failure for potentially large allocations

2014-08-08 Thread Kevin Wolf
Some code in the block layer makes potentially huge allocations. Failure is not completely unexpected there, so avoid aborting qemu and handle out-of-memory situations gracefully. This patch addresses the allocations in the bochs block driver. Signed-off-by: Kevin Wolf Reviewed-by: Stefan Hajnoc

[Qemu-devel] [PULL 62/62] block: Catch !bs->drv in bdrv_check()

2014-08-08 Thread Kevin Wolf
From: Max Reitz qemu-img check calls bdrv_check() twice if the first run repaired some inconsistencies. If the first run however again triggered corruption prevention (on qcow2) due to very bad inconsistencies, bs->drv may be NULL afterwards. Thus, bdrv_check() should check whether bs->drv is set

[Qemu-devel] [PULL 34/62] block: allow bdrv_unref() to be passed NULL pointers

2014-08-08 Thread Kevin Wolf
From: Jeff Cody If bdrv_unref() is passed a NULL BDS pointer, it is safe to exit with no operation. This will allow cleanup code to blindly call bdrv_unref() on a BDS that has been initialized to NULL. Reviewed-by: Max Reitz Signed-off-by: Jeff Cody Signed-off-by: Kevin Wolf --- block.c | 3

[Qemu-devel] [PULL 48/62] qcow1: Handle failure for potentially large allocations

2014-08-08 Thread Kevin Wolf
Some code in the block layer makes potentially huge allocations. Failure is not completely unexpected there, so avoid aborting qemu and handle out-of-memory situations gracefully. This patch addresses the allocations in the qcow1 block driver. Signed-off-by: Kevin Wolf Reviewed-by: Stefan Hajnoc

[Qemu-devel] [PULL 59/62] qcow2: Return useful error code in refcount_init()

2014-08-08 Thread Kevin Wolf
From: Max Reitz If bdrv_pread() returns an error, it is very unlikely that it was ENOMEM. In this case, the return value should be passed along; as bdrv_pread() will always either return the number of bytes read or a negative value (the error code), the condition for checking whether bdrv_pread()

[Qemu-devel] [PULL 31/62] block: vhdx - add error check

2014-08-08 Thread Kevin Wolf
From: Jeff Cody This add an error check for an invalid descriptor entry signature, when flushing the log descriptor entries. Signed-off-by: Jeff Cody Reviewed-by: Stefan Hajnoczi Signed-off-by: Kevin Wolf --- block/vhdx-log.c | 5 + 1 file changed, 5 insertions(+) diff --git a/block/vhd

[Qemu-devel] [PULL 50/62] qed: Handle failure for potentially large allocations

2014-08-08 Thread Kevin Wolf
Some code in the block layer makes potentially huge allocations. Failure is not completely unexpected there, so avoid aborting qemu and handle out-of-memory situations gracefully. This patch addresses the allocations in the qed block driver. Signed-off-by: Kevin Wolf Reviewed-by: Stefan Hajnoczi

[Qemu-devel] [PULL 58/62] mirror: Handle failure for potentially large allocations

2014-08-08 Thread Kevin Wolf
Some code in the block layer makes potentially huge allocations. Failure is not completely unexpected there, so avoid aborting qemu and handle out-of-memory situations gracefully. This patch addresses the allocations in the mirror block job. Signed-off-by: Kevin Wolf Reviewed-by: Stefan Hajnoczi

[Qemu-devel] [PULL 40/62] block: Handle failure for potentially large allocations

2014-08-08 Thread Kevin Wolf
Some code in the block layer makes potentially huge allocations. Failure is not completely unexpected there, so avoid aborting qemu and handle out-of-memory situations gracefully. This patch addresses bounce buffer allocations in block.c. While at it, convert bdrv_commit() from plain g_malloc() to

[Qemu-devel] [PULL 20/62] vmdk: Optimize cluster allocation

2014-08-08 Thread Kevin Wolf
From: Fam Zheng This drops the unnecessary bdrv_truncate() from, and also improves, cluster allocation code path. Before, when we need a new cluster, get_cluster_offset truncates the image to bdrv_getlength() + cluster_size, and returns the offset of added area, i.e. the image length before trun

[Qemu-devel] [PULL 46/62] nfs: Handle failure for potentially large allocations

2014-08-08 Thread Kevin Wolf
Some code in the block layer makes potentially huge allocations. Failure is not completely unexpected there, so avoid aborting qemu and handle out-of-memory situations gracefully. This patch addresses the allocations in the nfs block driver. Signed-off-by: Kevin Wolf Reviewed-by: Stefan Hajnoczi

[Qemu-devel] [PULL 55/62] vhdx: Handle failure for potentially large allocations

2014-08-08 Thread Kevin Wolf
Some code in the block layer makes potentially huge allocations. Failure is not completely unexpected there, so avoid aborting qemu and handle out-of-memory situations gracefully. This patch addresses the allocations in the vhdx block driver. Signed-off-by: Kevin Wolf Reviewed-by: Stefan Hajnocz

[Qemu-devel] [PULL 35/62] block: vdi - use block layer ops in vdi_create, instead of posix calls

2014-08-08 Thread Kevin Wolf
From: Jeff Cody Use the block layer to create, and write to, the image file in the VDI .bdrv_create() operation. This has a couple of benefits: Images can now be created over protocols, and hacks such as NOCOW are not needed in the image format driver, and the underlying file protocol appropriat

[Qemu-devel] [PULL 21/62] qemu-img info: show nocow info

2014-08-08 Thread Kevin Wolf
From: Chunyan Liu Add nocow info in 'qemu-img info' output to show whether the file currently has NOCOW flag set or not. Signed-off-by: Chunyan Liu Reviewed-by: Eric Blake Signed-off-by: Stefan Hajnoczi --- block/qapi.c | 26 ++ qapi/block-core.json | 5 -

[Qemu-devel] [PULL 45/62] iscsi: Handle failure for potentially large allocations

2014-08-08 Thread Kevin Wolf
Some code in the block layer makes potentially huge allocations. Failure is not completely unexpected there, so avoid aborting qemu and handle out-of-memory situations gracefully. This patch addresses the allocations in the iscsi block driver. Signed-off-by: Kevin Wolf Acked-by: Paolo Bonzini R

[Qemu-devel] [PULL 52/62] raw-win32: Handle failure for potentially large allocations

2014-08-08 Thread Kevin Wolf
Some code in the block layer makes potentially huge allocations. Failure is not completely unexpected there, so avoid aborting qemu and handle out-of-memory situations gracefully. This patch addresses the allocations in the raw-win32 block driver. Signed-off-by: Kevin Wolf Reviewed-by: Stefan Ha

[Qemu-devel] [PULL 37/62] block: vpc - use block layer ops in vpc_create, instead of posix calls

2014-08-08 Thread Kevin Wolf
From: Jeff Cody Use the block layer to create, and write to, the image file in the VPC .bdrv_create() operation. This has a couple of benefits: Images can now be created over protocols, and hacks such as NOCOW are not needed in the image format driver, and the underlying file protocol appropriat

[Qemu-devel] [PULL 17/62] qmp: hide "hotplugged" device property from device-list-properties

2014-08-08 Thread Kevin Wolf
From: Stefan Hajnoczi The "hotplugged" device property was not reported before commit f4eb32b590bf58c1c67570775eb78beb09964fad ("qmp: show QOM properties in device-list-properties"). Fix this difference. Signed-off-by: Stefan Hajnoczi Reviewed-by: Eric Blake --- qmp.c | 1 + 1 file changed,

[Qemu-devel] [PULL 38/62] block: iotest - update 084 to test static VDI image creation

2014-08-08 Thread Kevin Wolf
From: Jeff Cody This updates the VDI corruption test to also test static VDI image creation, as well as the default dynamic image creation. Reviewed-by: Max Reitz Signed-off-by: Jeff Cody Signed-off-by: Kevin Wolf --- tests/qemu-iotests/084 | 16 ++-- tests/qemu-iotests/084.o

[Qemu-devel] [PULL 47/62] parallels: Handle failure for potentially large allocations

2014-08-08 Thread Kevin Wolf
Some code in the block layer makes potentially huge allocations. Failure is not completely unexpected there, so avoid aborting qemu and handle out-of-memory situations gracefully. This patch addresses the allocations in the parallels block driver. Signed-off-by: Kevin Wolf Reviewed-by: Stefan Ha

[Qemu-devel] [PULL 36/62] block: use the standard 'ret' instead of 'result'

2014-08-08 Thread Kevin Wolf
From: Jeff Cody Most QEMU code uses 'ret' for function return values. The VDI driver uses a mix of 'result' and 'ret'. This cleans that up, switching over to the standard 'ret' usage. Reviewed-by: Max Reitz Signed-off-by: Jeff Cody Signed-off-by: Kevin Wolf --- block/vdi.c | 36

[Qemu-devel] [PULL 18/62] qdev-monitor: include QOM properties in -device FOO, help output

2014-08-08 Thread Kevin Wolf
From: Stefan Hajnoczi Update -device FOO,help to include QOM properties in addition to qdev properties. Devices are gradually adding more QOM properties that are not reflected as qdev properties. It is important to report all device properties since management tools like libvirt use this inform

[Qemu-devel] [PULL 32/62] block: VHDX endian fixes

2014-08-08 Thread Kevin Wolf
From: Jeff Cody This patch contains several changes for endian conversion fixes for VHDX, particularly for big-endian machines (multibyte values in VHDX are all on disk in LE format). Tests were done with existing qemu-iotests on an IBM POWER7 (8406-71Y). This includes sample images created by H

[Qemu-devel] [PULL 43/62] curl: Handle failure for potentially large allocations

2014-08-08 Thread Kevin Wolf
Some code in the block layer makes potentially huge allocations. Failure is not completely unexpected there, so avoid aborting qemu and handle out-of-memory situations gracefully. This patch addresses the allocations in the curl block driver. Signed-off-by: Kevin Wolf Reviewed-by: Stefan Hajnocz

[Qemu-devel] [PULL 28/62] block: bump coroutine pool size for drives

2014-08-08 Thread Kevin Wolf
From: Stefan Hajnoczi When a BlockDriverState is associated with a storage controller DeviceState we expect guest I/O. Use this opportunity to bump the coroutine pool size by 64. This patch ensures that the coroutine pool size scales with the number of drives attached to the guest. It should i

[Qemu-devel] [PULL 12/62] block: Avoid bdrv_get_geometry() where errors should be detected

2014-08-08 Thread Kevin Wolf
From: Markus Armbruster bdrv_get_geometry() hides errors. Use bdrv_nb_sectors() or bdrv_getlength() instead where that's obviously inappropriate. Signed-off-by: Markus Armbruster Reviewed-by: Eric Blake Reviewed-by: Max Reitz Reviewed-by: Benoit Canet Signed-off-by: Stefan Hajnoczi --- bl

[Qemu-devel] [PULL 30/62] thread-pool: avoid deadlock in nested aio_poll() calls

2014-08-08 Thread Kevin Wolf
From: Stefan Hajnoczi The thread pool has a race condition if two elements complete before thread_pool_completion_bh() runs: If element A's callback waits for element B using aio_poll() it will deadlock since pool->completion_bh is not marked scheduled when the nested aio_poll() runs. Fix

[Qemu-devel] [PULL 44/62] dmg: Handle failure for potentially large allocations

2014-08-08 Thread Kevin Wolf
Some code in the block layer makes potentially huge allocations. Failure is not completely unexpected there, so avoid aborting qemu and handle out-of-memory situations gracefully. This patch addresses the allocations in the dmg block driver. Signed-off-by: Kevin Wolf Reviewed-by: Stefan Hajnoczi

[Qemu-devel] [PULL 27/62] coroutine: make pool size dynamic

2014-08-08 Thread Kevin Wolf
From: Stefan Hajnoczi Allow coroutine users to adjust the pool size. For example, if the guest has multiple emulated disk drives we should keep around more coroutines. Signed-off-by: Stefan Hajnoczi Reviewed-by: Eric Blake --- include/block/coroutine.h | 11 +++ qemu-coroutine.c

[Qemu-devel] [PULL 09/62] block: Use bdrv_nb_sectors() where sectors, not bytes are wanted

2014-08-08 Thread Kevin Wolf
From: Markus Armbruster Instead of bdrv_getlength(). Aside: a few of these callers don't handle errors. I didn't investigate whether they should. Signed-off-by: Markus Armbruster Reviewed-by: Eric Blake Reviewed-by: Benoit Canet Signed-off-by: Stefan Hajnoczi --- block-migration.c | 9 +++

[Qemu-devel] [PULL 42/62] cloop: Handle failure for potentially large allocations

2014-08-08 Thread Kevin Wolf
Some code in the block layer makes potentially huge allocations. Failure is not completely unexpected there, so avoid aborting qemu and handle out-of-memory situations gracefully. This patch addresses the allocations in the cloop block driver. Signed-off-by: Kevin Wolf Reviewed-by: Stefan Hajnoc

[Qemu-devel] [PULL 29/62] thread-pool: avoid per-thread-pool EventNotifier

2014-08-08 Thread Kevin Wolf
From: Stefan Hajnoczi EventNotifier is implemented using an eventfd or pipe. It therefore consumes file descriptors, which can be limited by rlimits and should therefore be used sparingly. Switch from EventNotifier to QEMUBH in thread-pool.c. Originally EventNotifier was used because qemu_bh_s

[Qemu-devel] [PULL 19/62] qemu-iotests: Add data pattern in version3 VMDK sample image in 059

2014-08-08 Thread Kevin Wolf
From: Fam Zheng It's possible that we diverge from the specification with our implementation. Having a reference image in the test cases may detect such problems when we introduce a bug that can read what it creates, but can't handle a real VMDK. Signed-off-by: Fam Zheng Signed-off-by: Stefan

[Qemu-devel] [PULL 08/62] block: Use bdrv_nb_sectors() in img_convert()

2014-08-08 Thread Kevin Wolf
From: Markus Armbruster Instead of bdrv_getlength(). Replace variable output_length by output_sectors. Signed-off-by: Markus Armbruster Reviewed-by: Eric Blake Reviewed-by: Benoit Canet Signed-off-by: Stefan Hajnoczi --- qemu-img.c | 8 1 file changed, 4 insertions(+), 4 deletions

[Qemu-devel] [PULL 26/62] qemu-iotests: add support for Archipelago protocol

2014-08-08 Thread Kevin Wolf
From: Chrysostomos Nanakos Signed-off-by: Chrysostomos Nanakos Signed-off-by: Stefan Hajnoczi --- tests/qemu-iotests/common| 6 ++ tests/qemu-iotests/common.rc | 9 - 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/tests/qemu-iotests/common b/tests/qemu-iotests/c

[Qemu-devel] [PULL 39/62] block: Introduce qemu_try_blockalign()

2014-08-08 Thread Kevin Wolf
This function returns NULL instead of aborting when an allocation fails. Signed-off-by: Kevin Wolf Reviewed-by: Benoit Canet --- block.c | 13 + include/block/block.h | 1 + include/qemu/osdep.h | 1 + util/oslib-posix.c| 16 ++-- util/oslib-win32.c

[Qemu-devel] [PULL 13/62] docs: Make the recommendation for the backing file name position a requirement

2014-08-08 Thread Kevin Wolf
From: Maria Kustova The current version of the qcow2 specification recommends to save the backing file name in the end of the first cluster. It follows that the backing file name can be saved somewhere in the image, but the first cluster, which contradicts the current QEMU implementation. The pa

[Qemu-devel] [PULL 24/62] block/archipelago: Add support for creating images

2014-08-08 Thread Kevin Wolf
From: Chrysostomos Nanakos qemu-img archipelago:[/mport=[:vport=] [:segment=]] [size] Signed-off-by: Chrysostomos Nanakos Signed-off-by: Stefan Hajnoczi --- block/archipelago.c | 146 1 file changed, 146 insertions(+) diff --git a/block/a

[Qemu-devel] [PULL 07/62] block: Use bdrv_nb_sectors() in bdrv_co_get_block_status()

2014-08-08 Thread Kevin Wolf
From: Markus Armbruster Instead of bdrv_getlength(). Replace variables length, length2 by total_sectors, nb_sectors2. Bonus: use total_sectors instead of the slightly unclean bs->total_sectors. Signed-off-by: Markus Armbruster Reviewed-by: Eric Blake Reviewed-by: Benoit Canet Signed-off-by:

[Qemu-devel] [PULL 33/62] test-coroutine: add baseline test that times the cost of function calls

2014-08-08 Thread Kevin Wolf
From: Paolo Bonzini This can be used to compute the cost of coroutine operations. In the end the cost of the function call is a few clock cycles, so it's pretty cheap for now, but it may become more relevant as the coroutine code is optimized. For example, here are the results on my machine:

[Qemu-devel] [PULL 15/62] xen_disk: fix possible null-ptr dereference

2014-08-08 Thread Kevin Wolf
From: "Gonglei (Arei)" Signed-off-by: Gonglei Signed-off-by: Stefan Hajnoczi --- hw/block/xen_disk.c | 1 + 1 file changed, 1 insertion(+) diff --git a/hw/block/xen_disk.c b/hw/block/xen_disk.c index aed5b5b..a221d0b 100644 --- a/hw/block/xen_disk.c +++ b/hw/block/xen_disk.c @@ -589,6 +589,7

[Qemu-devel] [PULL 03/62] nbd: Follow the BDS' AIO context

2014-08-08 Thread Kevin Wolf
From: Max Reitz Keep the NBD server always in the same AIO context as the exported BDS by calling bdrv_add_aio_context_notifier() and implementing the required callbacks. Signed-off-by: Max Reitz Reviewed-by: Stefan Hajnoczi Signed-off-by: Kevin Wolf --- nbd.c | 31 ++

[Qemu-devel] [PULL 16/62] docs/multiple-iothreads.txt: add documentation on IOThread programming

2014-08-08 Thread Kevin Wolf
From: Stefan Hajnoczi This document explains how IOThreads and the main loop are related, especially how to write code that can run in an IOThread. Currently only virtio-blk-data-plane uses these techniques. The next obvious target is virtio-scsi; there has also been work on virtio-net. Signed

[Qemu-devel] [PULL 25/62] QMP: Add support for Archipelago

2014-08-08 Thread Kevin Wolf
From: Chrysostomos Nanakos Introduce new enum BlockdevOptionsArchipelago. @volume: #Name of the Archipelago volume image @mport: #'mport' is the port number on which mapperd is listening. This is optional and if not specified,

[Qemu-devel] [PULL 11/62] qemu-img: Make img_convert() get image size just once per image

2014-08-08 Thread Kevin Wolf
From: Markus Armbruster Chiefly so I don't have to do the error checking in quadruplicate in the next commit. Moreover, replacing the frequently updated bs_sectors by an array assigned just once makes the code easier to understand. Signed-off-by: Markus Armbruster Reviewed-by: Max Reitz Revie

  1   2   3   >