Re: [Qemu-devel] [PATCH V2 18/20] virtio-net: multiqueue support

2013-04-25 Thread Jason Wang
On 04/17/2013 04:42 PM, Aurelien Jarno wrote: On Wed, Apr 17, 2013 at 04:27:13PM +0800, Jason Wang wrote: On 04/17/2013 03:20 PM, Aurelien Jarno wrote: On Tue, Apr 16, 2013 at 11:08:59AM +0800, Jason Wang wrote: On 04/15/2013 04:28 PM, Aurelien Jarno wrote: On Mon, Apr 15, 2013 at 01:29:01PM

[Qemu-devel] [PATCH] virtio-net: count VIRTIO_NET_F_MAC when calculating config_len

2013-04-25 Thread Jason Wang
Commit 14f9b664 (hw/virtio-net.c: set config size using host features) tries to calculate config size based on the host features. But it forgets the VIRTIO_NET_F_MAC were always set for qemu later. This will lead a zero config len for virtio-net device when both VIRTIO_NET_F_STATUS and

Re: [Qemu-devel] [PATCH v2 03/12] savevm: update bdrv_snapshot_find() to find snapshot by id or name and add error parameter

2013-04-25 Thread Wenchao Xia
Finding snapshot by a name which could also be an id isn't best way how to do it. There will be rewrite of savevm, loadvm and delvm to improve the behavior of these commands. The savevm and loadvm will have their own patch series. Now bdrv_snapshot_find takes more parameters. The name

[Qemu-devel] [PATCH] virtio-net: unbreak the minix guest

2013-04-25 Thread Jason Wang
Multiqueue patchset conditionally add control vq only when guest negotiate the feature. Though the spec is not clear on this but it breaks the minix guest since it will identify the ctrl vq even if it does not support it. Though this behavior seems a violation on the spec If the

Re: [Qemu-devel] [PATCH v2 03/12] savevm: update bdrv_snapshot_find() to find snapshot by id or name and add error parameter

2013-04-25 Thread Pavel Hrdina
On 24.4.2013 23:26, Eric Blake wrote: On 04/24/2013 09:32 AM, Pavel Hrdina wrote: Finding snapshot by a name which could also be an id isn't best way how to do it. There will be rewrite of savevm, loadvm and delvm to improve the behavior of these commands. The savevm and loadvm will have their

[Qemu-devel] Git head build problem (popcountl vs. system headers)

2013-04-25 Thread Martin Husemann
I just tried building git HEAD on NetBSD-current and gcc chokes on a prototype mismatch for popcountl: util/hbitmap.c has: static inline int popcountl(unsigned long l) { return BITS_PER_LONG == 32 ? ctpop32(l) : ctpop64(l); } while NetBSD's strings.h uses: unsigned int

Re: [Qemu-devel] [PATCH v2 03/12] savevm: update bdrv_snapshot_find() to find snapshot by id or name and add error parameter

2013-04-25 Thread Pavel Hrdina
On 25.4.2013 08:31, Wenchao Xia wrote: Finding snapshot by a name which could also be an id isn't best way how to do it. There will be rewrite of savevm, loadvm and delvm to improve the behavior of these commands. The savevm and loadvm will have their own patch series. Now bdrv_snapshot_find

Re: [Qemu-devel] Para-Virtualized Clock Usage

2013-04-25 Thread Gleb Natapov
On Thu, Apr 25, 2013 at 12:28:35AM +, Joji Mekkattuparamban (joji) wrote: Thank you Gleb and Marcelo. I will migrate the API using gettimeofday. Is there any dependency on the QEMU or the Guest? If the host supports pvclock and the guest invokes gettimeofday, would the pvclock be

Re: [Qemu-devel] [PATCH] virtio-net: unbreak the minix guest

2013-04-25 Thread Michael S. Tsirkin
On Thu, Apr 25, 2013 at 02:19:53PM +0800, Jason Wang wrote: Multiqueue patchset conditionally add control vq only when guest negotiate the feature. Though the spec is not clear on this but it breaks the minix guest since it will identify the ctrl vq even if it does not support it. Though this

Re: [Qemu-devel] [PATCH v2 04/12] qapi: Convert delvm

2013-04-25 Thread Wenchao Xia
+char buf[256]; I know this fixed-size buffer is just a copy-and-paste from other code that displays snapshot information, but I really hate it. On the other hand, I can tolerate if we have it as an intermediate step between two series that both land in the same release. If your

Re: [Qemu-devel] [PATCH] virtio-net: count VIRTIO_NET_F_MAC when calculating config_len

2013-04-25 Thread Michael S. Tsirkin
On Thu, Apr 25, 2013 at 02:21:29PM +0800, Jason Wang wrote: Commit 14f9b664 (hw/virtio-net.c: set config size using host features) tries to calculate config size based on the host features. But it forgets the VIRTIO_NET_F_MAC were always set for qemu later. This will lead a zero config len

Re: [Qemu-devel] [PATCH] virtio-net: unbreak the minix guest

2013-04-25 Thread Jason Wang
On 04/25/2013 02:57 PM, Michael S. Tsirkin wrote: On Thu, Apr 25, 2013 at 02:19:53PM +0800, Jason Wang wrote: Multiqueue patchset conditionally add control vq only when guest negotiate the feature. Though the spec is not clear on this but it breaks the minix guest since it will identify the

Re: [Qemu-devel] [PATCH] virtio-net: count VIRTIO_NET_F_MAC when calculating config_len

2013-04-25 Thread Jason Wang
On 04/25/2013 02:59 PM, Michael S. Tsirkin wrote: On Thu, Apr 25, 2013 at 02:21:29PM +0800, Jason Wang wrote: Commit 14f9b664 (hw/virtio-net.c: set config size using host features) tries to calculate config size based on the host features. But it forgets the VIRTIO_NET_F_MAC were always set

