[Qemu-devel] [PATCH 4/5] qcow2: implemented bdrv_is_opened_unclean

2015-12-22 Thread Denis V. Lunev
From: Olga Krishtal While opening image we save dirty state in header_unclean. If the image was closed incorrectly we can retrieve this fact using bdrv_is_opened_unclean callback. This is necessary in case when we want to call brdv_check to repair dirty image. Signed-off-by: Olga Krishtal Sign

[Qemu-devel] [PATCH 3/5] block: added check image option and callback bdrv_is_opened_unclean

2015-12-22 Thread Denis V. Lunev
From: Olga Krishtal If image is opened for writing and it was not closed correctly (the image is dirty) we have to check and repair it. By default the option is off. bdrv_is_opened_unclean - cheks if the image is dirty This callbsck will be used to ensure that image was closed correctly, and if

[Qemu-devel] [PATCH 5/5] block/paralels: added paralles implementation for bdrv_is_opened_unclean

2015-12-22 Thread Denis V. Lunev
From: Olga Krishtal Signed-off-by: Olga Krishtal Signed-off-by: Denis V. Lunev CC: Kevin Wolf CC: Max Reitz CC: Eric Blake CC: Fam Zheng --- block/parallels.c | 7 ++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/block/parallels.c b/block/parallels.c index e4a56a5..618b

[Qemu-devel] [PATCH 1/5] block: added lock image option and callback

2015-12-22 Thread Denis V. Lunev
From: Olga Krishtal While opening the image we want to be sure that we are the one who works with image, anf if it is not true - opening the image for writing should fail. There are 2 ways at the moment: no lock at all and lock the file image. Signed-off-by: Olga Krishtal Signed-off-by: Denis

[Qemu-devel] [PATCH 2/5] block: implemented bdrv_lock_image for raw file

2015-12-22 Thread Denis V. Lunev
From: Olga Krishtal To lock the image file flock (LockFileEx) is used. We lock file handle/descriptor. If lock is failed - an error is returned. In win32 realization we can lock reagion of bytes within the file. For this reason we at first have to get file size and only than lock it. Signed-off

[Qemu-devel] [PATCH 0/4] fix memory leak which allocted by the setter of object_property_add_str

2015-12-22 Thread Li Zhijian
free the resources allocted by this setter at the instance finalization. Li Zhijian (4): net/filter: fix nf->netdev_id leak net/dump: fix nfds->filename leak backends/hostmem-file: fix fb->mem_path leak hw/ppc/spapr: fix spapr->kvm_type leak backends/hostmem-file.c | 8 hw/ppc/s

[Qemu-devel] [PATCH RFC 0/5] generic image locking and crash recovery

2015-12-22 Thread Denis V. Lunev
This series of patches is aimed to prevent usage of image file by different qemu instances. In case we are the first instance, and option lock is lockfile, - we lock the image file, and if check option is on, we check the file and fix it if nessecary. If one of this two ops fails - the image is clo

[Qemu-devel] [PATCH 2/4] net/dump: fix nfds->filename leak

2015-12-22 Thread Li Zhijian
Cc: Jason Wang Signed-off-by: Li Zhijian --- net/dump.c | 8 1 file changed, 8 insertions(+) diff --git a/net/dump.c b/net/dump.c index ce16a4b..347b5ca 100644 --- a/net/dump.c +++ b/net/dump.c @@ -329,6 +329,13 @@ static void filter_dump_instance_init(Object *obj)

[Qemu-devel] [PATCH 4/4] hw/ppc/spapr: fix spapr->kvm_type leak

2015-12-22 Thread Li Zhijian
Cc: David Gibson Cc: Alexander Graf Cc: qemu-...@nongnu.org Signed-off-by: Li Zhijian --- hw/ppc/spapr.c | 8 1 file changed, 8 insertions(+) diff --git a/hw/ppc/spapr.c b/hw/ppc/spapr.c index 6bfb908..65b2d61 100644 --- a/hw/ppc/spapr.c +++ b/hw/ppc/spapr.c @@ -2101,6 +2101,13 @@ sta

[Qemu-devel] [PATCH 1/4] net/filter: fix nf->netdev_id leak

