Re: [Qemu-devel] how to convert guest virtual address to host virtual address in QEMU?

2011-03-09 Thread Gunasekaran Dharman
Hi Stefan Thanks for your valuable suggestion. I will try the custom memcpy instruction. I have a question regarding virtual machine's CPU frequency. Compared to real processor how QEMU is emulating the processor speed? Can we configure the virtual machine's CPU frequency? If yes, what are the li

[Qemu-devel] Re: [PATCH (resend, rebased)] char: Prevent multiple devices opening same chardev

2011-03-09 Thread Amit Shah
On (Mon) 28 Feb 2011 [14:06:57], Amit Shah wrote: > Prevent: > > -chardev socket,path=/tmp/foo,server,nowait,id=c0 \ > -device virtserialport,chardev=c0,id=vs0 \ > -device virtserialport,chardev=c0,id=vs1 > > Reported-by: Mike Cao > Signed-off-by: Amit Shah Ping? > --- > hw/qdev-properties.c

[Qemu-devel] [PULL (resend, rebase) 5/5] virtio-serial: Don't clear ->have_data() pointer after unplug

2011-03-09 Thread Amit Shah
After a port unplug operation, the port->info->have_data() pointer was set to NULL. The problem is, the ->info struct is shared by all ports, effectively disabling writes to other ports. Reported-by: juzhang Signed-off-by: Amit Shah --- hw/virtio-console.c |1 - 1 files changed, 0 insertio

[Qemu-devel] [PULL (resend, rebase) 2/5] virtio-serial: Disallow generic ports at id 0

2011-03-09 Thread Amit Shah
Port 0 is reserved for virtconsole devices for backward compatibility with the old -virtioconsole (from qemu 0.12) device type. libvirt prior to commit 8e28c5d40200b4c5d483bd585d237b9d870372e5 used port 0 for generic ports. libvirt will no longer do that, but disallow instantiating generic ports

[Qemu-devel] [PULL (resend, rebase) 3/5] virtio-serial: Enable ioeventfd

2011-03-09 Thread Amit Shah
Enable ioeventfd for virtio-serial devices by default. Commit 25db9ebe15125deb32958c6df74996f745edf1f9 lists the benefits of using ioeventfd. Copying a file from guest to host over a virtio-serial channel didn't show much difference in time or io_exit rate. Signed-off-by: Amit Shah --- hw/virt

[Qemu-devel] [PULL (resend, rebase) 4/5] virtio-serial-bus: Simplify handle_output() function

2011-03-09 Thread Amit Shah
There's no code change, just re-arrangement to simplify the function after recent modifications. Reported-by: Juan Quintela Signed-off-by: Amit Shah --- hw/virtio-serial-bus.c | 12 +++- 1 files changed, 3 insertions(+), 9 deletions(-) diff --git a/hw/virtio-serial-bus.c b/hw/virtio-

[Qemu-devel] [PULL (resend, rebase) 0/5] virtio-serial fixes

2011-03-09 Thread Amit Shah
The following changes since commit 07bf23a77131668ef8db37e08d508b117655ce86: MAINTAINERS: add LatticeMico32 maintainer (2011-03-07 13:42:58 +0100) are available in the git repository at: git://git.kernel.org/pub/scm/virt/qemu/amit/virtio-serial.git for-anthony Amit Shah (5): virtio-serial:

[Qemu-devel] [PULL (resend, rebase) 1/5] virtio-serial: Use a struct to pass config information from proxy

2011-03-09 Thread Amit Shah
Instead of using a single variable to pass to the virtio_serial_init function, use a struct so that expanding the number of variables to be passed on later is easier. Signed-off-by: Amit Shah --- hw/virtio-pci.c| 12 ++-- hw/virtio-serial-bus.c | 16 hw/virti

Re: [Qemu-devel] [PATCH] `qdev_free` when unplug a pci device

2011-03-09 Thread Wen Congyang
At 03/10/2011 12:31 PM, Ryan Harper Write: > * Wen Congyang [2011-03-09 01:21]: >> At 03/09/2011 02:12 PM, Ryan Harper Write: >>> * Wen Congyang [2011-03-08 23:09]: At 03/09/2011 12:08 PM, Ryan Harper Write: > * Wen Congyang [2011-02-27 20:56]: >> Hi Markus Armbruster >> >>

[Qemu-devel] RFC: emulation of system flash

2011-03-09 Thread Jordan Justen
Hi all, I have documented a simple flash-like device which I think could be useful for qemu/kvm in some cases. (Particularly for allowing persistent UEFI non-volatile variables.) http://wiki.qemu.org/Features/System_Flash Let me know if you have any suggestions or concerns. Thanks for your tim

[Qemu-devel] Re: [PATCH 20/58] vmstate: port pxa2xx_pic

2011-03-09 Thread andrzej zaborowski
On 9 March 2011 12:42, Juan Quintela wrote: > andrzej zaborowski wrote: >> I pushed an earlier patch from Dmitry Eremin-Solenikov that converted >> this device, so this patch can be skipped.  Unfortunately some of your >> other patches may need rebasing now. > > Remove from my tree.  Please take

Re: [Qemu-devel] [PATCH 1/2][RESEND] vl: initialize all displaystates

2011-03-09 Thread andrzej zaborowski
On 4 March 2011 01:48, Dmitry Eremin-Solenikov wrote: > Init not only first displaystate, but all. Otherwise machines with > multiple display devices (e.g. tosa, as it exists now) will just > segfault on ds switch. > > Signed-off-by: Dmitry Eremin-Solenikov > --- >  vl.c |  104 > +++

[Qemu-devel] qemu 0.14.0 realview-pbx PCI support

