[Qemu-devel] [PATCH] qmp: fix typo in input-send-event examples

2014-11-25 Thread Amos Kong
Lack of two closed bracket in json commands. Signed-off-by: Amos Kong --- qmp-commands.hx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/qmp-commands.hx b/qmp-commands.hx index 8812401..bb2e380 100644 --- a/qmp-commands.hx +++ b/qmp-commands.hx @@ -3818,13 +3818,13 @@ Pr

Re: [Qemu-devel] [PATCH] input: move input-send-event into experimental namespace

2014-11-25 Thread Markus Armbruster
Gerd Hoffmann writes: > Ongoing discussions on how we are going to specify the console, > so tag the command as experiemntal so we can refine things in > the 2.3 development cycle. > > Signed-off-by: Gerd Hoffmann > --- > qmp-commands.hx | 12 ++-- Don't you need to patch qapi-schema.js

[Qemu-devel] [PATCH for-2.3 0/5] aio: Support epoll by introducing qemu_poll abstraction

2014-11-25 Thread Fam Zheng
ppoll(2) doesn't scale as well as epoll: The elapsed time of the syscall is linear to the number of fd's we poll, which hurts performance a bit when the number of devices are many, or when a virtio device registers many virtqueues (virtio-serial, for instance). To show some data from my test on cu

[Qemu-devel] [PATCH for-2.3 3/5] poll: Add epoll implementation for qemu_poll

2014-11-25 Thread Fam Zheng
This implements qemu_poll with epoll. The only complex part is qemu_poll_set_fds, which will sync up epollfd with epoll_ctl by computing the symmetric difference of previous and new fds. Signed-off-by: Fam Zheng --- Makefile.objs | 4 +- poll-linux.c | 216

[Qemu-devel] [PATCH for-2.3 4/5] main-loop: Replace qemu_poll_ns with qemu_poll

2014-11-25 Thread Fam Zheng
qemu_poll_set_fds + qemu_poll does the same, and when epoll is available, it is faster. Signed-off-by: Fam Zheng --- include/qemu/timer.h | 13 - main-loop.c | 35 ++- qemu-timer.c | 21 - 3 files changed, 30 insert

[Qemu-devel] [PATCH for-2.3 1/5] poll: Introduce QEMU Poll API

2014-11-25 Thread Fam Zheng
This is abstract of underlying poll implementation. A glib implementation is included. Signed-off-by: Fam Zheng --- Makefile.objs | 2 +- include/qemu/poll.h | 40 +++ include/qemu/typedefs.h | 2 + poll-glib.c | 130

[Qemu-devel] [PATCH for-2.3 5/5] tests: Add test case for qemu_poll

2014-11-25 Thread Fam Zheng
Signed-off-by: Fam Zheng --- tests/Makefile| 2 + tests/test-poll.c | 272 ++ 2 files changed, 274 insertions(+) create mode 100644 tests/test-poll.c diff --git a/tests/Makefile b/tests/Makefile index 16f0e4c..79f399d 100644 --- a/tests/

[Qemu-devel] [PATCH for-2.3 2/5] posix-aio: Use QEMU poll interface

2014-11-25 Thread Fam Zheng
The AIO handler list is only modified by aio_set_fd_handler, so we can easily add del poll fd there. Initialize a QEMUPoll and keep track of all the fds, so we don't need to rebuild a GPollFD array for g_poll in aio_poll. Signed-off-by: Fam Zheng --- aio-posix.c | 52

Re: [Qemu-devel] [PATCH] input: move input-send-event into experimental namespace

2014-11-25 Thread Amos Kong
On Tue, Nov 25, 2014 at 09:06:34AM +0100, Markus Armbruster wrote: > Gerd Hoffmann writes: > > > Ongoing discussions on how we are going to specify the console, > > so tag the command as experiemntal so we can refine things in > > the 2.3 development cycle. > > > > Signed-off-by: Gerd Hoffmann >

Re: [Qemu-devel] [BUGFIX][PATCH for 2.2 1/1] hw/ide/core.c: Prevent SIGSEGV during migration

2014-11-25 Thread Dr. David Alan Gilbert
* Don Slutz (dsl...@verizon.com) wrote: > On 11/21/14 05:49, Dr. David Alan Gilbert wrote: > >* Markus Armbruster (arm...@redhat.com) wrote: > >>Don Slutz writes: > >> > >>>On 11/19/14 07:29, Markus Armbruster wrote: > Don Slutz writes: > > >The other callers to blk_set_enable_write_

Re: [Qemu-devel] [PATCH 1/2] qemu-iotests: Speed up make check-block

2014-11-25 Thread Max Reitz
On 2014-10-28 at 07:45, Fam Zheng wrote: Using /tmp (usually mounted as tmpfs) and cache=writeback, the quick group can be quicker. On my laptop (Lenovo T430s with Fedora 20), this reduces the time from 50s to 30s. Signed-off-by: Fam Zheng --- tests/qemu-iotests-quick.sh | 2 +- 1 file chan

Re: [Qemu-devel] [PATCH 2/2] tests/Makefile: Add check-block to make check

2014-11-25 Thread Max Reitz
On 2014-10-28 at 07:45, Fam Zheng wrote: Signed-off-by: Fam Zheng --- tests/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/Makefile b/tests/Makefile index 16f0e4c..f430b18 100644 --- a/tests/Makefile +++ b/tests/Makefile @@ -463,7 +463,7 @@ check-qapi-schem

Re: [Qemu-devel] [PATCH 0/2] tests: Add check-block to "make check"

2014-11-25 Thread Max Reitz
On 2014-11-25 at 08:30, Markus Armbruster wrote: Markus Armbruster writes: Fam Zheng writes: qemu-iotests contains useful tests that have a nice coverage of block layer code. Adding check-block (which calls tests/qemu-iotests-quick.sh) to "make check" is good for developers' self-testing.

