[Qemu-devel] [PATCH v3] qdev: move the code adding the device out of realize

2014-03-03 Thread Amos Kong
Test steps: (qemu) device_add e1000,addr=adsf Property 'e1000.addr' doesn't take value 'adsf' (qemu) info qtree Then qemu crashed. Currently we set a link to the new device for qdev parent bus, but the device hasn't been added to QOM tree. When it fails to set properties, object_unparent() c

Re: [Qemu-devel] e1000 memory corruption in guest OS

2014-03-03 Thread Paolo Bonzini
Il 03/03/2014 02:58, Alexey Kardashevskiy ha scritto: On 03/02/2014 08:31 AM, Paolo Bonzini wrote: Il 01/03/2014 13:30, Alexey Kardashevskiy ha scritto: Corrupted DMA buffer is 0x e0 -- 0x7f15c313f000. The e1000 packet is at 0x12ffac2 -- 0x7f15c313eac2. (0x7f15c313f000 - 0x7f15c313eac2)

Re: [Qemu-devel] [PATCH 3/3] hw/9pfs: use g_strdup_printf() instead of PATH_MAX limitation

2014-03-03 Thread Markus Armbruster
Chen Gang writes: > When path is truncated by PATH_MAX limitation, it causes QEMU to access > incorrect file. So use original full path instead of PATH_MAX within > 9pfs (need check/process ENOMEM for related memory allocation). > > The related test: [...] > Signed-off-by: Chen Gang > --- > hw/

Re: [Qemu-devel] [PATCH] target-i386: bugfix of Intel MPX

2014-03-03 Thread Paolo Bonzini
Il 03/03/2014 06:24, Liu, Jinsong ha scritto: From 3a7783cd9a0556787809d3d5ecb5f2b85dd9fc02 Mon Sep 17 00:00:00 2001 From: Liu Jinsong Date: Mon, 3 Mar 2014 18:56:39 +0800 Subject: [PATCH] target-i386: bugfix of Intel MPX The correct size of cpuid 0x0d sub-leaf 4 is 0x40, not 0x10. This is conf

Re: [Qemu-devel] [PATCH 2/3] hw/9pfs/virtio-9p-local.c: use snprintf() instead of sprintf()

2014-03-03 Thread Markus Armbruster
Chen Gang writes: > 'ctx->fs_root' + 'path'/'fullname.data' may be larger than PATH_MAX, so > need use snprintf() instead of sprintf() just like another area have done in > 9pfs. > > Signed-off-by: Chen Gang > --- > hw/9pfs/virtio-9p-local.c | 7 --- > 1 file changed, 4 insertions(+), 3 de

Re: [Qemu-devel] [RFC PATCH v0 1/2] gluster: Change licence to GPLv2+

2014-03-03 Thread Bharata B Rao
On Thu, Jan 30, 2014 at 10:30:53AM +0100, Stefan Hajnoczi wrote: > On Wed, Jan 29, 2014 at 07:59:55PM +0530, Bharata B Rao wrote: > > Pipe handling mechanism in gluster driver was based on similar > > implementation > > in RBD driver and hence had GPLv2 and associated copyright information. > > Af

Re: [Qemu-devel] [RFC PATCH v0 0/2] gluster: licence change and cleanups

2014-03-03 Thread Stefan Hajnoczi
On Wed, Jan 29, 2014 at 07:59:54PM +0530, Bharata B Rao wrote: > Licence change of gluster driver from GPLv2 to GPLv2+ and some cleanups. > > Bharata B Rao (2): > gluster: Change licence to GPLv2+ > gluster: Remove unused defines and header include > > block/gluster.c | 16 ++-- >

Re: [Qemu-devel] [PATCH v3 0/2] dataplane: add query-iothreads QMP command

2014-03-03 Thread Stefan Hajnoczi
On Fri, Feb 28, 2014 at 02:00:28PM -0500, Luiz Capitulino wrote: > On Thu, 27 Feb 2014 11:48:40 +0100 > Stefan Hajnoczi wrote: > > > v3: > > * Loop until predicate is true to handle pthread_cond spurious wakeups > > [eblake] > > * Fix additional instances of "thread_id" [eblake] > > > > v2: >

[Qemu-devel] Using qemu to debug arm64 linux kernel

2014-03-03 Thread Xuebing wang
Hi community, I can think of 2 ways to use gdb+qemu to remotely debug arm64 kernel, by enabling gdbstub within qemu to communicate with gdb. I am wondering in the real-world practice, is this debug technique helpful for debugging arm64 kernel? Options are: 1) Host environment: qemu is runn

Re: [Qemu-devel] [PATCH v5 5/7] qdev: make get_pointer() handle temporary strings

2014-03-03 Thread Stefan Hajnoczi
On Fri, Feb 28, 2014 at 05:49:09PM +0100, Andreas Färber wrote: > Am 28.02.2014 16:18, schrieb Stefan Hajnoczi: > > From: Igor Mammedov > > > > get_pointer()'s print() callback might return a heap allocated > > string, to avoid adding dedicated get_pointer_foo for this case > > convert current pr

Re: [Qemu-devel] [PATCH v5 1/7] object: add object_get_canonical_basename()

2014-03-03 Thread Stefan Hajnoczi
On Fri, Feb 28, 2014 at 06:15:55PM +0100, Andreas Färber wrote: > Am 28.02.2014 16:18, schrieb Stefan Hajnoczi: > > It is often useful to find an object's child property name. Also use > > this new function to simplify the implementation of > > object_get_canonical_path(). > > > > Signed-off-by:

Re: [Qemu-devel] [PATCH] migration: add more traces

