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

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 ident

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 alw

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

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 hav

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

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

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

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

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 feat

[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 --- hw/virtio/virtio.c |7 ++- 1 files changed, 2 insertions(+), 5 deletions(-) diff --git a/h

[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 --- 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 22670d8..c74e791 1006

[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 --- 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 void ppm_save(const

[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 --- hw/display/xenfb.c |2 +- include/ui/console.h | 15 +++ ui/console.c | 15 ++- 3 files changed, 30 insertions(+), 2 deletions(-) diff --git a/hw/display/xenfb.c b

[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 --- 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 +++ b/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 --- hw/display/qxl.c |4 +--- include/ui/console.h |3 +-- ui/cocoa.m |2 +- ui/console.c | 10 +- ui/curses.c |2 +- u

[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 --- hw/arm/musicpal.c|2 +- hw/display/blizzard.c|2 +- hw/display/cirrus_vga.c |4 ++-- hw/display/exynos4210_fimd.c |2 +- hw/display/g364fb.c |

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 snapsh

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 Acked-by: Michael S. Tsirkin

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

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 commands

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

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

2013-04-25 Thread Liu Yuan
From: Liu Yuan 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 > savevm # get a

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

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

[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: Michae

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

[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: 5

[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 --- src/acpi.c | 67 +- 1 file changed, 66 insertions(+), 1 de

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

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) { >> >> >>>..

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

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 CC: Luiz Capitulino CC: Osier Yang CC: Anthony Liguori --- V3: fix json

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 nee

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 v

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

[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 --- block/sheepdog.c |2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/block/shee

[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 --- block/sheepdog.c | 15 --- 1 files changed, 8 insertions(+), 7 deletions(-) diff --git a/block/sheepdog.c b/block/sheepdog.c index 9f3

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

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

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 stri

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

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

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

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 environme

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 wrote: > On 04/24/2013 03:29 PM, Luiz Capitulino wrote: > >> -> { "execute": "query-command-capabilities" } > >> <- { [ { "type": "drive-mirror", > >> "data": [ "granularity", "buf-size" ] }, > >>{ "type", ... } > >> ] } > >> > >

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 h

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 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 wrote: > > > > > >> Libvirt has no way to probe if an option or property

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

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

2013-04-25 Thread Liu Yuan
From: Liu Yuan 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 > savevm # get a

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

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

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

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

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 t

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

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 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 > CC: Luiz

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

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

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': 'vm-snaps

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 BIT

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

[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 virtio-blk-pci,scsi=off,drive=

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

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 *)g_malloc

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 > CC: Luiz Capitulino

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 > --- > block.c | 3 +-- > include/block/block.h | 1 + > 2 files changed, 2 insertions(+), 2 deletions(-) Reviewed-by: Eric Blake -- Eric Blake eblake 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 Wolf

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 ma

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 specif

[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 Signed-off-by: Igor Mammedov --- Note: Will be used by ACPI table generation and cpu_exists() v2: * s/signal_cpu_creation()/tcg_signal_cpu_creation()/ --- c

[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 Reviewed-by: Andreas Färber --- hw/i386/kvm/apic.c |2 +- hw/intc/apic.c |2 +- hw/xen/xen_apic.c |2 +- include/hw/i386/

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

[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 --- v3: * mv include/hw/i386/icc_b

[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: https://github.com/imammedo/qemu/tree/cpu

[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 --- Note: split it in separate patch from "move APIC to ICC bus" patch to

[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 --- v2: * various style fixes * split out sysbus.h inclusion in kvmvapic.c to simplify review * squ

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

2013-04-25 Thread Igor Mammedov
From: Paolo Bonzini 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 correct. To fix kvm/ioap

[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 Acked-by: Luiz Capitulino Reviewed-by: Eric Blake --- v7: * added

[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

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

2013-04-25 Thread Eric Blake
On 04/25/2013 07:20 AM, Luiz Capitulino wrote: > On Thu, 25 Apr 2013 17:50:35 +0800 > 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

[Qemu-devel] [PATCH 06/15] target-i386: cpu: attach ICC bus to CPU on its creation

2013-04-25 Thread Igor Mammedov
X86CPU should have parent bus so it would be possible to unplug it later. Set bus_type to TYPE_ICC_BUS for X86CPU type to make device_add attach hotplugged CPU to ICC bus. Signed-off-by: Igor Mammedov --- v2: * make sure that missing or ambiguous icc-bus will cause error on softmmu target.

[Qemu-devel] [PATCH 1/2 v4] [S390-KVM] Allow selective runtime register synchronization

2013-04-25 Thread Jason J. Herne
From: "Jason J. Herne" We want to avoid expensive register synchronization IOCTL's on the hot path so a new kvm_s390_get_registers_partial() is introduced as a compliment to kvm_arch_get_registers(). The new function is called on the hot path, and kvm_arch_get_registers() is called when we need

[Qemu-devel] [PATCH 2/2 v4] [S390-KVM] Utilize selective runtime reg sync for hot code paths

2013-04-25 Thread Jason J. Herne
From: "Jason J. Herne" Make use of new kvm_s390_get_registers_partial() for kvm_handle_css_inst() and handle_hypercall() since they only need registers from the partial set and they are called quite frequently. Signed-off-by: Jason J. Herne --- target-s390x/kvm.c | 15 --- 1 file

[Qemu-devel] [PATCH 0/2 v4] [S390-KVM] Reg-sync: Allow selective register Synchronization

2013-04-25 Thread Jason J. Herne
Selective KVM Register synchronization work for S390. This is re-work of the patch set submitted here: https://lists.nongnu.org/archive/html/qemu-devel/2013-01/msg01631.html The selective runtime register sync code has been made S390 specific. This is the latest version of the code, fit to the lat

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

2013-04-25 Thread Jeff Cody
On Thu, Apr 25, 2013 at 03:05:37PM +0200, Kevin Wolf wrote: > 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

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

2013-04-25 Thread Stefan Hajnoczi
On Thu, Apr 25, 2013 at 09:51:47AM -0400, Luiz Capitulino wrote: > On Mon, 22 Apr 2013 15:53:43 +0200 > Stefan Hajnoczi 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 > > >

[Qemu-devel] [PATCH 12/15] pc: pass QEMUMachineInitArgs down to pc_cpus_init()

2013-04-25 Thread Igor Mammedov
It allows to store default cpu_model if none was specified. As side effect reduces size of the pc_piix.c code. Signed-off-by: Igor Mammedov --- hw/i386/pc.c | 11 hw/i386/pc_piix.c| 66 - hw/i386/pc_q35.c | 23 ++

Re: [Qemu-devel] SCSI CD-ROM hotplug problem

2013-04-25 Thread Stefan Hajnoczi
On Thu, Apr 25, 2013 at 01:40:41PM +, Liuji (Jeremy) wrote: > 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,i

[Qemu-devel] [PATCH 14/15] target-i386: implement machine->hot_add_cpu hook

2013-04-25 Thread Igor Mammedov
Signed-off-by: Igor Mammedov --- v2: * override .hot_add_cpu staticaly starting with 1.5 machine --- hw/i386/pc.c | 19 +++ hw/i386/pc_piix.c|1 + hw/i386/pc_q35.c |1 + include/hw/i386/pc.h |1 + 4 files changed, 22 insertions(+), 0 deletions(-) d

  1   2   3   >