2011-03-09 Thread asim khan
Hi, Iam working on qemu 0.14.0.I have to support usb for realview-pbx. I still see *(!is_pb)* if (!is_pb) { dev = sysbus_create_varargs("realview_pci", 0x9004,/*0x6000*/ pic[48], pic[49], pic[50], pic[51], NULL); pci_bus = (PCIBus *)qd

Re: [Qemu-devel] [PATCH 1/2] pxa2xx_timer: separate irq for pxa27x handling

2011-03-09 Thread andrzej zaborowski
On 4 March 2011 01:40, Dmitry Eremin-Solenikov wrote: > First, sysbus_init_irq shan't be called on on-stack variables. Indeed, > it only stores a passed pointer in qdev and the stored irq is later > populated, so we get a nice write-to-stack bug. > Second, irq for pxa27x should probably be handled

[Qemu-devel] qemu 0.14.0 realview pbx usb support

2011-03-09 Thread asim khan
Hi, Iam working on qemu 0.14.0.I have to support usb for realview-pbx.so can any one suggest that usb support for reaview pbx is already there in qemu 0.14.0??? if not plz let me know what I need to do for its support. --Thanx AK

Re: [Qemu-devel] [PATCH] `qdev_free` when unplug a pci device

2011-03-09 Thread Ryan Harper
* Wen Congyang [2011-03-09 01:21]: > At 03/09/2011 02:12 PM, Ryan Harper Write: > > * Wen Congyang [2011-03-08 23:09]: > >> At 03/09/2011 12:08 PM, Ryan Harper Write: > >>> * Wen Congyang [2011-02-27 20:56]: > Hi Markus Armbruster > > At 02/23/2011 04:30 PM, Markus Armbruster Writ

Re: [Qemu-devel] Issue with snapshot outside qcow2 disk - qemu 0.14.0

2011-03-09 Thread SAURAV LAHIRI
Thank you very much Stefan, Based on your suggestion I tried out the following two scenarios. Scenario 1: 1) I executed following with the vm in shutdown state. "#qemu-img snapshot -c snap1 /home/user1/lucid-vm2" 2) Brought the VM Up. 3) Inside the vm create a file. #touch samplefile 4) Shutd

Re: [Qemu-devel] OVMF Google Summer of Code ideas

2011-03-09 Thread Natalia Portillo
Hi, El 09/03/2011, a las 18:44, Jordan Justen escribió: > On Wed, Mar 9, 2011 at 05:43, Natalia Portillo wrote: >> This may come late in the discussion, but, has OVMF been tested with Mac OS >> X? > > No. > > I don't think Apple considers VMs an acceptable usage environment for > OS X. Please

Re: [Qemu-devel] [PATCH] Add qcow2 documentation

2011-03-09 Thread Stefan Hajnoczi
On Wed, Mar 9, 2011 at 6:08 PM, Dushyant Bansal wrote: > On Tuesday 08 March 2011 05:17 PM, Kevin Wolf wrote: >> +    l2_entries = (cluster_size / sizeof(uint64_t)) >> + >> +    l2_index = (offset / cluster_size) % l2_entries >> +    l1_index = (offset / cluster_size) / l2_entries >> + >> +    l2_

Re: [Qemu-devel] Issue with snapshot outside qcow2 disk - qemu 0.14.0

2011-03-09 Thread Stefan Hajnoczi
On Wed, Mar 9, 2011 at 6:06 PM, SAURAV LAHIRI wrote: > Following steps were executed to copy a snapshot outside the original qcow2 > but looks like there is an issue. > > 1. VM(vm1) brought up with a qcow2 image(/home/user1/lucid-vm2). This is a > lucid 10.04 VM. > > 2. Next snapshot created for

Re: [Qemu-devel] OVMF Google Summer of Code ideas

2011-03-09 Thread Jordan Justen
On Wed, Mar 9, 2011 at 05:43, Natalia Portillo wrote: > This may come late in the discussion, but, has OVMF been tested with Mac OS X? No. I don't think Apple considers VMs an acceptable usage environment for OS X. Please correct me if I am mistaken. Thanks, -Jordan

Re: [Qemu-devel] OVMF Google Summer of Code ideas

2011-03-09 Thread Jordan Justen
2011/3/9 Gleb Natapov : > On Tue, Mar 08, 2011 at 09:13:38AM -0800, Jordan Justen wrote: >> Regarding UEFI non-volatile variables on real HW: >> Most systems today have at least 1MB of flash storage located just >> below 4GB.  The entire contents can be modified, which is how firmware >> updates ha

[Qemu-devel] [Bug 732155] Re: system_reset doesn't work with qemu-kvm and latest SeaBIOS

2011-03-09 Thread Matthew Bloch
A bit of bisection on SeaBIOS shows that commit 244caf86f11f5f65d166d91704f64cb673167abc was the first to exhibit this behaviour. Arguably a SeaBIOS bug, but I don't know enough about the reset process to judge. -- You received this bug notification because you are a member of qemu- devel-ml, wh

Re: [Qemu-devel] [PATCH] Add qcow2 documentation

2011-03-09 Thread Dushyant Bansal
On Tuesday 08 March 2011 05:17 PM, Kevin Wolf wrote: This adds a description of the qcow2 file format to the docs/ directory. Besides documenting what's there, which is never wrong, the document should provide a good basis for the discussion of format extensions (called "qcow3" in previous discus

[Qemu-devel] Issue with snapshot outside qcow2 disk - qemu 0.14.0

2011-03-09 Thread SAURAV LAHIRI
Hello, I attempted to create snapshots outside the original qcow2 disk, a feature that is available with 0.14.0, but facing an unexpected behaviour as described below. Any help is greatly appreciated. I am using qemu version 0.14 # qemu --version QEMU emulator version 0.14.0, Copyright (c) 2003