Re: [Qemu-devel] [PATCH] virtio-net: count VIRTIO_NET_F_MAC when calculating config_len

2013-04-25 Thread Michael S. Tsirkin
On Thu, Apr 25, 2013 at 03:02:44PM +0800, Jason Wang wrote: On 04/25/2013 02:59 PM, Michael S. Tsirkin wrote: On Thu, Apr 25, 2013 at 02:21:29PM +0800, Jason Wang wrote: Commit 14f9b664 (hw/virtio-net.c: set config size using host features) tries to calculate config size based on the

Re: [Qemu-devel] [PATCH 4/5] vfio: Move container list to DMAContext

2013-04-25 Thread David Gibson
On Wed, Apr 24, 2013 at 09:12:39AM -0600, Alex Williamson wrote: On Wed, 2013-04-24 at 22:01 +1000, David Gibson wrote: At the moment, vfio maintains a global list of containers that are assumed to be more or less interchangeable, since they are all set up with a MemoryListener to have all

Re: [Qemu-devel] [PATCH 4/5] vfio: Move container list to DMAContext

2013-04-25 Thread David Gibson
On Wed, Apr 24, 2013 at 06:33:33PM +0200, Paolo Bonzini wrote: Il 24/04/2013 17:12, Alex Williamson ha scritto: At the moment, vfio maintains a global list of containers that are assumed to be more or less interchangeable, since they are all set up with a MemoryListener to have all

[Qemu-devel] [PATCH v2] virtio-net: unbreak the minix guest

2013-04-25 Thread Jason Wang
Multiqueue patchset conditionally add control vq only when guest negotiate the feature. Though the spec is not clear on this but it breaks the minix guest since it will identify the ctrl vq even if it does not support it. Though this behavior seems a violation on the spec If the

[Qemu-devel] [PATCH v2] virtio-net: count VIRTIO_NET_F_MAC when calculating config_len

2013-04-25 Thread Jason Wang
Commit 14f9b664 (hw/virtio-net.c: set config size using host features) tries to calculate config size based on the host features. But it forgets the VIRTIO_NET_F_MAC were always set for qemu later. This will lead a zero config len for virtio-net device when both VIRTIO_NET_F_STATUS and

Re: [Qemu-devel] [PATCH v2] virtio-net: count VIRTIO_NET_F_MAC when calculating config_len

2013-04-25 Thread Michael S. Tsirkin
On Thu, Apr 25, 2013 at 03:26:54PM +0800, Jason Wang wrote: Commit 14f9b664 (hw/virtio-net.c: set config size using host features) tries to calculate config size based on the host features. But it forgets the VIRTIO_NET_F_MAC were always set for qemu later. This will lead a zero config len

Re: [Qemu-devel] [PATCH] virtio-net: count VIRTIO_NET_F_MAC when calculating config_len

2013-04-25 Thread Jason Wang
On 04/25/2013 03:06 PM, Michael S. Tsirkin wrote: On Thu, Apr 25, 2013 at 03:02:44PM +0800, Jason Wang wrote: On 04/25/2013 02:59 PM, Michael S. Tsirkin wrote: On Thu, Apr 25, 2013 at 02:21:29PM +0800, Jason Wang wrote: Commit 14f9b664 (hw/virtio-net.c: set config size using host features)

[Qemu-devel] [PATCH] virtio: abort on zero config length

2013-04-25 Thread Jason Wang
In fact we don't support zero length config length for virtio device. And it can lead outbound memory access. So abort on zero config length to catch the bug earlier. Signed-off-by: Jason Wang jasow...@redhat.com --- hw/virtio/virtio.c |7 ++- 1 files changed, 2 insertions(+), 5

[Qemu-devel] [PATCH 3/6] console: add qemu_console_lookup_by_device

2013-04-25 Thread Gerd Hoffmann
Look up the QemuConsole for a given device, using the new link. Signed-off-by: Gerd Hoffmann kra...@redhat.com --- include/ui/console.h |1 + ui/console.c | 19 +++ 2 files changed, 20 insertions(+) diff --git a/include/ui/console.h b/include/ui/console.h index

[Qemu-devel] [PATCH 4/6] console: switch ppm_save to qemu_open

2013-04-25 Thread Gerd Hoffmann
... so it works with fdset. Signed-off-by: Gerd Hoffmann kra...@redhat.com --- ui/console.c |6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/ui/console.c b/ui/console.c index e3ab985..3835316 100644 --- a/ui/console.c +++ b/ui/console.c @@ -269,18 +269,20 @@ static

[Qemu-devel] [PATCH 1/6] console: qom-ify QemuConsole

2013-04-25 Thread Gerd Hoffmann
Just the minimal bits to turn QemuConsoles into Objects. Signed-off-by: Gerd Hoffmann kra...@redhat.com --- hw/display/xenfb.c |2 +- include/ui/console.h | 15 +++ ui/console.c | 15 ++- 3 files changed, 30 insertions(+), 2 deletions(-) diff --git

[Qemu-devel] [PATCH 6/6] console: add dummy surface for guests without graphic card

2013-04-25 Thread Gerd Hoffmann
So users get a notification instead of a crash. Signed-off-by: Gerd Hoffmann kra...@redhat.com --- ui/console.c | 34 -- 1 file changed, 32 insertions(+), 2 deletions(-) diff --git a/ui/console.c b/ui/console.c index a13fb64..b30853f 100644 --- a/ui/console.c

[Qemu-devel] [PATCH 5/6] console: zap ds arg from register_displaychangelistener