2015-12-22 Thread Li Zhijian
Cc: Jason Wang Signed-off-by: Li Zhijian --- net/filter.c | 1 + 1 file changed, 1 insertion(+) diff --git a/net/filter.c b/net/filter.c index 1365bad..f777ba2 100644 --- a/net/filter.c +++ b/net/filter.c @@ -204,6 +204,7 @@ static void netfilter_finalize(Object *obj) if (nf->netdev && !QT

[Qemu-devel] [PATCH 3/4] backends/hostmem-file: fix fb->mem_path leak

2015-12-22 Thread Li Zhijian
Signed-off-by: Li Zhijian --- backends/hostmem-file.c | 8 1 file changed, 8 insertions(+) diff --git a/backends/hostmem-file.c b/backends/hostmem-file.c index e9b6d21..5a73fd0 100644 --- a/backends/hostmem-file.c +++ b/backends/hostmem-file.c @@ -116,11 +116,19 @@ file_backend_instance

Re: [Qemu-devel] [Qemu-block] [PATCH 00/10] qcow2: Implement image locking

2015-12-22 Thread Denis V. Lunev
On 12/23/2015 06:14 AM, Fam Zheng wrote: On Tue, 12/22 17:46, Kevin Wolf wrote: Enough innocent images have died because users called 'qemu-img snapshot' while the VM was still running. Educating the users doesn't seem to be a working strategy, so this series adds locking to qcow2 that refuses t

Re: [Qemu-devel] [PATCH v2 05/14] qapi: Use qstring_append_chr() where appropriate

2015-12-22 Thread Fam Zheng
On Mon, 12/21 17:30, Eric Blake wrote: > No need to create a temporary buffer, when we already have a > function available for our needs. > > Signed-off-by: Eric Blake Reviewed-by: Fam Zheng

Re: [Qemu-devel] [PATCH v2 04/14] qapi: Factor out JSON number formatting

2015-12-22 Thread Fam Zheng
On Mon, 12/21 17:30, Eric Blake wrote: > Pull out a new qstring_append_json_number() helper, so that all > JSON output producers can use a consistent style for printing > floating point without duplicating code (since we are doing more > data massaging than a simple printf format can handle). > >

Re: [Qemu-devel] [PATCH v2 03/14] qapi: Factor out JSON string escaping

2015-12-22 Thread Fam Zheng
On Mon, 12/21 17:30, Eric Blake wrote: > Pull out a new qstring_append_json_string() helper, so that all > JSON output producers can use the same output escaping rules. > > While it appears that vmstate's use of the simpler qjson.c > formatter is not currently encountering any string that needs >

Re: [Qemu-devel] [PATCH v2 02/14] qapi: Improve use of qmp/types.h

2015-12-22 Thread Fam Zheng
On Mon, 12/21 17:30, Eric Blake wrote: > 'qobject-json.h' is not a QObject subtype; include this file > directly in .c files that are using it, rather than abusing > qmp/types.h for that purpose. > > Meanwhile, for files that include a list of individual QObject > subtypes, it's easier to just use

Re: [Qemu-devel] [PATCH] SeaBios: Fix reset procedure reentrancy problem on qemu-kvm platform

2015-12-22 Thread Gonglei (Arei)
> -Original Message- > From: Kevin O'Connor [mailto:ke...@koconnor.net] > Sent: Tuesday, December 22, 2015 11:51 PM > To: Gonglei (Arei) > Cc: Xulei (Stone); Paolo Bonzini; qemu-devel; seab...@seabios.org; > Huangweidong (C); k...@vger.kernel.org; Radim Krcmar > Subject: Re: [Qemu-devel] [P

Re: [Qemu-devel] [PATCH v3 0/5] correct some register return values for vxmnet3

2015-12-22 Thread Dmitry Fleytman
Reviewed-by: Dmitry Fleytman > On 23 Dec 2015, at 08:06 AM, Miao Yan wrote: > > Qemu vmxnet3 emulation doesn't recognize VMXNET3_CMD_GET_DID_LO, > VMXNET3_CMD_GET_DID_HI and VMXNET3_CMD_GET_DEV_EXTRA_INFO command and > returns -1 on all of them. > > This patchset makes them return correct valu

[Qemu-devel] [PATCH] iotests: 086: Add raw format

2015-12-22 Thread Fam Zheng
Raw is as qualified as qcow2 for this test case, add it for more coverage. Signed-off-by: Fam Zheng --- tests/qemu-iotests/086 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/qemu-iotests/086 b/tests/qemu-iotests/086 index 234eb9a..5527e86 100755 --- a/tests/qemu-iotest

[Qemu-devel] [PATCH v3 5/5] net/vmxnet3: rename VMXNET3_DEVICE_VERSION to VMXNET3_UPT_REVISION

2015-12-22 Thread Miao Yan
VMXNET3_DEVICE_VERSION is used as return value for accessing UPT Revision Report and Selection register. So rename it to VMXNET3_UPT_REVISION. Signed-off-by: Miao Yan --- hw/net/vmxnet3.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hw/net/vmxnet3.c b/hw/net/vmxnet3.c

[Qemu-devel] [PATCH v3 1/5] net/vmxnet3: return 1 on device activation failure

2015-12-22 Thread Miao Yan
When reading device status, 0 means device is successfully activated and 1 means error. This behavior can be observed by the following steps: 1) run a Linux distro on esxi server (5.5+) 2) modify vmxnet3 Linux driver to give it an invalid address to 'adapter->shared_pa' which is the shared

[Qemu-devel] [PATCH v3 4/5] net/vmxnet3: return 0 on unknown command

2015-12-22 Thread Miao Yan
Return 0 on unknown command, this is what esxi (5.x+) behaves. Signed-off-by: Miao Yan --- Changes in v3: - mention esxi version in commit message hw/net/vmxnet3.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/net/vmxnet3.c b/hw/net/vmxnet3.c index b8bc360..a429405 100

[Qemu-devel] [PATCH v3 2/5] net/vmxnet3: return correct value for VMXNET3_CMD_GET_DID_* command

2015-12-22 Thread Miao Yan
VMXNET3_CMD_GET_DID_LO should return PCI ID of the device and VMXNET3_CMD_GET_DID_HI should return vmxnet3 revision ID. This behavior can be observed by the following steps: 1) run a Linux distro on esxi server (5.x+) 2) modify vmxnet3 Linux driver to read DID_HI and DID_LO: VMXNET3_WRITE_BAR1

[Qemu-devel] [PATCH v3 3/5] net/vmxnet3: return correct value for VMXNET3_CMD_GET_DEV_EXTRA_INFO