Re: [Qemu-devel] [PATCH 1/2] qemu-iotests: Speed up make check-block

2014-11-25 Thread Kevin Wolf
Am 25.11.2014 um 10:12 hat Max Reitz geschrieben: > On 2014-10-28 at 07:45, Fam Zheng wrote: > >Using /tmp (usually mounted as tmpfs) and cache=writeback, the quick > >group can be quicker. > > > >On my laptop (Lenovo T430s with Fedora 20), this reduces the time from > >50s to 30s. > > > >Signed-of

Re: [Qemu-devel] [PATCH 1/2] qemu-iotests: Speed up make check-block

2014-11-25 Thread Max Reitz
On 2014-11-25 at 10:21, Kevin Wolf wrote: Am 25.11.2014 um 10:12 hat Max Reitz geschrieben: On 2014-10-28 at 07:45, Fam Zheng wrote: Using /tmp (usually mounted as tmpfs) and cache=writeback, the quick group can be quicker. On my laptop (Lenovo T430s with Fedora 20), this reduces the time from

Re: [Qemu-devel] [PATCH 1/2] qemu-iotests: Speed up make check-block

2014-11-25 Thread Kevin Wolf
Am 25.11.2014 um 10:21 hat Max Reitz geschrieben: > On 2014-11-25 at 10:21, Kevin Wolf wrote: > >Am 25.11.2014 um 10:12 hat Max Reitz geschrieben: > >>On 2014-10-28 at 07:45, Fam Zheng wrote: > >>>Using /tmp (usually mounted as tmpfs) and cache=writeback, the quick > >>>group can be quicker. > >>>

Re: [Qemu-devel] [PATCH] qmp: fix typo in input-send-event examples

2014-11-25 Thread Markus Armbruster
Amos Kong writes: > Lack of two closed bracket in json commands. > > Signed-off-by: Amos Kong Reviewed-by: Markus Armbruster

Re: [Qemu-devel] [PATCH 1/2] qemu-iotests: Speed up make check-block

2014-11-25 Thread Max Reitz
On 2014-11-25 at 10:30, Kevin Wolf wrote: Am 25.11.2014 um 10:21 hat Max Reitz geschrieben: On 2014-11-25 at 10:21, Kevin Wolf wrote: Am 25.11.2014 um 10:12 hat Max Reitz geschrieben: On 2014-10-28 at 07:45, Fam Zheng wrote: Using /tmp (usually mounted as tmpfs) and cache=writeback, the quick

Re: [Qemu-devel] [PATCH 1/2] qemu-iotests: Speed up make check-block

2014-11-25 Thread Fam Zheng
On Tue, 11/25 10:31, Max Reitz wrote: > On 2014-11-25 at 10:30, Kevin Wolf wrote: > >Am 25.11.2014 um 10:21 hat Max Reitz geschrieben: > >>On 2014-11-25 at 10:21, Kevin Wolf wrote: > >>>Am 25.11.2014 um 10:12 hat Max Reitz geschrieben: > On 2014-10-28 at 07:45, Fam Zheng wrote: > >Using /tm

Re: [Qemu-devel] [BUGFIX][PATCH for 2.2 v6 1/1] -machine vmport=auto: Fix handling of VMWare ioport emulation for xen

2014-11-25 Thread Paolo Bonzini
On 21/11/2014 17:18, Don Slutz wrote: > c/s 9b23cfb76b3a5e9eb5cc899eaf2f46bc46d33ba4 > > or > > c/s b154537ad07598377ebf98252fb7d2aff127983b > > moved the testing of xen_enabled() from pc_init1() to > pc_machine_initfn(). > > xen_enabled() does not return the correct value in > pc_machine_ini

Re: [Qemu-devel] [PATCH for-2.2] fw_cfg: fix boot order bug when dynamically modified via QOM

2014-11-25 Thread Paolo Bonzini
On 25/11/2014 05:38, arei.gong...@huawei.com wrote: > From: Gonglei > > When we dynamically modify boot order, the length of > boot order will be changed, but we don't update > s->files->f[i].size with new length. This casuse > seabios read a wrong vale of qemu cfg file about > bootorder. > >

Re: [Qemu-devel] [PATCH 1/2] qemu-iotests: Speed up make check-block

2014-11-25 Thread Kevin Wolf
Am 25.11.2014 um 10:44 hat Fam Zheng geschrieben: > On Tue, 11/25 10:31, Max Reitz wrote: > > On 2014-11-25 at 10:30, Kevin Wolf wrote: > > >Am 25.11.2014 um 10:21 hat Max Reitz geschrieben: > > >>On 2014-11-25 at 10:21, Kevin Wolf wrote: > > >>>Am 25.11.2014 um 10:12 hat Max Reitz geschrieben: > >

Re: [Qemu-devel] [BUGFIX][PATCH for 2.2 v6 1/1] -machine vmport=auto: Fix handling of VMWare ioport emulation for xen

2014-11-25 Thread Fabio Fantoni
On Fri, Nov 21, 2014 at 11:18:52AM -0500, Don Slutz wrote: >/ c/s 9b23cfb76b3a5e9eb5cc899eaf2f46bc46d33ba4/ >/ / >/ or/ >/ / >/ c/s b154537ad07598377ebf98252fb7d2aff127983b/ >/ / >/ moved the testing of xen_enabled() from pc_init1() to/ >/ pc_machine_initfn()./ >/ / >/ xen_enabled() does

[Qemu-devel] [PATCH 0/3] iotests: Fix test 039

2014-11-25 Thread Max Reitz
Test 039 used to fail because qemu-io -c abort may generate core dumps even with ulimit -c 0 (and the output then contains "(core dumped)"). Fix this by adding an option to the "abort" command which allows specifying a signal number to raise(). Using SIGKILL for example does not result in a core du