2013-04-25 Thread Gerd Hoffmann
We don't have multiple DisplayStates any more, so passing it in as argument is not needed. Signed-off-by: Gerd Hoffmann kra...@redhat.com --- hw/display/qxl.c |4 +--- include/ui/console.h |3 +-- ui/cocoa.m |2 +- ui/console.c | 10 +- ui/curses.c

[Qemu-devel] [PULL v2 0/6] console: qom-ify consoles

2013-04-25 Thread Gerd Hoffmann
Hi, Here are the console patches, targeting 1.5. It's just the QemuConsole QOM-ification and three little fixes. New in v2: unbreak xen build, add a patch which fixes the qemu -nodefaults segfault. cheers, Gerd The following changes since commit bb71623811686ce3c34ce724f073f5c5dd95f51b:

[Qemu-devel] [PATCH 2/6] console: add device link to QemuConsoles

2013-04-25 Thread Gerd Hoffmann
So it is possible to figure which qemu console displays which device. Signed-off-by: Gerd Hoffmann kra...@redhat.com --- hw/arm/musicpal.c|2 +- hw/display/blizzard.c|2 +- hw/display/cirrus_vga.c |4 ++-- hw/display/exynos4210_fimd.c |2 +-

Re: [Qemu-devel] [sheepdog] [PATCH v2] sheepdog: fix loadvm operation

2013-04-25 Thread MORITA Kazutaka
At Thu, 25 Apr 2013 12:12:58 +0800, Liu Yuan wrote: On 04/25/2013 12:47 AM, Liu Yuan wrote: - don't break old behavior if we boot up on the snapshot by using s-reverted to indicate if we delete working VDI successfully If we implement 'boot from snapshot' == loadvm snapshot, we

Re: [Qemu-devel] [PATCH] virtio: abort on zero config length

2013-04-25 Thread Michael S. Tsirkin
On Thu, Apr 25, 2013 at 03:43:27PM +0800, Jason Wang wrote: In fact we don't support zero length config length for virtio device. And it can lead outbound memory access. So abort on zero config length to catch the bug earlier. Signed-off-by: Jason Wang jasow...@redhat.com Acked-by:

Re: [Qemu-devel] [PATCH v2] virtio-net: unbreak the minix guest

2013-04-25 Thread Michael S. Tsirkin
On Thu, Apr 25, 2013 at 03:24:23PM +0800, Jason Wang wrote: Multiqueue patchset conditionally add control vq only when guest negotiate the feature. Though the spec is not clear on this but it breaks the minix guest since it will identify the ctrl vq even if it does not support it. Though this

Re: [Qemu-devel] [PATCH V3 5/5] block: make all steps in qmp_transaction() as callback

