Re: [Qemu-devel] [PATCH v5 0/5] bugs fix for hpet

2013-09-12 Thread Paolo Bonzini
Il 12/09/2013 05:25, Liu Ping Fan ha scritto: v5: use stand compat property to fix hpet intcap on pc-q35, while on pc-piix, hard code intcap as IRQ2 v4: use stand compat property to fix hpet intcap v3: change hpet interrupt capablity on board's demand Liu Ping Fan (5):

Re: [Qemu-devel] [PATCH v6 2/8] rule.mak: allow per object cflags and libs

2013-09-12 Thread Paolo Bonzini
Il 12/09/2013 04:52, Fam Zheng ha scritto: define unnest-dir $(foreach var,$(nested-vars),$(call push-var,$(var),$1/)) $(eval obj-parent-$1 := $(obj)) $(eval obj := $(if $(obj),$(obj)/$1,$1)) $(eval include $(SRC_PATH)/$1/Makefile.objs) +$(foreach v,$(nested-vars),$(call

[Qemu-devel] [PATCH] pc: add 1.7 machine types for piix,q35

2013-09-12 Thread Michael S. Tsirkin
piix 1.7 is the default. Signed-off-by: Michael S. Tsirkin m...@redhat.com --- hw/i386/pc_piix.c | 19 +-- hw/i386/pc_q35.c | 17 - 2 files changed, 33 insertions(+), 3 deletions(-) diff --git a/hw/i386/pc_piix.c b/hw/i386/pc_piix.c index 66551b4..0ade373 100644

[Qemu-devel] [PATCH v7 0/8] Shared Library Module Support

2013-09-12 Thread Fam Zheng
This series implements feature of shared object building as described in: http://wiki.qemu.org/Features/Modules The main idea behind modules is to isolate dependencies on third party libraries from qemu executables, such as libglusterfs or librbd, so that the end users can install core qemu

[Qemu-devel] [PATCH v7 2/8] make.rule: fix $(obj) to a real relative path

2013-09-12 Thread Fam Zheng
Makefile.target includes rule.mak and unnested common-obj-y, then prefix them with '../', this will ignore object specific QEMU_CFLAGS in subdir Makefile.objs: $(obj)/curl.o: QEMU_CFLAGS += $(CURL_CFLAGS) Because $(obj) here is './block', instead of '../block'. This doesn't hurt compiling

[Qemu-devel] [PATCH v7 3/8] rule.mak: allow per object cflags and libs

2013-09-12 Thread Fam Zheng
Adds extract-libs in LINK to expand any per object libs, the syntax to define such a libs options is like: foo.o-libs := $(CURL_LIBS) in block/Makefile.objs. Similarly, foo.o-cflags := $(FOO_CFLAGS) is also supported. foo.o must be listed a nested var (e.g. common-obj-y) to

[Qemu-devel] [PATCH v7 1/8] ui/Makefile.objs: delete unnecessary cocoa.o dependency

2013-09-12 Thread Fam Zheng
From: Peter Maydell peter.mayd...@linaro.org Delete an unnecessary dependency for cocoa.o; we already have a general rule that tells Make that we can build a .o file from a .m source using an ObjC compiler, so this specific rule is unnecessary. Further, it is using the dubious construct

[Qemu-devel] [PATCH v7 7/8] .gitignore: ignore module related files (dll, so, mo)

2013-09-12 Thread Fam Zheng
Signed-off-by: Fam Zheng f...@redhat.com --- .gitignore | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.gitignore b/.gitignore index d2c5c2f..4d0ac09 100644 --- a/.gitignore +++ b/.gitignore @@ -63,6 +63,9 @@ fsdev/virtfs-proxy-helper.pod *.cp *.dvi *.exe +*.dll +*.so +*.mo *.fn *.ky

[Qemu-devel] [PATCH v7 6/8] Makefile: install modules with make install

2013-09-12 Thread Fam Zheng
Install all the subdirs for modules under configure option moddir. Signed-off-by: Fam Zheng f...@redhat.com --- Makefile | 6 ++ 1 file changed, 6 insertions(+) diff --git a/Makefile b/Makefile index ef76967..00c2a52 100644 --- a/Makefile +++ b/Makefile @@ -360,6 +360,12 @@ install-datadir

[Qemu-devel] [PATCH v7 4/8] build-sys: introduce common-obj-m and block-obj-m for DSO

2013-09-12 Thread Fam Zheng
Add necessary rules and flags for shared object generation. $(common-obj-m) will include $(block-obj-m), like $(common-obj-y) does for $(block-obj-y). The new rules introduced here are: 0) For all %.so compiling: QEMU_CFLAGS += -fPIC 1) %.o in $(common-obj-m) is compiled to %.o, then linked

[Qemu-devel] [PATCH v7 5/8] module: implement module loading function

2013-09-12 Thread Fam Zheng
Added three types of modules: typedef enum { MODULE_LOAD_BLOCK = 0, MODULE_LOAD_UI, MODULE_LOAD_NET, MODULE_LOAD_MAX, } module_load_type; and their loading function: void module_load(module_load_type). which loads all .so files in a subdir under

[Qemu-devel] [PATCH v7 8/8] block: convert block drivers linked with libs to modules

2013-09-12 Thread Fam Zheng
The converted block drivers are: curl iscsi rbd ssh glusterfs no longer adds flags and libs for them to global variables, instead create config-host.mak variables like FOO_CFLAGS and FOO_LIBS, which is used as per object cflags and libs. Signed-off-by: Fam Zheng

Re: [Qemu-devel] [PATCH 3/3 resend v2] arch_init: right return for ram_save_iterate