[Qemu-devel] [PATCH 1/3] qemu-io: Let -c abort raise any signal

2014-11-25 Thread Max Reitz
abort() has the sometimes undesirable side-effect of generating a core dump. If that is not needed, SIGKILL has the same effect of abruptly crash qemu; without a core dump. Therefore, this patch allows to use the qemu-io abort command to raise any signal. Signed-off-by: Max Reitz --- qemu-io-cm

[Qemu-devel] [PATCH 3/3] iotests: Fix test 039

2014-11-25 Thread Max Reitz
Test 039 used qemu-io -c abort for simulating a qemu crash; however, abort() generally results in a core dump and ulimit -c 0 is no reliable way of preventing that. Use "abort -S 9" instead to have it crash without a core dump. Signed-off-by: Max Reitz --- tests/qemu-iotests/039 | 12 +++

[Qemu-devel] [PATCH 2/3] iotests: Filter for "Killed" in qemu-io output

2014-11-25 Thread Max Reitz
_filter_qemu_io already filters out the process ID when qemu-io is aborted; the same should be done if it is aborted. Signed-off-by: Max Reitz --- tests/qemu-iotests/common.filter | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/qemu-iotests/common.filter b/tests/qemu-io

Re: [Qemu-devel] [PATCH 1/3] s390: Add PCI bus support

2014-11-25 Thread Frank Blaschka
On Tue, Nov 18, 2014 at 06:00:40PM +0100, Alexander Graf wrote: > > > On 18.11.14 13:50, Frank Blaschka wrote: > > On Mon, Nov 10, 2014 at 04:14:16PM +0100, Alexander Graf wrote: > >> > >> > >> On 10.11.14 15:20, Frank Blaschka wrote: > >>> From: Frank Blaschka > >>> > >>> This patch implements

Re: [Qemu-devel] [RFC v2 3/4] hw/pci-host: Add a generic PCI host controller for virtual platforms

2014-11-25 Thread Claudio Fontana
On 24.11.2014 15:57, alvise rigo wrote: > Hi Claudio, > > Thank you for your review. Please see my in-line comments. > > On Mon, Nov 24, 2014 at 11:34 AM, Claudio Fontana > wrote: >> On 21.11.2014 19:07, Alvise Rigo wrote: >>> Add a generic PCI host controller for virtual platforms, based on the

Re: [Qemu-devel] [RFC v2 0/4] Add Generic PCI host device update