[Qemu-devel] [Bug 732155] [NEW] system_reset doesn't work with qemu-kvm and latest SeaBIOS

2011-03-09 Thread Matthew Bloch
Public bug reported: I've built qemu-kvm and seabios from the latest git sources, and found that the system_reset monitor command causes a freeze if I start qemu- system-x86_64 with the -no-kvm flag. This is a serial log from an attempt at rebooting: $ ./x86_64-softmmu/qemu-system-x86_64 -monito

[Qemu-devel] [V8 PATCH 05/11] virtio-9p: Add support to open a file in chroot environment

2011-03-09 Thread M. Mohan Kumar
This patch adds both chroot worker and qemu side support to open a file/ directory in the chroot environment Signed-off-by: M. Mohan Kumar --- hw/9pfs/virtio-9p-chroot.c | 28 - hw/9pfs/virtio-9p-chroot.h |2 +- hw/9pfs/virtio-9p-local.c | 70

[Qemu-devel] [V8 PATCH 08/11] virtio-9p: Add support for removing file or directory

2011-03-09 Thread M. Mohan Kumar
Support for removing file or directory in chroot environment. Add interfaces to remove file/directory in chroot worker and qemu side. Signed-off-by: M. Mohan Kumar --- hw/9pfs/virtio-9p-chroot-worker.c | 34 ++ hw/9pfs/virtio-9p-chroot.h|1 + hw/9pfs

[Qemu-devel] [PATCH 0/2] avoid races on exec migration

2011-03-09 Thread Paolo Bonzini
QEMU has a sigchld handler that reaps any child process. -smb is the only user of it and, in fact, QEMU inherited it from slirp. However, this handler causes 'exec' based migration to randomly return 'status: failed' in the monitor. This happens when the signal handler for SIGCHLD is ran before

[Qemu-devel] [PATCH 1/2] extract I/O handler lists to iohandler.c

2011-03-09 Thread Paolo Bonzini
Signed-off-by: Paolo Bonzini --- I had this patch queued for a while; only today I noticed the very similar one in virtagent. Makefile.objs |2 +- iohandler.c | 129 + qemu-common.h |3 + vl.c | 106 ++--

[Qemu-devel] [V8 PATCH 09/11] virtio-9p: Add support to rename

2011-03-09 Thread M. Mohan Kumar
Support renaming a file or directory in chroot envirnoment. Add interfaces for renaming in chroot worker and qemu side. Signed-off-by: M. Mohan Kumar --- hw/9pfs/virtio-9p-chroot-worker.c | 17 + hw/9pfs/virtio-9p-chroot.h|1 + hw/9pfs/virtio-9p-local.c |

[Qemu-devel] [V8 PATCH 07/11] virtio-9p: Support for creating special files

2011-03-09 Thread M. Mohan Kumar
Add both chroot worker and qemu side interfaces to create special files (directory, device nodes, links and symbolic links) Signed-off-by: M. Mohan Kumar --- hw/9pfs/virtio-9p-chroot-worker.c | 52 +++ hw/9pfs/virtio-9p-chroot.h|5 +++ hw/9pfs/virtio-9p-loca

Re: [Qemu-devel] [PATCH] block: Flush image after open

2011-03-09 Thread Anthony Liguori
On 03/09/2011 11:27 AM, Christoph Hellwig wrote: On Wed, Mar 09, 2011 at 05:15:53PM +0100, Kevin Wolf wrote: Quoting the bug report: qemu ensures that guest writes and qemu metadata writes hit the disk when necessary to prevent data corruption. However, if an image was in host pa

[Qemu-devel] [V8 PATCH 01/11] Implement qemu_read_full

2011-03-09 Thread M. Mohan Kumar
Add qemu_read_full function Signed-off-by: M. Mohan Kumar --- osdep.c | 32 qemu-common.h |2 ++ 2 files changed, 34 insertions(+), 0 deletions(-) diff --git a/osdep.c b/osdep.c index 327583b..8d84a88 100644 --- a/osdep.c +++ b/osdep.c @@ -127,6 +127

[Qemu-devel] [V8 PATCH 04/11] virtio-9p: Add qemu side interfaces for chroot environment

2011-03-09 Thread M. Mohan Kumar
QEMU side interfaces to communicate with chroot worker process. Signed-off-by: M. Mohan Kumar --- Makefile.objs |2 +- hw/9pfs/virtio-9p-chroot.c | 92 hw/9pfs/virtio-9p-chroot.h |1 + 3 files changed, 94 insertions(+), 1 deleti

[Qemu-devel] [V8 PATCH 06/11] virtio-9p: Create support in chroot environment

2011-03-09 Thread M. Mohan Kumar
Add both chroot worker & qemu side interfaces to create regular files in chroot environment Signed-off-by: M. Mohan Kumar --- hw/9pfs/virtio-9p-chroot-worker.c | 36 hw/9pfs/virtio-9p-chroot.h|1 + hw/9pfs/virtio-9p-local.c |5 +++--

Re: [Qemu-devel] [PATCH] block: Flush image after open

2011-03-09 Thread Christoph Hellwig
On Wed, Mar 09, 2011 at 05:15:53PM +0100, Kevin Wolf wrote: > Quoting the bug report: > > qemu ensures that guest writes and qemu metadata writes hit the disk > when necessary to prevent data corruption. However, if an image was > in host pagecache prior to starting qemu, for example a

[Qemu-devel] [PATCH 2/2] add a service to reap zombies, use it in SLIRP

2011-03-09 Thread Paolo Bonzini
SLIRP -smb support wants to fork a process and forget about reaping it. To please it, add a generic service to register a process id and let QEMU reap it. In the future it could be enhanced to pass a status, but this would be unused. With this in place, the SIGCHLD signal handler would not stomp