2013-09-12 Thread Lei Li
On 09/11/2013 07:27 PM, Paolo Bonzini wrote: Il 11/09/2013 13:06, Juan Quintela ha scritto: And I think that the right solution is make qemu_get_rate_limit() to return -1 in case of error (or the error, I don't care). You might do both things, it would avoid the useless g_usleep you pointed

Re: [Qemu-devel] [PATCH v6 2/8] rule.mak: allow per object cflags and libs

2013-09-12 Thread Fam Zheng
On Thu, 09/12 08:34, Paolo Bonzini wrote: Il 12/09/2013 04:52, Fam Zheng ha scritto: define unnest-dir $(foreach var,$(nested-vars),$(call push-var,$(var),$1/)) $(eval obj-parent-$1 := $(obj)) $(eval obj := $(if $(obj),$(obj)/$1,$1)) $(eval include

Re: [Qemu-devel] [PATCH RFC 0/4] Curling: KVM Fault Tolerance

2013-09-12 Thread Orit Wasserman
On 09/11/2013 04:54 AM, junqing.w...@cs2c.com.cn wrote: Hi, The first is that if the VM failure happen in the middle on the live migration the backup VM state will be inconsistent which means you can't failover to it. Yes, I have concerned about this problem. That is why we need a

Re: [Qemu-devel] [PATCH 3/3 resend v2] arch_init: right return for ram_save_iterate

2013-09-12 Thread Orit Wasserman
On 09/11/2013 02:27 PM, Paolo Bonzini wrote: Il 11/09/2013 13:06, Juan Quintela ha scritto: And I think that the right solution is make qemu_get_rate_limit() to return -1 in case of error (or the error, I don't care). You might do both things, it would avoid the useless g_usleep you pointed

Re: [Qemu-devel] [PATCH v5 0/5] bugs fix for hpet

2013-09-12 Thread liu ping fan
On Thu, Sep 12, 2013 at 2:29 PM, Paolo Bonzini pbonz...@redhat.com wrote: Il 12/09/2013 05:25, Liu Ping Fan ha scritto: v5: use stand compat property to fix hpet intcap on pc-q35, while on pc-piix, hard code intcap as IRQ2 v4: use stand compat property to fix hpet intcap v3:

Re: [Qemu-devel] [PATCH] qdev-monitor: Avoid exiting when hot-plugging two devices with the same bootindex value

2013-09-12 Thread Paolo Bonzini
Il 11/09/2013 20:26, Marcel Apfelbaum ha scritto: Qemu is expected to quit if the same boot index value is used by two devices. However, hot-plugging a device with a bootindex value already used should fail with a friendly message rather than quitting a running VM. I think the problem is right

Re: [Qemu-devel] Disabling IRQ error

2013-09-12 Thread Xie Xianshan
Hi Max, Thanks for your patience and help. I`ve tried to do what you said, but the problem doesn`t go away. And actually i cannot add a new register to the fpga device, because the fpga device i`m emulating already exists in the real world. So i cannot change anything about hardware

Re: [Qemu-devel] Disabling IRQ error

2013-09-12 Thread Max Filippov
On Thu, Sep 12, 2013 at 11:49 AM, Xie Xianshan xi...@cn.fujitsu.com wrote: Hi Max, Thanks for your patience and help. I`ve tried to do what you said, but the problem doesn`t go away. And actually i cannot add a new register to the fpga device, because the fpga device i`m emulating

Re: [Qemu-devel] [PATCH v3 00/29] tcg-aarch64 improvements

2013-09-12 Thread Claudio Fontana
On 10.09.2013 10:45, Peter Maydell wrote: On 10 September 2013 09:27, Claudio Fontana claudio.font...@huawei.com wrote: On another side, I end up having to manually revert some parts of these which you put as prerequisites, during bisection when landing after them, which is a huge time drain

Re: [Qemu-devel] [RFC] aio: add aio_context_acquire() and aio_context_release()

2013-09-12 Thread Stefan Hajnoczi
On Tue, Sep 10, 2013 at 02:42:10PM -0500, Michael Roth wrote: Quoting Stefan Hajnoczi (2013-08-29 02:43:02) On Thu, Aug 29, 2013 at 09:09:45AM +0800, Wenchao Xia wrote: 于 2013-8-28 16:49, Stefan Hajnoczi 写道: On Wed, Aug 28, 2013 at 11:25:33AM +0800, Wenchao Xia wrote: +void

Re: [Qemu-devel] [PATCH v3 00/29] tcg-aarch64 improvements

2013-09-12 Thread Claudio Fontana
On 10.09.2013 15:16, Richard Henderson wrote: On 09/10/2013 01:27 AM, Claudio Fontana wrote: There are two aspects. On one side, although some changes do not break anything, I see some problems in them. Then let us discuss them, sooner rather than later. Putting them as a prerequisite

Re: [Qemu-devel] [PATCH v3 0/3] qemu-timer: make qemu_timer_mod_ns() and qemu_timer_del() thread-safe

2013-09-12 Thread Stefan Hajnoczi
On Thu, Sep 12, 2013 at 11:10:01AM +0800, liu ping fan wrote: Do you think this series is ready to be merged? I have some code to run hpet on a dedicated thread, and in theory it will rely on this. Yes, it is ready. To ease the merge I have rebased it and sent a new revision. Stefan

Re: [Qemu-devel] [PATCH v3 0/3] qemu-timer: make qemu_timer_mod_ns() and qemu_timer_del() thread-safe

2013-09-12 Thread liu ping fan
On Thu, Sep 12, 2013 at 4:17 PM, Stefan Hajnoczi stefa...@gmail.com wrote: On Thu, Sep 12, 2013 at 11:10:01AM +0800, liu ping fan wrote: Do you think this series is ready to be merged? I have some code to run hpet on a dedicated thread, and in theory it will rely on this. Yes, it is ready.

[Qemu-devel] MSI-X doesn't work when running Windows as guest

2013-09-12 Thread Gal Hammer
Hi, I've notice that the virtio-serial Windows' driver doesn't use MSI-X vectors when running using upstream qemu or qemu-kvm-1.2.2-13.fc18.x86_64. The same VM works with MSI-X when using qemu-kvm-0.12.1.2-2.355.el6.x86_64. From what I saw, Windows is trying to enable MSI-X by writing a 2

Re: [Qemu-devel] [PATCH v2] e1000: NetClientInfo.receive_iov implemented

2013-09-12 Thread Stefan Hajnoczi
On Wed, Sep 11, 2013 at 12:57:58PM +0200, Vincenzo Maffione wrote: Thanks for the help! Actually I've found out that the variable copied I use in this patch can be removed, we can simply increment the variable ba instead (ba += iov_copy). I have the patch v3 to do that ready. Do you think

Re: [Qemu-devel] [PATCH v3 01/29] tcg-aarch64: Set ext based on TCG_OPF_64BIT

2013-09-12 Thread Claudio Fontana
On 02.09.2013 19:54, Richard Henderson wrote: Signed-off-by: Richard Henderson r...@twiddle.net --- tcg/aarch64/tcg-target.c | 28 +++- 1 file changed, 7 insertions(+), 21 deletions(-) diff --git a/tcg/aarch64/tcg-target.c b/tcg/aarch64/tcg-target.c index

Re: [Qemu-devel] [PATCH v3 02/29] tcg-aarch64: Change all ext variables to bool

2013-09-12 Thread Claudio Fontana
On 02.09.2013 19:54, Richard Henderson wrote: Signed-off-by: Richard Henderson r...@twiddle.net --- tcg/aarch64/tcg-target.c | 44 ++-- 1 file changed, 22 insertions(+), 22 deletions(-) diff --git a/tcg/aarch64/tcg-target.c b/tcg/aarch64/tcg-target.c

Re: [Qemu-devel] [PATCH v3 03/29] tcg-aarch64: Don't handle mov/movi in tcg_out_op

2013-09-12 Thread Claudio Fontana
On 02.09.2013 19:54, Richard Henderson wrote: Signed-off-by: Richard Henderson r...@twiddle.net --- tcg/aarch64/tcg-target.c | 20 +++- 1 file changed, 7 insertions(+), 13 deletions(-) diff --git a/tcg/aarch64/tcg-target.c b/tcg/aarch64/tcg-target.c index bde4c72..79a447d

Re: [Qemu-devel] [PATCH RFC 0/4] Curling: KVM Fault Tolerance

2013-09-12 Thread junqing . wang
hi, At the moment in your implementation the prefetch buffer can be very large (several copies of guest memory size) are you planning to address this issue? I agree but we need some way to notify the user of such problem. This issue has been handled (maybe not in the best way). The prefetch

[Qemu-devel] [PATCH] qemu-iotests: Cleanup test image in test number 007

2013-09-12 Thread Bharata B Rao
qemu-iotests number 007 doesn't do test image cleanup. This will affect those protocols that expect a clean state before every test. Hence ensure that test image is cleaned up in this test. Signed-off-by: Bharata B Rao bhar...@linux.vnet.ibm.com --- tests/qemu-iotests/007 | 2 +- 1 file changed,

[Qemu-devel] [PATCH 1/1] chardev: fix pty_chr_timer

2013-09-12 Thread Gerd Hoffmann
pty_chr_timer first calls pty_chr_update_read_handler(), then clears timer_tag (because it is a one-shot timer). This is the wrong order though. pty_chr_update_read_handler might re-arm time timer, and the new timer_tag gets overwitten in that case. This leads to crashes when unplugging a pty

Re: [Qemu-devel] [PATCH] scsi: prefer UUID to VM name for the initiator name

2013-09-12 Thread Stefan Hajnoczi
On Tue, Sep 10, 2013 at 06:40:04PM +0200, Paolo Bonzini wrote: The UUID is unique even across multiple hosts, thus it is better than a VM name even if it is less user-friendly. Signed-off-by: Paolo Bonzini pbonz...@redhat.com --- block/iscsi.c | 23 ---

[Qemu-devel] [PULL 0/1] chardev: fix pty_chr_timer

2013-09-12 Thread Gerd Hoffmann
Hi, Bugfix for the pty chardev which might segfault on unplug. Has been on the list for quite a while, wasn't picked up so far, so I'll try a single-patch-pull-request now ... please pull, Gerd The following changes since commit 2d1fe1873a984d1c2c89ffa3d12949cafc718551: Merge

Re: [Qemu-devel] [PATCH] qdev-monitor: Avoid exiting when hot-plugging two devices with the same bootindex value

2013-09-12 Thread Marcel Apfelbaum
On Thu, 2013-09-12 at 09:49 +0200, Paolo Bonzini wrote: Il 11/09/2013 20:26, Marcel Apfelbaum ha scritto: Qemu is expected to quit if the same boot index value is used by two devices. However, hot-plugging a device with a bootindex value already used should fail with a friendly message

Re: [Qemu-devel] MSI-X doesn't work when running Windows as guest

2013-09-12 Thread Michael S. Tsirkin
On Thu, Sep 12, 2013 at 11:23:46AM +0300, Gal Hammer wrote: Hi, I've notice that the virtio-serial Windows' driver doesn't use MSI-X vectors when running using upstream qemu or qemu-kvm-1.2.2-13.fc18.x86_64. The same VM works with MSI-X when using qemu-kvm-0.12.1.2-2.355.el6.x86_64. From

Re: [Qemu-devel] [PATCH] coroutine: add ./configure --disable-coroutine-pool

2013-09-12 Thread Stefan Hajnoczi
On Wed, Sep 11, 2013 at 05:38:07PM +0200, Kevin Wolf wrote: Am 11.09.2013 um 17:32 hat Gabriel Kerneis geschrieben: On Wed, Sep 11, 2013 at 05:24:55PM +0200, Kevin Wolf wrote: In config-host.make we do get: CONFIG_COROUTINE_POOL=0 But when config-host.h is generated from

[Qemu-devel] [PATCH v3] e1000: NetClientInfo.receive_iov implemented

2013-09-12 Thread Vincenzo Maffione
This patch implements the NetClientInfo.receive_iov method for the e1000 device emulation. In this way a network backend that uses qemu_sendv_packet() can deliver the fragmented packet without requiring an additional copy in the frontend/backend network code (nc_sendv_compat() function). The

Re: [Qemu-devel] Ping http://patchwork.ozlabs.org/patch/251410/

2013-09-12 Thread Peter Maydell
On 12 September 2013 00:08, Richard Henderson r...@twiddle.net wrote: There have been two patches posted for this uninitialized warning, outstanding since June 14. I still encounter this daily... Looks like material for -trivial to me, cc'ing. -- PMM

Re: [Qemu-devel] [PATCH] scsi: prefer UUID to VM name for the initiator name

2013-09-12 Thread Paolo Bonzini
Il 12/09/2013 10:38, Stefan Hajnoczi ha scritto: On Tue, Sep 10, 2013 at 06:40:04PM +0200, Paolo Bonzini wrote: The UUID is unique even across multiple hosts, thus it is better than a VM name even if it is less user-friendly. Signed-off-by: Paolo Bonzini pbonz...@redhat.com ---

Re: [Qemu-devel] [PATCH 4/4] qemu-img: conditionally discard target on convert

2013-09-12 Thread Peter Lieven
On 18.07.2013 16:14, Paolo Bonzini wrote: Il 18/07/2013 15:55, ronnie sahlberg ha scritto: bdrv-write_zeroes will use writesame16 and set the unmap flag only if BDRV_MAY_DISCARD == 1 and BDRV_O_UNMAP == 1 and lbprz == 1. When you use WRITESAME16 you can ignore the lbprz flag. Just send a

Re: [Qemu-devel] Ping http://patchwork.ozlabs.org/patch/251410/

2013-09-12 Thread Stefan Hajnoczi
On Wed, Sep 11, 2013 at 04:08:01PM -0700, Richard Henderson wrote: There have been two patches posted for this uninitialized warning, outstanding since June 14. I still encounter this daily... I'm still happy with the patch. Michael: Do you want to take this through the trivial patches tree?

Re: [Qemu-devel] [PATCH 4/4] qemu-img: conditionally discard target on convert

2013-09-12 Thread Paolo Bonzini
Il 12/09/2013 10:52, Peter Lieven ha scritto: On 18.07.2013 16:14, Paolo Bonzini wrote: Il 18/07/2013 15:55, ronnie sahlberg ha scritto: bdrv-write_zeroes will use writesame16 and set the unmap flag only if BDRV_MAY_DISCARD == 1 and BDRV_O_UNMAP == 1 and lbprz == 1. When you use WRITESAME16

Re: [Qemu-devel] [PATCH v3 00/29] tcg-aarch64 improvements

2013-09-12 Thread Peter Maydell
On 12 September 2013 09:03, Claudio Fontana claudio.font...@huawei.com wrote: On 10.09.2013 10:45, Peter Maydell wrote: On 10 September 2013 09:27, Claudio Fontana claudio.font...@huawei.com wrote: On another side, I end up having to manually revert some parts of these which you put as

Re: [Qemu-devel] [PATCH v3 01/29] tcg-aarch64: Set ext based on TCG_OPF_64BIT

2013-09-12 Thread Peter Maydell
On 12 September 2013 09:25, Claudio Fontana claudio.font...@huawei.com wrote: On 02.09.2013 19:54, Richard Henderson wrote: -case INDEX_op_bswap64_i64: -ext = 1; /* fall through */ case INDEX_op_bswap32_i64: +/* Despite the _i64, this is a 32-bit bswap. */ +

Re: [Qemu-devel] [PATCH v3 01/29] tcg-aarch64: Set ext based on TCG_OPF_64BIT

2013-09-12 Thread Claudio Fontana
On 12.09.2013 10:58, Peter Maydell wrote: On 12 September 2013 09:25, Claudio Fontana claudio.font...@huawei.com wrote: On 02.09.2013 19:54, Richard Henderson wrote: -case INDEX_op_bswap64_i64: -ext = 1; /* fall through */ case INDEX_op_bswap32_i64: +/* Despite

[Qemu-devel] [PATCH v4 2/3] qemu-timer: make qemu_timer_mod_ns() and qemu_timer_del() thread-safe

2013-09-12 Thread Stefan Hajnoczi
Introduce QEMUTimerList-active_timers_lock to protect the linked list of active timers. This allows qemu_timer_mod_ns() to be called from any thread. Note that vm_clock is not thread-safe and its use of qemu_clock_has_timers() works fine today but is also not thread-safe. The purpose of this

[Qemu-devel] [PATCH v4 1/3] qemu-timer: drop outdated signal safety comments

2013-09-12 Thread Stefan Hajnoczi
host_alarm_handler() is invoked from the signal processing thread (currently the iothread). Previously we did processing in a real signal handler with signalfd and therefore needed signal-safe timer code. Today host_alarm_handler() just marks the alarm timer as expired/pending and notifies the

[Qemu-devel] [PATCH v4 3/3] qemu-timer: do not take the lock in timer_pending

2013-09-12 Thread Stefan Hajnoczi
From: Paolo Bonzini pbonz...@redhat.com We can deduce the result from expire_time, by making it always -1 if the timer is not in the active_timers list. We need to check against negative times passed to timer_mod_ns; clamping them to zero is not a problem because the only clock that has a zero

[Qemu-devel] [PATCH v4 0/3] qemu-timer: make qemu_timer_mod_ns() and qemu_timer_del() thread-safe

2013-09-12 Thread Stefan Hajnoczi
v4: * Rebased retested for easy review and merge * No code changes v3: * Squashed Paolo's fixes and added his patch to avoid locking in timer_pending() v2: * Rebased onto qemu.git/master following the merge of Alex's AioContext timers The purpose of these patches is to eventually allow

Re: [Qemu-devel] [PATCH 4/4] qemu-img: conditionally discard target on convert

2013-09-12 Thread Peter Lieven
On 12.09.2013 10:55, Paolo Bonzini wrote: Il 12/09/2013 10:52, Peter Lieven ha scritto: On 18.07.2013 16:14, Paolo Bonzini wrote: Il 18/07/2013 15:55, ronnie sahlberg ha scritto: bdrv-write_zeroes will use writesame16 and set the unmap flag only if BDRV_MAY_DISCARD == 1 and BDRV_O_UNMAP == 1

Re: [Qemu-devel] [PATCH v6 4/8] module: implement module loading function

2013-09-12 Thread Daniel P. Berrange
On Thu, Sep 12, 2013 at 09:36:43AM +0400, Michael Tokarev wrote: 12.09.2013 07:02, Fam Zheng wrote. On Wed, 09/11 11:46, Richard Henderson wrote: On 09/11/2013 08:48 AM, Daniel P. Berrange wrote: We know the precise list of valid modules when building QEMU, so IMHO, this should just

[Qemu-devel] [RFC PATCH 0/8] Remove stub mon-protocol-event for block

2013-09-12 Thread Wenchao Xia
This series will remove the usage of symbols of mon-protocol-event in qemu-img, qemu-nbd and qemu-io, in short remove the connetion for block layer. Background: I am tring to decouple block layer code with other unnnessary components, and in ./stub there many symbols that qemu-img linked as

[Qemu-devel] [RFC PATCH 1/8] block: use type MonitorEvent directly

2013-09-12 Thread Wenchao Xia
block_int.h included monitor.h, so it knows the typedef. Signed-off-by: Wenchao Xia xiaw...@linux.vnet.ibm.com --- block.c |2 +- include/block/block_int.h |2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/block.c b/block.c index a325efc..2e2774d

[Qemu-devel] [RFC PATCH 3/8] qapi: move MonitorEvent define

2013-09-12 Thread Wenchao Xia
Signed-off-by: Wenchao Xia xiaw...@linux.vnet.ibm.com --- include/monitor/monitor.h | 38 +- include/qapi/qmp/qevent.h | 41 + include/qapi/qmp/types.h |1 + 3 files changed, 43 insertions(+), 37 deletions(-)

[Qemu-devel] [RFC PATCH 4/8] qapi: rename MonitorEvent to QEvent

2013-09-12 Thread Wenchao Xia
Signed-off-by: Wenchao Xia xiaw...@linux.vnet.ibm.com --- block.c|2 +- include/block/block_int.h |2 +- include/monitor/monitor.h |2 +- include/qapi/qmp/qevent.h |4 ++-- monitor.c | 12 ++-- stubs/mon-protocol-event.c |2 +-

[Qemu-devel] [RFC PATCH 8/8] stubs: remove mon-protocol-event.o in stub obj

2013-09-12 Thread Wenchao Xia
Now block layer do not use this symbol now, so qemg-img, qemu-io and qemu-nbd do not link with this file any more. The test program tests/test-qdev-global-props still need it, so add this obj in rule of test/Makefile, and keeps the c file now. Signed-off-by: Wenchao Xia xiaw...@linux.vnet.ibm.com

[Qemu-devel] [RFC PATCH 7/8] block: do not include monitor.h

2013-09-12 Thread Wenchao Xia
Block layer do not need it any more. Signed-off-by: Wenchao Xia xiaw...@linux.vnet.ibm.com --- include/block/block_int.h |1 - 1 files changed, 0 insertions(+), 1 deletions(-) diff --git a/include/block/block_int.h b/include/block/block_int.h index db2cb49..ec92f16 100644 ---

[Qemu-devel] [RFC PATCH 2/8] block: do not include monitor.h in block.c

2013-09-12 Thread Wenchao Xia
block_int.h already included it. Signed-off-by: Wenchao Xia xiaw...@linux.vnet.ibm.com --- block.c |1 - 1 files changed, 0 insertions(+), 1 deletions(-) diff --git a/block.c b/block.c index 2e2774d..a532eaa 100644 --- a/block.c +++ b/block.c @@ -24,7 +24,6 @@ #include config-host.h

[Qemu-devel] [RFC PATCH 5/8] block: add a callback layer for common functions

2013-09-12 Thread Wenchao Xia
This structure can hold some call back functions, such as event emit, error printf. By using call back, block layer can be decoupled with other components. Signed-off-by: Wenchao Xia xiaw...@linux.vnet.ibm.com --- block.c |7 +++ include/block/block.h | 11 +++ 2

[Qemu-devel] [RFC PATCH 6/8] block: replace monitor_protocol_event() with callback

2013-09-12 Thread Wenchao Xia
For code inside block layer, it is replaced with a call back function. vl.c will tell block layer how to emit the event. Signed-off-by: Wenchao Xia xiaw...@linux.vnet.ibm.com --- block.c| 12 ++-- block/qcow2-refcount.c |4 +++- blockjob.c | 10

Re: [Qemu-devel] [RFC PATCH 0/8] Remove stub mon-protocol-event for block

2013-09-12 Thread Paolo Bonzini
Il 12/09/2013 11:15, Wenchao Xia ha scritto: This series will remove the usage of symbols of mon-protocol-event in qemu-img, qemu-nbd and qemu-io, in short remove the connetion for block layer. Background: I am tring to decouple block layer code with other unnnessary components, and in

Re: [Qemu-devel] [PATCH] qdev-monitor: Avoid exiting when hot-plugging two devices with the same bootindex value

2013-09-12 Thread Markus Armbruster
Paolo Bonzini pbonz...@redhat.com writes: Il 11/09/2013 20:26, Marcel Apfelbaum ha scritto: Qemu is expected to quit if the same boot index value is used by two devices. However, hot-plugging a device with a bootindex value already used should fail with a friendly message rather than quitting

Re: [Qemu-devel] vfio for platform devices - 9/5/2012 - minutes

2013-09-12 Thread Bhushan Bharat-R65777
-Original Message- From: Alex Williamson [mailto:alex.william...@redhat.com] Sent: Wednesday, September 11, 2013 10:45 PM To: Yoder Stuart-B08248 Cc: Wood Scott-B07421; Sethi Varun-B16395; Bhushan Bharat-R65777; 'Peter Maydell'; 'Santosh Shukla'; 'Alexander Graf'; 'Antonios

[Qemu-devel] [PATCH v7 1/3] device_tree.c: Terminate the empty reservemap in create_device_tree()

2013-09-12 Thread Peter Maydell
Device trees created with create_device_tree() may not have any entries in their reservemap, because the FDT API requires that the reservemap is completed before any FDT nodes are added, and create_device_tree() itself creates a node. However we were not calling fdt_finish_reservemap(), which

[Qemu-devel] [PATCH v7 2/3] hw/arm/boot: Allow boards to provide an fdt blob

2013-09-12 Thread Peter Maydell
From: John Rigby john.ri...@linaro.org If no fdt is provided on command line and the new field get_dtb in struct arm_boot_info is set then call it to get a device tree blob. Signed-off-by: John Rigby john.ri...@linaro.org [PMM: minor tweaks and cleanup] Signed-off-by: Peter Maydell

Re: [Qemu-devel] [PATCH] qdev-monitor: Avoid exiting when hot-plugging two devices with the same bootindex value

2013-09-12 Thread Marcel Apfelbaum
On Thu, 2013-09-12 at 11:43 +0200, Markus Armbruster wrote: Paolo Bonzini pbonz...@redhat.com writes: Il 11/09/2013 20:26, Marcel Apfelbaum ha scritto: Qemu is expected to quit if the same boot index value is used by two devices. However, hot-plugging a device with a bootindex value

[Qemu-devel] [PATCH v7 0/3] hw/arm: Add 'virt' platform

2013-09-12 Thread Peter Maydell
This patch series adds a 'virt' platform which uses the kernel's mach-virt (fully device-tree driven) support to create a simple minimalist platform intended for use for KVM VM guests. The major change here is that I've added a PL011 UART. Sample command line: qemu-system-arm -machine

[Qemu-devel] [PATCH v7 3/3] hw/arm: Add 'virt' platform

2013-09-12 Thread Peter Maydell
Add 'virt' platform support corresponding to arch/arm/mach-virt in the Linux kernel tree. This has no platform-specific code but can use any device whose kernel driver is is able to work purely from a device tree node. We use this to instantiate a minimal set of devices: a GIC and some virtio-mmio

Re: [Qemu-devel] Disabling IRQ error

2013-09-12 Thread Xie Xianshan
Dear Max, Does it mean an IRQ to be edge-triggered? No, it is a level-sensitive and active-high interrupt. This is why i tried to use qemu_irq_raise() to trigger IRQ. Thanks, Simen Hi Max, Thanks for your patience and help. I`ve tried to do what you said, but the problem

Re: [Qemu-devel] [PATCH] qdev-monitor: Avoid exiting when hot-plugging two devices with the same bootindex value

2013-09-12 Thread Markus Armbruster
Marcel Apfelbaum marce...@redhat.com writes: On Thu, 2013-09-12 at 11:43 +0200, Markus Armbruster wrote: Paolo Bonzini pbonz...@redhat.com writes: Il 11/09/2013 20:26, Marcel Apfelbaum ha scritto: Qemu is expected to quit if the same boot index value is used by two devices. However,

Re: [Qemu-devel] Disabling IRQ error

2013-09-12 Thread Max Filippov
On Thu, Sep 12, 2013 at 2:51 PM, Xie Xianshan xi...@cn.fujitsu.com wrote: Dear Max, Does it mean an IRQ to be edge-triggered? No, it is a level-sensitive and active-high interrupt. This is why i tried to use qemu_irq_raise() to trigger IRQ. Ok, back to your original question: I`m

[Qemu-devel] [PULL 00/11] SCSI patches for 2013-09-11

2013-09-12 Thread Paolo Bonzini
Anthony, The following changes since commit 2d1fe1873a984d1c2c89ffa3d12949cafc718551: Merge remote-tracking branch 'pmaydell/tags/pull-target-arm-20130910' into staging (2013-09-11 14:46:52 -0500) are available in the git repository at: git://github.com/bonzini/qemu.git scsi-next for

[Qemu-devel] [PULL 05/11] hw/scsi/lsi53c895a: Use sextract32 for sign-extension

2013-09-12 Thread Paolo Bonzini
From: Peter Maydell peter.mayd...@linaro.org Use sextract32() for doing sign-extension rather than rolling our own implementation. Signed-off-by: Peter Maydell peter.mayd...@linaro.org Signed-off-by: Paolo Bonzini pbonz...@redhat.com --- hw/scsi/lsi53c895a.c | 16 +--- 1 file

[Qemu-devel] [PULL 06/11] hw/scsi/lsi53c895a: Use deposit32 rather than handcoded shift/mask

2013-09-12 Thread Paolo Bonzini
From: Peter Maydell peter.mayd...@linaro.org Use deposit32() rather than handcoded shifts/masks to update the scratch registers. This is cleaner and incidentally avoids a clang sanitizer complaint (runtime error: left shift of 255 by 24 places cannot be represented in type 'int'). Signed-off-by:

[Qemu-devel] [PULL 02/11] spapr-vscsi: add task management

2013-09-12 Thread Paolo Bonzini
From: Alexey Kardashevskiy a...@ozlabs.ru At the moment the guest kernel issues two types of task management requests to the hypervisor - task about and lun reset. This adds handling for these tasks. As spapr-vscsi starts calling scsi_req_cancel(), free_request callback was implemented. As

[Qemu-devel] [PULL 07/11] iscsi: add logical block provisioning information to iscsilun

2013-09-12 Thread Paolo Bonzini
From: Peter Lieven p...@kamp.de Signed-off-by: Peter Lieven p...@kamp.de Signed-off-by: Paolo Bonzini pbonz...@redhat.com --- block/iscsi.c | 77 +++ 1 file changed, 77 insertions(+) diff --git a/block/iscsi.c b/block/iscsi.c index

[Qemu-devel] [PULL 03/11] virtio-scsi: Make type virtio-scsi-common abstract

2013-09-12 Thread Paolo Bonzini
From: Markus Armbruster arm...@redhat.com It's the abstract base of virtio-scsi-device and vhost-scsi. Signed-off-by: Markus Armbruster arm...@redhat.com Signed-off-by: Paolo Bonzini pbonz...@redhat.com --- hw/scsi/virtio-scsi.c | 1 + 1 file changed, 1 insertion(+) diff --git

[Qemu-devel] [PULL 04/11] scsi: Fix scsi_bus_legacy_add_drive() scsi-generic with serial

2013-09-12 Thread Paolo Bonzini
From: Markus Armbruster arm...@redhat.com scsi_bus_legacy_add_drive() creates either a scsi-disk or a scsi-generic device. It sets property serial to argument serial unless null. Crashes with scsi-generic, because it doesn't have such the property. Only usb_msd_initfn_storage() passes non-null

[Qemu-devel] [PULL 11/11] spapr-vscsi: Report error on unsupported MAD requests

2013-09-12 Thread Paolo Bonzini
From: Alexey Kardashevskiy a...@ozlabs.ru The existing driver just dropped unsupported requests. This adds error responses to those unhandled requests. Signed-off-by: Alexey Kardashevskiy a...@ozlabs.ru Signed-off-by: Paolo Bonzini pbonz...@redhat.com --- hw/scsi/spapr_vscsi.c | 22

[Qemu-devel] [PULL 08/11] iscsi: add .bdrv_get_block_status

2013-09-12 Thread Paolo Bonzini
From: Peter Lieven p...@kamp.de this patch adds a coroutine for .bdrv_co_block_status as well as a generic framework that can be used to build coroutines in block/iscsi. Signed-off-by: Peter Lieven p...@kamp.de Signed-off-by: Paolo Bonzini pbonz...@redhat.com --- block/iscsi.c | 136

[Qemu-devel] [PULL 09/11] iscsi: split discard requests in multiple parts

2013-09-12 Thread Paolo Bonzini
From: Peter Lieven p...@kamp.de Replace .bdrv_aio_discard with .bdrv_co_discard so that discard requests can be split in multiple parts, each for a small amount of sectors. This is useful because we expose a generic API with no limit on the amount of sectors that can be unmapped in one request.

[Qemu-devel] [PULL 10/11] spapr-vscsi: Adding VSCSI capabilities

2013-09-12 Thread Paolo Bonzini
From: Nikunj A. Dadhania nik...@linux.vnet.ibm.com This implements capabilities exchange between vscsi host and client. As at the moment no capability is supported, put zero flags everywhere and return. Signed-off-by: Nikunj A Dadhania nik...@linux.vnet.ibm.com Signed-off-by: Paolo Bonzini

[Qemu-devel] [PULL 01/11] scsi: prefer UUID to VM name for the initiator name

2013-09-12 Thread Paolo Bonzini
The UUID is unique even across multiple hosts, thus it is better than a VM name even if it is less user-friendly. Signed-off-by: Paolo Bonzini pbonz...@redhat.com --- block/iscsi.c | 23 --- include/sysemu/sysemu.h | 2 ++ stubs/Makefile.objs | 1 +

Re: [Qemu-devel] [PATCH v3 0/4] timers thread-safe stuff

2013-09-12 Thread Paolo Bonzini
Il 27/08/2013 05:20, Liu Ping Fan ha scritto: Saw the Alex's patches has been merged, rebase mine onto his. v3: 1. rename seqlock_read_check as seqlock_read_retry 2. Document timerlist were protected by BQL, and discard private lock around qemu_event_wait(tl-ev). v2: 1. fix

Re: [Qemu-devel] [PATCH] qdev-monitor: Avoid exiting when hot-plugging two devices with the same bootindex value

2013-09-12 Thread Marcel Apfelbaum
On Thu, 2013-09-12 at 13:04 +0200, Markus Armbruster wrote: Marcel Apfelbaum marce...@redhat.com writes: On Thu, 2013-09-12 at 11:43 +0200, Markus Armbruster wrote: Paolo Bonzini pbonz...@redhat.com writes: Il 11/09/2013 20:26, Marcel Apfelbaum ha scritto: Qemu is expected to quit

Re: [Qemu-devel] [PATCH] qemu-img: fix invalid JSON

2013-09-12 Thread Kevin Wolf
Am 11.09.2013 um 18:58 hat Eric Blake geschrieben: On 09/11/2013 10:47 AM, Paolo Bonzini wrote: Single quotes for JSON are a QMP-ism, use real JSON in qemu-img output. Reported-by: Kevin Wolf kw...@redhat.com Signed-off-by: Paolo Bonzini pbonz...@redhat.com --- qemu-img.c | 2 +-

Re: [Qemu-devel] [PATCH] qemu-iotests: Cleanup test image in test number 007

2013-09-12 Thread Kevin Wolf
Am 12.09.2013 um 10:37 hat Bharata B Rao geschrieben: qemu-iotests number 007 doesn't do test image cleanup. This will affect those protocols that expect a clean state before every test. Hence ensure that test image is cleaned up in this test. Signed-off-by: Bharata B Rao

Re: [Qemu-devel] [PATCH v6 4/8] module: implement module loading function

2013-09-12 Thread Eric Blake
On 09/11/2013 11:36 PM, Michael Tokarev wrote: A solution which I proposed at the very beginning -- to export a hashed init function from modules, and call it from the main executable. Like, instead of, say, qemu_module_init(), call qemu_module_init_0xdeadbeaf(), where 0xdeadbeaf is a hash

Re: [Qemu-devel] [RFC PATCH 0/8] Remove stub mon-protocol-event for block

2013-09-12 Thread Kevin Wolf
Am 12.09.2013 um 11:31 hat Paolo Bonzini geschrieben: Il 12/09/2013 11:15, Wenchao Xia ha scritto: This series will remove the usage of symbols of mon-protocol-event in qemu-img, qemu-nbd and qemu-io, in short remove the connetion for block layer. Background: I am tring to decouple

[Qemu-devel] [Bug 1224444] [NEW] virtio-serial loses writes when used over virtio-mmio

2013-09-12 Thread Richard Jones
Public bug reported: virtio-serial appears to lose writes, but only when used on top of virtio-mmio. The scenario is this: /home/rjones/d/qemu/arm-softmmu/qemu-system-arm \ -global virtio-blk-device.scsi=off \ -nodefconfig \ -nodefaults \ -nographic \ -M vexpress-a15 \

Re: [Qemu-devel] [PATCH] pc: add 1.7 machine types for piix,q35

2013-09-12 Thread Andreas Färber
Am 12.09.2013 08:24, schrieb Michael S. Tsirkin: piix 1.7 is the default. Signed-off-by: Michael S. Tsirkin m...@redhat.com --- hw/i386/pc_piix.c | 19 +-- hw/i386/pc_q35.c | 17 - 2 files changed, 33 insertions(+), 3 deletions(-) Looks like you forget to

Re: [Qemu-devel] [RFC PATCH 0/8] Remove stub mon-protocol-event for block

2013-09-12 Thread Markus Armbruster
[Note cc: Luiz] Paolo Bonzini pbonz...@redhat.com writes: Il 12/09/2013 11:15, Wenchao Xia ha scritto: This series will remove the usage of symbols of mon-protocol-event in qemu-img, qemu-nbd and qemu-io, in short remove the connetion for block layer. Background: I am tring to decouple

Re: [Qemu-devel] [PATCH v6 4/8] module: implement module loading function

2013-09-12 Thread Daniel P. Berrange
On Thu, Sep 12, 2013 at 05:59:30AM -0600, Eric Blake wrote: On 09/11/2013 11:36 PM, Michael Tokarev wrote: A solution which I proposed at the very beginning -- to export a hashed init function from modules, and call it from the main executable. Like, instead of, say, qemu_module_init(),

[Qemu-devel] [PATCH] block: Assert validity of BdrvActionOps

2013-09-12 Thread Max Reitz
In qmp_transaction, assert that the BdrvActionOps to be used is actually valid. This assertion failing is very improbable, however, it might happen, if a new TransactionActionKind is introduced out of order and the actions[] array is not updated. Signed-off-by: Max Reitz mre...@redhat.com ---

[Qemu-devel] [Bug 1224444] Re: virtio-serial loses writes when used over virtio-mmio

2013-09-12 Thread Richard Jones
** Description changed: virtio-serial appears to lose writes, but only when used on top of virtio-mmio. The scenario is this: /home/rjones/d/qemu/arm-softmmu/qemu-system-arm \ -global virtio-blk-device.scsi=off \ -nodefconfig \ -nodefaults \ -nographic \ -M

Re: [Qemu-devel] [PATCH v3] e1000: NetClientInfo.receive_iov implemented

2013-09-12 Thread Stefan Hajnoczi
On Thu, Sep 12, 2013 at 10:47:37AM +0200, Vincenzo Maffione wrote: This patch implements the NetClientInfo.receive_iov method for the e1000 device emulation. In this way a network backend that uses qemu_sendv_packet() can deliver the fragmented packet without requiring an additional copy in

Re: [Qemu-devel] [PATCH v3 01/29] tcg-aarch64: Set ext based on TCG_OPF_64BIT

2013-09-12 Thread Richard Henderson
On 09/12/2013 01:58 AM, Peter Maydell wrote: On 12 September 2013 09:25, Claudio Fontana claudio.font...@huawei.com wrote: On 02.09.2013 19:54, Richard Henderson wrote: -case INDEX_op_bswap64_i64: -ext = 1; /* fall through */ case INDEX_op_bswap32_i64: +/* Despite

Re: [Qemu-devel] [PATCH v3 02/29] tcg-aarch64: Change all ext variables to bool

2013-09-12 Thread Richard Henderson
On 09/12/2013 01:29 AM, Claudio Fontana wrote: I see the problem related to the previous patch. What about continuing to use int in the previous patch, and replace it with bool in this one? The previous patch would only target the way ext is set, and this one would really contain all bool

  1   2   >