2014-11-25 Thread alvise rigo
On Mon, Nov 24, 2014 at 4:50 PM, Claudio Fontana wrote: > Another general question about this series use: > > why do all these other devices that are unrelated to the virt platform show > up? There are two devices added to the platform by default in mach-virt. Look at the end of create_pci_host(

Re: [Qemu-devel] [PATCH 2/2] vga: flip qemu 2.2 pc machine types from cirrus to stdvga

2014-11-25 Thread Michael S. Tsirkin
On Mon, Nov 24, 2014 at 01:18:59PM +0100, Gerd Hoffmann wrote: > Hi, > > > > > This is not new - it was disabled with -vga std previously - > > > > but poses a bigger problem now it's the default? > > > > Thoughts? Something we can fix for 2.2? > > > > > > Which windows version is this? > > >

Re: [Qemu-devel] [PATCH 00/13] linux-aio/virtio-scsi: support AioContext wide IO submission as batch

2014-11-25 Thread Paolo Bonzini
On 22/11/2014 13:33, Ming Lei wrote: > > these patches are interesting. I would like to compare them with the > > opposite approach (and, I think, more similar to your old work) where > > the qemu_laio_state API is moved entirely into AioContext, with lazy > > allocation (reference-counted too,

Re: [Qemu-devel] [PATCH v2 00/12] qcow2: Add new overlap check functions

2014-11-25 Thread Max Reitz
On 2014-11-24 at 16:56, Max Reitz wrote: RAM usage = So I have looked at my 2 GB image above, and the list uses 40 kB, which may or may not be too much (sounds completely fine to me for an image with 512 byte clusters); but it is a least a number I can use for testing the following theor

Re: [Qemu-devel] [PATCH v2 01/12] qcow2: Add new overlap check functions

2014-11-25 Thread Max Reitz
On 2014-11-24 at 16:56, Max Reitz wrote: The existing qcow2 metadata overlap detection function used existing structures to determine the location of the image metadata, from plain fields such as l1_table_offset and l1_size in the BDRVQcowState, over image structures in memory such as the L1 tabl

Re: [Qemu-devel] [PULL v2 00/15] pc, pci, misc bugfixes

2014-11-25 Thread Peter Maydell
On 24 November 2014 at 19:30, Michael S. Tsirkin wrote: > The following changes since commit 0e88f478508b566152c6681f4889ed9830a2c0a5: > > Merge remote-tracking branch 'remotes/stefanha/tags/net-pull-request' into > staging (2014-11-21 14:15:37 +) > > are available in the git repository at:

Re: [Qemu-devel] [PATCH v2 2/6] geometry: Detect blocksize via ioctls in separate static functions

2014-11-25 Thread Stefan Hajnoczi
On Fri, Nov 21, 2014 at 11:17:02AM +0100, Christian Borntraeger wrote: > Am 19.11.2014 um 11:17 schrieb Ekaterina Tumanova: > > Move the IOCTL calls that detect logical blocksize from raw_probe_alignment > > into separate function (probe_logical_blocksize). > > Introduce function which detect physi

Re: [Qemu-devel] [BUGFIX][PATCH for 2.2 1/1] hw/ide/core.c: Prevent SIGSEGV during migration

2014-11-25 Thread Markus Armbruster
"Dr. David Alan Gilbert" writes: > * Don Slutz (dsl...@verizon.com) wrote: >> On 11/21/14 05:49, Dr. David Alan Gilbert wrote: >> >* Markus Armbruster (arm...@redhat.com) wrote: [...] >> >>Management tools should use -nodefaults. But if it mixes default and >> >>-nodefaults in migration, recreat

Re: [Qemu-devel] "File too large" error from "qemu-img snapshot" (was Re: AW: Bug Repoting Directions Request)

2014-11-25 Thread Kevin Wolf
Am 22.11.2014 um 18:02 hat Prof. Dr. Michael Schefczyk geschrieben: > Dear All, > > after some trying, my impression is that the following steps do work with > plain Centos 7: > > virsh snapshot-create-as VM backsnap > qemu-img convert -f qcow2 -s backsnap -O qcow2 VM.img backup.img > virsh snap

Re: [Qemu-devel] "File too large" error from "qemu-img snapshot" (was Re: AW: Bug Repoting Directions Request)

2014-11-25 Thread Prof. Dr. Michael Schefczyk
Dear Kevin, thank you very much! For the moment, I did stabilize my systems with these commands. For a next step, will explore three further options, which should all solve the issue better: - move to ovirt altogether - probably as foolproof as needed at my skill level - install ovirt's qemu-k

[Qemu-devel] [Bug 1368815] Re: qemu-img convert intermittently corrupts output images

2014-11-25 Thread Kevin Wolf
** Description changed: == - Impact: occasional qcow2 corruption + Impact: occasional image corruption (any format on local filesystem) Test case: see the qemu-img command below Regression potential: this cherrypicks a patch from upstre

Re: [Qemu-devel] [PATCH] input: move input-send-event into experimental namespace

2014-11-25 Thread Markus Armbruster
Amos Kong writes: > On Tue, Nov 25, 2014 at 09:06:34AM +0100, Markus Armbruster wrote: >> Gerd Hoffmann writes: >> >> > Ongoing discussions on how we are going to specify the console, >> > so tag the command as experiemntal so we can refine things in >> > the 2.3 development cycle. >> > >> > Si

Re: [Qemu-devel] [PATCH 1/3] s390: Add PCI bus support

2014-11-25 Thread Alexander Graf
On 25.11.14 11:11, Frank Blaschka wrote: > On Tue, Nov 18, 2014 at 06:00:40PM +0100, Alexander Graf wrote: >> >> >> On 18.11.14 13:50, Frank Blaschka wrote: >>> On Mon, Nov 10, 2014 at 04:14:16PM +0100, Alexander Graf wrote: On 10.11.14 15:20, Frank Blaschka wrote: > From: Fran

Re: [Qemu-devel] [PATCH 0/3] iotests: Fix test 039

2014-11-25 Thread Markus Armbruster
Max Reitz writes: > Test 039 used to fail I'm confused: "used to" suggests it doesn't anymore, but you sending a patches strongly suggests something's broken. > because qemu-io -c abort may generate core dumps > even with ulimit -c 0 (and the output then contains "(core du

Re: [Qemu-devel] [PATCH 0/3] iotests: Fix test 039

2014-11-25 Thread Max Reitz
On 2014-11-25 at 13:21, Markus Armbruster wrote: Max Reitz writes: Test 039 used to fail I'm confused: "used to" suggests it doesn't anymore, but you sending a patches strongly suggests something's broken. Well, it used to fail before this series. :-P You're right, this sounds bad. Current

[Qemu-devel] [RFC PATCH v1 2/2] x86: Update VT-d Posted-Interrupts related information

2014-11-25 Thread Feng Wu
VT-d Posted-Interrupts(PI) is an enhancement to CPU side Posted-Interrupt. With VT-d Posted-Interrupts enabled, external interrupts from direct-assigned devices can be delivered to guests without VMM involvement when guest is running in non-root mode. If VT-d PI is supported by KVM, we need to upd

[Qemu-devel] [RFC PATCH v1 1/2] linux-headers: Update KVM headers

2014-11-25 Thread Feng Wu
Sync-up KVM related Linux headers from KVM tree using scripts/update-linux-header.sh New VFIO attribute and data structure for VT-d Posted-Interrupts. Signed-off-by: Feng Wu --- linux-headers/linux/kvm.h | 10 ++ 1 files changed, 10 insertions(+), 0 deletions(-) diff --git a/linux-he

[Qemu-devel] [RFC PATCH v1 0/2] VFIO: add VT-d Posted-Interrupts support

2014-11-25 Thread Feng Wu
VT-d Posted-Interrupts is an enhancement to CPU side Posted-Interrupt. With VT-d Posted-Interrupts enabled, external interrupts from direct-assigned devices can be delivered to guests without VMM intervention when guest is running in non-root mode. You can find the VT-d Posted-Interrtups Spec. in

Re: [Qemu-devel] [PATCH 1/3] s390: Add PCI bus support

2014-11-25 Thread Frank Blaschka
On Tue, Nov 25, 2014 at 01:14:01PM +0100, Alexander Graf wrote: > > > On 25.11.14 11:11, Frank Blaschka wrote: > > On Tue, Nov 18, 2014 at 06:00:40PM +0100, Alexander Graf wrote: > >> > >> > >> On 18.11.14 13:50, Frank Blaschka wrote: > >>> On Mon, Nov 10, 2014 at 04:14:16PM +0100, Alexander Graf

Re: [Qemu-devel] [PATCH v2 0/6] Geometry and blocksize support for backing devices

2014-11-25 Thread Stefan Hajnoczi
On Wed, Nov 19, 2014 at 11:17:50AM +0100, Ekaterina Tumanova wrote: > Hi folks, > > I'm sorry for the recent spam. I messed up during code submission last time. > So please ignore any previous notes you received from me and answer only to > this thread. > > This is the rework of the geometry+bloc

Re: [Qemu-devel] [PATCH v2] hw/arm/realview.c: Fix memory leak in realview_init()

2014-11-25 Thread Markus Armbruster
Nikita Belov writes: > Variable 'ram_lo' is allocated unconditionally, but used only in some cases. > When it is unused pointer will be lost at function exit, resulting in a > memory leak. Allocate memory for 'ram_lo' only if it is needed. > > Valgrind output: > ==16879== 240 bytes in 1 blocks ar

Re: [Qemu-devel] [PATCH 2/3] iotests: Filter for "Killed" in qemu-io output

2014-11-25 Thread Markus Armbruster
Max Reitz writes: > _filter_qemu_io already filters out the process ID when qemu-io is > aborted; the same should be done if it is aborted. "when it is killed".

Re: [Qemu-devel] [PATCH 2/3] iotests: Filter for "Killed" in qemu-io output

2014-11-25 Thread Max Reitz
On 2014-11-25 at 14:05, Markus Armbruster wrote: Max Reitz writes: _filter_qemu_io already filters out the process ID when qemu-io is aborted; the same should be done if it is aborted. "when it is killed". Oops, right. Max

Re: [Qemu-devel] [PATCH v6 1/3] linux-aio: fix submit aio as a batch

2014-11-25 Thread Stefan Hajnoczi
On Tue, Nov 25, 2014 at 03:23:11PM +0800, Ming Lei wrote: > @@ -296,12 +370,14 @@ void laio_detach_aio_context(void *s_, AioContext > *old_context) > > aio_set_event_notifier(old_context, &s->e, NULL); > qemu_bh_delete(s->completion_bh); > +qemu_bh_delete(s->io_q.abort_bh); > } >

Re: [Qemu-devel] [PATCH v6 3/3] linux-aio: remove 'node' from 'struct qemu_laiocb'

2014-11-25 Thread Stefan Hajnoczi
On Tue, Nov 25, 2014 at 03:23:13PM +0800, Ming Lei wrote: > No one uses the 'node' field any more, so remove it > from 'struct qemu_laiocb', and this can save 16byte > for the struct on 64bit arch. > > Reviewed-by: Paolo Bonzini > Signed-off-by: Ming Lei > --- > block/linux-aio.c |1 - > 1

Re: [Qemu-devel] [PATCH v6 2/3] linux-aio: handling -EAGAIN for !s->io_q.plugged case

2014-11-25 Thread Stefan Hajnoczi
On Tue, Nov 25, 2014 at 03:23:12PM +0800, Ming Lei wrote: > Previously -EAGAIN is simply ignored for !s->io_q.plugged case, > and sometimes it is easy to cause -EIO to VM, such as NVME device. > > This patch handles -EAGAIN by io queue for !s->io_q.plugged case, > and it will be retried in followi

Re: [Qemu-devel] [PATCH 1/3] qemu-io: Let -c abort raise any signal

2014-11-25 Thread Markus Armbruster
Max Reitz writes: > abort() has the sometimes undesirable side-effect of generating a core > dump. If that is not needed, SIGKILL has the same effect of abruptly > crash qemu; without a core dump. > > Therefore, this patch allows to use the qemu-io abort command to raise > any signal. > > Signed-

Re: [Qemu-devel] [PATCH 0/3] iotests: Fix test 039

2014-11-25 Thread Markus Armbruster
Max Reitz writes: > On 2014-11-25 at 13:21, Markus Armbruster wrote: >> Max Reitz writes: >> >>> Test 039 used to fail >> I'm confused: "used to" suggests it doesn't anymore, but you sending a >> patches strongly suggests something's broken. > > Well, it used to fail before this series. :-P > >

Re: [Qemu-devel] [PATCH 0/3] iotests: Fix test 039

2014-11-25 Thread Max Reitz
On 2014-11-25 at 14:20, Markus Armbruster wrote: Max Reitz writes: On 2014-11-25 at 13:21, Markus Armbruster wrote: Max Reitz writes: Test 039 used to fail I'm confused: "used to" suggests it doesn't anymore, but you sending a patches strongly suggests something's broken. Well, it used t

[Qemu-devel] [PATCH RFC v2 00/12] qemu: towards virtio-1 host support

2014-11-25 Thread Cornelia Huck
Hi, here's the next version of my virtio-1 qemu patchset. Using virtio-1 virtio-blk and virtio-net devices with a guest kernel built from <1416829787-14252-1-git-send-email-...@redhat.com> still seems to work for the virtio-ccw transport. Changes from v1: - rebased against current master - don't

[Qemu-devel] [PATCH RFC v2 01/12] linux-headers/virtio_config: Update with VIRTIO_F_VERSION_1

2014-11-25 Thread Cornelia Huck
From: Thomas Huth Add the new VIRTIO_F_VERSION_1 definition to the virtio_config.h linux header. Signed-off-by: Thomas Huth Signed-off-by: Cornelia Huck --- linux-headers/linux/virtio_config.h |3 +++ 1 file changed, 3 insertions(+) diff --git a/linux-headers/linux/virtio_config.h b/lin

[Qemu-devel] [PATCH RFC v2 09/12] s390x/virtio-ccw: add virtio set-revision call

2014-11-25 Thread Cornelia Huck
From: Thomas Huth Handle the virtio-ccw revision according to what the guest sets. When revision 1 is selected, we have a virtio-1 standard device with byteswapping for the virtio rings. When a channel gets disabled, we have to revert to the legacy behavior in case the next user of the device do

[Qemu-devel] [PATCH RFC v2 12/12] s390x/virtio-ccw: enable virtio 1.0

2014-11-25 Thread Cornelia Huck
virtio-ccw should now have everything in place to operate virtio 1.0 devices, so let's enable revision 1. Signed-off-by: Cornelia Huck --- hw/s390x/virtio-ccw.h |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/s390x/virtio-ccw.h b/hw/s390x/virtio-ccw.h index 03d5955..08e

[Qemu-devel] [PATCH RFC v2 04/12] s390x/virtio-ccw: fix check for WRITE_FEAT

2014-11-25 Thread Cornelia Huck
We need to check guest feature size, not host feature size to find out whether we should call virtio_set_features(). This check is possible now that vdev->guest_features is an array. Reviewed-by: Thomas Huth Signed-off-by: Cornelia Huck --- hw/s390x/virtio-ccw.c |2 +- 1 file changed, 1 ins

[Qemu-devel] [PATCH RFC v2 02/12] virtio: cull virtio_bus_set_vdev_features

2014-11-25 Thread Cornelia Huck
The only user of this function was virtio-ccw, and it should use virtio_set_features() like everybody else: We need to make sure that bad features are masked out properly, which this function did not do. Reviewed-by: Thomas Huth Signed-off-by: Cornelia Huck --- hw/s390x/virtio-ccw.c |

[Qemu-devel] [PATCH RFC v2 03/12] virtio: support more feature bits

2014-11-25 Thread Cornelia Huck
With virtio-1, we support more than 32 feature bits. Let's make vdev->guest_features depend on the number of supported feature bits, allowing us to grow the feature bits automatically. We also need to enhance the internal functions dealing with getting and setting features with an additional index

[Qemu-devel] [PATCH RFC v2 08/12] s390x/css: Add a callback for when subchannel gets disabled

2014-11-25 Thread Cornelia Huck
From: Thomas Huth We need a possibility to run code when a subchannel gets disabled. This patch adds the necessary infrastructure. Signed-off-by: Thomas Huth Signed-off-by: Cornelia Huck --- hw/s390x/css.c | 12 hw/s390x/css.h |1 + 2 files changed, 13 insertions(+) diff -

[Qemu-devel] [PATCH RFC v2 05/12] virtio: introduce legacy virtio devices

2014-11-25 Thread Cornelia Huck
Introduce a helper function to indicate whether a virtio device is operating in legacy or virtio standard mode. It may be used to make decisions about the endianess of virtio accesses and other virtio-1 specific changes, enabling us to support transitional devices. Reviewed-by: Thomas Huth Sign

[Qemu-devel] [PATCH RFC v2 06/12] virtio: allow virtio-1 queue layout

2014-11-25 Thread Cornelia Huck
For virtio-1 devices, we allow a more complex queue layout that doesn't require descriptor table and rings on a physically-contigous memory area: add virtio_queue_set_rings() to allow transports to set this up. Signed-off-by: Cornelia Huck --- hw/virtio/virtio.c | 16

[Qemu-devel] [PATCH RFC v2 11/12] virtio-net/virtio-blk: enable virtio 1.0

2014-11-25 Thread Cornelia Huck
virtio-net (non-vhost) and virtio-blk have everything in place to support virtio 1.0: let's enable the feature bit for them. Note that VIRTIO_F_VERSION_1 is technically a transport feature; once every device is ready for virtio 1.0, we can move this setting this feature bit out of the individual d

[Qemu-devel] [PATCH RFC v2 07/12] dataplane: allow virtio-1 devices

2014-11-25 Thread Cornelia Huck
Handle endianness conversion for virtio-1 virtqueues correctly. Note that dataplane now needs to be built per-target. Signed-off-by: Cornelia Huck --- hw/block/dataplane/virtio-blk.c |3 +- hw/scsi/virtio-scsi-dataplane.c |2 +- hw/virtio/Makefile.objs |2 +- hw/

[Qemu-devel] [PATCH RFC v2 10/12] s390x/virtio-ccw: support virtio-1 set_vq format

2014-11-25 Thread Cornelia Huck
Support the new CCW_CMD_SET_VQ format for virtio-1 devices. While we're at it, refactor the code a bit and enforce big endian fields (which had always been required, even for legacy). Reviewed-by: Thomas Huth Signed-off-by: Cornelia Huck --- hw/s390x/virtio-ccw.c | 114 +++

Re: [Qemu-devel] [PATCH 1/3] qemu-io: Let -c abort raise any signal

2014-11-25 Thread Max Reitz
On 2014-11-25 at 14:19, Markus Armbruster wrote: Max Reitz writes: abort() has the sometimes undesirable side-effect of generating a core dump. If that is not needed, SIGKILL has the same effect of abruptly crash qemu; without a core dump. Therefore, this patch allows to use the qemu-io abort

Re: [Qemu-devel] [PATCH v2 00/12] qcow2: Add new overlap check functions

2014-11-25 Thread Stefan Hajnoczi
On Mon, Nov 24, 2014 at 04:56:48PM +0100, Max Reitz wrote: > * CPU usage at runtime decreased by 150 to 275 percent on > overlap-check-heavy tasks > * No additional performance problems at loading time (in theory has the > same runtime complexity as a single overlap check right now; in > prac

Re: [Qemu-devel] [PATCH for-2.3 3/5] poll: Add epoll implementation for qemu_poll

2014-11-25 Thread Stefan Hajnoczi
On Tue, Nov 25, 2014 at 04:07:57PM +0800, Fam Zheng wrote: > +QEMUPoll *qemu_poll_new(void) > +{ > +int epollfd; > +QEMUPoll *qpoll = g_new0(QEMUPoll, 1); > +epollfd = epoll_create1(EPOLL_CLOEXEC); > +if (epollfd < 0) { > +perror("epoll_create1:"); > +abort(); > +

Re: [Qemu-devel] [PATCH 0/3] iotests: Fix test 039

2014-11-25 Thread Markus Armbruster
Max Reitz writes: > On 2014-11-25 at 14:20, Markus Armbruster wrote: >> Max Reitz writes: >> >>> On 2014-11-25 at 13:21, Markus Armbruster wrote: Max Reitz writes: > Test 039 used to fail I'm confused: "used to" suggests it doesn't anymore, but you sending a patches stro

Re: [Qemu-devel] [PATCH 0/3] iotests: Fix test 039

2014-11-25 Thread Max Reitz
On 2014-11-25 at 14:48, Markus Armbruster wrote: Max Reitz writes: On 2014-11-25 at 14:20, Markus Armbruster wrote: Max Reitz writes: On 2014-11-25 at 13:21, Markus Armbruster wrote: Max Reitz writes: Test 039 used to fail I'm confused: "used to" suggests it doesn't anymore, but you s

Re: [Qemu-devel] [Xen-devel] [v2 1/4] Qemu-Xen-vTPM: Support for Xen stubdom vTPM command line options

2014-11-25 Thread Xu, Quan
> -Original Message- > From: xen-devel-boun...@lists.xen.org > [mailto:xen-devel-boun...@lists.xen.org] On Behalf Of Eric Blake > Sent: Tuesday, November 25, 2014 1:31 AM > To: Xu, Quan; qemu-devel@nongnu.org > Cc: xen-de...@lists.xen.org; arm...@redhat.com; lcapitul...@redhat.com > Subje

Re: [Qemu-devel] [v2 1/4] Qemu-Xen-vTPM: Support for Xen stubdom vTPM command line options

2014-11-25 Thread Xu, Quan
> -Original Message- > From: Eric Blake [mailto:ebl...@redhat.com] > Sent: Tuesday, November 25, 2014 1:19 AM > To: Xu, Quan; qemu-devel@nongnu.org > Cc: xen-de...@lists.xen.org; lcapitul...@redhat.com; arm...@redhat.com > Subject: Re: [v2 1/4] Qemu-Xen-vTPM: Support for Xen stubdom vTPM

Re: [Qemu-devel] [PATCH for-2.3 0/5] aio: Support epoll by introducing qemu_poll abstraction

2014-11-25 Thread Stefan Hajnoczi
On Tue, Nov 25, 2014 at 04:07:54PM +0800, Fam Zheng wrote: > ppoll(2) doesn't scale as well as epoll: The elapsed time of the syscall is > linear to the number of fd's we poll, which hurts performance a bit when the > number of devices are many, or when a virtio device registers many virtqueues > (

Re: [Qemu-devel] [Xen-devel] virtio leaks cpu mappings, was: qemu crash with virtio on Xen domUs (backtrace included)

2014-11-25 Thread Stefano Stabellini
On Tue, 25 Nov 2014, Jason Wang wrote: > On 11/25/2014 02:44 AM, Stefano Stabellini wrote: > > On Mon, 24 Nov 2014, Stefano Stabellini wrote: > >> On Mon, 24 Nov 2014, Stefano Stabellini wrote: > >>> CC'ing Paolo. > >>> > >>> > >>> Wen, > >>> thanks for the logs. > >>> > >>> I investigated a little

[Qemu-devel] [PATCH v2 for-2.2] input: move input-send-event into experimental namespace

2014-11-25 Thread Markus Armbruster
From: Gerd Hoffmann Ongoing discussions on how we are going to specify the console, so tag the command as experiental so we can refine things in the 2.3 development cycle. Signed-off-by: Gerd Hoffmann [Spell out "not a stable API", and x- the QAPI schema, too] Signed-off-by: Markus Armbruster

Re: [Qemu-devel] [PATCH] input: move input-send-event into experimental namespace

2014-11-25 Thread Markus Armbruster
Markus Armbruster writes: > Amos Kong writes: > >> On Tue, Nov 25, 2014 at 09:06:34AM +0100, Markus Armbruster wrote: >>> Gerd Hoffmann writes: >>> >>> > Ongoing discussions on how we are going to specify the console, >>> > so tag the command as experiemntal so we can refine things in >>> > th

Re: [Qemu-devel] [PATCH for-2.3 0/5] aio: Support epoll by introducing qemu_poll abstraction

2014-11-25 Thread Paolo Bonzini
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 25/11/2014 14:52, Stefan Hajnoczi wrote: > Do you think it is okay to forget about <1 ms timeout precision? > > If we go ahead with this, we'll need to rethink other timeouts in > QEMU. For example, is there a point in setting timer slack to 1 n

Re: [Qemu-devel] [PATCH 0/3] iotests: Fix test 039

2014-11-25 Thread Markus Armbruster
Max Reitz writes: > On 2014-11-25 at 14:48, Markus Armbruster wrote: >> Max Reitz writes: >> >>> On 2014-11-25 at 14:20, Markus Armbruster wrote: Max Reitz writes: > On 2014-11-25 at 13:21, Markus Armbruster wrote: >> Max Reitz writes: >> >>> Test 039 used to fail >>>

[Qemu-devel] [Regression] hmp: QEMU crash on device_del auto-completion

2014-11-25 Thread Marcel Apfelbaum
Hi, The commits: - 6a1fa9f5 (monitor: add del completion for peripheral device) - 66e56b13 (qdev: add qdev_build_hotpluggable_device_list helper) cause a QEMU crash when trying to use HMP device_del auto-completion. It can be easily reproduced by: -enable-kvm ~/images/fedora.qcow2 -monitor s

[Qemu-devel] [PATCH 02/12] block/vvfat: qcow driver may not be found

2014-11-25 Thread Max Reitz
Although virtually impossible right now, bdrv_find_format("qcow") may fail. The vvfat block driver should mind that case. Cc: qemu-sta...@nongnu.org Signed-off-by: Max Reitz --- block/vvfat.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/block/vvfat.c b/block/vvfat.c index cefe3a4..e

[Qemu-devel] [PATCH 03/12] block/nfs: Add create_opts

2014-11-25 Thread Max Reitz
The nfs protocol driver is capable of creating images, but did not specify any creation options. Fix it. Cc: qemu-sta...@nongnu.org Signed-off-by: Max Reitz --- block/nfs.c | 15 +++ 1 file changed, 15 insertions(+) diff --git a/block/nfs.c b/block/nfs.c index c76e368..ca9e24e 10064

[Qemu-devel] [PATCH 05/12] qemu-img: Check create_opts before image creation

2014-11-25 Thread Max Reitz
If a driver supports image creation, it needs to set the .create_opts field. We can use that to make sure .create_opts for both drivers involved is not NULL for the target image in qemu-img convert, which is important so that the create_opts pointer in img_convert() is not NULL after the qemu_opts_

[Qemu-devel] [PATCH 08/12] iotests: Add test for unsupported image creation

2014-11-25 Thread Max Reitz
Add a test for creating and amending images (amendment uses the creation options) with formats not supporting creation over protocols not supporting creation. Cc: qemu-sta...@nongnu.org Signed-off-by: Max Reitz --- tests/qemu-iotests/113 | 76 ++ t

[Qemu-devel] [PATCH 01/12] block: qcow2 driver may not be found

2014-11-25 Thread Max Reitz
Albeit absolutely impossible right now, bdrv_find_format("qcow2") may fail. bdrv_append_temp_snapshot() should heed that case. Cc: qemu-sta...@nongnu.org Signed-off-by: Max Reitz --- block.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/block.c b/block.c index 866c8b4..b31fb67 100644

[Qemu-devel] [PATCH 04/12] block: Check create_opts before image creation

2014-11-25 Thread Max Reitz
If a driver supports image creation, it needs to set the .create_opts field. We can use that to make sure .create_opts for both drivers involved is not NULL in bdrv_img_create(), which is important so that the create_opts pointer in that function is not NULL after the qemu_opts_append() calls and w

[Qemu-devel] [PATCH 10/12] qcow2: Flushing the caches in qcow2_close may fail

2014-11-25 Thread Max Reitz
qcow2_cache_flush() may fail; if one of the caches failed to be flushed successfully to disk in qcow2_close() the image should not be marked clean, and we should emit a warning. Cc: qemu-sta...@nongnu.org Signed-off-by: Max Reitz --- block/qcow2.c | 19 --- 1 file changed, 16 ins

[Qemu-devel] [PATCH 06/12] qemu-img: Check create_opts before image amendment

2014-11-25 Thread Max Reitz
The image options which can be amended are described by the .create_opts field for every driver. This field must therefore be non-NULL so that anything can be amended in the first place. Check that this holds true before going into qemu_opts_create() (because if .create_opts is NULL, the create_opt

[Qemu-devel] [PATCH 00/12] block: Various Coverity-spotted fixes

2014-11-25 Thread Max Reitz
This series fixes various issues spotted by Coverity. None of these is critical; most are just "If you do something crazy, qemu-img crashes" or "But what if there is no qcow2 driver?". Therefore, while these are bug fixes, it is a bit late to try to push them into 2.2.0. I am therefore tempted to v

[Qemu-devel] [PATCH 09/12] qcow2: Prevent numerical overflow

2014-11-25 Thread Max Reitz
In qcow2_alloc_cluster_offset(), *num is limited to INT_MAX >> BDRV_SECTOR_BITS by all callers. However, since remaining is of type uint64_t, we might as well cast *num to that type before performing the shift. Cc: qemu-sta...@nongnu.org Signed-off-by: Max Reitz --- block/qcow2-cluster.c | 2 +-

[Qemu-devel] [PATCH 12/12] block/raw-posix: Fix ret in raw_open_common()

2014-11-25 Thread Max Reitz
The return value must be negative on error; there is one place in raw_open_common() where errp is set, but ret remains 0. Fix it. Cc: qemu-sta...@nongnu.org Signed-off-by: Max Reitz --- block/raw-posix.c | 1 + 1 file changed, 1 insertion(+) diff --git a/block/raw-posix.c b/block/raw-posix.c in

Re: [Qemu-devel] [Regression] hmp: QEMU crash on device_del auto-completion

2014-11-25 Thread Luiz Capitulino
On Tue, 25 Nov 2014 16:04:19 +0200 Marcel Apfelbaum wrote: > Hi, > > The commits: > - 6a1fa9f5 (monitor: add del completion for peripheral device) > - 66e56b13 (qdev: add qdev_build_hotpluggable_device_list helper) > > cause a QEMU crash when trying to use HMP device_del auto-completion. > I

[Qemu-devel] [PATCH 07/12] iotests: Only kill NBD server if it runs

2014-11-25 Thread Max Reitz
There may be NBD tests which do not create a sample image and simply test whether wrong usage of the protocol is rejected as expected. In this case, there will be no NBD server and trying to kill it during clean-up will fail. Cc: qemu-sta...@nongnu.org Signed-off-by: Max Reitz --- tests/qemu-iot

[Qemu-devel] [PATCH 11/12] qcow2: Respect bdrv_truncate() error

2014-11-25 Thread Max Reitz
bdrv_truncate() may fail and qcow2_write_compressed() should return the error code in that case. Cc: qemu-sta...@nongnu.org Signed-off-by: Max Reitz --- block/qcow2.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/block/qcow2.c b/block/qcow2.c index 2bd2a53..691f363 100644

Re: [Qemu-devel] [PATCH v2 for-2.2] input: move input-send-event into experimental namespace

2014-11-25 Thread Luiz Capitulino
On Tue, 25 Nov 2014 14:54:17 +0100 Markus Armbruster wrote: > From: Gerd Hoffmann > > Ongoing discussions on how we are going to specify the console, > so tag the command as experiental so we can refine things in > the 2.3 development cycle. > > Signed-off-by: Gerd Hoffmann > [Spell out "not

  1   2   3   >