2015-12-22 Thread Miao Yan
VMXNET3_CMD_GET_DEV_EXTRA_INFO should return 0 for emulation mode This behavior can be observed by the following steps: 1) run a Linux distro on esxi server (5.x+) 2) modify vmxnet3 Linux driver to read the register: VMXNET3_WRITE_BAR1_REG(adapter, VMXNET3_REG_CMD, VMXNET3_CMD_GET_DEV_EXTRA_I

[Qemu-devel] [PATCH v3 0/5] correct some register return values for vxmnet3

2015-12-22 Thread Miao Yan
Qemu vmxnet3 emulation doesn't recognize VMXNET3_CMD_GET_DID_LO, VMXNET3_CMD_GET_DID_HI and VMXNET3_CMD_GET_DEV_EXTRA_INFO command and returns -1 on all of them. This patchset makes them return correct values. Changes in v2: - return 0 on unknown command Changes in v3: - rename VMXNET3_DEVICE_V

[Qemu-devel] [PATCH v3 5/5] iotests: Add test cases for blockdev-mirror

2015-12-22 Thread Fam Zheng
Signed-off-by: Fam Zheng --- tests/qemu-iotests/041 | 100 ++--- tests/qemu-iotests/041.out | 4 +- 2 files changed, 79 insertions(+), 25 deletions(-) diff --git a/tests/qemu-iotests/041 b/tests/qemu-iotests/041 index 05b5962..bcdefb2 100755 --- a/te

[Qemu-devel] [PATCH v3 3/5] block: Add check on mirror target

2015-12-22 Thread Fam Zheng
Signed-off-by: Fam Zheng Reviewed-by: Max Reitz --- blockdev.c| 3 +++ include/block/block.h | 1 + 2 files changed, 4 insertions(+) diff --git a/blockdev.c b/blockdev.c index 22e06ba..f42e171 100644 --- a/blockdev.c +++ b/blockdev.c @@ -3342,6 +3342,9 @@ static void blockdev_mirror

[Qemu-devel] [PATCH v3 4/5] qmp: Add blockdev-mirror command

2015-12-22 Thread Fam Zheng
This will start a mirror job from a named device to another named device, its relation with drive-mirror is similar with blockdev-backup to drive-backup. In blockdev-mirror, the target node should be prepared by blockdev-add, which will be responsible for assigning a name to the new node, so we do

[Qemu-devel] [PATCH v3 2/5] block: Extract blockdev part of qmp_drive_mirror

2015-12-22 Thread Fam Zheng
This is the part that will be reused by blockdev-mirror. Signed-off-by: Fam Zheng --- blockdev.c | 146 + 1 file changed, 88 insertions(+), 58 deletions(-) diff --git a/blockdev.c b/blockdev.c index bd6f68e..22e06ba 100644 --- a/blockd

[Qemu-devel] [PATCH v3 0/5] qmp: Add blockdev-mirror

2015-12-22 Thread Fam Zheng
v3: Rebase to master. v2: 01: Move bdrv_op_block_all down. [Max] 02, 04: Add Max's rev-by. 03: Check has_mode and fix "return;". [Max] 05: Check target->blk. Drop superfluous whitespace. [Max] 06: Drop superfluous whitespace hunk and add Max's rev-by. [Max] This is the cou

[Qemu-devel] [PATCH v3 1/5] block: Rename BLOCK_OP_TYPE_MIRROR to BLOCK_OP_TYPE_MIRROR_SOURCE

2015-12-22 Thread Fam Zheng
It's necessary to distinguish source and target before we can add blockdev-mirror, because we would want a concrete type of operation to check on target bs before starting. Signed-off-by: Fam Zheng Reviewed-by: Max Reitz --- blockdev.c | 2 +- hw/block/dataplane/virtio-blk.

Re: [Qemu-devel] [PATCH v2] net: rocker: fix an incorrect array bounds check

2015-12-22 Thread P J P
+-- On Tue, 22 Dec 2015, Peter Maydell wrote --+ | Could you submit patches in the usual git send-email format, | please? It's easier for maintainers to process them if they're | not in an odd arrangement that requires manual intervention. | (In particular, comments that aren't intended to go in th

Re: [Qemu-devel] [PATCH v2] net: rocker: fix an incorrect array bounds check

2015-12-22 Thread Stefan Hajnoczi
On Wed, Dec 23, 2015 at 12:54:18AM +0530, P J P wrote: > Hello Paolo, all > > Please see an updated patch below, as per suggestion in > -> https://lists.gnu.org/archive/html/qemu-devel/2015-12/msg04057.html Adding Jason Wang (net maintainer) on CC. > === > >From 344a487d637be20b3fb110bec36cb

Re: [Qemu-devel] [PATCH v2] iov: avoid memcpy for "simple" iov_from_buf/iov_to_buf

2015-12-22 Thread Stefan Hajnoczi
On Tue, Dec 22, 2015 at 12:03:33PM +0100, Paolo Bonzini wrote: > memcpy can take a large amount of time for small reads and writes. > For virtio it is a common case that the first iovec can satisfy the > whole read or write. In that case, and if bytes is a constant to > avoid excessive growth of c

Re: [Qemu-devel] [PATCH] trace: fix PRIx64 constants in trace-events

2015-12-22 Thread Stefan Hajnoczi
On Sat, Dec 19, 2015 at 11:08:42PM +, Mark Cave-Ayland wrote: > Commit c8ee0a4 introduced new events containing PRIx64 constants without > including the % prefix in the preceding string. This results in a compile > error during build if --enable-trace-backends is passed to configure. > > Signe

[Qemu-devel] [PATCH v7 2/2] mirror: Add mirror_wait_for_io

2015-12-22 Thread Fam Zheng
The three lines are duplicated a number of times now, refactor a function. Signed-off-by: Fam Zheng Reviewed-by: Max Reitz --- block/mirror.c | 24 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/block/mirror.c b/block/mirror.c index 90a4ebc..fffcfe0 100

[Qemu-devel] [PATCH v7 1/2] mirror: Rewrite mirror_iteration

2015-12-22 Thread Fam Zheng
The "pnum < nb_sectors" condition in deciding whether to actually copy data is unnecessarily strict, and the qiov initialization is unnecessarily for bdrv_aio_write_zeroes and bdrv_aio_discard. Rewrite mirror_iteration to fix both flaws. Signed-off-by: Fam Zheng --- block/mirror.c | 308 +++

[Qemu-devel] [PATCH v7 0/2] mirror: Improve zero write and discard

2015-12-22 Thread Fam Zheng
v7: Add Max's rev-by in patch 2. Address Max's comments in patch 1: - Fix tail calculation (-1) - Don't shadow variable. - Fix return value of mirror_cow_align. - Reorder a few lines to be clean. - "> 0" => ">= 0" for the return value of bdrv_get_block_status_above. Patch 1

Re: [Qemu-devel] [PATCH v6 1/2] mirror: Rewrite mirror_iteration

2015-12-22 Thread Fam Zheng
On Fri, 12/18 17:41, Max Reitz wrote: > On 20.11.2015 11:12, Fam Zheng wrote: > > The "pnum < nb_sectors" condition in deciding whether to actually copy > > data is unnecessarily strict, and the qiov initialization is > > unnecessarily for bdrv_aio_write_zeroes and bdrv_aio_discard. > > > > Rewrit

Re: [Qemu-devel] Block I/O Tracing

2015-12-22 Thread Stefan Hajnoczi
On Wed, Dec 16, 2015 at 12:37:39PM -0500, Luis Pabón wrote: > I am really interested in the following feature: > http://wiki.qemu.org/Features/Block/Todo#Trace_guest_block_I.2FO.2C_replay_with_qemu-io > . Is there any more information about this feature? Hi Luis, It's a useful idea but non-tri

Re: [Qemu-devel] [Qemu-block] [PATCH COLO-Frame v12 25/38] qmp event: Add event notification for COLO error

2015-12-22 Thread Hailiang Zhang
On 2015/12/22 5:14, John Snow wrote: On 12/19/2015 05:02 AM, Markus Armbruster wrote: Copying qemu-block because this seems related to generalising block jobs to background jobs. zhanghailiang writes: If some errors happen during VM's COLO FT stage, it's important to notify the users of t

Re: [Qemu-devel] [PATCH 00/10] qcow2: Implement image locking

2015-12-22 Thread Fam Zheng
On Tue, 12/22 17:46, Kevin Wolf wrote: > Enough innocent images have died because users called 'qemu-img snapshot' > while > the VM was still running. Educating the users doesn't seem to be a working > strategy, so this series adds locking to qcow2 that refuses to access the > image > read-write

Re: [Qemu-devel] [PATCH 0/3] correct some register return values for vxmnet3

2015-12-22 Thread Miao Yan
2015-12-23 10:15 GMT+08:00 Jason Wang : > > > On 12/22/2015 03:05 PM, Dmitry Fleytman wrote: >> >>> On 22 Dec 2015, at 04:44 AM, Miao Yan >> > wrote: >>> >>> Hi Dmitry, >>> >>> 2015-12-22 1:19 GMT+08:00 Dmitry Fleytman >> >: Hello Miao, >

Re: [Qemu-devel] [PATCH COLO-Frame v12 25/38] qmp event: Add event notification for COLO error

2015-12-22 Thread Hailiang Zhang
On 2015/12/19 18:02, Markus Armbruster wrote: Copying qemu-block because this seems related to generalising block jobs to background jobs. Er, this event just used to help users to know what happened to VM with COLO FT on. If users get this event, they can make further check what's wrong, and

Re: [Qemu-devel] [PATCH v2 2/4] net/vmxnet3: return correct value for VMXNET3_CMD_GET_DID_* command

2015-12-22 Thread Miao Yan
2015-12-23 4:49 GMT+08:00 Shmulik Ladkani : > Hi, > > On Mon, 21 Dec 2015 22:18:22 -0800 Miao Yan wrote: >> VMXNET3_CMD_GET_DID_LO should return PCI ID of the device >> and VMXNET3_CMD_GET_DID_HI should return vmxnet3 revision ID. >> >> This behavior can be observed by the following steps: >> >> 1

Re: [Qemu-devel] [PATCH 10/12] Support for quad commands.

2015-12-22 Thread Peter Crosthwaite
On Tue, Dec 22, 2015 at 1:40 PM, Peter Crosthwaite wrote: > On Wed, Dec 16, 2015 at 4:57 AM, wrote: >> From: Marcin Krzeminski >> >> Signed-off-by: Pawel Lenkow >> --- >> hw/block/m25p80.c | 38 -- >> 1 file changed, 36 insertions(+), 2 deletions(-) >> >> d

Re: [Qemu-devel] [PATCH 0/3] correct some register return values for vxmnet3

2015-12-22 Thread Jason Wang
On 12/22/2015 03:05 PM, Dmitry Fleytman wrote: > >> On 22 Dec 2015, at 04:44 AM, Miao Yan > > wrote: >> >> Hi Dmitry, >> >> 2015-12-22 1:19 GMT+08:00 Dmitry Fleytman > >: >>> Hello Miao, >>> >>> While patches look good technically, I cannot

Re: [Qemu-devel] [PATCH COLO-Frame v12 25/38] qmp event: Add event notification for COLO error

2015-12-22 Thread Hailiang Zhang
On 2015/12/19 0:03, Eric Blake wrote: On 12/15/2015 01:22 AM, zhanghailiang wrote: If some errors happen during VM's COLO FT stage, it's important to notify the users of this event. Together with 'colo_lost_heartbeat', users can intervene in COLO's failover work immediately. If users don't wan

Re: [Qemu-devel] [PATCH COLO-Frame v12 25/38] qmp event: Add event notification for COLO error

2015-12-22 Thread Wen Congyang
On 12/19/2015 06:02 PM, Markus Armbruster wrote: > Copying qemu-block because this seems related to generalising block jobs > to background jobs. > > zhanghailiang writes: > >> If some errors happen during VM's COLO FT stage, it's important to notify >> the users >> of this event. Together with

Re: [Qemu-devel] [PATCH COLO-Frame v12 00/38] COarse-grain LOck-stepping(COLO) Virtual Machines for Non-stop Service (FT)

2015-12-22 Thread Hailiang Zhang
On 2015/12/18 23:47, Dr. David Alan Gilbert wrote: * Hailiang Zhang (zhang.zhanghaili...@huawei.com) wrote: On 2015/12/17 18:52, Dr. David Alan Gilbert wrote: * Hailiang Zhang (zhang.zhanghaili...@huawei.com) wrote: On 2015/12/15 20:14, Dr. David Alan Gilbert wrote: * zhanghailiang (zhang.zha

[Qemu-devel] [Bug 1528718] [NEW] Initial monitor does not output anything on Windows (MSYS2 binary)

2015-12-22 Thread ECC_OK
Public bug reported: When running on Windows error messages before the UI is started are not showing up. For example when I run: qemu-system-i386.exe -L /mingw32/etc/qemu/ -m 20G It should display "ram size too large", according to gdb: Breakpoint 1, error_report (fmt=fmt@entry=0x71bdf6 "ram

Re: [Qemu-devel] [PATCH v3 2/4] target-tilegx: Add single floating point implementation

2015-12-22 Thread Chen Gang
On 12/11/15 06:15, Chen Gang wrote: > > On 12/11/15 04:18, Richard Henderson wrote: >> On 12/10/2015 09:15 AM, Richard Henderson wrote: >>> d = (uint64_t)sign << 63; >>> d = deposit64(d, 53, 11, exp); >>> d = deposit64(d, 21, 32, man); >>> return float64_to_float32(d, fp_status); >> >> Hm

Re: [Qemu-devel] [PATCH 10/10] qcow2: Add image locking

2015-12-22 Thread Eric Blake
On 12/22/2015 09:46 AM, Kevin Wolf wrote: > People have been keeping destroying their qcow2 images by using Any of these sound better: People have kept on destroying People have been destroying People keep on destroying > 'qemu-img snapshot' on images that were in use by a VM. This patch adds >

Re: [Qemu-devel] [PATCH v2] net: rocker: fix an incorrect array bounds check

2015-12-22 Thread Peter Maydell
On 22 December 2015 at 19:24, P J P wrote: > Hello Paolo, all > > Please see an updated patch below, as per suggestion in > -> https://lists.gnu.org/archive/html/qemu-devel/2015-12/msg04057.html Could you submit patches in the usual git send-email format, please? It's easier for maintainers t

Re: [Qemu-devel] [PATCH 06/10] qemu-img: Prepare for locked images

2015-12-22 Thread Eric Blake
On 12/22/2015 09:46 AM, Kevin Wolf wrote: > This patch extends qemu-img for working with locked images. It prints a > helpful error message when trying to access a locked image read-write, > and adds a 'qemu-img force-unlock' command as well as a 'qemu-img check > -r all --force' option in order to

Re: [Qemu-devel] [PATCH 10/12] Support for quad commands.

2015-12-22 Thread Peter Crosthwaite
On Wed, Dec 16, 2015 at 4:57 AM, wrote: > From: Marcin Krzeminski > > Signed-off-by: Pawel Lenkow > --- > hw/block/m25p80.c | 38 -- > 1 file changed, 36 insertions(+), 2 deletions(-) > > diff --git a/hw/block/m25p80.c b/hw/block/m25p80.c > index 6fc55a3..25

Re: [Qemu-devel] [PATCH 06/12] 4byte address mode support added.

2015-12-22 Thread Peter Crosthwaite
On Tue, Dec 22, 2015 at 10:41 AM, Cédric Le Goater wrote: > Hello Marcin, > > > On 12/16/2015 01:57 PM, marcin.krzemin...@nokia.com wrote: >> From: Marcin Krzeminski >> >> Signed-off-by: Marcin Krzeminski >> --- >> hw/block/m25p80.c | 31 --- >> 1 file changed, 28 in

Re: [Qemu-devel] [PATCH 09/10] qcow2: Make image inaccessible after failed qcow2_invalidate_cache()

2015-12-22 Thread Eric Blake
On 12/22/2015 09:46 AM, Kevin Wolf wrote: > If qcow2_invalidate_cache() fails, we are in a state where qcow2_close() > has already been completed, but the image hasn't been reopened yet. > Calling into any qcow2 function for an image in this state will cause > crashes. > > The real solution would

Re: [Qemu-devel] [PATCH 08/10] qcow2: Fix BDRV_O_INCOMING handling in qcow2_invalidate_cache()

2015-12-22 Thread Eric Blake
On 12/22/2015 09:46 AM, Kevin Wolf wrote: > What qcow2_invalidate_cache() should do is closing the image with > BDRV_O_INCOMING set and reopening it with the flag cleared. In fact, it Might read better with s/closing/close/, s/reopening/reopen/ > used to do exactly the opposite: qcow2_close() rel

Re: [Qemu-devel] [PATCH 07/10] qcow2: Implement .bdrv_inactivate

2015-12-22 Thread Eric Blake
On 12/22/2015 09:46 AM, Kevin Wolf wrote: > The callback has to ensure that closing or flushing the image afterwards > wouldn't cause a write access to the image files. This means that just > the caches have to be written out, which is part of the existing > .bdrv_close implementation. > > Signed-

Re: [Qemu-devel] [PATCH v2 2/4] net/vmxnet3: return correct value for VMXNET3_CMD_GET_DID_* command

2015-12-22 Thread Shmulik Ladkani
On Mon, 21 Dec 2015 22:18:22 -0800 Miao Yan wrote: > Signed-off-by: Miao Yan Reviewed-by: Shmulik Ladkani

Re: [Qemu-devel] [PATCH v2 1/4] net/vmxnet3: return 1 on device activation failure

2015-12-22 Thread Shmulik Ladkani
On Tue, 22 Dec 2015 22:41:34 +0200 Shmulik Ladkani wrote: > Could it be that various other error codes might be returned from ESXi > for a VMXNET3_CMD_ACTIVATE_DEV read, depending on device condition? Thinking this over, the commit takes us one step into a finer device implementation, and we can

Re: [Qemu-devel] [PATCH 06/10] qemu-img: Prepare for locked images

2015-12-22 Thread Eric Blake
On 12/22/2015 09:46 AM, Kevin Wolf wrote: > This patch extends qemu-img for working with locked images. It prints a > helpful error message when trying to access a locked image read-write, > and adds a 'qemu-img force-unlock' command as well as a 'qemu-img check > -r all --force' option in order to

Re: [Qemu-devel] [PATCH v2 3/4] net/vmxnet3: return correct value for VMXNET3_CMD_GET_DEV_EXTRA_INFO

2015-12-22 Thread Shmulik Ladkani
Hi, On Mon, 21 Dec 2015 22:18:23 -0800 Miao Yan wrote: > VMXNET3_CMD_GET_DEV_EXTRA_INFO should return 0 for emulation > mode > > This behavior can be observed by the following steps: > > 1) run a Linux distro on esxi server > 2) modify vmxnet3 Linux driver to read the register: > > VMXNET3_W

Re: [Qemu-devel] [PATCH 05/10] block: Inactivate BDS when migration completes

2015-12-22 Thread Eric Blake
On 12/22/2015 09:46 AM, Kevin Wolf wrote: > So far, live migration with shared storage meant that the image is in a > not-really-ready don't-touch-me state on the destination while the > source is still actively using it, but after completing the migration, > the image was fully opened on both side

Re: [Qemu-devel] [PATCH v2 2/4] net/vmxnet3: return correct value for VMXNET3_CMD_GET_DID_* command

2015-12-22 Thread Shmulik Ladkani
Hi, On Mon, 21 Dec 2015 22:18:22 -0800 Miao Yan wrote: > VMXNET3_CMD_GET_DID_LO should return PCI ID of the device > and VMXNET3_CMD_GET_DID_HI should return vmxnet3 revision ID. > > This behavior can be observed by the following steps: > > 1) run a Linux distro on esxi server > 2) modify vmxne

