Re: [Qemu-devel] [PATCH 0/2] Make mixer emulation configurable at runtime

2013-08-28 Thread Markus Armbruster
Gerd Hoffmann writes: > Hi, > >> Only pulse and the spice audio backends set VOICE_VOLUME_CAP. >> >> Impact on users isn't obvious to me. > > It offloads volume control to the audio backend, i.e. it will be done by > pulseaudio/spice-client instead of mixemu. > >> Questions (not just for y

Re: [Qemu-devel] [PATCH 0/2] Make mixer emulation configurable at runtime

2013-08-28 Thread Markus Armbruster
Bandan Das writes: > Markus Armbruster writes: > >> Bandan Das writes: >> >>> Currently, hda-codec mixer emulation can only be enabled by using the >>> "--enable-mixemu" option to configure at compile time. These patches add >>>

Re: [Qemu-devel] [PATCH 1/2] qemu_hexstr(): hexdump a small buffer to a string, for in-line printing

2013-08-29 Thread Markus Armbruster
Laszlo Ersek writes: > This function should primarily serve tracing needs. > > Signed-off-by: Laszlo Ersek > --- > include/qemu-common.h | 11 +++ > util/hexdump.c| 20 > 2 files changed, 31 insertions(+), 0 deletions(-) > > diff --git a/include/qemu-com

Re: [Qemu-devel] [PATCH 0/3] Fix confused output for alias properties

2014-09-16 Thread Markus Armbruster
Paolo Bonzini writes: > Il 16/09/2014 11:16, Markus Armbruster ha scritto: >>> I think both "str" and "link" actually are a small >>> degradation >>> compared to "drive", and this is why I kept the legacy_name. But overall I >>&

Re: [Qemu-devel] [PATCH v2] virtio-balloon: fix integer overflow in memory stats feature

2014-09-16 Thread Markus Armbruster
kinds of overflow. > > Signed-off-by: Luiz Capitulino Reviewed-by: Markus Armbruster

Re: [Qemu-devel] [PATCH] hmp: fix memory leak at hmp_info_block_jobs()

2014-09-16 Thread Markus Armbruster
obs(Monitor *mon, const QDict *qdict) > } > list = list->next; > } > + > +qapi_free_BlockJobInfoList(list); > } > > void hmp_info_tpm(Monitor *mon, const QDict *qdict) Reviewed-by: Markus Armbruster

Re: [Qemu-devel] [PATCH] block: delete cow block driver

2014-09-16 Thread Markus Armbruster
s QEMU cow images are useless and QEMU has not had bug reports > from users actually hitting these issues. > > Let's get rid of this thing, it serves no purpose and no one will be > affected. > > Signed-off-by: Stefan Hajnoczi Reviewed-by: Markus Armbruster

Re: [Qemu-devel] [PATCH v2 0/2] usb: Don't use qerror_report

2014-09-16 Thread Markus Armbruster
Gerd Hoffmann writes: > Hi, > >> > Gonglei (2): >> > redirect.c: Don't use qerror_report() >> > dev-network: Don't use qerror_report_err() > >> Hi, Gerd >> Would you like to apply this patch series at present? Thanks! > > Picked it up now. Originally dropped due to review comments from pa

Re: [Qemu-devel] [PATCH v5 2/2] dump: Don't return error code when return an Error object

2014-09-16 Thread Markus Armbruster
zhanghailiang writes: > Functions shouldn't return an error code and an Error object at the same time. > Turn all these functions that returning Error object to void. > We also judge if a function success or fail by reference to the *errp. > > Signed-off-by: zhanghailiang > --- > dump.c | 244

Re: [Qemu-devel] [PATCH v2 08/23] block: Eliminate BlockDriverState member device_name[]