2013-04-25 Thread Wenchao Xia
于 2013-4-24 17:25, Stefan Hajnoczi 写道: On Fri, Apr 19, 2013 at 08:57:10AM +0800, Wenchao Xia wrote: diff --git a/blockdev.c b/blockdev.c index 051be98..b336794 100644 --- a/blockdev.c +++ b/blockdev.c @@ -779,14 +779,41 @@ void qmp_blockdev_snapshot_sync(const char *device, const char

Re: [Qemu-devel] [PATCH v2 03/12] savevm: update bdrv_snapshot_find() to find snapshot by id or name and add error parameter

2013-04-25 Thread Pavel Hrdina
On 25.4.2013 08:46, Pavel Hrdina wrote: On 24.4.2013 23:26, Eric Blake wrote: On 04/24/2013 09:32 AM, Pavel Hrdina wrote: Finding snapshot by a name which could also be an id isn't best way how to do it. There will be rewrite of savevm, loadvm and delvm to improve the behavior of these

Re: [Qemu-devel] [sheepdog] [PATCH v2] sheepdog: fix loadvm operation

2013-04-25 Thread Liu Yuan
On 04/25/2013 04:11 PM, MORITA Kazutaka wrote: Are you suggesting that booting from snapshot should discard the current state like savevm? If yes, it looks okay to me. Yeah, this will make code cleaner. I'll update v3. Thanks Yuan

Re: [Qemu-devel] [PATCH] KVM: Don't assume that mpstate exists with in-kernel PIC always

2013-04-25 Thread Jan Kiszka
On 2013-04-24 22:49, Alexander Graf wrote: On PPC, we don't support MP state. So far it's not necessary and I'm not convinced yet that we really need to support it ever. However, the current idle logic in QEMU assumes that an in-kernel PIC also means we support MP state. This assumption is

[Qemu-devel] [PATCH v3] sheepdog: fix loadvm operation

2013-04-25 Thread Liu Yuan
From: Liu Yuan tailai...@taobao.com Currently the 'loadvm' opertaion works as following: 1. switch to the snapshot 2. mark current working VDI as a snapshot 3. rely on sd_create_branch to create a new working VDI based on the snapshot This works not the same as other format as QCOW2. For e.g,

[Qemu-devel] [PATCH] KVM: Don't assume that mpstate exists with in-kernel PIC always

2013-04-25 Thread Alexander Graf
On PPC, we don't support MP state. So far it's not necessary and I'm not convinced yet that we really need to support it ever. However, the current idle logic in QEMU assumes that an in-kernel PIC also means we support MP state. This assumption is not true anymore. Let's split up the two cases

[Qemu-devel] [PATCH] virtio-ccw: Check indicators location.

2013-04-25 Thread Cornelia Huck
If a guest neglected to register (secondary) indicators but still runs with notifications enabled, we might end up writing to guest zero; avoid this by checking for valid indicators and only writing to the guest and generating an interrupt if indicators have been setup. Cc: qemu-sta...@nongnu.org

[Qemu-devel] [PULL] virtio-ccw: indicators fix.

2013-04-25 Thread Cornelia Huck
One bugfix to make sure guests that didn't set up indicators are handled correctly. Please pull. The following changes since commit 9953f8822cc316eec9962f0a2858c3439a80adec: pc: Kill the use flash device for BIOS unless KVM misfeature (2013-04-24 13:23:51 -0500) are available in the git

[Qemu-devel] [PATCH RFC 3/3] acpi: add an option to disable builtin tables

2013-04-25 Thread Michael S. Tsirkin
Serves to save a bit of memory, and is helpful for debugging (making sure tables come from qemu). Memory stats: Enabled: Total size: 128776 Fixed: 59100 Free: 2296 (used 98.2% of 128KiB rom) Disabled: Total size: 119836 Fixed: 58996 Free: 11236 (used 91.4% of 128KiB rom) Signed-off-by:

Re: [Qemu-devel] [PATCH v2 5/5] block: add header update capability for VHDX images.

2013-04-25 Thread Stefan Hajnoczi
On Wed, Apr 24, 2013 at 10:56:19AM -0400, Jeff Cody wrote: On Wed, Apr 24, 2013 at 04:47:15PM +0200, Stefan Hajnoczi wrote: On Tue, Apr 23, 2013 at 10:24:24AM -0400, Jeff Cody wrote: This adds the ability to update the headers in a VHDX image, including generating a new MS-compatible

[Qemu-devel] [PATCH RFC 0/3] seabios: move acpi table formatting out of bios

2013-04-25 Thread Michael S. Tsirkin
Untested yet, but I thought I'd share the BIOS bits so we can agree on direction. In particular check out ROM sizes: - Before patchset with DSDT enabled Total size: 127880 Fixed: 59060 Free: 3192 (used 97.6% of 128KiB rom) - Before patchset with DSDT disabled Total size: 122844 Fixed:

[Qemu-devel] [PATCH RFC 2/3] acpi: load and link tables from /etc/acpi/

2013-04-25 Thread Michael S. Tsirkin
Load files in /etc/acpi/ and use for acpi tables. Any files in this directory completely disable generating and loading legacy acpi tables. Signed-off-by: Michael S. Tsirkin m...@redhat.com --- src/acpi.c | 67 +- 1 file changed, 66

[Qemu-devel] [PATCH RFC 1/3] linker: utility to patch in-memory ROM files

2013-04-25 Thread Michael S. Tsirkin
Add ability for a ROM file to point to it's image in memory. When file is in memory, add utility that can patch it, storing pointers to one file within another file. This is not a lot of code: together with the follow-up patch to load ACPI tables from ROM, we get: Before: Total size: 127880

Re: [Qemu-devel] KVM VM(windows xp) reseted when running geekbench for about 2 days

2013-04-25 Thread Zhanghaoyu (A)
On Thu, Apr 18, 2013 at 12:00:49PM +, Zhanghaoyu (A) wrote: I start 10 VMs(windows xp), then running geekbench tool on them, about 2 days, one of them was reset, I found the reset operation is done by int kvm_cpu_exec(CPUArchState *env) { ... switch

Re: [Qemu-devel] [sheepdog] [PATCH v3] sheepdog: fix loadvm operation

2013-04-25 Thread MORITA Kazutaka
At Thu, 25 Apr 2013 16:42:34 +0800, Liu Yuan wrote: +/* Delete current working VDI on the snapshot chain */ +static bool sd_delete(BDRVSheepdogState *s) +{ +unsigned int wlen = SD_MAX_VDI_LEN, rlen = 0; +SheepdogVdiReq hdr = { +.opcode = SD_OP_DEL_VDI, +.vdi_id =

Re: [Qemu-devel] [sheepdog] [PATCH v3] sheepdog: fix loadvm operation

2013-04-25 Thread Liu Yuan
On 04/25/2013 05:40 PM, MORITA Kazutaka wrote: Isn't it better to show an error message when the result code is SD_RES_NO_VDI? This information isn't useful even for debugging, what it for? Thanks, Yuan

[Qemu-devel] [PATCH v5] monitor: introduce query-command-line-options

2013-04-25 Thread Amos Kong
Libvirt has no way to probe if an option or property is supported, This patch introduces a new qmp command to query command line option information. hmp command isn't added because it's not needed. Signed-off-by: Amos Kong ak...@redhat.com CC: Luiz Capitulino lcapitul...@redhat.com CC: Osier Yang

Re: [Qemu-devel] [PATCH v4] monitor: introduce query-command-line-options

2013-04-25 Thread Amos Kong
On Thu, Apr 25, 2013 at 01:39:44PM +0800, Osier Yang wrote: On 25/04/13 13:06, Amos Kong wrote: Libvirt has no way to probe if an option or property is supported, This patch introdues a new qmp command to query command line option information. hmp command isn't added because it's not needed.

Re: [Qemu-devel] [sheepdog] [PATCH v3] sheepdog: fix loadvm operation

2013-04-25 Thread MORITA Kazutaka
At Thu, 25 Apr 2013 17:44:41 +0800, Liu Yuan wrote: On 04/25/2013 05:40 PM, MORITA Kazutaka wrote: Isn't it better to show an error message when the result code is SD_RES_NO_VDI? This information isn't useful even for debugging, what it for? The block driver tries to delete the vdi, but

Re: [Qemu-devel] uhci: cancel delay for unregistered queues

2013-04-25 Thread Hans de Goede
Hi, On 02/14/2013 01:23 PM, Gerd Hoffmann wrote: Hi, The only fix I can think of is allocating a receive buffer inside the UHCI code for read transfers, and copy the result over to the guest memory when we are re-scanning the schedule, encounter the completed td and are going to signal its

[Qemu-devel] [PATCH] uhci: Use an intermediate buffer for usb packet data

2013-04-25 Thread Hans de Goede
Due to various unfortunate reasons we cannot reliable detect a guest cancelling a packet as soon as it happens, instead we detect cancels with some delay. When packets are handled async, and we directly pass the guest memory for the packet to the usb-device as iovec, this means that the

[Qemu-devel] [PATCH 2/3] sheepdog: add SD_RES_READONLY result code

2013-04-25 Thread MORITA Kazutaka
Sheepdog returns SD_RES_READONLY when qemu sends write requests to the snapshot vdi. This adds the result code and makes sd_strerror() print its error reason. Signed-off-by: MORITA Kazutaka morita.kazut...@lab.ntt.co.jp --- block/sheepdog.c |2 ++ 1 files changed, 2 insertions(+), 0

[Qemu-devel] [PATCH 1/3] sheepdog: cleanup find_vdi_name

2013-04-25 Thread MORITA Kazutaka
This makes 'filename' and 'tag' constant variables, and renames 'for_snapshot' to 'lock' to clear how it works. Signed-off-by: MORITA Kazutaka morita.kazut...@lab.ntt.co.jp --- block/sheepdog.c | 15 --- 1 files changed, 8 insertions(+), 7 deletions(-) diff --git

[Qemu-devel] [PATCH 3/3] sheepdog: resend write requests when SD_RES_READONLY is received

2013-04-25 Thread MORITA Kazutaka
When a snapshot is taken from out side of qemu (e.g. qemu-img snapshot), write requests to the current vdi return SD_RES_READONLY. In this case, the sheepdog block driver needs to update the current inode to the latest one and resend the write requests. Signed-off-by: MORITA Kazutaka

[Qemu-devel] [PATCH 0/3] sheepdog: support online snapshot from qemu-img

2013-04-25 Thread MORITA Kazutaka
Currently, we can take sheepdog snapshots of running VMs only from the qemu monitor. This series allows taking online snapshots from qemu-img. The first two patches prepare for the thrid patch. MORITA Kazutaka (3): sheepdog: cleanup find_vdi_name sheepdog: add SD_RES_READONLY result code

Re: [Qemu-devel] Git head build problem (popcountl vs. system headers)

2013-04-25 Thread Richard Henderson
On 2013-04-25 07:47, Martin Husemann wrote: I just tried building git HEAD on NetBSD-current and gcc chokes on a prototype mismatch for popcountl: util/hbitmap.c has: static inline int popcountl(unsigned long l) { return BITS_PER_LONG == 32 ? ctpop32(l) : ctpop64(l); } while NetBSD's

[Qemu-devel] [PATCH] qemu-char: Set foo_tag = 0 when returning FALSE from callbacks

2013-04-25 Thread Hans de Goede
While reviewing some patches I found this problem where tcp_chr_accept does not clear listen_tag when returning FALSE, leading to a double g_source_remove of the underlying source. Not really a problem unless the id gets re-used in between, but still something we should fix. While at it I've also

Re: [Qemu-devel] question about concurrent block job

2013-04-25 Thread Stefan Hajnoczi
On Thu, Apr 25, 2013 at 01:59:23AM +, Zhangleiqiang wrote: May be the in_use flag of bs at the drive unit is too large. Perhaps the in_use flag should just lock at the unit of one or some image(s) in the image chain, the image(s) needed to be locked are always the ones will be

Re: [Qemu-devel] [PATCH v2 03/12] savevm: update bdrv_snapshot_find() to find snapshot by id or name and add error parameter

2013-04-25 Thread Eric Blake
On 04/25/2013 12:31 AM, Wenchao Xia wrote: + +if (!found) { +error_setg(errp, Failed to find snapshot '%s', name ? name : id); suggest not to set error, since it is a normal case. The way I understand it, failure to find a snapshot might need to be treated as an error - it's

Re: [Qemu-devel] [PATCH v2 04/12] qapi: Convert delvm

2013-04-25 Thread Eric Blake
On 04/25/2013 12:58 AM, Wenchao Xia wrote: +char buf[256]; I know this fixed-size buffer is just a copy-and-paste from other code that displays snapshot information, but I really hate it. On the other hand, I can tolerate if we have it as an intermediate step between two series

Re: [Qemu-devel] Environment variables for user-mode QEMU

2013-04-25 Thread Riku Voipio
Bcc: Subject: Re: [Qemu-devel] Environment variables for user-mode QEMU Reply-To: In-Reply-To: 87txmwoyqc@schwinge.name X-message-flag: Warning: message not sent with a DRM-Certified client On Wed, Apr 24, 2013 at 03:16:27PM +0200, Thomas Schwinge wrote: We have a need to pass environment

Re: [Qemu-devel] [PATCH for-1.5] qmp: add query-drive-mirror-capabilities

2013-04-25 Thread Luiz Capitulino
On Wed, 24 Apr 2013 15:59:15 -0600 Eric Blake ebl...@redhat.com wrote: On 04/24/2013 03:29 PM, Luiz Capitulino wrote: - { execute: query-command-capabilities } - { [ { type: drive-mirror, data: [ granularity, buf-size ] }, { type, ... } ] } And whether a

Re: [Qemu-devel] [sheepdog] [PATCH v3] sheepdog: fix loadvm operation

2013-04-25 Thread Liu Yuan
On 04/25/2013 06:03 PM, MORITA Kazutaka wrote: The block driver tries to delete the vdi, but the sheepdog servers return No such vdi - I thought that something goes wrong in this case. What's the scenario where the sheepdog servers return SD_RES_NO_VDI? Can we ignore it safely? V2 has this

Re: [Qemu-devel] [PATCH] monitor: introduce query-config-schema command

2013-04-25 Thread Luiz Capitulino
On Thu, 25 Apr 2013 11:52:58 +0800 Amos Kong ak...@redhat.com wrote: On Wed, Apr 24, 2013 at 01:39:08PM -0600, Eric Blake wrote: On 04/24/2013 12:20 PM, Luiz Capitulino wrote: On Thu, 25 Apr 2013 01:33:24 +0800 Amos Kong ak...@redhat.com wrote: Libvirt has no way to probe if an

Re: [Qemu-devel] [RFC][PATCH v3 00/24] instrument: Let the user wrap/override specific event tracing routines

2013-04-25 Thread Stefan Hajnoczi
On Wed, Apr 24, 2013 at 02:17:22PM +0200, Lluís Vilanova wrote: Stefan Hajnoczi writes: On Sun, Apr 21, 2013 at 09:11:30PM +0200, Lluís Vilanova wrote: TODO: Operations 'instr_load' and 'instr_unload' are not thread safe. (qemu_cpu_kick?) TODO: Do cmdline actions have to be

[Qemu-devel] [PATCH v4] sheepdog: fix loadvm operation

2013-04-25 Thread Liu Yuan
From: Liu Yuan tailai...@taobao.com Currently the 'loadvm' opertaion works as following: 1. switch to the snapshot 2. mark current working VDI as a snapshot 3. rely on sd_create_branch to create a new working VDI based on the snapshot This works not the same as other format as QCOW2. For e.g,

Re: [Qemu-devel] [PATCH v20 4/7] pvpanic: pass configurable ioport to seabios

2013-04-25 Thread Markus Armbruster
Hu Tao hu...@cn.fujitsu.com writes: On Wed, Apr 24, 2013 at 06:35:49PM +0200, Markus Armbruster wrote: Hu Tao hu...@cn.fujitsu.com writes: This lets seabios patch the corresponding SSDT entry. Signed-off-by: Hu Tao hu...@cn.fujitsu.com --- hw/misc/pvpanic.c | 14

Re: [Qemu-devel] [PATCH v2 3/5] block: initial VHDX driver support framework - supports open and probe

2013-04-25 Thread Kevin Wolf
Am 23.04.2013 um 16:24 hat Jeff Cody geschrieben: This is the initial block driver framework for VHDX image support ( i.e. Hyper-V image file formats), that supports opening VHDX files, and parsing the headers. This commit does not yet enable: - reading - writing - updating

Re: [Qemu-devel] [PATCH v2 2/5] block: vhdx header for the QEMU support of VHDX images

2013-04-25 Thread Kevin Wolf
Am 23.04.2013 um 16:24 hat Jeff Cody geschrieben: This is based on Microsoft's VHDX specification: VHDX Format Specification v0.95, published 4/12/2012 https://www.microsoft.com/en-us/download/details.aspx?id=29681 These structures define the various header, metadata, and other

Re: [Qemu-devel] [sheepdog] [PATCH v4] sheepdog: fix loadvm operation

2013-04-25 Thread MORITA Kazutaka
At Thu, 25 Apr 2013 20:49:39 +0800, Liu Yuan wrote: From: Liu Yuan tailai...@taobao.com Currently the 'loadvm' opertaion works as following: 1. switch to the snapshot 2. mark current working VDI as a snapshot 3. rely on sd_create_branch to create a new working VDI based on the snapshot

Re: [Qemu-devel] [sheepdog] [PATCH 3/3] sheepdog: resend write requests when SD_RES_READONLY is received

2013-04-25 Thread Liu Yuan
On 04/25/2013 06:37 PM, MORITA Kazutaka wrote: +/* update inode with the latest state */ +static int coroutine_fn reload_vdi_object(BDRVSheepdogState *s) I'd suggest function name as 'reload_inode(BDRVSheepdogState *s, tag, snapid)', then sd_create_branch and sd_snapshot_goto can make use of

Re: [Qemu-devel] [PATCH v3 6/6] vmdk: add bdrv_co_write_zeroes

2013-04-25 Thread Stefan Hajnoczi
On Wed, Apr 24, 2013 at 08:44:35PM +0800, Fam Zheng wrote: @@ -905,6 +905,13 @@ static int get_cluster_offset(BlockDriverState *bs, l2_index = ((offset 9) / extent-cluster_sectors) % extent-l2_size; *cluster_offset = le32_to_cpu(l2_table[l2_index]); +if (m_data) { +

Re: [Qemu-devel] [PATCH v3 5/6] vmdk: store fields of VmdkMetaData in cpu endian

2013-04-25 Thread Stefan Hajnoczi
On Wed, Apr 24, 2013 at 08:44:34PM +0800, Fam Zheng wrote: @@ -938,7 +938,7 @@ static int get_cluster_offset(BlockDriverState *bs, } if (m_data) { -m_data-offset = tmp; +m_data-offset = *cluster_offset; tmp can be dropped now: -tmp =

Re: [Qemu-devel] [PATCH v5] monitor: introduce query-command-line-options

2013-04-25 Thread Luiz Capitulino
On Thu, 25 Apr 2013 17:50:35 +0800 Amos Kong ak...@redhat.com wrote: Libvirt has no way to probe if an option or property is supported, This patch introduces a new qmp command to query command line option information. hmp command isn't added because it's not needed. Signed-off-by: Amos Kong

Re: [Qemu-devel] [PATCH v3 0/6] vmdk: zeroed-grain GTE support

2013-04-25 Thread Stefan Hajnoczi
On Wed, Apr 24, 2013 at 08:44:29PM +0800, Fam Zheng wrote: Added support for zeroed-grain GTE to VMDK according to VMDK Spec 5.0[1]. [1] Virtual Disk Format 5.0 - VMware, http://www.vmware.com/support/developer/vddk/vmdk_50_technote.pdf?src=vmdk Changes since v2: - all: Added 5/6

Re: [Qemu-devel] [PATCH] monitor: introduce query-config-schema command

2013-04-25 Thread Eric Blake
On 04/25/2013 06:36 AM, Luiz Capitulino wrote: One other concern - you document that if a flag parameter is omitted, then it defaults to 1. Is that really true? I'm wrong. If it's omitted in cmdline, we will give it a default value. This kind of default info is only added in help

Re: [Qemu-devel] [PATCH v2 00/12] covert savevm, loadvm and delvm into qapi

2013-04-25 Thread Stefan Hajnoczi
On Wed, Apr 24, 2013 at 05:31:58PM +0200, Pavel Hrdina wrote: I'm sending patches for all commands in one patch series because the savevm command depends on delvm command. This patch series introduces new design of these commands: * QMP vm-snapshot-save: - { 'command':

Re: [Qemu-devel] Git head build problem (popcountl vs. system headers)

2013-04-25 Thread Laszlo Ersek
On 04/25/13 12:36, Richard Henderson wrote: On 2013-04-25 07:47, Martin Husemann wrote: I just tried building git HEAD on NetBSD-current and gcc chokes on a prototype mismatch for popcountl: util/hbitmap.c has: static inline int popcountl(unsigned long l) { return BITS_PER_LONG == 32

Re: [Qemu-devel] [PATCH v2 02/12] block: update error reporting for bdrv_snapshot_delete() and related functions

2013-04-25 Thread Stefan Hajnoczi
On Wed, Apr 24, 2013 at 05:32:00PM +0200, Pavel Hrdina wrote: diff --git a/block/sheepdog.c b/block/sheepdog.c index 20b5d06..7e0610f 100644 --- a/block/sheepdog.c +++ b/block/sheepdog.c @@ -1937,10 +1937,12 @@ out: return ret; } -static int sd_snapshot_delete(BlockDriverState

[Qemu-devel] SCSI CD-ROM hotplug problem

2013-04-25 Thread Liuji (Jeremy)
Hello, everyone I have a question about hotplug of cd-rom. version of qemu: Apr-22-2013 bb71623811686ce3c34ce724f073f5c5dd95f51b 1) start the vm: qemu-kvm -enable-kvm -m 1024 -smp 2 -boot c -drive file=/home/vm/winxp.qcow2,if=none,id=drive0,format=qcow2 -device

Re: [Qemu-devel] [PATCH 0/3] sheepdog: support online snapshot from qemu-img

2013-04-25 Thread Eric Blake
On 04/25/2013 04:37 AM, MORITA Kazutaka wrote: Currently, we can take sheepdog snapshots of running VMs only from the qemu monitor. This series allows taking online snapshots from qemu-img. Is that even safe? We specifically recommend that users NOT use qemu-img on any image that is in-use

Re: [Qemu-devel] [PATCH 0/2] block: fix spurious DEVICE_TRAY_MOVED events on shutdown

2013-04-25 Thread Luiz Capitulino
On Mon, 22 Apr 2013 15:53:43 +0200 Stefan Hajnoczi stefa...@gmail.com wrote: On Fri, Apr 19, 2013 at 01:47:17PM -0400, Luiz Capitulino wrote: Hi, This fixes a regression introduced by commit 9ca111544, as detailed in patch 2/2, by moving bdrv_dev_change_media_cb() calls to callers of

Re: [Qemu-devel] [PATCH 3/3] sheepdog: resend write requests when SD_RES_READONLY is received

2013-04-25 Thread Stefan Hajnoczi
On Thu, Apr 25, 2013 at 07:37:43PM +0900, MORITA Kazutaka wrote: +/* update inode with the latest state */ +static int coroutine_fn reload_vdi_object(BDRVSheepdogState *s) +{ +SheepdogInode *inode; +int ret = 0, fd; +uint32_t vid; + +inode = (SheepdogInode

Re: [Qemu-devel] [PATCH v5] monitor: introduce query-command-line-options

2013-04-25 Thread Eric Blake
On 04/25/2013 03:50 AM, Amos Kong wrote: Libvirt has no way to probe if an option or property is supported, This patch introduces a new qmp command to query command line option information. hmp command isn't added because it's not needed. Signed-off-by: Amos Kong ak...@redhat.com CC: Luiz

Re: [Qemu-devel] [PATCH 1/2] block: make bdrv_dev_change_media_cb() public

2013-04-25 Thread Eric Blake
On 04/19/2013 11:47 AM, Luiz Capitulino wrote: Next commit wants to use it. Signed-off-by: Luiz Capitulino lcapitul...@redhat.com --- block.c | 3 +-- include/block/block.h | 1 + 2 files changed, 2 insertions(+), 2 deletions(-) Reviewed-by: Eric Blake ebl...@redhat.com --

Re: [Qemu-devel] [PATCH 2/2] block: move bdrv_dev_change_media_cb() to callers that really need it

2013-04-25 Thread Eric Blake
On 04/19/2013 11:47 AM, Luiz Capitulino wrote: Commit 9ca111544c64b5abed2e79cf52e19a8f227b347b moved the call to bdrv_dev_change_media_cb() outside the media check in bdrv_close(), this added a regression where spurious DEVICE_TRAY_MOVED events are emitted at shutdown. Libvirt can tolerate

[Qemu-devel] [PATCH] rbd: Fix use after free in rbd_open()

2013-04-25 Thread Kevin Wolf
Commit 56d1b4d2 frees the QemuOpts for the driver-specific options immediately, even though it still needs the filename string that is contained there. This doesn't work. Move the deletion of the QemuOpts to the end of the function where its content isn't needed any more. Signed-off-by: Kevin

Re: [Qemu-devel] [sheepdog] [PATCH 0/3] sheepdog: support online snapshot from qemu-img

2013-04-25 Thread Liu Yuan
On 04/25/2013 09:44 PM, Eric Blake wrote: Is that even safe? We specifically recommend that users NOT use qemu-img on any image that is in-use by a qemu process, and instead only use qemu monitor commands; since qemu-img may see inconsistent state, and worse, any writes that qemu-img do may

Re: [Qemu-devel] [PATCH 0/3] sheepdog: support online snapshot from qemu-img

2013-04-25 Thread Stefan Hajnoczi
On Thu, Apr 25, 2013 at 07:44:29AM -0600, Eric Blake wrote: On 04/25/2013 04:37 AM, MORITA Kazutaka wrote: Currently, we can take sheepdog snapshots of running VMs only from the qemu monitor. This series allows taking online snapshots from qemu-img. Is that even safe? We specifically

[Qemu-devel] [PATCH 01/15] exec: add qemu_for_each_cpu

2013-04-25 Thread Igor Mammedov
wrapper will help to remove open-coded loops. pathc icludes random example of how it could be used. Signed-off-by: Michael S. Tsirkin m...@redhat.com Signed-off-by: Igor Mammedov imamm...@redhat.com --- Note: Will be used by ACPI table generation and cpu_exists() v2: *

[Qemu-devel] [PATCH 07/15] target-i386: replace MSI_SPACE_SIZE with APIC_SPACE_SIZE

2013-04-25 Thread Igor Mammedov
... and put APIC_SPACE_SIZE in public header so that it could be reused later elsewhere. Signed-off-by: Igor Mammedov imamm...@redhat.com Reviewed-by: Andreas Färber afaer...@suse.de --- hw/i386/kvm/apic.c |2 +- hw/intc/apic.c |2 +- hw/xen/xen_apic.c

[Qemu-devel] [PATCH 02/15] cpu: add helper cpu_exists(), to check if CPU with specified id exists

2013-04-25 Thread Igor Mammedov
Signed-off-by: Igor Mammedov imamm...@redhat.com --- v3: * use qemu_for_each_cpu() instead of recursion v2: * s/get_firmware_id()/get_arch_id()/ rebase fixup * remove check for get_arch_id being NULL, since it's always defined --- include/qom/cpu.h | 10 ++ qom/cpu.c |

[Qemu-devel] [PATCH 05/15] target-i386: introduce ICC bus/device/bridge

2013-04-25 Thread Igor Mammedov
Provides hotplug-able bus for APIC and CPU. * icc-bridge will serve as a parent for icc-bus and provide mmio mapping services to child icc-devices. * icc-device will replace SysBusDevice as a parent of APIC and IOAPIC devices. Signed-off-by: Igor Mammedov imamm...@redhat.com --- v3: * mv

[Qemu-devel] [PATCH 00/15 v6 for 1.5] target-i386: CPU hot-add with cpu-add QMP command

2013-04-25 Thread Igor Mammedov
Implements alternative way for hot-adding CPU using cpu-add QMP command, which could be useful until it would be possible to add CPUs via device_add. To hot-add CPU use following command from qmp-shell: cpu-add id=[0..max-cpus - 1) git tree for testing:

[Qemu-devel] [PATCH 08/15] target-i386: kvmvapic: make expilict dependency on sysbus.h

2013-04-25 Thread Igor Mammedov
Allows kvmvapic to compile if sysbus.h is removed from apic_internal.h, from which it is indirectly included. sysbus.h will be removed from apic_internal.h after converting APICs to ICCDevice. Signed-off-by: Igor Mammedov imamm...@redhat.com --- Note: split it in separate patch from move APIC

[Qemu-devel] [PATCH 09/15] target-i386: move APIC to ICC bus

2013-04-25 Thread Igor Mammedov
It allows APIC to be hotplugged * map APIC's mmio at board level if it is present * do not register mmio region for each APIC, since only one is used/mapped Signed-off-by: Igor Mammedov imamm...@redhat.com --- v2: * various style fixes * split out sysbus.h inclusion in kvmvapic.c to

[Qemu-devel] [PATCH 10/15] extend memory_region_find() and use it in kvm/ioapic

2013-04-25 Thread Igor Mammedov
From: Paolo Bonzini pbonz...@redhat.com kvm/ioapic is relying on the fact that SysBus device maps mmio regions with offset counted from start of system memory. But if ioapic's region is moved to another sub-region which doesn't start at the beginning of system memory then using offset isn't

[Qemu-devel] [PATCH 15/15] QMP: add cpu-add command

2013-04-25 Thread Igor Mammedov
Adds cpu-add id=xxx QMP command. cpu-add's id argument is a CPU number in a range [0..max-cpus) Example QMP command: - { execute: cpu-add, arguments: { id: 2 } } - { return: {} } Signed-off-by: Igor Mammedov imamm...@redhat.com Acked-by: Luiz Capitulino lcapitul...@redhat.com Reviewed-by:

[Qemu-devel] [PATCH 13/15] add hot_add_cpu hook to QEMUMachine and export machine_args

2013-04-25 Thread Igor Mammedov
hot_add_cpu hook should be overriden by target that implements cpu hot-add via cpu-add QMP command. Make machine_args available globaly, it allows to reuse machine_args-cpu_model during hotplug, instead of adding target specific globals to keep a copy of cpu_model. Signed-off-by: Igor Mammedov

  1   2   3   >