Re: [Qemu-devel] [PATCH v2 1/4] net/vmxnet3: return 1 on device activation failure

2015-12-22 Thread Shmulik Ladkani
Hi, On Mon, 21 Dec 2015 22:18:21 -0800 Miao Yan wrote: > When reading device status, 0 means device is successfully > activated and 1 means error. > > This behavior can be observed by the following steps: > > 1) run a Linux distro on esxi server > 2) modify vmxnet3 Linux driver to give it an in

Re: [Qemu-devel] [PATCH 04/10] block: Fix error path in bdrv_invalidate_cache()

2015-12-22 Thread Eric Blake
On 12/22/2015 09:46 AM, Kevin Wolf wrote: > We can only clear BDRV_O_INCOMING if the caches were actually > invalidated. > > Signed-off-by: Kevin Wolf > --- > block.c | 2 ++ > 1 file changed, 2 insertions(+) Reviewed-by: Eric Blake -- Eric Blake eblake redhat com+1-919-301-3266 Libvir

Re: [Qemu-devel] [PATCH 03/10] block: Assert no write requests under BDRV_O_INCOMING

2015-12-22 Thread Eric Blake
On 12/22/2015 09:46 AM, Kevin Wolf wrote: > As long as BDRV_O_INCOMING is set, the image file is only opened so we > have a file descriptor for it. We're definitely not supposed to modify > the image, it's still owned by the migration source. > > Signed-off-by: Kevin Wolf > --- > block/io.c | 2