[Qemu-devel] [V8 PATCH 11/11] virtio-9p: Chroot environment for other functions

2011-03-09 Thread M. Mohan Kumar
Add chroot functionality for systemcalls that can operate on a file using relative directory file descriptor. Signed-off-by: M. Mohan Kumar --- hw/9pfs/virtio-9p-local.c | 156 - 1 files changed, 139 insertions(+), 17 deletions(-) diff --git a/hw/9pf

[Qemu-devel] [V8 PATCH 02/11] virtio-9p: Enable CONFIG_THREAD if CONFIG_VIRTFS is enabled

2011-03-09 Thread M. Mohan Kumar
9p Chroot environment needs APIs defined in qemu-thread.c, so enable CONFIG_THREAD if virtfs is enabled Signed-off-by: M. Mohan Kumar --- configure |1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/configure b/configure index 2560357..9eddd38 100755 --- a/configure +++ b/c

[Qemu-devel] [V8 PATCH 10/11] virtio-9p: Move file post creation changes to none security model

2011-03-09 Thread M. Mohan Kumar
After creating a file object, its permission and ownership details are updated as per 9p client's request for both passthrough and none security model. But with chrooted environment its not required for passthrough security model. Move all post file creation changes to none security model. Signed-

[Qemu-devel] [V8 PATCH 03/11] virtio-9p: Provide chroot worker side interfaces

2011-03-09 Thread M. Mohan Kumar
Implement chroot worker side interfaces like sending the file descriptor to qemu process, reading the object request from socket etc. Also add chroot main function and other helper routines. Signed-off-by: M. Mohan Kumar --- Makefile.objs |1 + hw/9pfs/virtio-9p-chroot-wo

[Qemu-devel] [V8 PATCH 00/11] virtio-9p: Use chroot to safely access files in passthrough security model

2011-03-09 Thread M. Mohan Kumar
In passthrough security model, following symbolic links in the server side could result in TOCTTOU vulnerabilities. This patchset resolves this issue by creating a dedicated process which chroots into the share path and all file object access is done in the chroot environment. This patchset imple

Re: [Qemu-devel] [PATCH] QMP: add snapshot_blkdev_sync command

2011-03-09 Thread Anthony Liguori
On 03/09/2011 10:01 AM, Kevin Wolf wrote: Am 09.03.2011 16:46, schrieb Anthony Liguori: On 03/09/2011 09:37 AM, jes.soren...@redhat.com wrote: From: Jes Sorensen Add QMP bits for snapshot_blkdev_sync command. This is the same as snapshot_blkdev in the human monitor, but added _sync to the name

[Qemu-devel] [PATCH] block: Flush image after open

2011-03-09 Thread Kevin Wolf
Quoting the bug report: qemu ensures that guest writes and qemu metadata writes hit the disk when necessary to prevent data corruption. However, if an image was in host pagecache prior to starting qemu, for example after running qemu-img convert, then nothing prevents writes from r

Re: [Qemu-devel] [PATCH] QMP: add snapshot_blkdev_sync command

2011-03-09 Thread Kevin Wolf
Am 09.03.2011 16:46, schrieb Anthony Liguori: > On 03/09/2011 09:37 AM, jes.soren...@redhat.com wrote: >> From: Jes Sorensen >> >> Add QMP bits for snapshot_blkdev_sync command. This is the same as >> snapshot_blkdev in the human monitor, but added _sync to the name to >> make it explicit that the

[Qemu-devel] [PATCH] hmp-commands.hx: fix badly merged client_migrate_info command

2011-03-09 Thread Jes . Sorensen
From: Jes Sorensen client_migrate_info was merged badly, placing it between the command and the documentation for another command. In addition it did not respect the general rule of hmp-commands.hx, of having command definition before the documentation. Signed-off-by: Jes Sorensen --- hmp-comm

Re: [Qemu-devel] [PATCH]hw/xen_disk: aio_inflight not released in handling ioreq when nr_segments==0

2011-03-09 Thread Kevin Wolf
Am 09.03.2011 14:19, schrieb Feiran Zheng: > In hw/xen_disk.c, async writing ioreq is leaked when > ioreq->req.nr_segments==0, because `aio_inflight` flag is not released > properly (skipped by misplaced "break"). > > Signed-off-by: Feiran Zheng Thanks, applied to the block branch. Kevin

Re: [Qemu-devel] [PATCH] QMP: add snapshot_blkdev_sync command

2011-03-09 Thread Anthony Liguori
On 03/09/2011 09:37 AM, jes.soren...@redhat.com wrote: From: Jes Sorensen Add QMP bits for snapshot_blkdev_sync command. This is the same as snapshot_blkdev in the human monitor, but added _sync to the name to make it explicit that the command is synchronous and leave space for a future async ve

[Qemu-devel] Re: [RFC][PATCH v7 01/16] Move code related to fd handlers into utility functions

2011-03-09 Thread Anthony Liguori
On 03/09/2011 08:45 AM, Paolo Bonzini wrote: On 03/09/2011 03:40 PM, Anthony Liguori wrote: I must say I really dislike the patches 1..3. It's _really_ getting the QEMU NIH worse. While it is not really possible to get a new shiny mainloop infrastructure in QEMU like snapping fingers (and I'm

[Qemu-devel] [PATCH] QMP: add snapshot_blkdev_sync command

2011-03-09 Thread Jes . Sorensen
From: Jes Sorensen Add QMP bits for snapshot_blkdev_sync command. This is the same as snapshot_blkdev in the human monitor, but added _sync to the name to make it explicit that the command is synchronous and leave space for a future async version. Signed-off-by: Jes Sorensen --- qmp-commands.h