2014-03-03 Thread Paolo Bonzini
Good idea, but I dislike the generic trace_migrate_event tracepoint. Better add separate generic tracepoints, for example: @@ -111,7 +101,7 @@ static void process_incoming_migration_co(void *opaque) exit(EXIT_FAILURE); } qemu_announce_self(); -DPRINTF("successfully loaded

[Qemu-devel] What is qemu_irq?

2014-03-03 Thread Atlas Khan
Can any one tell me what is qemu_irq and where it is defined in QEMU?

Re: [Qemu-devel] [PATCH v5 3/6] vl: allow customizing the class of /machine

2014-03-03 Thread Alexey Kardashevskiy
On 03/01/2014 02:57 AM, Andreas Färber wrote: > Am 28.02.2014 16:08, schrieb Alexey Kardashevskiy: >> On 03/01/2014 02:05 AM, Paolo Bonzini wrote: >>> Il 28/02/2014 16:03, Alexey Kardashevskiy ha scritto: On 02/28/2014 02:04 AM, Marcel Apfelbaum wrote: > On Thu, 2014-02-27 at 15:59 +0100,

Re: [Qemu-devel] [PATCH RFC V2 8/9] machine-opts: replace qemu_opt_get by QOM QemuMachine queries

2014-03-03 Thread Paolo Bonzini
Il 02/03/2014 14:07, Marcel Apfelbaum ha scritto: @@ -1182,10 +1183,17 @@ ram_addr_t last_ram_offset(void) static void qemu_ram_setup_dump(void *addr, ram_addr_t size) { int ret; +bool dump_guest_core = true; + +if (object_property_is_set(OBJECT(current_machine), +

Re: [Qemu-devel] [PATCH RFC V2 6/9] vl.c: do not set 'type' property in obj_set_property

2014-03-03 Thread Paolo Bonzini
Il 02/03/2014 14:07, Marcel Apfelbaum ha scritto: Filter out also 'type' property when setting object's properties Signed-off-by: Marcel Apfelbaum --- vl.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/vl.c b/vl.c index c4939ef..dc206e1 100644 --- a/vl.c +++ b/vl.c @@ -

Re: [Qemu-devel] [PATCH RFC V2 9/9] hw/core: mapped QemuOpts into QEMUMachineInitArgs fields to remove duplication

2014-03-03 Thread Paolo Bonzini
Il 02/03/2014 14:07, Marcel Apfelbaum ha scritto: The QOM machine has both field per QemuOpt and an instance of QEMUMachineInitArgs. Removed dupplications. Signed-off-by: Marcel Apfelbaum I think this patch is a bit backwards. :) You should _start_ with properties that access QEMUMachineInit

[Qemu-devel] [PATCH v6 0/7] dataplane: switch to N:M devices-per-thread model

2014-03-03 Thread Stefan Hajnoczi
v6: * Rename to object_get_canonical_path_component() [Andreas] * Add g_assert(obj) in object_get_canonical_path_component() [Andreas] v5: * Use Igor's get_pointer() malloc string patch [Igor] * Add object_get_canonical_basename() and use it for iothread_get_id() [Igor] v4: * Rename qdev pro

[Qemu-devel] [PATCH v6 4/7] iothread: add I/O thread object

2014-03-03 Thread Stefan Hajnoczi
This is a stand-in for Michael Roth's QContext. I expect this to be replaced once QContext is completed. The IOThread object is an AioContext event loop thread. This patch adds the concept of multiple event loop threads, allowing users to define them. When SMP guests run on SMP hosts it makes s

[Qemu-devel] [PATCH v6 3/7] aio: add aio_context_acquire() and aio_context_release()

2014-03-03 Thread Stefan Hajnoczi
It can be useful to run an AioContext from a thread which normally does not "own" the AioContext. For example, request draining can be implemented by acquiring the AioContext and looping aio_poll() until all requests have been completed. The following pattern should work: /* Event loop thread

[Qemu-devel] [PATCH v6 5/7] qdev: make get_pointer() handle temporary strings

2014-03-03 Thread Stefan Hajnoczi
From: Igor Mammedov get_pointer()'s print() callback might return a heap allocated string, to avoid adding dedicated get_pointer_foo for this case convert current print() callbacks to return temporary heap allocated string and make get_pointer() free it. Cc: "Andreas Färber" Signed-off-by: Igor

[Qemu-devel] [PATCH v6 1/7] object: add object_get_canonical_path_component()

2014-03-03 Thread Stefan Hajnoczi
It is often useful to find an object's child property name. Also use this new function to simplify the implementation of object_get_canonical_path(). Cc: "Andreas Färber" Signed-off-by: Stefan Hajnoczi --- include/qom/object.h | 8 qom/object.c | 54 ++

[Qemu-devel] [PATCH v6 7/7] dataplane: replace internal thread with IOThread

2014-03-03 Thread Stefan Hajnoczi
Today virtio-blk dataplane uses a 1:1 device-per-thread model. Now that IOThreads have been introduced we can generalize this to N:M devices per threads. This patch drops thread code from dataplane in favor of running inside an IOThread AioContext. As a bonus we solve the case where a guest keep

[Qemu-devel] [PATCH v6 6/7] iothread: add "iothread" qdev property type

2014-03-03 Thread Stefan Hajnoczi
Add a "iothread" qdev property type so devices can be hooked up to an IOThread from the comand-line: qemu -object iothread,id=iothread0 \ -device some-device,x-iothread=iothread0 Note that Paolo Bonzini has suggested using QOM links instead. This way the relationship between the object

Re: [Qemu-devel] [PATCH RFC V2 7/9] qom: add object_property_is_set

2014-03-03 Thread Paolo Bonzini
Il 02/03/2014 14:07, Marcel Apfelbaum ha scritto: Sometimes is not enough to get property's value, but it is needed to know if the value was actually set. This is especially useful when querying bool properties and having different defaults on different scenarios. Signed-off-by: Marcel Apfelbau

[Qemu-devel] [PATCH v6 2/7] rfifolock: add recursive FIFO lock

2014-03-03 Thread Stefan Hajnoczi
QemuMutex does not guarantee fairness and cannot be acquired recursively: Fairness means each locker gets a turn and the scheduler cannot cause starvation. Recursive locking is useful for composition, it allows a sequence of locking operations to be invoked atomically by acquiring the lock around

Re: [Qemu-devel] [RFC PATCH v0 0/2] gluster: licence change and cleanups

2014-03-03 Thread Kevin Wolf
Am 03.03.2014 um 10:16 hat Stefan Hajnoczi geschrieben: > On Wed, Jan 29, 2014 at 07:59:54PM +0530, Bharata B Rao wrote: > > Licence change of gluster driver from GPLv2 to GPLv2+ and some cleanups. > > > > Bharata B Rao (2): > > gluster: Change licence to GPLv2+ > > gluster: Remove unused defi

Re: [Qemu-devel] qemu-img convert cache mode for source

2014-03-03 Thread Kevin Wolf
Am 28.02.2014 um 15:35 hat Peter Lieven geschrieben: > On 27.02.2014 09:57, Stefan Hajnoczi wrote: > >On Wed, Feb 26, 2014 at 05:01:52PM +0100, Peter Lieven wrote: > >>On 26.02.2014 16:41, Stefan Hajnoczi wrote: > >>>On Wed, Feb 26, 2014 at 11:14:04AM +0100, Peter Lieven wrote: > I was wonderin

Re: [Qemu-devel] qemu-img convert cache mode for source

2014-03-03 Thread Kevin Wolf
Am 27.02.2014 um 17:12 hat Peter Lieven geschrieben: > Am 27.02.2014 12:07, schrieb Kevin Wolf: > > Am 27.02.2014 um 02:10 hat Fam Zheng geschrieben: > >> On Wed, 02/26 16:41, Stefan Hajnoczi wrote: > >>> On Wed, Feb 26, 2014 at 11:14:04AM +0100, Peter Lieven wrote: > I was wondering if it wou

Re: [Qemu-devel] e1000 memory corruption in guest OS

2014-03-03 Thread Alexey Kardashevskiy
On 03/03/2014 07:33 PM, Paolo Bonzini wrote: > Il 03/03/2014 02:58, Alexey Kardashevskiy ha scritto: >> On 03/02/2014 08:31 AM, Paolo Bonzini wrote: >>> Il 01/03/2014 13:30, Alexey Kardashevskiy ha scritto: >> >> Corrupted DMA buffer is 0x e0 -- 0x7f15c313f000. >> The e1000 packet i

Re: [Qemu-devel] [PATCH RFC V2 3/9] hw/boards: converted current_machine to be an instance of QemuMachineCLass

2014-03-03 Thread Paolo Bonzini
Il 02/03/2014 14:07, Marcel Apfelbaum ha scritto: In order to allow attaching machine options to a machine instance, current_machine is converted into QemuMachineState. As a first step of deprecating QEMUMachine, some of the functions were modified to return QemuMachineCLass. This is a relative

Re: [Qemu-devel] [PATCH RFC V2 0/9] qemu-machine as a QOM object

2014-03-03 Thread Paolo Bonzini
Il 02/03/2014 14:07, Marcel Apfelbaum ha scritto: Most of the "Cc" list is due to patch 8: (Should I send each patch to a different list?) machine-opts: replace qemu_opt_get by QOM QemuMachine queries. Status: - machine_opts are mapped into QemuMachineState's properties, which can

Re: [Qemu-devel] [PATCH 3/3] hw/9pfs: use g_strdup_printf() instead of PATH_MAX limitation

2014-03-03 Thread Chen Gang
On 03/03/2014 04:34 PM, Markus Armbruster wrote: > Chen Gang writes: > >> When path is truncated by PATH_MAX limitation, it causes QEMU to access >> incorrect file. So use original full path instead of PATH_MAX within >> 9pfs (need check/process ENOMEM for related memory allocation). >> >> The re

Re: [Qemu-devel] [PATCH 2/3] hw/9pfs/virtio-9p-local.c: use snprintf() instead of sprintf()

2014-03-03 Thread Chen Gang
On 03/03/2014 04:34 PM, Markus Armbruster wrote: > Chen Gang writes: > >> 'ctx->fs_root' + 'path'/'fullname.data' may be larger than PATH_MAX, so >> need use snprintf() instead of sprintf() just like another area have done in >> 9pfs. >> >> Signed-off-by: Chen Gang >> --- >> hw/9pfs/virtio-9p-

Re: [Qemu-devel] [PATCH v2 5/7] allwinner-a10-pit: implement prescaler and source selection

2014-03-03 Thread Peter Crosthwaite
On Mon, Mar 3, 2014 at 12:06 AM, Beniamino Galvani wrote: > This implements the prescaler and source fields of the timer control > register as described in the A10 user manual. > > Signed-off-by: Beniamino Galvani > --- > hw/timer/allwinner-a10-pit.c | 19 ++- > 1 file changed,

Re: [Qemu-devel] The unholy encrypted image key mess

2014-03-03 Thread Kevin Wolf
Am 28.02.2014 um 22:01 hat Markus Armbruster geschrieben: > Questions: > > 1. Should we protect guests from state NEEDKEY? Yes. An image in state NEEDKEY isn't fully initialised, so we should make sure that it isn't used. > 2. If yes, how? > >Pause the guest when something enters state NEED

Re: [Qemu-devel] [PATCH v2 7/7] allwinner-emac: update irq status after writes to interrupt registers

2014-03-03 Thread Peter Crosthwaite
On Mon, Mar 3, 2014 at 12:06 AM, Beniamino Galvani wrote: > The irq line status must be updated after writes to the INT_CTL and > INT_STA registers. > > Signed-off-by: Beniamino Galvani Reviewed-by: Peter Crosthwaite > --- > hw/net/allwinner_emac.c |2 ++ > 1 file changed, 2 insertions(+)

Re: [Qemu-devel] [PATCH v2 3/7] allwinner-a10-pit: avoid generation of spurious interrupts

2014-03-03 Thread Peter Crosthwaite
On Mon, Mar 3, 2014 at 12:06 AM, Beniamino Galvani wrote: > The model was generating interrupts for all enabled timers after the > expiration of one of them. Avoid this by passing to the timer callback > function a structure containing the index of the expired timer. > Nice catch! I think there w

Re: [Qemu-devel] [PATCH v2 1/7] allwinner-a10-pic: set vector address when an interrupt is pending

2014-03-03 Thread Peter Crosthwaite
On Mon, Mar 3, 2014 at 12:06 AM, Beniamino Galvani wrote: > This patch implements proper updating of the vector register which > should hold, according to the A10 user manual, the vector address for > the interrupt currently active on the CPU IRQ input. > > Interrupt priority is not implemented at

Re: [Qemu-devel] qemu-img convert cache mode for source

2014-03-03 Thread Peter Lieven
On 03.03.2014 11:38, Kevin Wolf wrote: Am 28.02.2014 um 15:35 hat Peter Lieven geschrieben: On 27.02.2014 09:57, Stefan Hajnoczi wrote: On Wed, Feb 26, 2014 at 05:01:52PM +0100, Peter Lieven wrote: On 26.02.2014 16:41, Stefan Hajnoczi wrote: On Wed, Feb 26, 2014 at 11:14:04AM +0100, Peter Lie

Re: [Qemu-devel] e1000 memory corruption in guest OS

2014-03-03 Thread Paolo Bonzini
Il 03/03/2014 11:47, Alexey Kardashevskiy ha scritto: > > Sorry, I am not following you here. Does KVM map things not page-aligned? > > Look in exec.c for xen_enabled(). Xen's implementation of > address_space_map/unmap is completely different. Honestly cannot see much difference in the current

Re: [Qemu-devel] [PATCH v3 3/6] qemu-img convert: Support multiple -o options

2014-03-03 Thread Peter Lieven
On 21.02.2014 16:24, Kevin Wolf wrote: Instead of ignoring all option values but the last one, multiple -o options now have the same meaning as having a single option with all settings in the order of their respective -o options. Signed-off-by: Kevin Wolf --- qemu-img.c | 34 +

Re: [Qemu-devel] [PATCH v2 2/7] allwinner-a10-pic: update pending register when an irq is cleared

2014-03-03 Thread Peter Crosthwaite
On Mon, Mar 3, 2014 at 12:06 AM, Beniamino Galvani wrote: > The value of pending register was updated only when an irq was raised > from a device; it should also be updated when an interrupt is cleared. > So the reason for doing this is obviously the need for level sensitive interrupts. Current i

Re: [Qemu-devel] qemu-img convert cache mode for source

2014-03-03 Thread Stefan Hajnoczi
On Fri, Feb 28, 2014 at 03:35:05PM +0100, Peter Lieven wrote: > On 27.02.2014 09:57, Stefan Hajnoczi wrote: > >On Wed, Feb 26, 2014 at 05:01:52PM +0100, Peter Lieven wrote: > >>On 26.02.2014 16:41, Stefan Hajnoczi wrote: > >>>On Wed, Feb 26, 2014 at 11:14:04AM +0100, Peter Lieven wrote: > I was

Re: [Qemu-devel] [PATCH RFC V2 0/9] qemu-machine as a QOM object

2014-03-03 Thread Marcel Apfelbaum
On Mon, 2014-03-03 at 11:50 +0100, Paolo Bonzini wrote: > Il 02/03/2014 14:07, Marcel Apfelbaum ha scritto: > > Most of the "Cc" list is due to patch 8: (Should I send each patch to a > > different list?) > > machine-opts: replace qemu_opt_get by QOM QemuMachine queries. > > > > Status: > >

Re: [Qemu-devel] [PATCH RFC V2 3/9] hw/boards: converted current_machine to be an instance of QemuMachineCLass

2014-03-03 Thread Marcel Apfelbaum
On Mon, 2014-03-03 at 11:49 +0100, Paolo Bonzini wrote: > Il 02/03/2014 14:07, Marcel Apfelbaum ha scritto: > > In order to allow attaching machine options to a machine instance, > > current_machine is converted into QemuMachineState. > > As a first step of deprecating QEMUMachine, some of the func

Re: [Qemu-devel] [PATCH RFC V2 7/9] qom: add object_property_is_set

2014-03-03 Thread Marcel Apfelbaum
On Mon, 2014-03-03 at 11:13 +0100, Paolo Bonzini wrote: > Il 02/03/2014 14:07, Marcel Apfelbaum ha scritto: > > Sometimes is not enough to get property's value, > > but it is needed to know if the value was actually set. > > > > This is especially useful when querying bool properties > > and havin

Re: [Qemu-devel] [PATCH RFC V2 6/9] vl.c: do not set 'type' property in obj_set_property

2014-03-03 Thread Marcel Apfelbaum
On Mon, 2014-03-03 at 11:11 +0100, Paolo Bonzini wrote: > Il 02/03/2014 14:07, Marcel Apfelbaum ha scritto: > > Filter out also 'type' property when setting > > object's properties > > > > Signed-off-by: Marcel Apfelbaum > > --- > > vl.c | 3 ++- > > 1 file changed, 2 insertions(+), 1 deletion(-

Re: [Qemu-devel] [PATCH RFC V2 9/9] hw/core: mapped QemuOpts into QEMUMachineInitArgs fields to remove duplication

2014-03-03 Thread Marcel Apfelbaum
On Mon, 2014-03-03 at 11:13 +0100, Paolo Bonzini wrote: > Il 02/03/2014 14:07, Marcel Apfelbaum ha scritto: > > The QOM machine has both field per QemuOpt and an instance of > > QEMUMachineInitArgs. Removed dupplications. > > > > Signed-off-by: Marcel Apfelbaum > > I think this patch is a bit ba

Re: [Qemu-devel] [PATCH RFC V2 3/9] hw/boards: converted current_machine to be an instance of QemuMachineCLass

2014-03-03 Thread Marcel Apfelbaum
On Mon, 2014-03-03 at 11:49 +0100, Paolo Bonzini wrote: > Il 02/03/2014 14:07, Marcel Apfelbaum ha scritto: > > In order to allow attaching machine options to a machine instance, > > current_machine is converted into QemuMachineState. > > As a first step of deprecating QEMUMachine, some of the fun

Re: [Qemu-devel] Request for openhackware.git mirror

2014-03-03 Thread Stefan Hajnoczi
On Sun, Mar 02, 2014 at 09:41:04PM +0100, Andreas Färber wrote: > We have a file pc-bios/ppc_rom.bin in qemu.git, used by PReP emulation, > to which we do not have available the full GPL source code. I would like > to replace the current file with a new binary built from original > OpenHack'Ware so

Re: [Qemu-devel] qemu-img convert cache mode for source

2014-03-03 Thread Peter Lieven
On 03.03.2014 13:03, Stefan Hajnoczi wrote: On Fri, Feb 28, 2014 at 03:35:05PM +0100, Peter Lieven wrote: On 27.02.2014 09:57, Stefan Hajnoczi wrote: On Wed, Feb 26, 2014 at 05:01:52PM +0100, Peter Lieven wrote: On 26.02.2014 16:41, Stefan Hajnoczi wrote: On Wed, Feb 26, 2014 at 11:14:04AM +0

Re: [Qemu-devel] [PATCH RFC V2 8/9] machine-opts: replace qemu_opt_get by QOM QemuMachine queries

2014-03-03 Thread Marcel Apfelbaum
On Mon, 2014-03-03 at 11:11 +0100, Paolo Bonzini wrote: > Il 02/03/2014 14:07, Marcel Apfelbaum ha scritto: > > @@ -1182,10 +1183,17 @@ ram_addr_t last_ram_offset(void) > > static void qemu_ram_setup_dump(void *addr, ram_addr_t size) > > { > > int ret; > > +bool dump_guest_core = true;

Re: [Qemu-devel] [RFC]VM live snapshot proposal

2014-03-03 Thread Stefan Hajnoczi
On Mon, Mar 03, 2014 at 01:13:41AM +, Huangpeng (Peter) wrote: Just to summarize the idea of live savevm for people joining the discussion: It should be possible to save a snapshot of the guest (including memory, devices, and disk) without noticable downtime. The 'savevm' command pauses the

Re: [Qemu-devel] [Bug 1286253] [NEW] virtio-net acceleration features not set when plugged into backend dynamically

2014-03-03 Thread Stefan Hajnoczi
On Fri, Feb 28, 2014 at 05:40:19PM -, Mario Smarduch wrote: > When using indpendent transport and backend in this case virtio-net- > device transport, none of the acceleration features are set after guest > probes the transport the backend is plugged into. For virtio-net this > leads to low thr

Re: [Qemu-devel] [Bug 1286253] [NEW] virtio-net acceleration features not set when plugged into backend dynamically

2014-03-03 Thread Michael S. Tsirkin
On Mon, Mar 03, 2014 at 01:37:46PM +0100, Stefan Hajnoczi wrote: > On Fri, Feb 28, 2014 at 05:40:19PM -, Mario Smarduch wrote: > > When using indpendent transport and backend in this case virtio-net- > > device transport, none of the acceleration features are set after guest > > probes the tran

Re: [Qemu-devel] [PATCH v5 5/7] qdev: make get_pointer() handle temporary strings

2014-03-03 Thread Igor Mammedov
On Mon, 3 Mar 2014 10:41:30 +0100 Stefan Hajnoczi wrote: > On Fri, Feb 28, 2014 at 05:49:09PM +0100, Andreas Färber wrote: > > Am 28.02.2014 16:18, schrieb Stefan Hajnoczi: > > > From: Igor Mammedov > > > > > > get_pointer()'s print() callback might return a heap allocated > > > string, to avoi

Re: [Qemu-devel] [PATCH RFC V2 3/9] hw/boards: converted current_machine to be an instance of QemuMachineCLass

2014-03-03 Thread Paolo Bonzini
Il 03/03/2014 13:07, Marcel Apfelbaum ha scritto: > ... which brings us to what is missing here: you are not adding > current_machine as /machine in the QOM tree. :) Is missing in purpose, I am not sure what are the consequences of changing the /machine from container to an actual object. I am

Re: [Qemu-devel] [PATCH RFC V2 6/9] vl.c: do not set 'type' property in obj_set_property

2014-03-03 Thread Paolo Bonzini
Il 03/03/2014 13:09, Marcel Apfelbaum ha scritto: > Unfortunately, it is quite possible to have a -object invocation where > the object has a "type" property. Thanks, I was thinking that "type" is a built-in property of the Object, derived directly from class's type, so no one can "set" this pro

Re: [Qemu-devel] [PATCH RFC V2 1/9] hw/core: introduced qemu machine as QOM object

2014-03-03 Thread Michael S. Tsirkin
On Sun, Mar 02, 2014 at 03:07:04PM +0200, Marcel Apfelbaum wrote: > The main functionality change is to convert QEMUMachine into QemuMachineClass > and QEMUMachineInitArgs into QemuMachineState, instance of QemuMachineClass. > > As a first step, in order to make possible an incremental developemen

Re: [Qemu-devel] [PATCH RFC V2 2/9] vl: use qemu machine QOM class instead of global machines list

2014-03-03 Thread Michael S. Tsirkin
On Sun, Mar 02, 2014 at 03:07:05PM +0200, Marcel Apfelbaum wrote: > The machine registration flow is refactored to use the QOM functionality. > Instead of linking the machines into a list, each machine has a type > and the types can be traversed in the QOM way. > > Signed-off-by: Marcel Apfelbaum

Re: [Qemu-devel] [RFC]VM live snapshot proposal

2014-03-03 Thread Kevin Wolf
Am 03.03.2014 um 13:32 hat Stefan Hajnoczi geschrieben: > On Mon, Mar 03, 2014 at 01:13:41AM +, Huangpeng (Peter) wrote: > > Just to summarize the idea of live savevm for people joining the > discussion: > > It should be possible to save a snapshot of the guest (including memory, > devices, a

Re: [Qemu-devel] [PATCH RFC V2 0/9] qemu-machine as a QOM object

2014-03-03 Thread Paolo Bonzini
Il 03/03/2014 13:07, Marcel Apfelbaum ha scritto: Another early refactoring should be to pass ¤t_machine->init_args to machine->init, not the "args". Problem is that this is a "private field", should I add a getter for it? vl.c is already accessing it one line before, isn't it? So vl.c is alr

Re: [Qemu-devel] [PATCH RFC V2 2/9] vl: use qemu machine QOM class instead of global machines list

2014-03-03 Thread Paolo Bonzini
Il 03/03/2014 13:58, Michael S. Tsirkin ha scritto: On Sun, Mar 02, 2014 at 03:07:05PM +0200, Marcel Apfelbaum wrote: > The machine registration flow is refactored to use the QOM functionality. > Instead of linking the machines into a list, each machine has a type > and the types can be traverse

Re: [Qemu-devel] qemu-img convert cache mode for source

2014-03-03 Thread Paolo Bonzini
Il 03/03/2014 12:20, Peter Lieven ha scritto: This #ifdef should be in the raw-posix driver. Please try to keep the qemu interface backend agnostic and leave POSIX_FADV_DONTNEED and friends as an implementation detail of block drivers. I had the same idee, but as far as I see the callback to t

Re: [Qemu-devel] [Qemu-ppc] [PATCH] target-ppc: Introduce hypervisor call H_GET_TCE

2014-03-03 Thread Laurent Dufour
On 21/02/2014 10:29, Laurent Dufour wrote: > This patch introduces the hypervisor call H_GET_TCE which is basically the > reverse of H_PUT_TCE, as defined in the Power Architecture Platform > Requirements (PAPR). > > The hcall H_GET_TCE is required by the kdump kernel which is calling it to > retr

Re: [Qemu-devel] [PATCH RFC V2 2/9] vl: use qemu machine QOM class instead of global machines list

2014-03-03 Thread Marcel Apfelbaum
On Mon, 2014-03-03 at 13:57 +0100, Paolo Bonzini wrote: > Il 03/03/2014 13:58, Michael S. Tsirkin ha scritto: > > On Sun, Mar 02, 2014 at 03:07:05PM +0200, Marcel Apfelbaum wrote: > >> > The machine registration flow is refactored to use the QOM functionality. > >> > Instead of linking the machines

Re: [Qemu-devel] qemu-img convert cache mode for source

2014-03-03 Thread Peter Lieven
On 03.03.2014 13:59, Paolo Bonzini wrote: Il 03/03/2014 12:20, Peter Lieven ha scritto: This #ifdef should be in the raw-posix driver. Please try to keep the qemu interface backend agnostic and leave POSIX_FADV_DONTNEED and friends as an implementation detail of block drivers. I had the same

Re: [Qemu-devel] [PATCH v3 3/6] qemu-img convert: Support multiple -o options

2014-03-03 Thread Kevin Wolf
Am 03.03.2014 um 12:43 hat Peter Lieven geschrieben: > On 21.02.2014 16:24, Kevin Wolf wrote: > >Instead of ignoring all option values but the last one, multiple -o > >options now have the same meaning as having a single option with all > >settings in the order of their respective -o options. > > >

Re: [Qemu-devel] [PATCH RFC V2 0/9] qemu-machine as a QOM object

2014-03-03 Thread Marcel Apfelbaum
On Mon, 2014-03-03 at 13:56 +0100, Paolo Bonzini wrote: > Il 03/03/2014 13:07, Marcel Apfelbaum ha scritto: > >> Another early refactoring should be to pass ¤t_machine->init_args > >> to machine->init, not the "args". > > Problem is that this is a "private field", should I add a getter for it? > >

Re: [Qemu-devel] [RFC]VM live snapshot proposal

2014-03-03 Thread Paolo Bonzini
Il 03/03/2014 13:32, Stefan Hajnoczi ha scritto: If there is not enough memory to fork, then a synchronous approach to catching guest memory writes is needed. I'm not sure if a good mechanism for that exists but the simplest would be mprotect(2) and a signal handler (which will make the guest ru

Re: [Qemu-devel] [RFC]VM live snapshot proposal

2014-03-03 Thread Paolo Bonzini
Il 03/03/2014 13:55, Kevin Wolf ha scritto: > > Due to memory-modifications may happen in kvm, qemu, or vhost, the key-part is how we > > can provide common page-modify-tracking-and-saving api, we completed a prototype by > > simply add modified-page tracking/saving function in qemu, and it see

Re: [Qemu-devel] Contribution - L2TPv3 transport

2014-03-03 Thread Stefan Hajnoczi
On Fri, Feb 28, 2014 at 08:28:11AM +, Anton Ivanov (antivano) wrote: > 3. Qemu to communicate with the local host, remote vms, network devices, > etc at speeds which for a number of use cases exceed the speed of the > legacy tap driver. This surprises me. It's odd that tap performs significan

Re: [Qemu-devel] [RFC]VM live snapshot proposal

2014-03-03 Thread Kevin Wolf
Am 03.03.2014 um 14:19 hat Paolo Bonzini geschrieben: > Il 03/03/2014 13:55, Kevin Wolf ha scritto: > > Due to memory-modifications may happen in kvm, qemu, or vhost, the > > key-part is how we > > can provide common page-modify-tracking-and-saving api, we completed a > > prot

Re: [Qemu-devel] [PATCH v3] qdev: move the code adding the device out of realize

2014-03-03 Thread Igor Mammedov
On Mon, 3 Mar 2014 15:57:55 +0800 Amos Kong wrote: s/subj/qdev: set properties after device's parent is assigned/ > Test steps: > (qemu) device_add e1000,addr=adsf > Property 'e1000.addr' doesn't take value 'adsf' > (qemu) info qtree > Then qemu crashed. > > Currently we set a link to th

Re: [Qemu-devel] [RFC]VM live snapshot proposal

2014-03-03 Thread Paolo Bonzini
Il 03/03/2014 14:30, Kevin Wolf ha scritto: > > So why don't we simply reuse the existing migration code? > I think this is different in the same way that block-backup and > block-mirror are different. Huangpeng's proposal would let you make > a consistent snapshot of disks and RAM. Right. Thoug

[Qemu-devel] [PATCH 2/2] qemu-iotests: Test progress output for conversion

2014-03-03 Thread Kevin Wolf
Signed-off-by: Kevin Wolf --- tests/qemu-iotests/086 | 65 ++ tests/qemu-iotests/086.out | 18 + tests/qemu-iotests/group | 1 + 3 files changed, 84 insertions(+) create mode 100755 tests/qemu-iotests/086 create mode 100644 tests/qe

[Qemu-devel] [PATCH 1/2] qemu-img convert: Fix progress output

2014-03-03 Thread Kevin Wolf
Initialise progress output only when the -p and -q options have already been parsed, otherwise it's always disabled. Reported-by: Peter Lieven Signed-off-by: Kevin Wolf --- qemu-img.c | 20 +++- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/qemu-img.c b/qemu-img

[Qemu-devel] [PATCH 0/2] qemu-img convert: Fix progress output

2014-03-03 Thread Kevin Wolf
Kevin Wolf (2): qemu-img convert: Fix progress output qemu-iotests: Test progress output for conversion qemu-img.c | 20 +++--- tests/qemu-iotests/086 | 65 ++ tests/qemu-iotests/086.out | 18 + tests/qemu-iot

Re: [Qemu-devel] Contribution - L2TPv3 transport

2014-03-03 Thread Anton Ivanov (antivano)
On 03/03/14 13:27, Stefan Hajnoczi wrote: > On Fri, Feb 28, 2014 at 08:28:11AM +, Anton Ivanov (antivano) wrote: >> 3. Qemu to communicate with the local host, remote vms, network devices, >> etc at speeds which for a number of use cases exceed the speed of the >> legacy tap driver. > This surp

Re: [Qemu-devel] [PATCH 2/2] [RFC] Convert Clock Timerlists to RCU V2

2014-03-03 Thread Mike Day
On Fri, Feb 28, 2014 at 3:05 PM, Alex Bligh wrote: >> Rather than introduce a second mutex for timerlists, which would >> require nested mutexes to in orderwrite to the timerlists, use one >> QemuMutex in the QemuClock structure for all write access to any list >> hanging off the QemuClock struct

Re: [Qemu-devel] [RFC]VM live snapshot proposal

2014-03-03 Thread Kevin Wolf
Am 03.03.2014 um 14:47 hat Paolo Bonzini geschrieben: > Il 03/03/2014 14:30, Kevin Wolf ha scritto: > >> > So why don't we simply reuse the existing migration code? > >> I think this is different in the same way that block-backup and > >> block-mirror are different. Huangpeng's proposal would let

[Qemu-devel] [PATCH] linux-user: translate signal number on return from sigtimedwait

2014-03-03 Thread Petar Jovanovic
From: Petar Jovanovic On success, sigtimedwait() returns a signal number that needs to be translated from a host value to a target value. This change also fixes issues with sigwait (that is implemented using sigtimedwait()). Signed-off-by: Petar Jovanovic --- linux-user/syscall.c | 16 +

Re: [Qemu-devel] [PATCH RFC V2 0/9] qemu-machine as a QOM object

2014-03-03 Thread Andreas Färber
Am 03.03.2014 14:17, schrieb Marcel Apfelbaum: > On Mon, 2014-03-03 at 13:56 +0100, Paolo Bonzini wrote: >> Il 03/03/2014 13:07, Marcel Apfelbaum ha scritto: >>> I see no reason why not, the main problem I see is the use of those wrappers >>> or setters/getters, I suspect that the usage will be: >>

Re: [Qemu-devel] [PATCH 2/2] [RFC] Convert Clock Timerlists to RCU V2

2014-03-03 Thread Paolo Bonzini
Il 28/02/2014 21:05, Alex Bligh ha scritto: Mike On 27 Feb 2014, at 19:35, Mike Day wrote: timerlists is a list of lists that holds active timers, among other items. It is read-mostly. This patch converts read access to the timerlists to use RCU. Rather than introduce a second mutex for timer

Re: [Qemu-devel] [PATCH v4 2/3] qapi: Add a primitive to include other files from a QAPI schema file

2014-03-03 Thread Lluís Vilanova
Markus Armbruster writes: > Lluís Vilanova writes: >> Adds the "include(...)" primitive to the syntax of QAPI schema files. >> >> Signed-off-by: Lluís Vilanova >> --- >> docs/qapi-code-gen.txt |8 >> scripts/qapi.py| 36 ++-- >> 2 files chang

Re: [Qemu-devel] [PATCH v4 1/3] qapi: Use an explicit input file

2014-03-03 Thread Lluís Vilanova
Markus Armbruster writes: > Lluís Vilanova writes: [...] >> diff --git a/scripts/qapi.py b/scripts/qapi.py >> index 9b3de4c..59c2b9b 100644 >> --- a/scripts/qapi.py >> +++ b/scripts/qapi.py >> @@ -12,6 +12,7 @@ >> # See the COPYING.LIB file in the top-level directory. >> >> from ordereddict impo

[Qemu-devel] [PATCH] Modify qemu-img can not create local filename contain ":"

2014-03-03 Thread Jun Li
Such as how to visit glusterfs: file=gluster://1.2.3.4/testvol/a.img file=gluster+tcp://1.2.3.4/testvol/a.img file=gluster+tcp://1.2.3.4:24007/testvol/dir/a.img file=gluster+tcp://[1:2:3:4:5:6:7:8]/testvol/dir/a.img file=gluster+tcp://[1:2:3:4:5:6:7:8]:24007/testvol/dir/a.img file=gluster+tcp://ser

Re: [Qemu-devel] [PATCH 2/3] hw/9pfs/virtio-9p-local.c: use snprintf() instead of sprintf()

2014-03-03 Thread Markus Armbruster
Chen Gang writes: > On 03/03/2014 04:34 PM, Markus Armbruster wrote: >> Chen Gang writes: >> >>> 'ctx->fs_root' + 'path'/'fullname.data' may be larger than PATH_MAX, so >>> need use snprintf() instead of sprintf() just like another area have done >>> in 9pfs. >>> >>> Signed-off-by: Chen Gang

Re: [Qemu-devel] [PATCH] linux-user: translate signal number on return from sigtimedwait

2014-03-03 Thread Peter Maydell
On 3 March 2014 14:07, Petar Jovanovic wrote: > From: Petar Jovanovic > > On success, sigtimedwait() returns a signal number that needs to be > translated from a host value to a target value. > > This change also fixes issues with sigwait (that is implemented using > sigtimedwait()). > > Signed-o

Re: [Qemu-devel] [PATCH RFC V2 2/9] vl: use qemu machine QOM class instead of global machines list

2014-03-03 Thread Andreas Färber
Am 03.03.2014 14:03, schrieb Marcel Apfelbaum: > On Mon, 2014-03-03 at 13:57 +0100, Paolo Bonzini wrote: >> Il 03/03/2014 13:58, Michael S. Tsirkin ha scritto: >>> On Sun, Mar 02, 2014 at 03:07:05PM +0200, Marcel Apfelbaum wrote: > The machine registration flow is refactored to use the QOM func

Re: [Qemu-devel] Contribution - L2TPv3 transport

2014-03-03 Thread Stefan Hajnoczi
On Fri, Feb 28, 2014 at 08:28:11AM +, Anton Ivanov (antivano) wrote: I didn't check all of Paolo and Eric's comments. Feel free to skip comments that have already been made. > diff --git a/include/qemu/sockets.h b/include/qemu/sockets.h > index 45588d7..865f1c2 100644 > --- a/include/qemu/so

Re: [Qemu-devel] [RFC]VM live snapshot proposal

2014-03-03 Thread Dr. David Alan Gilbert
* Paolo Bonzini (pbonz...@redhat.com) wrote: > Il 03/03/2014 14:30, Kevin Wolf ha scritto: > >> > So why don't we simply reuse the existing migration code? > >> I think this is different in the same way that block-backup and > >> block-mirror are different. Huangpeng's proposal would let you make

Re: [Qemu-devel] qemu-img cannot convert 280G VHD file to qcow2 rightly

2014-03-03 Thread Stefan Hajnoczi
On Fri, Feb 28, 2014 at 07:10:18PM +0800, redtone wrote: > Vhd file uslinux01-1.vhd is uploaded to KVM node, the original VHD's size is > 290G > But when I convert to QCOW2, I find the disk size is 127G, and then I also > found the uslinux01-1.vhd disk size is 127G by qemu-img info. > > Qemu versi

Re: [Qemu-devel] [PATCH v6 0/4] qemu-img: add preallocation=full

2014-03-03 Thread Stefan Hajnoczi
On Fri, Feb 28, 2014 at 10:29:29AM +0800, Hu Tao wrote: > This series implements full image preallocation to create a non-sparse image > file at creation time, both for raw and qcow2 format. The purpose is to avoid > performance deterioration of the guest cause by sparse image. > > v6: > - add `

Re: [Qemu-devel] [PATCH RFC V2 2/9] vl: use qemu machine QOM class instead of global machines list

2014-03-03 Thread Marcel Apfelbaum
On Mon, 2014-03-03 at 15:52 +0100, Andreas Färber wrote: > Am 03.03.2014 14:03, schrieb Marcel Apfelbaum: > > On Mon, 2014-03-03 at 13:57 +0100, Paolo Bonzini wrote: > >> Il 03/03/2014 13:58, Michael S. Tsirkin ha scritto: > >>> On Sun, Mar 02, 2014 at 03:07:05PM +0200, Marcel Apfelbaum wrote: > >>

Re: [Qemu-devel] [PATCH v4 2/3] qapi: Add a primitive to include other files from a QAPI schema file

2014-03-03 Thread Markus Armbruster
Lluís Vilanova writes: > Markus Armbruster writes: > >> Lluís Vilanova writes: >>> Adds the "include(...)" primitive to the syntax of QAPI schema files. >>> >>> Signed-off-by: Lluís Vilanova >>> --- >>> docs/qapi-code-gen.txt |8 >>> scripts/qapi.py| 36 ++

[Qemu-devel] [PATCH 00/10] block/json: Add JSON protocol driver

2014-03-03 Thread Max Reitz
This series adds a passthrough JSON protocol block driver. Its filenames are JSON objects prefixed by "json:". The objects are used as options for opening another block device which will be the child of the JSON device. Regarding this child device, the JSON driver behaves nearly the same as raw_bsd

[Qemu-devel] [PATCH 02/10] block/json: Add JSON protocol driver

2014-03-03 Thread Max Reitz
Add a JSON protocol driver which allows supplying block driver options through the filename rather than separately. Other than that, it is a pure passthrough driver which identifies itself as a filter. This patch implements the functions bdrv_parse_filename(), bdrv_file_open(), bdrv_close(), bdrv_

[Qemu-devel] [PATCH 04/10] block/json: Add functions for writing zeroes etc.

2014-03-03 Thread Max Reitz
Add passthrough functions for bdrv_aio_discard(), bdrv_co_write_zeroes(), bdrv_truncate() and bdrv_has_zero_init(). Signed-off-by: Max Reitz --- block/json.c | 30 ++ 1 file changed, 30 insertions(+) diff --git a/block/json.c b/block/json.c index 2f885cc..a2f4691 100

  1   2   3   >