Re: [Qemu-devel] [PATCH 02/10] qcow2: Write full header on image creation

2015-12-22 Thread Eric Blake
On 12/22/2015 09:46 AM, Kevin Wolf wrote: > When creating a qcow2 image, we didn't necessarily call > qcow2_update_header(), but could end up with the basic header that > qcow2_create2() created manually. One thing that this basic header > lacks is the feature table. Let's make sure that it's alway

Re: [Qemu-devel] [PATCH 01/10] qcow2: Write feature table only for v3 images

2015-12-22 Thread Eric Blake
On 12/22/2015 09:46 AM, Kevin Wolf wrote: > Version 2 images don't have feature bits, so writing a feature table to > those images is kind of pointless. Fortunately, it is also harmless; even the v2 spec allowed for unknown extension headers. > > Signed-off-by: Kevin Wolf > --- > block/qcow2.c

[Qemu-devel] [PATCH v2] net: rocker: fix an incorrect array bounds check

2015-12-22 Thread P J P
Hello Paolo, all Please see an updated patch below, as per suggestion in -> https://lists.gnu.org/archive/html/qemu-devel/2015-12/msg04057.html === From 344a487d637be20b3fb110bec36cb703e7f6ecaa Mon Sep 17 00:00:00 2001 From: Prasad J Pandit Date: Wed, 23 Dec 2015 00:40:13 +0530 Subject: [