[Qemu-devel] Re: [RFC][PATCH v7 01/16] Move code related to fd handlers into utility functions

2011-03-09 Thread Paolo Bonzini
On 03/09/2011 04:01 PM, Michael Roth wrote: These objs: virtagent.o virtagent-server.o virtagent-common.o virtagent-transport.o virtagent-manager.o Are shared by qemu and qemu-va. Okay, that's what I missed. Then I guess it's a pity but there's a good reason. It seems like a more general o

[Qemu-devel] Re: [RFC][PATCH v7 01/16] Move code related to fd handlers into utility functions

2011-03-09 Thread Michael Roth
On 03/09/2011 08:38 AM, Paolo Bonzini wrote: On 03/09/2011 03:11 PM, Michael Roth wrote: In the context of virtagent I would agree. The only complication there being that a large part of the event-driven code (the async read/write handlers for instance) is shared between virtagent and the host.

Re: [Qemu-devel] Re: [PATCH]hw/xen_disk: aio_inflight not released in handling ioreq when nr_segments==0

2011-03-09 Thread Stefan Hajnoczi
On Wed, Mar 9, 2011 at 2:42 PM, Stefano Stabellini wrote: > On Wed, 9 Mar 2011, Feiran Zheng wrote: >> In hw/xen_disk.c, async writing ioreq is leaked when >> ioreq->req.nr_segments==0, because `aio_inflight` flag is not released >> properly (skipped by misplaced "break"). >> >> Signed-off-by: Fei

[Qemu-devel] Re: [RFC][PATCH v7 01/16] Move code related to fd handlers into utility functions

2011-03-09 Thread Paolo Bonzini
On 03/09/2011 03:40 PM, Anthony Liguori wrote: I must say I really dislike the patches 1..3. It's _really_ getting the QEMU NIH worse. While it is not really possible to get a new shiny mainloop infrastructure in QEMU like snapping fingers (and I'm not sure the glib mainloop will ever happen t

Re: [Qemu-devel] [PATCH 14/22] qapi: add query-version QMP command

2011-03-09 Thread Anthony Liguori
On 03/09/2011 08:37 AM, Avi Kivity wrote: On 03/09/2011 04:11 PM, Anthony Liguori wrote: (just picking on a patch that has a bit of schema in it) If you want to see more of the schema in action http://repo.or.cz/w/qemu/aliguori.git/blob/refs/heads/glib:/qmp-schema.json Thanks. Something a

[Qemu-devel] Re: [PATCH]hw/xen_disk: aio_inflight not released in handling ioreq when nr_segments==0

2011-03-09 Thread Stefano Stabellini
On Wed, 9 Mar 2011, Feiran Zheng wrote: > In hw/xen_disk.c, async writing ioreq is leaked when > ioreq->req.nr_segments==0, because `aio_inflight` flag is not released > properly (skipped by misplaced "break"). > > Signed-off-by: Feiran Zheng Acked-by: Stefano Stabellini

[Qemu-devel] Re: [RFC][PATCH v7 01/16] Move code related to fd handlers into utility functions

2011-03-09 Thread Anthony Liguori
On 03/09/2011 07:58 AM, Paolo Bonzini wrote: On 03/07/2011 09:10 PM, Michael Roth wrote: This allows us to implement an i/o loop outside of vl.c that can interact with objects that use qemu_set_fd_handler() I must say I really dislike the patches 1..3. It's _really_ getting the QEMU NIH wors

[Qemu-devel] Re: [RFC][PATCH v7 01/16] Move code related to fd handlers into utility functions

2011-03-09 Thread Paolo Bonzini
On 03/09/2011 03:11 PM, Michael Roth wrote: In the context of virtagent I would agree. The only complication there being that a large part of the event-driven code (the async read/write handlers for instance) is shared between virtagent and the host. What exactly? The dependencies in 16/16 gi

Re: [Qemu-devel] [PATCH 14/22] qapi: add query-version QMP command

2011-03-09 Thread Avi Kivity
On 03/09/2011 04:11 PM, Anthony Liguori wrote: (just picking on a patch that has a bit of schema in it) If you want to see more of the schema in action http://repo.or.cz/w/qemu/aliguori.git/blob/refs/heads/glib:/qmp-schema.json Thanks. Something a little worrying is the reliance on capital

[Qemu-devel] fdc: refactor device creation causes guest kernel panic

2011-03-09 Thread Stefan Hajnoczi
The following kernel panic occurs when the RHEL6 installer starts on qemu.git/master: BUG: unable to handle kernel NULL pointer dereference at (null) IP: [] floppy_ready+0xfb/0x730 [floppy] For full details see http://pastebin.com/SYE5A6LA. git-bisect revealed that the following commit causes th

Re: [Qemu-devel] Re: [RFC][PATCH v7 01/16] Move code related to fd handlers into utility functions

2011-03-09 Thread Anthony Liguori
On 03/09/2011 07:58 AM, Paolo Bonzini wrote: On 03/07/2011 09:10 PM, Michael Roth wrote: This allows us to implement an i/o loop outside of vl.c that can interact with objects that use qemu_set_fd_handler() I must say I really dislike the patches 1..3. It's _really_ getting the QEMU NIH wors

Re: [Qemu-devel] [PATCH v2] Add qcow2 documentation

2011-03-09 Thread Stefan Hajnoczi
On Wed, Mar 9, 2011 at 1:55 PM, Kevin Wolf wrote: > Am 09.03.2011 14:08, schrieb Stefan Hajnoczi: >> On Wed, Mar 9, 2011 at 12:30 PM, Kevin Wolf wrote: >>> This adds a description of the qcow2 file format to the docs/ directory. >>> Besides documenting what's there, which is never wrong, the docu

Re: [Qemu-devel] [PATCH 19/22] qapi: add QMP put-event command