2014-09-16 Thread Markus Armbruster
Paolo Bonzini writes: > Il 16/09/2014 16:08, Markus Armbruster ha scritto: >>>> >> +if (bs->device_list.tqe_prev) { >>>> >> QTAILQ_REMOVE(&bdrv_states, bs, device_list); >>>> >> +bs->device_list.tqe_prev

[Qemu-devel] [PATCH v3 05/23] block: Code motion to get rid of stubs/blockdev.c

2014-09-16 Thread Markus Armbruster
Signed-off-by: Markus Armbruster Reviewed-by: Benoît Canet --- block/block-backend.c | 15 +++ blockdev.c| 13 - include/sysemu/blockdev.h | 1 - stubs/Makefile.objs | 1 - stubs/blockdev.c | 12 5 files changed, 15

[Qemu-devel] [PATCH v3 01/23] block: Split bdrv_new_root() off bdrv_new()

2014-09-16 Thread Markus Armbruster
Creating an anonymous BDS can't fail. Make that obvious. Signed-off-by: Markus Armbruster Reviewed-by: Max Reitz Reviewed-by: Benoît Canet --- block.c | 28 +++- block/iscsi.c | 2 +- block/vvfat.c | 2 +- blockdev.c

[Qemu-devel] [PATCH v3 03/23] block: Connect BlockBackend to BlockDriverState

2014-09-16 Thread Markus Armbruster
eak here is rather hairy, but it'll become straightforward in a few commits, so I mark it FIXME in the code now, and plug it when it's easy. Signed-off-by: Markus Armbruster --- block.c| 10 ++-- block/block-backend.c | 71 ++

[Qemu-devel] [PATCH v3 10/23] block: Eliminate DriveInfo member bdrv, use blk_by_legacy_dinfo()

2014-09-16 Thread Markus Armbruster
ers a bit. I also omit tests whether dinfo->bdrv is null, because it never is. Signed-off-by: Markus Armbruster --- blockdev.c | 3 +-- hw/arm/collie.c | 9 + hw/arm/gumstix.c | 5 +++-- hw/arm/mains

[Qemu-devel] [PATCH v3 07/23] block: Eliminate bdrv_iterate(), use bdrv_next()

2014-09-16 Thread Markus Armbruster
Signed-off-by: Markus Armbruster Reviewed-by: Benoît Canet --- block-migration.c | 30 +++--- block.c | 9 - blockdev.c| 31 +-- include/block/block.h | 2 -- monitor.c | 32

[Qemu-devel] [PATCH v3 00/23] Split BlockBackend off BDS with an axe

2014-09-16 Thread Markus Armbruster
Convert qmp_eject(), qmp_change_blockdev() to BlockBackend - Both unchanged * [PATCH 22/23] block: Lift device model API into BlockBackend - Only comments and context differences * [PATCH 23/23] block: Make device model's references to BlockBackend - Unchanged Markus Armbruster (23): b

[Qemu-devel] [PATCH v3 09/23] block: Merge BlockBackend and BlockDriverState name spaces

2014-09-16 Thread Markus Armbruster
BlockBackend's name space is separate only to keep the initial patches simple. Time to merge the two. Signed-off-by: Markus Armbruster Reviewed-by: Benoît Canet --- block.c | 11 +++ block/block-backend.c | 13 ++--- 2 files changed, 9 insertions(+), 15 dele

[Qemu-devel] [PATCH v3 19/23] blockdev: Drop DriveInfo member enable_auto_del

2014-09-16 Thread Markus Armbruster
Commit 2d246f0 introduced DriveInfo member enable_auto_del to distinguish DriveInfo created via drive_new() from DriveInfo created via qmp_blockdev_add(). The latter no longer exist. Drop enable_auto_del. Signed-off-by: Markus Armbruster --- blockdev.c| 11 +++ include

[Qemu-devel] [PATCH v3 08/23] block: Eliminate BlockDriverState member device_name[]

2014-09-16 Thread Markus Armbruster
ted with a BlockBackend, and vice versa. Furthermore, blk_new_with_bs() keeps the two names equal. Therefore, device_name[] is redundant. Eliminate it. Signed-off-by: Markus Armbruster --- block-migration.c | 12 block.c

[Qemu-devel] [PATCH v3 04/23] block: Connect BlockBackend and DriveInfo

2014-09-16 Thread Markus Armbruster
Make the BlockBackend own the DriveInfo. Change blockdev_init() to return the BlockBackend instead of the DriveInfo. Signed-off-by: Markus Armbruster --- block.c | 2 -- block/block-backend.c | 38 blockdev.c| 73

[Qemu-devel] [PATCH v3 02/23] block: New BlockBackend

2014-09-16 Thread Markus Armbruster
tate objects are created and destroyed. "Root" in the sense of "in bdrv_states". They're not yet used for anything; that'll come shortly. BlockBackend is reference-counted. Its reference count never exceeds one so far, but that's going to change. Signed

[Qemu-devel] [PATCH v3 17/23] blockdev: Drop superfluous DriveInfo member id

2014-09-16 Thread Markus Armbruster
Signed-off-by: Markus Armbruster --- block/block-backend.c | 1 - blockdev.c| 3 +-- include/sysemu/blockdev.h | 1 - 3 files changed, 1 insertion(+), 4 deletions(-) diff --git a/block/block-backend.c b/block/block-backend.c index 5f796b4..141a31b 100644 --- a/block/block

[Qemu-devel] [PATCH v3 13/23] virtio-blk: Rename VirtIOBlkConf variables to conf

2014-09-16 Thread Markus Armbruster
This is consistent with how VirtIOFOOConf variables are named elsewhere, and makes blk available for BlockBackend variables. Signed-off-by: Markus Armbruster --- hw/block/dataplane/virtio-blk.c | 33 +- hw/block/dataplane/virtio-blk.h | 2 +- hw/block/virtio-blk.c

[Qemu-devel] [PATCH v3 06/23] block: Make BlockBackend own its BlockDriverState

2014-09-16 Thread Markus Armbruster
On BlockBackend destruction, unref its BlockDriverState. Replaces the callers' unrefs. Signed-off-by: Markus Armbruster --- block/block-backend.c | 6 ++ blockdev.c| 8 ++-- hw/block/xen_disk.c | 6 +++--- qemu-img.c

[Qemu-devel] [PATCH v3 23/23] block: Make device model's references to BlockBackend strong

2014-09-16 Thread Markus Armbruster
Doesn't make a difference just yet, but it's the right thing to do. Signed-off-by: Markus Armbruster --- block/block-backend.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/block/block-backend.c b/block/block-backend.c index d49c988..5646628 100644 --- a/b

[Qemu-devel] [PATCH v3 12/23] virtio-blk: Drop redundant VirtIOBlock member conf

2014-09-16 Thread Markus Armbruster
Commit 12c5674 turned it into a pointer to member blk.conf. Signed-off-by: Markus Armbruster --- hw/block/virtio-blk.c | 28 ++-- include/hw/virtio/virtio-blk.h | 1 - 2 files changed, 14 insertions(+), 15 deletions(-) diff --git a/hw/block/virtio-blk.c b/hw

[Qemu-devel] [PATCH v3 15/23] ide: Complete conversion from BlockDriverState to BlockBackend

2014-09-16 Thread Markus Armbruster
Add a BlockBackend member to TrimAIOCB, so ide_issue_trim_cb() can use blk_aio_discard() instead of bdrv_aio_discard(). Signed-off-by: Markus Armbruster --- hw/ide/core.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/hw/ide/core.c b/hw/ide/core.c index f02ce4a

[Qemu-devel] [PATCH v3 18/23] blockdev: Fix blockdev-add not to create IDE drive (0, 0)

2014-09-16 Thread Markus Armbruster
drives. Not sure whether getting the QMP command executed early enough is likely in practice, though. Fix by creating DriveInfo in drive_new(). Block backends created by blockdev-add don't get one. A few places assume a block backend always has a DriveInfo. Fix them up. Signed-off-by: M

[Qemu-devel] [PATCH v3 20/23] block/qapi: Convert qmp_query_block() to BlockBackend

2014-09-16 Thread Markus Armbruster
Much more command code needs conversion. I start with this one because it's using bdrv_dev_* functions, which I'm about to lift into BlockBackend. While there, give bdrv_query_info() internal linkage. Signed-off-by: Markus Armbruster --- block/qapi.c | 15 --

[Qemu-devel] [PATCH v3 21/23] blockdev: Convert qmp_eject(), qmp_change_blockdev() to BlockBackend

2014-09-16 Thread Markus Armbruster
Much more command code needs conversion. I'm converting these now because they's using bdrv_dev_* functions, which I'm about to lift into BlockBackend. Signed-off-by: Markus Armbruster --- blockdev.c | 20 1 file changed, 12 insertions(+), 8 deletions(-

[Qemu-devel] [PATCH v3 11/23] block: Rename BlockDriverAIOCB* to BlockAIOCB*

2014-09-16 Thread Markus Armbruster
I'll use BlockDriverAIOCB with block backends shortly, and the name is going to fit badly there. It's a block layer thing anyway, not just a block driver thing. Signed-off-by: Markus Armbruster --- block-migration.c | 2 +- block.c

[Qemu-devel] [PATCH v3 22/23] block: Lift device model API into BlockBackend

2014-09-16 Thread Markus Armbruster
Move device model attachment / detachment and the BlockDevOps device model callbacks and their wrappers from BlockDriverState to BlockBackend. Signed-off-by: Markus Armbruster --- block.c| 126 -- block/block-backend.c | 151

[Qemu-devel] [PATCH v3 16/23] pc87312: Drop unused members of PC87312State

2014-09-16 Thread Markus Armbruster
Signed-off-by: Markus Armbruster --- include/hw/isa/pc87312.h | 3 --- 1 file changed, 3 deletions(-) diff --git a/include/hw/isa/pc87312.h b/include/hw/isa/pc87312.h index befc8bd..bf74470 100644 --- a/include/hw/isa/pc87312.h +++ b/include/hw/isa/pc87312.h @@ -47,13 +47,10 @@ typedef struct

Re: [Qemu-devel] [PATCH 0/3] Fix confused output for alias properties

2014-09-16 Thread Markus Armbruster
Eric Blake writes: > On 09/16/2014 12:31 PM, Paolo Bonzini wrote: > >>> Change legacy_name to point to a detailed human-readable >>> description of the type? >>> E.g. "Ethernet 6-byte MAC Address, format: AA:BB:CC:DD:EE:FF"? >> >> If libvirt can cope with >> >> e1000.mac=str (Ethernet 6-byte MA

Re: [Qemu-devel] [PATCH 0/3] Fix confused output for alias properties

2014-09-16 Thread Markus Armbruster
"Michael S. Tsirkin" writes: > On Tue, Sep 16, 2014 at 10:01:19PM +0300, Michael S. Tsirkin wrote: >> On Tue, Sep 16, 2014 at 08:31:08PM +0200, Paolo Bonzini wrote: >> > Il 16/09/2014 18:56, Michael S. Tsirkin ha scritto: >> > > On Tue, Sep 16, 2014 at 06:27:51PM +0200, Paolo Bonzini wrote: >> >

Re: [Qemu-devel] [PATCH] block: vhdx - fix reading beyond pointer during image creation

2014-09-16 Thread Markus Armbruster
Jeff Cody writes: > In vhdx_create_metadata(), we allocate 40 bytes to entry_buffer for > the various metadata table entries. However, we write out 64kB from > that buffer into the new file. Only write out the correct 40 bytes. > > Signed-off-by: Jeff Cody > --- > block/vhdx.c | 16 --

Re: [Qemu-devel] [PATCH] vnc: add additional key up event before repeated key down

2014-09-17 Thread Markus Armbruster
Anthony Liguori writes: > On Tue, Sep 9, 2014 at 8:31 PM, Chun Yan Liu wrote: >> >> >>>>> On 9/10/2014 at 02:23 AM, in message >>>>> <87tx4girg6....@blackfin.pond.sub.org>, >> Markus Armbruster wrote: >>> "Chun Yan Liu&qu

[Qemu-devel] [PATCH] vnc-tls: Clean up dead store in vnc_set_x509_credential()

2014-09-17 Thread Markus Armbruster
Signed-off-by: Markus Armbruster --- ui/vnc-tls.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/ui/vnc-tls.c b/ui/vnc-tls.c index 6392326..0f59f9b 100644 --- a/ui/vnc-tls.c +++ b/ui/vnc-tls.c @@ -444,8 +444,6 @@ static int vnc_set_x509_credential(VncDisplay *vd, struct stat sb

Re: [Qemu-devel] [PATCH 1/1] loader: g_realloc(p, 0) frees and returns NULL, simplify

2014-09-17 Thread Markus Armbruster
Ping? Markus Armbruster writes: > "Michael S. Tsirkin" writes: > >> On Wed, Aug 20, 2014 at 08:38:11PM +0200, Markus Armbruster wrote: >>> Once upon a time, it was decided that qemu_realloc(ptr, 0) should >>> abort. Switching to glib retired that bright

Re: [Qemu-devel] [PATCH] vnc: add additional key up event before repeated key down

2014-09-17 Thread Markus Armbruster
Peter Maydell writes: > On 17 September 2014 00:04, Markus Armbruster wrote: >> Anthony Liguori writes: >>> You should fix TigerVNC. It's broken if it isn't sending repeat events. >> >> It *is* sending repeat events. The commit message says so, and I &

Re: [Qemu-devel] [PATCH] qdev-monitor: fix segmentation fault on qdev_device_help()

2014-09-17 Thread Markus Armbruster
"Gonglei (Arei)" writes: >> > >> >> > >> Doesn't this leak prop_list when local_err && prop_list? >> > >> >> > > No, it will not happen this situation. >> > > >> > >> Returning both a value in need of destruction and an error object is at >> > >> least highly unusual, and probably plain wrong. >>

Re: [Qemu-devel] [PATCH] block: vhdx - fix reading beyond pointer during image creation

2014-09-17 Thread Markus Armbruster
Jeff Cody writes: > On Wed, Sep 17, 2014 at 08:33:10AM +0200, Markus Armbruster wrote: >> Jeff Cody writes: >> >> > In vhdx_create_metadata(), we allocate 40 bytes to entry_buffer for >> > the various metadata table entries. However, we write out 64kB from &

Re: [Qemu-devel] [PATCH] qga: Fix possible freed memory accessing

2014-09-18 Thread Markus Armbruster
zhanghailiang writes: > If readdir_r fails, error_setg_errno will reference the freed > pointer *dirpath*. > > Signed-off-by: zhanghailiang Reviewed-by: Markus Armbruster

Re: [Qemu-devel] [PATCH v3 10/23] block: Eliminate DriveInfo member bdrv, use blk_by_legacy_dinfo()

2014-09-18 Thread Markus Armbruster
Benoît Canet writes: > On Tue, Sep 16, 2014 at 08:12:15PM +0200, Markus Armbruster wrote: Restoring context... @@ -252,14 +253,16 @@ static int milkymist_memcard_init(SysBusDevice *dev) { MilkymistMemcardState *s = MILKYMIST_MEMCARD(dev); DriveInfo *di

Re: [Qemu-devel] [PATCH v3 13/23] virtio-blk: Rename VirtIOBlkConf variables to conf

2014-09-18 Thread Markus Armbruster
Benoît Canet writes: >> -if (size % dev->blk.conf.logical_block_size) { >> +if (size % dev->conf.conf.logical_block_size) { > > This look strange (conf.conf) Yeah, it does. I picked conf anyway, for consistency with the existing similar members of sibling structs VirtIOSCSICommon and Vi

Re: [Qemu-devel] [PATCH] usb-storage: fix possible memory leak and missing error message

2014-09-18 Thread Markus Armbruster
writes: > From: Gonglei > > When scsi_bus_legacy_add_drive() return NULL, meanwhile err will > be not NULL, which will casue memory leak and missing error message. > > Signed-off-by: Gonglei > --- > hw/usb/dev-storage.c | 11 ++- > 1 file changed, 6 insertions(+), 5 deletions(-) > > di

Re: [Qemu-devel] [PATCH] block: vhdx - fix reading beyond pointer during image creation

2014-09-18 Thread Markus Armbruster
Markus Armbruster writes: > Jeff Cody writes: > >> On Wed, Sep 17, 2014 at 08:33:10AM +0200, Markus Armbruster wrote: >>> Jeff Cody writes: >>> >>> > In vhdx_create_metadata(), we allocate 40 bytes to entry_buffer for >>> > the various me

Re: [Qemu-devel] [PATCH] block: Validate node-name

2014-09-18 Thread Markus Armbruster
Kevin Wolf writes: > Am 17.09.2014 um 13:49 hat Benoît Canet geschrieben: >> >> >> > +int qemu_opts_id_wellformed(const char *id) >> >> This return 0 and 1 as a bool. >> Could we make the function return bool in the same series ? > > I considered the change (as you probably saw, the new block.

Re: [Qemu-devel] [PATCH] usb-storage: fix possible memory leak and missing error message

2014-09-18 Thread Markus Armbruster
"Gonglei (Arei)" writes: >> From: Markus Armbruster [mailto:arm...@redhat.com] >> Sent: Thursday, September 18, 2014 3:38 PM >> Subject: Re: [Qemu-devel] [PATCH] usb-storage: fix possible memory leak and >> missing error message >> >>

Re: [Qemu-devel] [PATCH 1/6] block/qapi: Add cache information to query-block

2014-09-18 Thread Markus Armbruster
Kevin Wolf writes: > Signed-off-by: Kevin Wolf > --- > block/qapi.c | 10 ++ > hmp.c | 8 > qapi/block-core.json | 4 +++- > tests/qemu-iotests/051.out | 1 + > tests/qemu-iotests/067.out | 10 +- > 5 files changed, 27 inserti

Re: [Qemu-devel] [PATCH v2] pci-hotplug-old: avoid lossing error message

2014-09-18 Thread Markus Armbruster
writes: > From: Gonglei > > When scsi_bus_legacy_add_drive() produce error, > we will loss error message. Using error_report > report it. > > Cc: Markus Armbruster > Signed-off-by: Gonglei Reviewed-by: Markus Armbruster

Re: [Qemu-devel] [PATCH 1/6] block/qapi: Add cache information to query-block

2014-09-18 Thread Markus Armbruster
Markus Armbruster writes: > Kevin Wolf writes: [...] >> @@ -335,6 +336,13 @@ void hmp_info_block(Monitor *mon, const QDict *qdict) >> continue; >> } >> >> +inserted = info->value->inserted; >> + >> +

Re: [Qemu-devel] [PATCH 2/6] block: Add optional device argument to query-block

2014-09-18 Thread Markus Armbruster
Kevin Wolf writes: > This allows querying one specific BlockDriverState instead of a list of > all drives. I've long resisted optional arguments to limit list-valued queries, because I believe the additional interface complexity isn't worth the additional utility. But resistance might be futile

Re: [Qemu-devel] [PATCH 3/6] block: Introduce query-block-node

2014-09-18 Thread Markus Armbruster
Kevin Wolf writes: > This new command is a renamed version of query-named-block-nodes > with an additional argument that allows querying only one specific > BlockDriverState instead of getting a list for all of them. > > Signed-off-by: Kevin Wolf > --- > block.c | 15 +

Re: [Qemu-devel] [PATCH v2] qemu-char: Do not disconnect when there's data for reading

2014-09-18 Thread Markus Armbruster
this patch uses the return value of tcp_chr_recv() > to check the state of connection as suggested by Kirill. > > Cc: Kirill Batuzov > Cc: Nikolay Nikolaev > Cc: Markus Armbruster > Cc: Anthony Liguori > Signed-off-by: Zifei Tong > --- > qemu-char.c | 8 +--- &

Re: [Qemu-devel] [PATCH 1/6] block/qapi: Add cache information to query-block

2014-09-18 Thread Markus Armbruster
Kevin Wolf writes: > Am 18.09.2014 um 13:04 hat Markus Armbruster geschrieben: >> Before this patch, QAPI type BlockdevCacheOptions is used only as a >> member of BlockdevOptionsBase. >> >> BlockdevOptionsBase is a collection configuration settings. >> Conseq

Re: [Qemu-devel] [PATCH] block: Catch simultaneous usage of options and their aliases

2014-09-18 Thread Markus Armbruster
t; > Not the most typical usage, so it might be worth a comment that this > function can be called with errp already set. But since it's static, > it's not too hard to figure out as-is. The problem with this usage is it doesn't combine well with the common usage. That'

Re: [Qemu-devel] [PATCH] Prevent segmentation fault in case of relative resolve of uri

2014-09-18 Thread Markus Armbruster
Stefan Hajnoczi writes: > On Tue, Sep 09, 2014 at 09:45:06AM +0200, mreza...@redhat.com wrote: >> From: Miroslav Rezanina >> >> It was possible to call strcmp with NULL argument, that can cause >> segmentation fault. Properly checking parameters to prevent this >> situation. >> >> Signed-off-b

Re: [Qemu-devel] [PATCH] Prevent segmentation fault in case of relative resolve of uri

2014-09-18 Thread Markus Armbruster
Markus Armbruster writes: > Stefan Hajnoczi writes: > >> On Tue, Sep 09, 2014 at 09:45:06AM +0200, mreza...@redhat.com wrote: >>> From: Miroslav Rezanina >>> >>> It was possible to call strcmp with NULL argument, that can cause >>> segmentatio

Re: [Qemu-devel] [PATCH v2 00/19] usb: convert device init to realize

2014-09-18 Thread Markus Armbruster
writes: > From: Gonglei > > DeviceClass->init is the old interface, let's convert usb > devices to the new realize API. In this way, all the > implementations now use error_setg instead of > qerror_report/error_report for reporting error. [...] Thanks for doing this work. If you can do a bit

Re: [Qemu-devel] [PATCH v2] qemu-char: Do not disconnect when there's data for reading

2014-09-18 Thread Markus Armbruster
Zifei Tong writes: > Hi Markus, > > On Thu, Sep 18, 2014 at 8:11 PM, Markus Armbruster wrote: >> Zifei Tong writes: >> >>> After commit 812c1057f6175ac9a9829fa2920a2b5783814193 (Handle G_IO_HUP >>> in tcp_chr_read for tcp chardev), connections are disc

Re: [Qemu-devel] [PATCH v2 00/19] usb: convert device init to realize

2014-09-19 Thread Markus Armbruster
Paolo Bonzini writes: > Il 18/09/2014 19:15, Markus Armbruster ha scritto: >> >> Thanks for doing this work. If you can do a bit more of the same, here >> are a few more device model init() methods I'd love to have converted, >> because they use qerror_report_er

[Qemu-devel] [PATCH] qemu-socket: Polish errors for connect() and listen() failure

2014-09-19 Thread Markus Armbruster
connect() doesn't "connect to socket", it connects a socket to an address and, if it's of type SOCK_STREAM, initiates a connection. Scratch "to". listen() does "set socket to listening mode", but it sounds awkward. Change to "listen on socket". S

Re: [Qemu-devel] [PATCH v1] vl: Fix possible freed memory accessing

2014-09-19 Thread Markus Armbruster
zhanghailiang writes: > The logic of pcmcia_socket_unregister is wrong, > which will cause a freed memory accessing > > Signed-off-by: zhanghailiang > --- > Hi, > > The function pcmcia_socket_unregister seemes to be unused, > Should it be removed? Thanks. I think we should remove the whole thin

Re: [Qemu-devel] [RFC v2 1/3] blockdev: Add function to search for orphaned drives

2014-09-19 Thread Markus Armbruster
John Snow writes: > Signed-off-by: John Snow > --- > blockdev.c| 19 +++ > include/sysemu/blockdev.h | 1 + > vl.c | 5 + > 3 files changed, 25 insertions(+) > > diff --git a/blockdev.c b/blockdev.c > index b361fbb..5e7c93a 100644 > ---

Re: [Qemu-devel] [RFC v2 2/3] Add units-per-idebus property

2014-09-19 Thread Markus Armbruster
John Snow writes: > Signed-off-by: John Snow > --- > blockdev.c| 10 -- > device-hotplug.c | 2 +- > hw/i386/pc_q35.c | 3 ++- > include/hw/boards.h | 3 ++- > include/sysemu/blockdev.h | 2 +- > vl.c | 19 +++-

Re: [Qemu-devel] [RFC v2 3/3] ahci: implement -cdrom and -hd[a-d]

2014-09-19 Thread Markus Armbruster
John Snow writes: > Signed-off-by: John Snow > --- > hw/i386/pc_q35.c | 3 +++ > hw/ide/ahci.c| 31 +++ > hw/ide/ahci.h| 3 +++ > 3 files changed, 37 insertions(+) > > diff --git a/hw/i386/pc_q35.c b/hw/i386/pc_q35.c > index fd26fe1..0f33696 100644 > --- a/

Re: [Qemu-devel] [RFC v2 0/3] Q35/AHCI -cdrom/-hda desugaring

2014-09-19 Thread Markus Armbruster
John Snow writes: > This is an extremely rough/quick sketch of > a -cdrom/-hda desugaring fix for Q35/AHCI. > > Before I spent any time on it, I wanted feedback > from Markus or anyone else who had concerns about > how this problem would get fixed. > > This is, then, rough approach #2. > > Highli

Re: [Qemu-devel] [PATCH 00/15] AHCI test helper refactors

2014-09-19 Thread Markus Armbruster
John Snow writes: > The original version of the AHCI test base > which is now staged for being merged, processes > the ahci_identify test in a monolithic fashion. > > In authoring new tests, it became necessary and > obvious as to how the operation of this device > should be factored out to ease

[Qemu-devel] [PATCH 1/1] hmp: Remove "info pcmcia"

2014-09-19 Thread Markus Armbruster
is command doesn't really tell anybody anything new so far. Moreover, pcmcia_socket_unregister() has a use-after-free bug, flagged by Coverity. Has never been used, because there has never been code to eject a PCMCIA card. Not worth fixing & converting to QMP. Remove it. Signed-off-by

Re: [Qemu-devel] [PATCH] qemu-socket: Polish errors for connect() and listen() failure

2014-09-19 Thread Markus Armbruster
Luiz Capitulino writes: > On Fri, 19 Sep 2014 09:27:04 +0200 > Markus Armbruster wrote: > >> connect() doesn't "connect to socket", it connects a socket to an >> address and, if it's of type SOCK_STREAM, initiates a connection. >> Scratch "to&

Re: [Qemu-devel] [PATCH v3 02/23] block: New BlockBackend

2014-09-19 Thread Markus Armbruster
Kevin Wolf writes: > Am 16.09.2014 um 20:12 hat Markus Armbruster geschrieben: >> A block device consists of a frontend device model and a backend. >> >> A block backend has a tree of block drivers doing the actual work. >> The tree is managed by the block layer

Re: [Qemu-devel] [Qemu-trivial] [PATCH v1] vl: Fix possible freed memory accessing

2014-09-21 Thread Markus Armbruster
Michael Tokarev writes: > Applied to -trivial, thank you! Makes my 'hmp: Remove "info pcmcia"' conflict. Either revert this one before applying mine, or resolve the conflict and drop the paragraph about the bug from my commit message.

Re: [Qemu-devel] [PATCH] qom: suppress conscan warning of returning null point

2014-09-21 Thread Markus Armbruster
Paolo Bonzini writes: > Il 20/09/2014 02:11, Amos Kong ha scritto: >> Conscan complains about g_malloc0() and malloc() return null. s/Conscan/Coverity/, both here and in subject. >> >> Error: NULL_RETURNS (CWE-476): >> qemu-kvm/qom/object.c:239: returned_null: Function >> "g_malloc0(gsize)

Re: [Qemu-devel] [PATCH v3 02/23] block: New BlockBackend

2014-09-21 Thread Markus Armbruster
Max Reitz writes: > On 16.09.2014 20:12, Markus Armbruster wrote: >> A block device consists of a frontend device model and a backend. >> >> A block backend has a tree of block drivers doing the actual work. >> The tree is managed by the block layer. >> >>

Re: [Qemu-devel] [PATCH v3 04/23] block: Connect BlockBackend and DriveInfo

2014-09-22 Thread Markus Armbruster
Max Reitz writes: > On 16.09.2014 20:12, Markus Armbruster wrote: >> Make the BlockBackend own the DriveInfo. Change blockdev_init() to >> return the BlockBackend instead of the DriveInfo. >> >> Signed-off-by: Markus Armbruster >> --- >> block.c

Re: [Qemu-devel] [PATCH v3 12/23] virtio-blk: Drop redundant VirtIOBlock member conf

2014-09-22 Thread Markus Armbruster
Max Reitz writes: > On 16.09.2014 20:12, Markus Armbruster wrote: >> Commit 12c5674 turned it into a pointer to member blk.conf. >> >> Signed-off-by: Markus Armbruster >> --- >> hw/block/virtio-blk.c | 28 ++-- >> inclu

Re: [Qemu-devel] [PATCH v3 14/23] hw: Convert from BlockDriverState to BlockBackend, mostly

2014-09-22 Thread Markus Armbruster
Max Reitz writes: > On 16.09.2014 20:12, Markus Armbruster wrote: >> Just four uses of BlockDriverState are left: >> >> * The Xen paravirtual block device backend (xen_disk.c) opens images >>itself when set up via xenbus, bypassing blockdev.c. I figure

Re: [Qemu-devel] [RFC v2 2/3] Add units-per-idebus property

2014-09-22 Thread Markus Armbruster
Marcel Apfelbaum writes: > On Fri, 2014-09-19 at 11:39 +0200, Markus Armbruster wrote: >> John Snow writes: >> >> > Signed-off-by: John Snow [...] >> > @@ -1583,6 +1584,7 @@ static void machine_class_init(ObjectClass *oc, void >> > *data) &

Re: [Qemu-devel] [PATCH v4] Add HMP command "info memory-devices"

2014-09-22 Thread Markus Armbruster
zhugh writes: > On Fri, 2014-09-19 at 11:34 -0400, Luiz Capitulino wrote: >> On Fri, 19 Sep 2014 15:30:19 +0200 >> Igor Mammedov wrote: >> >> > On Thu, 18 Sep 2014 16:09:32 +0800 >> > zhugh wrote: >> > >> > > Hi, >> > > >> > > Could anyone help to review this patch? >> > > If there was no pr

Re: [Qemu-devel] [PATCH v4] Add HMP command "info memory-devices"

2014-09-22 Thread Markus Armbruster
Igor Mammedov writes: > On Mon, 22 Sep 2014 09:59:06 +0200 > Markus Armbruster wrote: > >> zhugh writes: >> >> > On Fri, 2014-09-19 at 11:34 -0400, Luiz Capitulino wrote: >> >> On Fri, 19 Sep 2014 15:30:19 +0200 >> >> Igor Mammedov wr

Re: [Qemu-devel] [PATCH 0/3] Fix confused output for alias properties

2014-09-22 Thread Markus Armbruster
"Michael S. Tsirkin" writes: > On Mon, Sep 15, 2014 at 10:44:36PM +0800, arei.gong...@huawei.com wrote: >> From: Gonglei >> >> At present, people have no way to know they should >> have a specific format for alias properties. >> >> Example: >> >> before output: >> >> virtio-blk-pci.physical

Re: [Qemu-devel] [PATCH 0/3] Fix confused output for alias properties

2014-09-22 Thread Markus Armbruster
Paolo Bonzini writes: > Il 22/09/2014 10:34, Michael S. Tsirkin ha scritto: >> Basically this patch brings back historical HMP behaviour. >> As far as I could tell, it wasn't changed intentionally. > > It was changed intentionally. Or rather, the change was known at the > time Stefan made it. C

Re: [Qemu-devel] [PATCH v4 04/19] qapi: Document type-safety considerations

2014-09-22 Thread Markus Armbruster
Eric Blake writes: > Go into more details about the various types of valid expressions > in a qapi schema, including tweaks to document fixes being done > later in the current patch series. > > Signed-off-by: Eric Blake > --- > docs/qapi-code-gen.txt | 249 > +++

Re: [Qemu-devel] [PATCH v4 01/19] qapi: Consistent whitespace in tests/Makefile

2014-09-22 Thread Markus Armbruster
Eric Blake writes: > tests/Makefile had a mix of TAB vs. 8-space indentation; given > that it is a Makefile, TAB is more idiomatic even though in these > particular cases the choice of whitespace didn't matter. > > Signed-off-by: Eric Blake Reviewed-by: Markus Armbruster

Re: [Qemu-devel] [PATCH v4 03/19] qapi: Update docs given recent event, spacing fixes

2014-09-22 Thread Markus Armbruster
ith a big > disclaimer about QMP not using QAPI yet, which feels rather stale. > > Signed-off-by: Eric Blake Reviewed-by: Markus Armbruster

Re: [Qemu-devel] [PATCH v4 05/19] qapi: Add some enum tests

2014-09-22 Thread Markus Armbruster
Eric Blake writes: > Demonstrate that the qapi generator doesn't deal well with enums > that aren't up to par. Later patches will update the expected > results as the generator is made stricter. > > Signed-off-by: Eric Blake Reviewed-by: Markus Armbruster

Re: [Qemu-devel] [PATCH 0/3] Fix confused output for alias properties

2014-09-22 Thread Markus Armbruster
Paolo Bonzini writes: > Il 22/09/2014 13:22, Gonglei (Arei) ha scritto: >> > This doesn't change the fact that ObjectProperty is a generic struct, >> > and adding alias-specific fields there is wrong. >> >> OK, Maybe I should find other ways to attach this purpose and >> avoid layering violation

Re: [Qemu-devel] [PATCH v3 22/23] block: Lift device model API into BlockBackend

2014-09-22 Thread Markus Armbruster
Benoît Canet writes: > On Tue, Sep 16, 2014 at 08:12:27PM +0200, Markus Armbruster wrote: >> Move device model attachment / detachment and the BlockDevOps device >> model callbacks and their wrappers from BlockDriverState to >> BlockBackend. >> >>

Re: [Qemu-devel] [PATCH v3 19/23] blockdev: Drop DriveInfo member enable_auto_del

2014-09-22 Thread Markus Armbruster
Max Reitz writes: > On 16.09.2014 20:12, Markus Armbruster wrote: >> Commit 2d246f0 introduced DriveInfo member enable_auto_del to >> distinguish DriveInfo created via drive_new() from DriveInfo created >> via qmp_blockdev_add(). The latter no longer exist. Dr

Re: [Qemu-devel] [PATCH v3 21/23] blockdev: Convert qmp_eject(), qmp_change_blockdev() to BlockBackend

2014-09-22 Thread Markus Armbruster
Max Reitz writes: > On 16.09.2014 20:12, Markus Armbruster wrote: >> Much more command code needs conversion. I'm converting these now >> because they's using bdrv_dev_* functions, which I'm about to lift > > Either this is again some phrase I haven't

Re: [Qemu-devel] [PATCH v3 2/2] Add configure option --enable-pc-1-0-qemu-kvm

2014-09-22 Thread Markus Armbruster
"Michael S. Tsirkin" writes: > On Sun, Sep 21, 2014 at 03:38:59PM +0100, Alex Bligh wrote: >> Add a configure option --enable-pc-1-0-qemu-kvm and the >> corresponding --disable-pc-1-0-qemu-kvm, defaulting >> to disabled. >> >> Rename machine type pc-1.0 to pc-1.0-qemu-git. >> >> Make pc-1.0 mac

Re: [Qemu-devel] [PATCH 0/3] trace: drop orphan events from ./trace-events

2014-09-22 Thread Markus Armbruster
obes that these events are > based on do not exist. Reviewed-by: Markus Armbruster While you're at it, could you also clean up the pointers to source files that have bit-rotted? $ scripts/cleanup-trace-events.pl trace-events | diff -u trace-events - --- trace-events2014-09-22 17:40:04.2

Re: [Qemu-devel] [libvirt] [PATCH v3 2/2] Add configure option --enable-pc-1-0-qemu-kvm

2014-09-22 Thread Markus Armbruster
"Daniel P. Berrange" writes: > On Mon, Sep 22, 2014 at 02:36:55PM +0300, Michael S. Tsirkin wrote: >> On Sun, Sep 21, 2014 at 03:38:59PM +0100, Alex Bligh wrote: >> > Add a configure option --enable-pc-1-0-qemu-kvm and the >> > corresponding --disable-pc-1-0-qemu-kvm, defaulting >> > to disabled.

Re: [Qemu-devel] [PATCH v3 03/23] block: Connect BlockBackend to BlockDriverState

2014-09-22 Thread Markus Armbruster
Kevin Wolf writes: > Am 16.09.2014 um 20:12 hat Markus Armbruster geschrieben: >> The pointer from BlockBackend to BlockDriverState is a strong >> reference, managed with bdrv_ref() / bdrv_unref(), the back-pointer is >> a weak one. >> >> Convenience fun

Re: [Qemu-devel] [PATCH v3 2/2] Add configure option --enable-pc-1-0-qemu-kvm

2014-09-22 Thread Markus Armbruster
Alex Bligh writes: > On 22 Sep 2014, at 16:45, Andreas Färber wrote: > >> What about adding a bool property "qemu-kvm-compat" to the MachineClass? >> Then a qemu-kvm shell script (like SUSE uses) can pass -global >> machine.qemu-kvm-compat=on whereas qemu-system-x86_64 would run in the No need

Re: [Qemu-devel] [PATCH v3 23/23] block: Make device model's references to BlockBackend strong

2014-09-22 Thread Markus Armbruster
Max Reitz writes: > On 16.09.2014 20:12, Markus Armbruster wrote: >> Doesn't make a difference just yet, but it's the right thing to do. >> >> Signed-off-by: Markus Armbruster >> --- >> block/block-backend.c | 4 +++- >> 1 file changed, 3 inse

Re: [Qemu-devel] [RFC v2 0/3] Q35/AHCI -cdrom/-hda desugaring

2014-09-23 Thread Markus Armbruster
John Snow writes: > On 09/19/2014 05:53 AM, Markus Armbruster wrote: >> John Snow writes: >> >>> This is an extremely rough/quick sketch of >>> a -cdrom/-hda desugaring fix for Q35/AHCI. >>> >>> Before I spent any time on it, I wanted feedb

Re: [Qemu-devel] [PATCH v3 2/2] Add configure option --enable-pc-1-0-qemu-kvm

2014-09-23 Thread Markus Armbruster
"Michael S. Tsirkin" writes: > On Mon, Sep 22, 2014 at 05:32:16PM +0200, Markus Armbruster wrote: >> "Michael S. Tsirkin" writes: >> >> > On Sun, Sep 21, 2014 at 03:38:59PM +0100, Alex Bligh wrote: >> >> Add a configure option --enable-pc

Re: [Qemu-devel] [PATCH v4 02/19] qapi: Ignore files created during make check

2014-09-23 Thread Markus Armbruster
Eric Blake writes: > After an in-tree build and run of 'make check-{qapi-schema,unit}', > I noticed some leftover files. > > Signed-off-by: Eric Blake > Reviewed-by: Wenchao Xia Reviewed-by: Markus Armbruster

<    5   6   7   8   9   10   11   12   13   14   >