Re: [Qemu-devel] [PATCH v2] qemu-char: add logfile facility to all chardev backends

2015-12-22 Thread Eric Blake
On 12/22/2015 11:17 AM, Daniel P. Berrange wrote: > Typically a UNIX guest OS will log boot messages to a serial > port in addition to any graphical console. An admin user > may also wish to use the serial port for an interactive > console. A virtualization management system may wish to > collect s

Re: [Qemu-devel] [PATCH 01/74] tests: acpi: print ASL diff in verbose mode

2015-12-22 Thread Michael S. Tsirkin
On Tue, Dec 22, 2015 at 06:22:08PM +0100, Igor Mammedov wrote: > On Tue, 22 Dec 2015 18:59:30 +0200 > "Michael S. Tsirkin" wrote: > > > On Tue, Dec 22, 2015 at 04:54:06PM +0100, Igor Mammedov wrote: > > > On Tue, 22 Dec 2015 17:28:42 +0200 > > > "Michael S. Tsirkin" wrote: > > > > > > > On Thu,

Re: [Qemu-devel] [PATCH] net: rocker: fix an incorrect array bounds check

2015-12-22 Thread P J P
+-- On Tue, 22 Dec 2015, Paolo Bonzini wrote --+ | > === | > diff --git a/hw/net/rocker/rocker.c b/hw/net/rocker/rocker.c | > index c57f1a6..2e77e50 100644 | > --- a/hw/net/rocker/rocker.c | > +++ b/hw/net/rocker/rocker.c | > @@ -232,6 +232,9 @@ static int tx_consume(Rocker *r, DescInfo *info) | >