2011-03-09 Thread Anthony Liguori
On 03/09/2011 07:58 AM, Avi Kivity wrote: On 03/09/2011 03:48 PM, Anthony Liguori wrote: +[ 'put-event', {'tag': 'int'}, {}, 'none' ] Why is tag an int? +## It's a handle so the type doesn't matter as long as I can make sure values are unique. ints are easier to work with because they don'

Re: [Qemu-devel] [PATCH 00/22] QAPI Round 1

2011-03-09 Thread Anthony Liguori
On 03/09/2011 07:55 AM, Avi Kivity wrote: On 03/09/2011 03:51 PM, Anthony Liguori wrote: { execute: 'write-keystore' arguments: { 'key': 'foo', 'value': 'bar' } } This is coming from the guest? Yes. So what about: { 'KeyStore': { '*foo': 'str', '*otherkey': 'str' } } [ 'guest-write-keys

Re: [Qemu-devel] [PATCH 14/22] qapi: add query-version QMP command

2011-03-09 Thread Anthony Liguori
On 03/09/2011 07:36 AM, Avi Kivity wrote: On 03/07/2011 03:22 AM, Anthony Liguori wrote: This is used internally by QMP. It's also a pretty good example of a typical command conversion. +## +{ 'VersionInfo': {'qemu': {'major': 'int', 'minor': 'int', 'micro': 'int'}, + 'pack

Re: [Qemu-devel] [PATCH 14/22] qapi: add query-version QMP command

2011-03-09 Thread Anthony Liguori
On 03/09/2011 07:51 AM, Avi Kivity wrote: On 03/09/2011 03:44 PM, Anthony Liguori wrote: Yeah, it's only loosely JSON as I don't use a JSON parser. Goes kind of against all the buzzwords you're letting fly here... The schema defines arguments in a dictionary because in QMP, the argument or

[Qemu-devel] Re: [RFC][PATCH v7 01/16] Move code related to fd handlers into utility functions

2011-03-09 Thread Michael Roth
On 03/09/2011 07:58 AM, Paolo Bonzini wrote: On 03/07/2011 09:10 PM, Michael Roth wrote: This allows us to implement an i/o loop outside of vl.c that can interact with objects that use qemu_set_fd_handler() I must say I really dislike the patches 1..3. It's _really_ getting the QEMU NIH worse.

[Qemu-devel] Re: [RFC][PATCH v7 01/16] Move code related to fd handlers into utility functions

2011-03-09 Thread Paolo Bonzini
On 03/07/2011 09:10 PM, Michael Roth wrote: + +/* XXX: fd_read_poll should be suppressed, but an API change is + necessary in the character devices to suppress fd_can_read(). */ +int qemu_set_fd_handler3(void *ioh_record_list, + int fd, + IOCanRea

[Qemu-devel] Re: [PATCH v2] vnc: threaded server depends on io-thread

2011-03-09 Thread Corentin Chary
On Wed, Mar 9, 2011 at 1:51 PM, Paolo Bonzini wrote: > On 03/09/2011 02:21 PM, Corentin Chary wrote: >> >> The threaded VNC servers messed up with QEMU fd handlers without >> any kind of locking, and that can cause some nasty race conditions. >> >> The IO-Thread provides appropriate locking primit

Re: [Qemu-devel] [PATCH 19/22] qapi: add QMP put-event command

2011-03-09 Thread Avi Kivity
On 03/09/2011 03:48 PM, Anthony Liguori wrote: +[ 'put-event', {'tag': 'int'}, {}, 'none' ] Why is tag an int? +## It's a handle so the type doesn't matter as long as I can make sure values are unique. ints are easier to work with because they don't require memory allocation. I think it'

[Qemu-devel] Re: [RFC][PATCH v7 01/16] Move code related to fd handlers into utility functions

2011-03-09 Thread Paolo Bonzini
On 03/07/2011 09:10 PM, Michael Roth wrote: This allows us to implement an i/o loop outside of vl.c that can interact with objects that use qemu_set_fd_handler() I must say I really dislike the patches 1..3. It's _really_ getting the QEMU NIH worse. While it is not really possible to get a n

Re: [Qemu-devel] [PATCH 14/22] qapi: add query-version QMP command

2011-03-09 Thread Avi Kivity
On 03/09/2011 03:44 PM, Anthony Liguori wrote: Yeah, it's only loosely JSON as I don't use a JSON parser. Goes kind of against all the buzzwords you're letting fly here... The schema defines arguments in a dictionary because in QMP, the argument order doesn't matter. But the argument order

Re: [Qemu-devel] [PATCH 00/22] QAPI Round 1

2011-03-09 Thread Avi Kivity
On 03/09/2011 03:51 PM, Anthony Liguori wrote: { execute: 'write-keystore' arguments: { 'key': 'foo', 'value': 'bar' } } This is coming from the guest? Yes. So what about: { 'KeyStore': { '*foo': 'str', '*otherkey': 'str' } } [ 'guest-write-keystore', { 'keystore': 'KeyStore' }, 'none' ]

Re: [Qemu-devel] [PATCH v2] Add qcow2 documentation

2011-03-09 Thread Kevin Wolf
Am 09.03.2011 14:08, schrieb Stefan Hajnoczi: > On Wed, Mar 9, 2011 at 12:30 PM, Kevin Wolf wrote: >> This adds a description of the qcow2 file format to the docs/ directory. >> Besides documenting what's there, which is never wrong, the document should >> provide a good basis for the discussion o

Re: [Qemu-devel] [PATCH 00/22] QAPI Round 1

2011-03-09 Thread Michael Roth
On 03/09/2011 07:14 AM, Avi Kivity wrote: On 03/09/2011 03:12 PM, Anthony Liguori wrote: On 03/09/2011 02:51 AM, Avi Kivity wrote: On 03/08/2011 09:19 PM, Anthony Liguori wrote: Both the guest and the management agent (and both can listen for events). I don't see why guest->qemu RPC is problem

[Qemu-devel] Re: [PATCH v2] vnc: threaded server depends on io-thread

2011-03-09 Thread Paolo Bonzini
On 03/09/2011 02:21 PM, Corentin Chary wrote: The threaded VNC servers messed up with QEMU fd handlers without any kind of locking, and that can cause some nasty race conditions. The IO-Thread provides appropriate locking primitives to avoid that. This patch makes CONFIG_VNC_THREAD depends on CO

Re: [Qemu-devel] [PATCH 00/22] QAPI Round 1

2011-03-09 Thread Anthony Liguori
On 03/09/2011 07:14 AM, Avi Kivity wrote: On 03/09/2011 03:12 PM, Anthony Liguori wrote: On 03/09/2011 02:51 AM, Avi Kivity wrote: On 03/08/2011 09:19 PM, Anthony Liguori wrote: Both the guest and the management agent (and both can listen for events). I don't see why guest->qemu RPC is proble

Re: [Qemu-devel] [PATCH 19/22] qapi: add QMP put-event command

2011-03-09 Thread Anthony Liguori
On 03/09/2011 07:31 AM, Avi Kivity wrote: On 03/07/2011 03:23 AM, Anthony Liguori wrote: This is needed for libqmp to support events. put-event is used to disconnect from signals. Signed-off-by: Anthony Liguori diff --git a/qmp-schema.json b/qmp-schema.json index 3f2dd4e..a13885f 100644 ---

Re: [Qemu-devel] OVMF Google Summer of Code ideas

2011-03-09 Thread Natalia Portillo
Hi all, This may come late in the discussion, but, has OVMF been tested with Mac OS X? A decent Intel Macintosh emulation requires of course EFI + HFS. Regards, Natalia Portillo El 09/03/2011, a las 05:34, Jordan Justen escribió: > On Tue, Mar 8, 2011 at 18:23, Kevin O'Connor wrote: >> On Tue

Re: [Qemu-devel] [PATCH 14/22] qapi: add query-version QMP command

2011-03-09 Thread Anthony Liguori
On 03/09/2011 07:28 AM, Avi Kivity wrote: On 03/07/2011 03:41 PM, Anthony Liguori wrote: On 03/07/2011 07:35 AM, Stefan Hajnoczi wrote: On Mon, Mar 7, 2011 at 1:22 AM, Anthony Liguori wrote: diff --git a/qmp-schema.json b/qmp-schema.json index e69de29..b343f5e 100644 --- a/qmp-schema.json +++

[Qemu-devel] Re: [PATCH v2] vnc: threaded server depends on io-thread

2011-03-09 Thread Corentin Chary
On Wed, Mar 9, 2011 at 1:21 PM, Corentin Chary wrote: > The threaded VNC servers messed up with QEMU fd handlers without > any kind of locking, and that can cause some nasty race conditions. > > The IO-Thread provides appropriate locking primitives to avoid that. > This patch makes CONFIG_VNC_THRE

[Qemu-devel] Re: [PATCH 1/3] qemu_next_deadline should not consider host-time timers

2011-03-09 Thread Paolo Bonzini
On 03/05/2011 07:07 PM, Jan Kiszka wrote: On 2011-03-05 18:14, Paolo Bonzini wrote: It is purely for icount-based virtual timers. How about renaming the function to clarify its scope? Will do. Paolo

Re: [Qemu-devel] [PATCH 14/22] qapi: add query-version QMP command

2011-03-09 Thread Avi Kivity
On 03/07/2011 03:22 AM, Anthony Liguori wrote: This is used internally by QMP. It's also a pretty good example of a typical command conversion. +## +{ 'VersionInfo': {'qemu': {'major': 'int', 'minor': 'int', 'micro': 'int'}, + 'package': 'str'} } + +## +# @query-version: +# +#

[Qemu-devel] [PATCH] qmp-commands.hx: Clean up mess of client_migrate_info

2011-03-09 Thread Jes . Sorensen
From: Jes Sorensen client_migrate_info was put into qmp-commands.hx in the middle of migrate_set_speed, between the command and it's description. In addition client_migrate_info put the description before the command itself, which is the wrong order. Signed-off-by: Jes Sorensen --- qmp-command

Re: [Qemu-devel] [PATCH 19/22] qapi: add QMP put-event command

2011-03-09 Thread Avi Kivity
On 03/07/2011 03:23 AM, Anthony Liguori wrote: This is needed for libqmp to support events. put-event is used to disconnect from signals. Signed-off-by: Anthony Liguori diff --git a/qmp-schema.json b/qmp-schema.json index 3f2dd4e..a13885f 100644 --- a/qmp-schema.json +++ b/qmp-schema.json @@ -

Re: [Qemu-devel] [PATCH 14/22] qapi: add query-version QMP command

2011-03-09 Thread Avi Kivity
On 03/07/2011 03:41 PM, Anthony Liguori wrote: On 03/07/2011 07:35 AM, Stefan Hajnoczi wrote: On Mon, Mar 7, 2011 at 1:22 AM, Anthony Liguori wrote: diff --git a/qmp-schema.json b/qmp-schema.json index e69de29..b343f5e 100644 --- a/qmp-schema.json +++ b/qmp-schema.json @@ -0,0 +1,38 @@ +# *-*-

[Qemu-devel] [PATCH]hw/xen_disk: aio_inflight not released in handling ioreq when nr_segments==0

2011-03-09 Thread Feiran Zheng
In hw/xen_disk.c, async writing ioreq is leaked when ioreq->req.nr_segments==0, because `aio_inflight` flag is not released properly (skipped by misplaced "break"). Signed-off-by: Feiran Zheng --- hw/xen_disk.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/hw/xen_disk

[Qemu-devel] [PATCH v2] vnc: threaded server depends on io-thread

2011-03-09 Thread Corentin Chary
The threaded VNC servers messed up with QEMU fd handlers without any kind of locking, and that can cause some nasty race conditions. The IO-Thread provides appropriate locking primitives to avoid that. This patch makes CONFIG_VNC_THREAD depends on CONFIG_IO_THREAD, and add lock and unlock calls ar

Re: [Qemu-devel] Re: [RFC][PATCH v7 05/16] virtagent: common helpers and init routines

2011-03-09 Thread Michael Roth
On 03/09/2011 04:38 AM, Jes Sorensen wrote: On 03/07/11 21:10, Michael Roth wrote: +#define VA_PIDFILE "/var/run/qemu-va.pid" +#define VA_HDR_LEN_MAX 4096 /* http header limit */ +#define VA_CONTENT_LEN_MAX 2*1024*1024 /* rpc/http send limit */ +#define VA_CLIENT_JOBS_MAX 5 /* max client rpcs we

[Qemu-devel] Re: [PATCH v4] Improve error handling in do_snapshot_blkdev()

2011-03-09 Thread Anthony Liguori
On 03/09/2011 04:20 AM, jes.soren...@redhat.com wrote: From: Jes Sorensen In case we cannot open the newly created snapshot image, try to fall back to the original image file and continue running on that, which should prevent the guest from aborting. This is a corner case which can happen if th

Re: [Qemu-devel] [PATCH 00/22] QAPI Round 1

2011-03-09 Thread Avi Kivity
On 03/09/2011 03:12 PM, Anthony Liguori wrote: On 03/09/2011 02:51 AM, Avi Kivity wrote: On 03/08/2011 09:19 PM, Anthony Liguori wrote: Both the guest and the management agent (and both can listen for events). I don't see why guest->qemu RPC is problematic for migration - at least when qemu t

Re: [Qemu-devel] KVM call minutes for Mar 8

2011-03-09 Thread Anthony Liguori
On 03/09/2011 03:25 AM, Kevin Wolf wrote: Am 08.03.2011 16:50, schrieb Chris Wright: QAPI merge plans - should be 100% back compat - qmp moved over - hmp moved over - 1st pass, core infrastructure (includes test framework) - 2nd pass, command conversion - 3rd pass, more controversial bits - adds

Re: [Qemu-devel] [PATCH 00/22] QAPI Round 1

2011-03-09 Thread Anthony Liguori
On 03/09/2011 02:51 AM, Avi Kivity wrote: On 03/08/2011 09:19 PM, Anthony Liguori wrote: Both the guest and the management agent (and both can listen for events). I don't see why guest->qemu RPC is problematic for migration - at least when qemu terminates it. If it's terminated in QEMU, it'

Re: [Qemu-devel] [PATCH V2] qemu, qmp: add keydown and keyup command for qmp

2011-03-09 Thread Anthony Liguori
On 03/09/2011 02:24 AM, Lai Jiangshan wrote: sendkey is a very good command for human using it in their monitor, but it is not a good idea to port it to qmp, because qmp is a machine protocol. So we introduce keydown and keyup command for qmp, they simulate the events that keyboard send to the sy

Re: [Qemu-devel] [PATCH v2] Add qcow2 documentation

2011-03-09 Thread Stefan Hajnoczi
On Wed, Mar 9, 2011 at 12:30 PM, Kevin Wolf wrote: > This adds a description of the qcow2 file format to the docs/ directory. > Besides documenting what's there, which is never wrong, the document should > provide a good basis for the discussion of format extensions (called "qcow3" > in previous d

Re: [Qemu-devel] Re: [RFC][PATCH v7 03/16] Make qemu timers available for tools

2011-03-09 Thread Jes Sorensen
On 03/09/11 14:04, Michael Roth wrote: > On 03/09/2011 04:33 AM, Jes Sorensen wrote: >>> diff --git a/qemu-ioh.c b/qemu-ioh.c >>> index cc71470..5c3f94c 100644 >>> --- a/qemu-ioh.c >>> +++ b/qemu-ioh.c >>> @@ -113,3 +117,94 @@ void qemu_process_fd_handlers2(void >>> *ioh_record_list, const fd_set *

Re: [Qemu-devel] Re: [RFC][PATCH v7 03/16] Make qemu timers available for tools

2011-03-09 Thread Michael Roth
On 03/09/2011 04:33 AM, Jes Sorensen wrote: On 03/07/11 21:10, Michael Roth wrote: To be able to use qemu_mod_timer() and friends to register timeout events for virtagent's qemu-va tool, we need to do the following: Move several blocks of code out of cpus.c that handle initialization of qemu's

[Qemu-devel] Re: [PATCH] vnc: threaded server depends on io-thread

2011-03-09 Thread Peter Lieven
Am 09.03.2011 um 12:42 schrieb Jan Kiszka: > On 2011-03-09 11:41, Corentin Chary wrote: >> The threaded VNC servers messed up with QEMU fd handlers without >> any kind of locking, and that can cause some nasty race conditions. >> >> The IO-Thread provides appropriate locking primitives to avoid

[Qemu-devel] [PATCH v2] Add qcow2 documentation

2011-03-09 Thread Kevin Wolf
This adds a description of the qcow2 file format to the docs/ directory. Besides documenting what's there, which is never wrong, the document should provide a good basis for the discussion of format extensions (called "qcow3" in previous discussions) Signed-off-by: Kevin Wolf --- docs/specs/qcow

  1   2   >