Re: [Qemu-devel] migration: qemu-coroutine-lock.c:141: qemu_co_mutex_unlock: Assertion `mutex->locked == 1' failed

2014-09-16 Thread Alexey Kardashevskiy
On 09/16/2014 10:34 PM, Kevin Wolf wrote: > Am 16.09.2014 um 14:10 hat Paolo Bonzini geschrieben: >> Il 16/09/2014 14:02, Alexey Kardashevskiy ha scritto: >>> I am having problems when migrate a guest via libvirt like this: >>> >>> virsh migrate --live --persistent --undefinesource --copy-storage-a

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 03/14] target-ppc: use separate indices for various translation modes

2014-09-16 Thread Paolo Bonzini
> What if instead of having a "mmu_index" for the mmu arrays, we have a pointer > to the "mmu context". This does imply an extra memory load on the fast path, > but probably not an extra instruction. > > With this, we can suddenly afford to have a relatively large number of mmu > contexts, with

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 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

[Qemu-devel] vhost-user:is miss command VHOST_NET_SET_BACKEND?

2014-09-16 Thread Linhaifeng
Hi, The VHOST_NET_SET_BACKEND could tell the user when the backend is created or destroyed.is usefull for the user but this command is lost in the protocol

[Qemu-devel] vhost-user:why region[0] always mmap failed ?

2014-09-16 Thread Linhaifeng
Hi, There is two memory regions when receive VHOST_SET_MEM_TABLE message: region[0] gpa = 0x0 size = 655360 ua = 0x2ac0 offset = 0 region[1] gpa = 0xC size = 2146697216 ua = 0x2acc offset = 786432 region[0] always

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

2014-09-16 Thread Gonglei (Arei)
> From: Paolo Bonzini [mailto:pbonz...@redhat.com] > Sent: Tuesday, September 16, 2014 10:37 PM > Subject: Re: [Qemu-devel] [PATCH 0/3] Fix confused output for alias properties > > Il 16/09/2014 16:32, Markus Armbruster ha scritto: > > Paolo Bonzini writes: > > > >> Il 16/09/2014 11:16, Markus Ar

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

2014-09-16 Thread Fam Zheng
On Tue, 09/16 15:24, Stefan Hajnoczi wrote: > diff --git a/qapi/block-core.json b/qapi/block-core.json > index a685d02..56302c7 100644 > --- a/qapi/block-core.json > +++ b/qapi/block-core.json > @@ -197,7 +197,7 @@ > # 'file', 'file', 'ftp', 'ftps', 'host_cdrom', 'host_device', > # 'h

[Qemu-devel] [PATCH V3 7/7] acpi/cpu-hotplug: introduce help function to keep bit setting in one place

2014-09-16 Thread Gu Zheng
Introduce help function acpi_set_local_sts() to simplify acpi_cpu_plug_cb and acpi_cpu_hotplug_init, so that we can keep bit setting in one place. Signed-off-by: Gu Zheng --- hw/acpi/cpu_hotplug.c | 22 +++--- 1 files changed, 15 insertions(+), 7 deletions(-) diff --git a/hw/a

[Qemu-devel] [PATCH V3 5/7] pc: Update rtc_cmos in pc_cpu_plug

2014-09-16 Thread Gu Zheng
Update rtc_cmos in pc_cpu_plug directly instead of the notifier, with this change, there will no user of CPU hot-plug notifier any more, so remove it. Signed-off-by: Gu Zheng --- hw/i386/pc.c| 25 ++--- include/sysemu/sysemu.h |3 --- qom/cpu.c

[Qemu-devel] [PATCH V3 6/7] cpu-hotplug: rename function for better readability

2014-09-16 Thread Gu Zheng
Rename: AcpiCpuHotplug_init --> acpi_cpu_hotplug_init AcpiCpuHotplug_ops --> acpi_cpu_hotplug_ops for better readability, just cleanup. Signed-off-by: Gu Zheng --- hw/acpi/cpu_hotplug.c |4 ++-- hw/acpi/ich9.c|4 ++-- hw/acpi/piix4.c |4 ++-- inc

Re: [Qemu-devel] [RFC PATCH 07/17] COLO buffer: implement colo buffer as well as QEMUFileOps based on it

2014-09-16 Thread Hongyang Yang
Hi 在 08/01/2014 10:52 PM, Dr. David Alan Gilbert 写道: * Yang Hongyang (yan...@cn.fujitsu.com) wrote: We need a buffer to store migration data. On save side: all saved data was write into colo buffer first, so that we can know the total size of the migration data. this can also separate the d

[Qemu-devel] [PATCH V3 4/7] pc: add cpu hotplug handler to PC_MACHINE

2014-09-16 Thread Gu Zheng
Add cpu hotplug handler to PC_MACHINE, which will perform the acpi cpu hotplug callback via hotplug_handler API. v3: -deal with start up cpus in a more neat way as Igor suggested. v2: -just rebase. Signed-off-by: Gu Zheng --- hw/i386/pc.c | 26 +- 1 files changed, 25

[Qemu-devel] [PATCH V3 3/7] acpi:piix4: convert cpu hotplug handle to hotplug_handler API

2014-09-16 Thread Gu Zheng
Convert notifier based hotplug handle to hotplug_handler API, and remove the unused AcpiCpuHotplug_add(). v2: -remove the unused AcpiCpuHotplug_add(). Signed-off-by: Gu Zheng --- hw/acpi/cpu_hotplug.c | 14 ++ hw/acpi/piix4.c | 14 ++ include/hw

[Qemu-devel] [PATCH V3 2/7] acpi:ich9: convert cpu hotplug handle to hotplug_handler API

2014-09-16 Thread Gu Zheng
Convert notifier based hotplug handle to hotplug_handler API. Signed-off-by: Gu Zheng --- hw/acpi/ich9.c | 14 +++--- include/hw/acpi/ich9.h |1 - 2 files changed, 3 insertions(+), 12 deletions(-) diff --git a/hw/acpi/ich9.c b/hw/acpi/ich9.c index 7b14bbb..c53d4ab 100644 -

[Qemu-devel] [PATCH V3 1/7] acpi/cpu: add cpu hotplug callback function to match hotplug_handler API

2014-09-16 Thread Gu Zheng
--- v2: -add errp argument to catch error. -return error instead of aborting if cpu id is invalid. -make acpi_cpu_plug_cb as a wrapper around AcpiCpuHotplug_add. --- Signed-off-by: Gu Zheng --- hw/acpi/cpu_hotplug.c | 17 + include/hw/acpi/cpu_hotplug.h |3 +++ 2

[Qemu-devel] [PATCH V3 0/7] cpu/acpi: convert cpu hot plug to hotplug_handler API

2014-09-16 Thread Gu Zheng
Previously we use cpu_added_notifiers to register cpu hotplug notifier callback which is not able to pass/handle errors, so we switch it to unified hotplug handler API which allows to pass errors and would allow to cancel device_add in case of error. Thanks very much for Igor's review and suggestio

Re: [Qemu-devel] [PATCH v15 0/5] qcow2, raw: add preallocation=full and preallocation=falloc

2014-09-16 Thread Hu Tao
On Tue, Sep 16, 2014 at 12:19:58PM +0200, Kevin Wolf wrote: > Am 16.09.2014 um 12:10 hat Hu Tao geschrieben: > > ping... > > Sorry, forgot to send the mail when I merged it. This is in master now. Thank you very much! Regards, Hu > > Kevin > > > On Fri, Sep 12, 2014 at 05:22:45PM +0800, Hu Ta

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

2014-09-16 Thread Gonglei (Arei)
> From: Markus Armbruster [mailto:arm...@redhat.com] > Sent: Tuesday, September 16, 2014 11:12 PM > To: Gonglei (Arei) > Cc: qemu-devel@nongnu.org; kw...@redhat.com; Huangweidong (C); > lcapitul...@redhat.com; stefa...@redhat.com > Subject: Re: [Qemu-devel] [PATCH] hmp: fix memory leak at > hmp_inf

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

2014-09-16 Thread Gonglei (Arei)
> From: Markus Armbruster [mailto:arm...@redhat.com] > Sent: Wednesday, September 17, 2014 12:16 AM > To: Gerd Hoffmann > Cc: Gonglei (Arei); Huangweidong (C); qemu-devel@nongnu.org > Subject: Re: [Qemu-devel] [PATCH v2 0/2] usb: Don't use qerror_report > > Gerd Hoffmann writes: > > > Hi, > >

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

2014-09-16 Thread Gonglei (Arei)
> From: Markus Armbruster [mailto:arm...@redhat.com] > Sent: Tuesday, September 16, 2014 10:26 PM > To: Paolo Bonzini > Cc: Gonglei (Arei); qemu-devel@nongnu.org; Huangweidong (C); > kra...@redhat.com > Subject: Re: [Qemu-devel] [PATCH v2 0/2] usb: Don't use qerror_report > > Paolo Bonzini writes

Re: [Qemu-devel] [PATCH] virtio-balloon: Add some trace events

2014-09-16 Thread zhanghailiang
Hi, Ping... Is this acceptable? Thanks, zhanghailiang On 2014/9/12 15:06, zhanghailiang wrote: Add some trace events for easier debugging Signed-off-by: zhanghailiang --- hw/virtio/virtio-balloon.c | 6 ++ trace-events | 4 2 files changed, 10 insertions(+) diff --

Re: [Qemu-devel] [PATCH v2 0/5] Convert remaining legacy chardevs to QAPI

2014-09-16 Thread Peter Maydell
On 9 September 2014 01:11, Peter Maydell wrote: > On 9 September 2014 07:47, Paolo Bonzini wrote: >> Il 02/09/2014 12:24, Peter Maydell ha scritto: >>> This patchset converts the two remaining legacy chardevs >>> ('socket' and 'udp') to use the new-style parse/kind >>> mechanisms, and removes all

Re: [Qemu-devel] [PATCH 03/14] target-ppc: use separate indices for various translation modes

2014-09-16 Thread Richard Henderson
On 09/16/2014 11:41 AM, Richard Henderson wrote: >> In practice, only 3 to 7 are---hence my original attempt at using some >> kind of FIFO caching: >> >>user mode, translation enabled >>kernel mode, paging disabled >>kernel mode, paging enabled >>supervisor mode, paging disabled >>

Re: [Qemu-devel] [PATCH 03/14] target-ppc: use separate indices for various translation modes

2014-09-16 Thread Richard Henderson
On 09/16/2014 11:49 AM, Peter Maydell wrote: > On 16 September 2014 10:20, Tom Musta wrote: >> >> 1389 /* Compensate for very large offsets. */ >> 1390 if (add_off >= 0x8000) { >> 1391 /* Most target env are smaller than 32k; none are larger >> than 64k. >> 1392

Re: [Qemu-devel] [PATCH v6 00/16] KVM platform device passthrough

2014-09-16 Thread Alex Williamson
On Tue, 2014-09-16 at 14:51 -0600, Alex Williamson wrote: > On Tue, 2014-09-16 at 00:01 +0200, Eric Auger wrote: > > On 09/12/2014 01:05 AM, Christoffer Dall wrote: > > > On Thu, Sep 11, 2014 at 04:51:14PM -0600, Alex Williamson wrote: > > >> On Thu, 2014-09-11 at 15:23 -0700, Christoffer Dall wrot

Re: [Qemu-devel] [PATCH v6 00/16] KVM platform device passthrough

2014-09-16 Thread Eric Auger
On 09/16/2014 10:51 PM, Alex Williamson wrote: > On Tue, 2014-09-16 at 00:01 +0200, Eric Auger wrote: >> On 09/12/2014 01:05 AM, Christoffer Dall wrote: >>> On Thu, Sep 11, 2014 at 04:51:14PM -0600, Alex Williamson wrote: On Thu, 2014-09-11 at 15:23 -0700, Christoffer Dall wrote: > On Thu,

Re: [Qemu-devel] [PATCH v6 00/16] KVM platform device passthrough

2014-09-16 Thread Alex Williamson
On Tue, 2014-09-16 at 00:01 +0200, Eric Auger wrote: > On 09/12/2014 01:05 AM, Christoffer Dall wrote: > > On Thu, Sep 11, 2014 at 04:51:14PM -0600, Alex Williamson wrote: > >> On Thu, 2014-09-11 at 15:23 -0700, Christoffer Dall wrote: > >>> On Thu, Sep 11, 2014 at 04:14:09PM -0600, Alex Williamson

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

2014-09-16 Thread Eric Blake
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 MAC Address, format: AA:BB:CC:DD:

Re: [Qemu-devel] [PATCH v3] async: aio_context_new(): Handle event_notifier_init failure

2014-09-16 Thread Benoît Canet
The Tuesday 16 Sep 2014 à 13:40:24 (-0600), Eric Blake wrote : > On 09/16/2014 12:04 PM, Chrysostomos Nanakos wrote: > > If event_notifier_init fails QEMU exits without printing > > any error information to the user. This commit adds an error > > message on failure: > > > > # qemu [...] > > Show

Re: [Qemu-devel] [PATCH v3] async: aio_context_new(): Handle event_notifier_init failure

2014-09-16 Thread Eric Blake
On 09/16/2014 12:04 PM, Chrysostomos Nanakos wrote: > If event_notifier_init fails QEMU exits without printing > any error information to the user. This commit adds an error > message on failure: > > # qemu [...] Showing the actual command line you used would be helpful. > qemu: Failed to init

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

2014-09-16 Thread Jeff Cody
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 1 file changed, 8 inserti

Re: [Qemu-devel] [PATCH 07/23] target-xtensa: Use cpu_exec_interrupt qom hook

2014-09-16 Thread Richard Henderson
On 09/16/2014 11:18 AM, Alex Bennée wrote: > Do this mean when all this unwinding has occured cc->do_interrupt will > no longer be needed at all entries will go in via > $ARCH_cpu_exec_interrupt? No. Don't forget the call to do_interrupt in the block immediately following the sigsetjmp. And even

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

2014-09-16 Thread Michael S. Tsirkin
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: > > >> Il 16/09/2014 18:26, Michael S. Ts

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

2014-09-16 Thread Michael S. Tsirkin
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: > >> Il 16/09/2014 18:26, Michael S. Tsirkin ha scritto: > >>> Right so types should be explicit. > >>> If an arbit

Re: [Qemu-devel] [PATCH 03/14] target-ppc: use separate indices for various translation modes

2014-09-16 Thread Peter Maydell
On 16 September 2014 10:20, Tom Musta wrote: > > 1389 /* Compensate for very large offsets. */ > 1390 if (add_off >= 0x8000) { > 1391 /* Most target env are smaller than 32k; none are larger than > 64k. > 1392 Simplify the logic here merely to offset by 0x7

Re: [Qemu-devel] [PATCH 03/14] target-ppc: use separate indices for various translation modes

2014-09-16 Thread Richard Henderson
On 09/16/2014 11:27 AM, Paolo Bonzini wrote: > Il 16/09/2014 20:02, Richard Henderson ha scritto: >> While we could probably fix this for ppc (using addis), it's not nearly so >> easily fixable for arm -- without impacting performance anyway. >> >> Does 96k worth of TLBs really help that much? Are

Re: [Qemu-devel] [PATCH 09/23] target-m68k: Use cpu_exec_interrupt qom hook

2014-09-16 Thread Alex Bennée
Richard Henderson writes: > Since do_interrupt_m68k_hardirq is no longer used outside > op_helper.c, make it static. > > Signed-off-by: Richard Henderson Reviewed-by: Alex Bennée > --- > cpu-exec.c | 13 - > target-m68k/cpu-qom.h | 1 + > target-m68k/cpu.c |

Re: [Qemu-devel] [PATCH 08/23] target-s390x: Use cpu_exec_interrupt qom hook

2014-09-16 Thread Alex Bennée
Richard Henderson writes: > Cc: Alexander Graf > Signed-off-by: Richard Henderson Reviewed-by: Alex Bennée > --- > cpu-exec.c | 6 -- > target-s390x/cpu-qom.h | 1 + > target-s390x/cpu.c | 1 + > target-s390x/helper.c | 13 + > 4 files changed, 15 inserti

Re: [Qemu-devel] [PULL 0/2] sdl patch queue

2014-09-16 Thread Peter Maydell
27; into staging > (2014-09-15 19:44:34 +0100) > > are available in the git repository at: > > > git://git.kraxel.org/qemu tags/pull-sdl-20140916-1 > > for you to fetch changes up to 0d61f7dcc6c04e7e825417c74e5036

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

2014-09-16 Thread Paolo Bonzini
Il 16/09/2014 18:56, Michael S. Tsirkin ha scritto: > On Tue, Sep 16, 2014 at 06:27:51PM +0200, Paolo Bonzini wrote: >> Il 16/09/2014 18:26, Michael S. Tsirkin ha scritto: >>> Right so types should be explicit. >>> If an arbitrary string isn't allowed, this should be documented. >>> It's not great

Re: [Qemu-devel] [PATCH 07/23] target-xtensa: Use cpu_exec_interrupt qom hook

2014-09-16 Thread Alex Bennée
Richard Henderson writes: > Cc: Max Filippov > Signed-off-by: Richard Henderson > @@ -669,12 +669,6 @@ int cpu_exec(CPUArchState *env) > cc->do_interrupt(cpu); > next_tb = 0; > } > -#elif defined(TARGET_XTENSA) > -

Re: [Qemu-devel] [PATCH 03/14] target-ppc: use separate indices for various translation modes

2014-09-16 Thread Paolo Bonzini
Il 16/09/2014 20:02, Richard Henderson ha scritto: > While we could probably fix this for ppc (using addis), it's not nearly so > easily fixable for arm -- without impacting performance anyway. > > Does 96k worth of TLBs really help that much? Are all 12 of them actually > used? Can we use a mor

[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 PC

[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 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 | 151 ++---

[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(-) diff --git a/block

[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 --- include/block

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

2014-09-16 Thread Markus Armbruster
blockdev_init() always creates a DriveInfo, but only drive_new() fills it in. qmp_blockdev_add() leaves it blank. This results in a drive with type = IF_IDE, bus = 0, unit = 0. Screwed up in commit ee13ed1c. Board initialization code looking for IDE drive (0,0) can pick up one of these bogus dr

[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..23964a

[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/bl

[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/block/block-back

[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| 35 +--

[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 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-bac

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

2014-09-16 Thread Markus Armbruster
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. We currently use a single abstraction BlockDriverState both for tree nodes and the backend as a whole. Drawbacks: * Its AP

[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 08/23] block: Eliminate BlockDriverState member device_name[]

2014-09-16 Thread Markus Armbruster
device_name[] can become non-empty only in bdrv_new_root() and bdrv_move_feature_fields(). The latter is used only to undo damage done by bdrv_swap(). The former is called only by blk_new_with_bs(). Therefore, when a BlockDriverState's device_name[] is non-empty, then it's been created with a Blo

[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 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 deletions(

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

2014-09-16 Thread Markus Armbruster
My last attempt got bogged down because I tried to do a reasonably complete job, and the complexity proved more than I could handle with the limited amount of uninterrupted time available. This time, I'm cutting BlockBackend off with an axe, leaving most of the work for later. Done in this series

[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 10/23] block: Eliminate DriveInfo member bdrv, use blk_by_legacy_dinfo()

2014-09-16 Thread Markus Armbruster
The patch is big, but all it really does is replacing dinfo->bdrv by blk_bs(blk_by_legacy_dinfo(dinfo)) The replacement is repetitive, but the conversion of device models to BlockBackend is imminent, and will shorten it to just blk_legacy_dinfo(dinfo). Line wrapping muddies the waters

[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| 2 +-

[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 insert

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

2014-09-16 Thread Markus Armbruster
The pointer from BlockBackend to BlockDriverState is a strong reference, managed with bdrv_ref() / bdrv_unref(), the back-pointer is a weak one. Convenience function blk_new_with_bs() creates a BlockBackend with its BlockDriverState. Callers have to unref both. The commit after next will relieve

Re: [Qemu-devel] [PATCH] kvmclock: clarify usage of cpu_clean_all_dirty

2014-09-16 Thread Marcelo Tosatti
On Tue, Sep 16, 2014 at 06:22:15PM +0200, Paolo Bonzini wrote: > Il 16/09/2014 18:07, Marcelo Tosatti ha scritto: > >> > The cpu_synchronize_all_states() call in kvmclock_vm_state_change() is > >> > needed to make env->tsc up to date with the value on the source, right? > > Its there to make sure t

Re: [Qemu-devel] [PATCH 06/23] qom: Add cpu_exec_interrupt hook

2014-09-16 Thread Alex Bennée
Richard Henderson writes: > Continuing the removal of ifdefs from cpu_exec. > > Cc: Andreas Färber > Signed-off-by: Richard Henderson Reviewed-by: Alex Bennée > --- > cpu-exec.c| 14 +- > include/qom/cpu.h | 2 ++ > qom/cpu.c | 6 ++ > 3 files changed, 17 i

Re: [Qemu-devel] [PATCH 2/2] tcg: Always enable TCGv type checking

2014-09-16 Thread Peter Maydell
On 16 September 2014 10:46, Richard Henderson wrote: > Instead of using structures, which imply some amount of overhead > on certain ABIs, use pointer types. > > This actually reduces the size of the binaries vs a NON-debug > build on ppc64 and x86_64, due to a reduction in the number of > sign-ex

Re: [Qemu-devel] [PATCH 1/2] qemu/compiler: Define QEMU_ARTIFICIAL

2014-09-16 Thread Peter Maydell
On 16 September 2014 10:46, Richard Henderson wrote: > The combination of always_inline + artificial allows tiny inline > functions to be written that do not interfere with debugging. > In particular, gdb will not step into an artificial function. > > The always_inline attribute was introduced in

[Qemu-devel] [PATCH v3] async: aio_context_new(): Handle event_notifier_init failure

2014-09-16 Thread Chrysostomos Nanakos
If event_notifier_init fails QEMU exits without printing any error information to the user. This commit adds an error message on failure: # qemu [...] qemu: Failed to initialize event notifier: Too many open files in system Signed-off-by: Chrysostomos Nanakos --- async.c |

[Qemu-devel] [PATCH v3] async: aio_context_new(): Handle event_notifier_init failure

2014-09-16 Thread Chrysostomos Nanakos
v2->v3 -- * Remove errno usage and print the detailed message based on errno when event_notifier_init() fails. * Propagate error and return from iothread_complete() if aio_context_new() fails. * Return if !iothread->ctx from iothread_instance_finalize(), used by QOM when object_unref(obj)

Re: [Qemu-devel] [PATCH 03/14] target-ppc: use separate indices for various translation modes

2014-09-16 Thread Richard Henderson
On 09/16/2014 10:20 AM, Tom Musta wrote: > On 9/15/2014 10:03 AM, Paolo Bonzini wrote: >> PowerPC TCG flushes the TLB on every IR/DR change, which basically >> means on every user<->kernel context switch. Encode IR/DR in the >> MMU index. >> >> This brings the number of TLB flushes down from ~9000

Re: [Qemu-devel] [PATCH v2] async: aio_context_new(): Handle event_notifier_init failure

2014-09-16 Thread Chrysostomos Nanakos
On Tue, Sep 16, 2014 at 06:50:38PM +0300, Chrysostomos Nanakos wrote: > On Tue, Sep 16, 2014 at 05:45:16PM +0200, Paolo Bonzini wrote: > > Il 16/09/2014 17:43, Chrysostomos Nanakos ha scritto: > > >> > error_propagate(errp, local_error); > > >> > return; > > > Just to note that after propag

Re: [Qemu-devel] [RFC PATCH] tests: use g_test_trap_fork for glib between 2.16 and 2.38

2014-09-16 Thread Michael S. Tsirkin
On Tue, Sep 16, 2014 at 10:23:03AM -0700, Peter Maydell wrote: > On 16 September 2014 09:57, Michael S. Tsirkin wrote: > > Could you pls tell me whether my patch works, in your testing? > > My box which had such an old glib seems to be dead. > > Can you give me a Subject: line or a URL in patchwo

[Qemu-devel] [PATCH 0/2] Always enable TCGv type checking

2014-09-16 Thread Richard Henderson
We've had a number of bugs slip through recently that would have been caught by --enable-tcg-debug. r~ Richard Henderson (2): qemu/compiler: Define QEMU_ARTIFICIAL tcg: Always enable TCGv type checking include/qemu/compiler.h | 6 tcg/tcg.h | 89 +++

[Qemu-devel] [PATCH 2/2] tcg: Always enable TCGv type checking

2014-09-16 Thread Richard Henderson
Instead of using structures, which imply some amount of overhead on certain ABIs, use pointer types. This actually reduces the size of the binaries vs a NON-debug build on ppc64 and x86_64, due to a reduction in the number of sign-extension insns. Signed-off-by: Richard Henderson --- tcg/tcg.h

[Qemu-devel] [PATCH 1/2] qemu/compiler: Define QEMU_ARTIFICIAL

2014-09-16 Thread Richard Henderson
The combination of always_inline + artificial allows tiny inline functions to be written that do not interfere with debugging. In particular, gdb will not step into an artificial function. The always_inline attribute was introduced in gcc 4.2, and the artificial attribute was introduced in gcc 4.3

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 = NULL; >>> > >>> > I think a comments explaining the trick you are doin

Re: [Qemu-devel] [PULL 0/1] spice: call qemu_spice_set_passwd() during init

2014-09-16 Thread Peter Maydell
emotes/qmp-unstable/queue/qmp' into staging > (2014-09-15 19:44:34 +0100) > > are available in the git repository at: > > > git://anongit.freedesktop.org/spice/qemu tags/pull-spice-20140916-2 > > for you to fetch changes up to 07d49a53b6394941ed833486a3acb5c480d87db2: >

Re: [Qemu-devel] [RFC PATCH] tests: use g_test_trap_fork for glib between 2.16 and 2.38

2014-09-16 Thread Peter Maydell
On 16 September 2014 09:57, Michael S. Tsirkin wrote: > Could you pls tell me whether my patch works, in your testing? > My box which had such an old glib seems to be dead. Can you give me a Subject: line or a URL in patchwork, please? (I can't conveniently search by message-id.) thanks -- PMM

Re: [Qemu-devel] [PATCH 03/14] target-ppc: use separate indices for various translation modes

2014-09-16 Thread Tom Musta
On 9/15/2014 10:03 AM, Paolo Bonzini wrote: > PowerPC TCG flushes the TLB on every IR/DR change, which basically > means on every user<->kernel context switch. Encode IR/DR in the > MMU index. > > This brings the number of TLB flushes down from ~90 to ~5 > for starting up the Debian insta

Re: [Qemu-devel] [RFC PATCH] tests: use g_test_trap_fork for glib between 2.16 and 2.38

2014-09-16 Thread Michael S. Tsirkin
On Tue, Sep 16, 2014 at 06:23:29PM +0200, Paolo Bonzini wrote: > Il 16/09/2014 18:20, Peter Maydell ha scritto: > >> > - bumping the minimum required version from 2.12 to 2.16. I suggest > >> > bumping to the currently required version for Windows, which is 2.20 > >> > (released March 2009). > > T

Re: [Qemu-devel] [PATCH] kvmclock: clarify usage of cpu_clean_all_dirty

2014-09-16 Thread Marcelo Tosatti
On Tue, Sep 16, 2014 at 05:42:16PM +0200, Paolo Bonzini wrote: > Il 16/09/2014 17:14, Marcelo Tosatti ha scritto: > > + /* > > +* Make sure that CPU state is synchronized from KVM > > +* once every VM state change callback has finished. > > Which other callback could affect the in-kernel

Re: [Qemu-devel] [PATCH] kvmclock: clarify usage of cpu_clean_all_dirty

2014-09-16 Thread Marcelo Tosatti
On Tue, Sep 16, 2014 at 01:48:24PM -0300, Marcelo Tosatti wrote: > On Tue, Sep 16, 2014 at 06:22:15PM +0200, Paolo Bonzini wrote: > > Il 16/09/2014 18:07, Marcelo Tosatti ha scritto: > > >> > The cpu_synchronize_all_states() call in kvmclock_vm_state_change() is > > >> > needed to make env->tsc up

Re: [Qemu-devel] [RFC PATCH] tests: use g_test_trap_fork for glib between 2.16 and 2.38

2014-09-16 Thread Michael S. Tsirkin
On Tue, Sep 16, 2014 at 09:45:03AM -0700, Peter Maydell wrote: > On 16 September 2014 09:33, Paolo Bonzini wrote: > > Il 16/09/2014 18:28, Peter Maydell ha scritto: > >>> > Though you would just drop support for "make check" on RHEL5. Even > >>> > "make -k check" would roughly work. > >> Can't we

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

2014-09-16 Thread Michael S. Tsirkin
On Tue, Sep 16, 2014 at 06:27:51PM +0200, Paolo Bonzini wrote: > Il 16/09/2014 18:26, Michael S. Tsirkin ha scritto: > > Right so types should be explicit. > > If an arbitrary string isn't allowed, this should be documented. > > It's not great as is: what's the format for macaddr? AA:BB:CC:DD:EE:FF

Re: [Qemu-devel] [PATCH] kvmclock: clarify usage of cpu_clean_all_dirty

2014-09-16 Thread Marcelo Tosatti
On Tue, Sep 16, 2014 at 06:22:15PM +0200, Paolo Bonzini wrote: > Il 16/09/2014 18:07, Marcelo Tosatti ha scritto: > >> > The cpu_synchronize_all_states() call in kvmclock_vm_state_change() is > >> > needed to make env->tsc up to date with the value on the source, right? > > Its there to make sure t

Re: [Qemu-devel] [RFC PATCH] tests: use g_test_trap_fork for glib between 2.16 and 2.38

2014-09-16 Thread Peter Maydell
On 16 September 2014 09:33, Paolo Bonzini wrote: > Il 16/09/2014 18:28, Peter Maydell ha scritto: >>> > Though you would just drop support for "make check" on RHEL5. Even >>> > "make -k check" would roughly work. >> Can't we just put in the makefile and configure magic to skip >> the test if the

Re: [Qemu-devel] [RFC PATCH] tests: use g_test_trap_fork for glib between 2.16 and 2.38

2014-09-16 Thread Michael S. Tsirkin
On Tue, Sep 16, 2014 at 09:28:03AM -0700, Peter Maydell wrote: > On 16 September 2014 09:23, Paolo Bonzini wrote: > > Il 16/09/2014 18:20, Peter Maydell ha scritto: > >>> > - bumping the minimum required version from 2.12 to 2.16. I suggest > >>> > bumping to the currently required version for Wi

Re: [Qemu-devel] [RFC PATCH] tests: use g_test_trap_fork for glib between 2.16 and 2.38

2014-09-16 Thread Paolo Bonzini
Il 16/09/2014 18:28, Peter Maydell ha scritto: >> > Though you would just drop support for "make check" on RHEL5. Even >> > "make -k check" would roughly work. > Can't we just put in the makefile and configure magic to skip > the test if the glib version is too old for it? Yes, that's what Michae

Re: [Qemu-devel] [RFC PATCH] tests: use g_test_trap_fork for glib between 2.16 and 2.38

2014-09-16 Thread Peter Maydell
On 16 September 2014 09:23, Paolo Bonzini wrote: > Il 16/09/2014 18:20, Peter Maydell ha scritto: >>> > - bumping the minimum required version from 2.12 to 2.16. I suggest >>> > bumping to the currently required version for Windows, which is 2.20 >>> > (released March 2009). >> The commit message

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

2014-09-16 Thread Michael S. Tsirkin
On Tue, Sep 16, 2014 at 12:45:43PM +0200, Paolo Bonzini wrote: > Il 16/09/2014 12:37, Michael S. Tsirkin ha scritto: > > str really should be for free-form strings. > > It makes as much sense to call it as string > > Yes, that's why I said drive->str is a degradation. The question is, > how impor

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

2014-09-16 Thread Paolo Bonzini
Il 16/09/2014 18:26, Michael S. Tsirkin ha scritto: > Right so types should be explicit. > If an arbitrary string isn't allowed, this should be documented. > It's not great as is: what's the format for macaddr? AA:BB:CC:DD:EE:FF? > aa:bb:cc:dd:ee:ff? aabbccddeeff? 0xaabbccddeeff? > But just saying

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] [RFC PATCH] tests: use g_test_trap_fork for glib between 2.16 and 2.38

2014-09-16 Thread Paolo Bonzini
Il 16/09/2014 18:20, Peter Maydell ha scritto: >> > - bumping the minimum required version from 2.12 to 2.16. I suggest >> > bumping to the currently required version for Windows, which is 2.20 >> > (released March 2009). > The commit message for a52d28afb suggests that this bump would be > droppi

Re: [Qemu-devel] [PATCH] kvmclock: clarify usage of cpu_clean_all_dirty

2014-09-16 Thread Paolo Bonzini
Il 16/09/2014 18:07, Marcelo Tosatti ha scritto: >> > The cpu_synchronize_all_states() call in kvmclock_vm_state_change() is >> > needed to make env->tsc up to date with the value on the source, right? > Its there to make sure the pair > > env->tsc, s->clock = data.clock > > are relative to point

Re: [Qemu-devel] [RFC PATCH] tests: use g_test_trap_fork for glib between 2.16 and 2.38

2014-09-16 Thread Peter Maydell
On 16 September 2014 08:43, Paolo Bonzini wrote: > Glib recently introduced a robust way to run tests in a subprocess, > which is used in test-qdev-global-props. However, we would like > to have the same tests run with older versions of glib, and the > older fork-based mechanisms works well enoug

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

  1   2   3   >