[Qemu-devel] [Bug 685096] Re: USB Passthrough not working for Windows 7 guest

2015-12-22 Thread FFO
The only way to see my iPhone (or any USB device) in the Windows guest is to have it redirected via "Spice", not with libvirt xml capture elements. Select Redirect USB device in virt-viewer and it just works. I have upgraded to Qemu 2.4, libvirt 1.2.21 and upgraded the qemu machine to "q35" as I

Re: [Qemu-devel] [PATCH] hmp: avoid redundant null termination of buffer

2015-12-22 Thread Luiz Capitulino
On Thu, 17 Dec 2015 18:10:59 +0530 (IST) P J P wrote: >Hello, > > An OOB write issue was reported by Mr Ling Liu, CC'd here. It occurs while > processing the 'sendkey' command, if the command argument was longer than > the 'keyname_buf[16]' buffer. Markus, are you planning a pull request s

Re: [Qemu-devel] [PATCH v2] qemu-char: add logfile facility to all chardev backends

2015-12-22 Thread Eric Blake
On 12/22/2015 11:17 AM, Daniel P. Berrange wrote: > Typically a UNIX guest OS will log boot messages to a serial > port in addition to any graphical console. An admin user > may also wish to use the serial port for an interactive > console. A virtualization management system may wish to > collect s

Re: [Qemu-devel] [PATCH 06/12] 4byte address mode support added.

2015-12-22 Thread Cédric Le Goater
Hello Marcin, On 12/16/2015 01:57 PM, marcin.krzemin...@nokia.com wrote: > From: Marcin Krzeminski > > Signed-off-by: Marcin Krzeminski > --- > hw/block/m25p80.c | 31 --- > 1 file changed, 28 insertions(+), 3 deletions(-) > > diff --git a/hw/block/m25p80.c b/hw/b

Re: [Qemu-devel] [PATCH 2/2] io: fix stack allocation when sending of file descriptors

2015-12-22 Thread Eric Blake
On 12/21/2015 09:23 AM, Daniel P. Berrange wrote: > When sending file descriptors over a socket, we have to > allocate a data buffer to hold the FDs in the scmsghdr. > Unfortunately we allocated the buffer on the stack inside > an if () {} block, but called sendmsg() outside the block. > So the sta

[Qemu-devel] [PATCH v2] qemu-char: add logfile facility to all chardev backends

2015-12-22 Thread Daniel P. Berrange
Typically a UNIX guest OS will log boot messages to a serial port in addition to any graphical console. An admin user may also wish to use the serial port for an interactive console. A virtualization management system may wish to collect system boot messages by logging the serial port, but also wis

Re: [Qemu-devel] [PATCH 1/2] io: fix setting of QIO_CHANNEL_FEATURE_FD_PASS on server connections

2015-12-22 Thread Eric Blake
On 12/21/2015 09:23 AM, Daniel P. Berrange wrote: > The QIO_CHANNEL_FEATURE_FD_PASS feature flag is set in the > qio_channel_socket_set_fd() method, however, this only deals > with client side connections. > > To ensure server side connections also have the feature flag > set, we must set it in qi

Re: [Qemu-devel] [PATCH] net: rocker: fix an incorrect array bounds check

2015-12-22 Thread Paolo Bonzini
On 22/12/2015 18:26, P J P wrote: > +-- On Tue, 22 Dec 2015, Paolo Bonzini wrote --+ > | > -if (++iovcnt > ROCKER_TX_FRAGS_MAX) { > | > +if (++iovcnt >= ROCKER_TX_FRAGS_MAX) { > | > | Doesn't this forbid some valid ROCKER_TX_FRAGS_MAX-element iovecs? > > forbid..? Sorry, I di

Re: [Qemu-devel] [PATCH 7/7] qemu-img: allow specifying image as a set of options args

2015-12-22 Thread Eric Blake
On 12/22/2015 11:07 AM, Daniel P. Berrange wrote: > A third option would be to keep using positional arguments, but > add a '--source-opts' *boolean* flag to indicate how to interpret > the positional arguments. ie without --source-opts we use the > historic syntax, but with --source-opts, we ass

Re: [Qemu-devel] [PATCH 7/7] qemu-img: allow specifying image as a set of options args

2015-12-22 Thread Daniel P. Berrange
On Tue, Dec 22, 2015 at 10:50:19AM -0700, Eric Blake wrote: > On 12/22/2015 10:42 AM, Daniel P. Berrange wrote: > > >> Overall, I'm left wondering whether requiring '--source FOO' vs. > >> positional 'FOO', and manually enforcing mutual exclusion between the > >> two, is necessary, or if we could

Re: [Qemu-devel] [PATCH 7/7] qemu-img: allow specifying image as a set of options args

2015-12-22 Thread Eric Blake
On 12/22/2015 10:42 AM, Daniel P. Berrange wrote: >> Overall, I'm left wondering whether requiring '--source FOO' vs. >> positional 'FOO', and manually enforcing mutual exclusion between the >> two, is necessary, or if we could stick with positional. But I guess >> the main argument is backwards-

Re: [Qemu-devel] [PATCH 7/7] qemu-img: allow specifying image as a set of options args

2015-12-22 Thread Daniel P. Berrange
On Tue, Dec 22, 2015 at 10:33:48AM -0700, Eric Blake wrote: > On 12/22/2015 04:06 AM, Daniel P. Berrange wrote: > > Currently qemu-img allows an image filename to be passed on the > > command line, but does not have a way to set any options except > > the format eg > > > >qemu-img info https:/

Re: [Qemu-devel] [PATCH 7/7] qemu-img: allow specifying image as a set of options args

2015-12-22 Thread Eric Blake
On 12/22/2015 04:06 AM, Daniel P. Berrange wrote: > Currently qemu-img allows an image filename to be passed on the > command line, but does not have a way to set any options except > the format eg > >qemu-img info https://127.0.0.1/images/centos7.iso > > This adds a --source arg (that is mut

Re: [Qemu-devel] [PATCH 4/7] qemu-io: add support for --object command line arg

2015-12-22 Thread Daniel P. Berrange
On Tue, Dec 22, 2015 at 09:55:17AM -0700, Eric Blake wrote: > On 12/22/2015 04:06 AM, Daniel P. Berrange wrote: > > Allow creation of user creatable object types with qemu-io > > via a --object command line arg. This will be used to supply > > passwords and/or encryption keys to the various block d

Re: [Qemu-devel] [PATCH 01/74] tests: acpi: print ASL diff in verbose mode

2015-12-22 Thread Igor Mammedov
On Tue, 22 Dec 2015 18:59:30 +0200 "Michael S. Tsirkin" wrote: > On Tue, Dec 22, 2015 at 04:54:06PM +0100, Igor Mammedov wrote: > > On Tue, 22 Dec 2015 17:28:42 +0200 > > "Michael S. Tsirkin" wrote: > > > > > On Thu, Dec 10, 2015 at 12:40:55AM +0100, Igor Mammedov wrote: > > > > Signed-off-by:

Re: [Qemu-devel] [PATCH 2/7] qemu-img: add support for --object command line arg

2015-12-22 Thread Daniel P. Berrange
On Tue, Dec 22, 2015 at 09:24:00AM -0700, Eric Blake wrote: > On 12/22/2015 04:06 AM, Daniel P. Berrange wrote: > > Allow creation of user creatable object types with qemu-img > > via a --object command line arg. This will be used to supply > > Does this read better as "a dash-dash-object", or "an

Re: [Qemu-devel] [PATCH] net: rocker: fix an incorrect array bounds check

2015-12-22 Thread P J P
+-- On Tue, 22 Dec 2015, Paolo Bonzini wrote --+ | > -if (++iovcnt > ROCKER_TX_FRAGS_MAX) { | > +if (++iovcnt >= ROCKER_TX_FRAGS_MAX) { | | Doesn't this forbid some valid ROCKER_TX_FRAGS_MAX-element iovecs? forbid..? Sorry, I did not get the question. | The check should be mov

Re: [Qemu-devel] [PATCH 4/7] qemu-io: add support for --object command line arg

2015-12-22 Thread Eric Blake
On 12/22/2015 04:06 AM, Daniel P. Berrange wrote: > Allow creation of user creatable object types with qemu-io > via a --object command line arg. This will be used to supply > passwords and/or encryption keys to the various block driver > backends via the recently added 'secret' object type. > >

Re: [Qemu-devel] [PATCH 5/7] qemu-io: allow specifying image as a set of options args

2015-12-22 Thread Daniel P. Berrange
On Tue, Dec 22, 2015 at 10:06:00AM -0700, Eric Blake wrote: > On 12/22/2015 04:06 AM, Daniel P. Berrange wrote: > > Currently qemu-io allows an image filename to be passed on the > > command line, but does not have a way to set any options except > > the format eg > > > > qemu-io https://127.0.0.

[Qemu-devel] [PULL 55/55] acpi: extend aml_and() to accept target argument

2015-12-22 Thread Michael S. Tsirkin
From: Igor Mammedov Signed-off-by: Igor Mammedov Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin --- include/hw/acpi/aml-build.h | 2 +- hw/acpi/aml-build.c | 4 ++-- hw/arm/virt-acpi-build.c| 2 +- hw/i386/acpi-build.c| 8 +--- 4 files changed, 9 ins

[Qemu-devel] [PULL 54/55] acpi: extend aml_or() to accept target argument

2015-12-22 Thread Michael S. Tsirkin
From: Igor Mammedov Signed-off-by: Igor Mammedov Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin Reviewed-by: Marcel Apfelbaum --- include/hw/acpi/aml-build.h | 2 +- hw/acpi/aml-build.c | 4 ++-- hw/arm/virt-acpi-build.c| 6 +++--- hw/i386/acpi-build.c|

Re: [Qemu-devel] [PATCH 6/7] qemu-nbd: allow specifying image as a set of options args

2015-12-22 Thread Eric Blake
On 12/22/2015 04:06 AM, Daniel P. Berrange wrote: > Currently qemu-nbd allows an image filename to be passed on the > command line, but does not have a way to set any options except > the format eg > >qemu-nbd https://127.0.0.1/images/centos7.iso >qemu-nbd /home/berrange/demo.qcow2 Well,

[Qemu-devel] [PULL 42/55] acpi: add aml_decrement() and aml_subtract()

2015-12-22 Thread Michael S. Tsirkin
From: Igor Mammedov Signed-off-by: Igor Mammedov Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin Reviewed-by: Marcel Apfelbaum --- include/hw/acpi/aml-build.h | 2 ++ hw/acpi/aml-build.c | 14 ++ 2 files changed, 16 insertions(+) diff --git a/include/h

Re: [Qemu-devel] [PATCH 5/7] qemu-io: allow specifying image as a set of options args

2015-12-22 Thread Eric Blake
On 12/22/2015 04:06 AM, Daniel P. Berrange wrote: > Currently qemu-io allows an image filename to be passed on the > command line, but does not have a way to set any options except > the format eg > > qemu-io https://127.0.0.1/images/centos7.iso > qemu-io /home/berrange/demo.qcow2 Well, you CAN

[Qemu-devel] [PULL 53/55] acpi add aml_dma()

2015-12-22 Thread Michael S. Tsirkin
From: Igor Mammedov Signed-off-by: Igor Mammedov Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin --- include/hw/acpi/aml-build.h | 20 hw/acpi/aml-build.c | 14 ++ 2 files changed, 34 insertions(+) diff --git a/include/hw/acpi/aml-bu

  1   2   3   >