[Qemu-devel] [PATCH v2 0/7] TCG global variables clean-up

2012-10-23 Thread Evgeny Voevodin
This set of patches moves global variables to tcg_ctx: gen_opc_ptr gen_opparam_ptr gen_opc_buf gen_opparam_buf Build tested for all targets. Execution tested on ARM. I didn't notice any slow-down of kernel boot after this set was applied. Changelog: v1->v2: Introduced TCGContext *tcg_cur_ctx glo

Re: [Qemu-devel] qemu <-> libvirt interaction broken

2012-10-23 Thread Gerd Hoffmann
On 10/22/12 15:51, Peter Maydell wrote: > On 22 October 2012 14:28, Gerd Hoffmann wrote: >> Commit 585f60368f23e6603cf86cfdaeceb89d1169f4b8 appearently breaks the >> libvirt feature detection, my guests fail to start with this message: >> >> error: Failed to start domain fedora-org-virtio >> error

[Qemu-devel] [PATCH v2 2/7] translate-all.c: Introduce TCGContext *tcg_cur_ctx

2012-10-23 Thread Evgeny Voevodin
We will use this pointer from functions where we don't have an interface to pass tcg_ctx as a parameter. Signed-off-by: Evgeny Voevodin --- tcg/tcg.h |1 + translate-all.c |1 + 2 files changed, 2 insertions(+) diff --git a/tcg/tcg.h b/tcg/tcg.h index 43b4317..d326b36 100644 --- a

Re: [Qemu-devel] Resource reporting for VGA cards

2012-10-23 Thread Gerd Hoffmann
On 10/22/12 21:43, Hervé Poussineau wrote: > Hello, > > I'm trying to add support for a S3 PCI VGA card to QEMU. It currently > works on some non-x86 systems. > However, on x86, it seems that the card is correctly detected, but there > is no display at all; I think it is due to bad framebuffer add

[Qemu-devel] [PATCH] qemu-options.hx: complete -nodefaults device list

2012-10-23 Thread Stefan Hajnoczi
Commit 66c19bf1204f2cb283918c24d4eb74d02c5e882c ('qemu-options.hx: Improve -nodefaults description') added an incomplete list of devices disabled with -nodefaults. This -nodefaults code rarely changes so it's worth documenting the full list of devices that are disabled with -nodefaults, thus savin

Re: [Qemu-devel] qemu <-> libvirt interaction broken

2012-10-23 Thread Peter Maydell
On 23 October 2012 08:03, Gerd Hoffmann wrote: > On 10/22/12 15:51, Peter Maydell wrote: >> On 22 October 2012 14:28, Gerd Hoffmann wrote: >>> Commit 585f60368f23e6603cf86cfdaeceb89d1169f4b8 appearently breaks the >>> libvirt feature detection, my guests fail to start with this message: >>> >>> e

Re: [Qemu-devel] [PATCH v2 0/7] TCG global variables clean-up

2012-10-23 Thread Evgeny Voevodin
On 10/23/2012 10:21 AM, Evgeny Voevodin wrote: This set of patches moves global variables to tcg_ctx: gen_opc_ptr gen_opparam_ptr gen_opc_buf gen_opparam_buf Build tested for all targets. Execution tested on ARM. I didn't notice any slow-down of kernel boot after this set was applied. Changelo

Re: [Qemu-devel] qemu <-> libvirt interaction broken

2012-10-23 Thread Gerd Hoffmann
On 10/23/12 10:19, Peter Maydell wrote: > On 23 October 2012 08:03, Gerd Hoffmann wrote: >> On 10/22/12 15:51, Peter Maydell wrote: >>> On 22 October 2012 14:28, Gerd Hoffmann wrote: Commit 585f60368f23e6603cf86cfdaeceb89d1169f4b8 appearently breaks the libvirt feature detection, my gue

Re: [Qemu-devel] [patch v4 10/16] memory: introduce lock ops for MemoryRegionOps

2012-10-23 Thread Jan Kiszka
On 2012-10-23 07:53, liu ping fan wrote: > On Mon, Oct 22, 2012 at 6:30 PM, Avi Kivity wrote: >> On 10/22/2012 11:23 AM, Liu Ping Fan wrote: >>> This can help memory core to use mr's fine lock to mmio dispatch. >>> >>> diff --git a/memory.c b/memory.c >>> index d528d1f..86d5623 100644 >>> --- a/me

Re: [Qemu-devel] [patch v4 12/16] e1000: apply fine lock on e1000

2012-10-23 Thread Jan Kiszka
On 2012-10-22 11:23, Liu Ping Fan wrote: > Use local lock to protect e1000. When calling the system function, > dropping the fine lock before acquiring the big lock. This will > introduce broken device state, which need extra effort to fix. > > Signed-off-by: Liu Ping Fan > --- > hw/e1000.c |

Re: [Qemu-devel] [patch v4 13/16] e1000: add busy flag to anti broken device state

2012-10-23 Thread Avi Kivity
On 10/23/2012 07:52 AM, liu ping fan wrote: > On Mon, Oct 22, 2012 at 6:40 PM, Avi Kivity wrote: >> On 10/22/2012 11:23 AM, Liu Ping Fan wrote: >>> The broken device state is caused by releasing local lock before acquiring >>> big lock. To fix this issue, we have two choice: >>> 1.use busy flag

Re: [Qemu-devel] [patch v4 13/16] e1000: add busy flag to anti broken device state

2012-10-23 Thread Jan Kiszka
On 2012-10-23 07:52, liu ping fan wrote: > On Mon, Oct 22, 2012 at 6:40 PM, Avi Kivity wrote: >> On 10/22/2012 11:23 AM, Liu Ping Fan wrote: >>> The broken device state is caused by releasing local lock before acquiring >>> big lock. To fix this issue, we have two choice: >>> 1.use busy flag to

Re: [Qemu-devel] [patch v4 13/16] e1000: add busy flag to anti broken device state

2012-10-23 Thread liu ping fan
On Tue, Oct 23, 2012 at 5:07 PM, Jan Kiszka wrote: > On 2012-10-23 07:52, liu ping fan wrote: >> On Mon, Oct 22, 2012 at 6:40 PM, Avi Kivity wrote: >>> On 10/22/2012 11:23 AM, Liu Ping Fan wrote: The broken device state is caused by releasing local lock before acquiring big lock. To fix

Re: [Qemu-devel] [patch v4 13/16] e1000: add busy flag to anti broken device state

2012-10-23 Thread Avi Kivity
On 10/23/2012 11:32 AM, liu ping fan wrote: > On Tue, Oct 23, 2012 at 5:07 PM, Jan Kiszka wrote: >> On 2012-10-23 07:52, liu ping fan wrote: >>> On Mon, Oct 22, 2012 at 6:40 PM, Avi Kivity wrote: On 10/22/2012 11:23 AM, Liu Ping Fan wrote: > The broken device state is caused by releasing

Re: [Qemu-devel] [PATCH] main: Hide F_GETFD and FD_CLOEXEC use for _WIN32

2012-10-23 Thread Kevin Wolf
Am 22.10.2012 19:46, schrieb Corey Bryant: > > > On 10/22/2012 12:16 PM, Luiz Capitulino wrote: >> On Mon, 22 Oct 2012 09:53:44 -0400 >> Corey Bryant wrote: >> >>> >>> Signed-off-by: Corey Bryant >>> --- >>> vl.c | 2 ++ >>> 1 file changed, 2 insertions(+) >>> >>> diff --git a/vl.c b/vl.c >>

Re: [Qemu-devel] [PATCH 5/8] qemu-img: img_create(): use Error object

2012-10-23 Thread Markus Armbruster
Kevin Wolf writes: > Am 18.10.2012 15:49, schrieb Luiz Capitulino: >> On Thu, 18 Oct 2012 14:11:40 +0200 >> Kevin Wolf wrote: >> >>> Am 17.10.2012 21:35, schrieb Luiz Capitulino: Signed-off-by: Luiz Capitulino --- qemu-img.c | 10 +++--- 1 file changed, 7 insertions(+)

Re: [Qemu-devel] [PATCH 5/8] qemu-img: img_create(): use Error object

2012-10-23 Thread Kevin Wolf
Am 23.10.2012 11:58, schrieb Markus Armbruster: > Kevin Wolf writes: > >> Am 18.10.2012 15:49, schrieb Luiz Capitulino: >>> On Thu, 18 Oct 2012 14:11:40 +0200 >>> Kevin Wolf wrote: >>> Am 17.10.2012 21:35, schrieb Luiz Capitulino: > Signed-off-by: Luiz Capitulino > --- > qemu-

[Qemu-devel] [PATCH 0/2] Qemu boot order patch series

2012-10-23 Thread Avik Sil
Hi, This patch series implements requirement 1 of the mailing list discussion [1], i.e., to allow a machine to specify if it wants a default boot order or not. Comments are welcome. Regards, Avik [1] http://lists.nongnu.org/archive/html/qemu-devel/2012-10/msg02799.html Avik Sil (2): Make de

[Qemu-devel] [PATCH 2/2] pseries: set boot-device property only if boot order specified

2012-10-23 Thread Avik Sil
Signed-off-by: Avik Sil --- hw/spapr.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/hw/spapr.c b/hw/spapr.c index 637b3fb..1b2340c 100644 --- a/hw/spapr.c +++ b/hw/spapr.c @@ -283,7 +283,9 @@ static void *spapr_create_fdt_skel(const char *cpu_model, _FDT((fdt_

[Qemu-devel] [PATCH 1/2] Make default boot order machine specific

2012-10-23 Thread Avik Sil
This patch makes default boot order machine specific instead of set globally. The default boot order can be set per machine in QEMUMachine default_machine_opts, or by the command line using -machine ,boot=, or by standard -boot option. This allows a machine to receive a NULL boot order when -boot i

Re: [Qemu-devel] [PATCH 1/2] Make default boot order machine specific

2012-10-23 Thread Alexander Graf
On 23.10.2012, at 12:09, Avik Sil wrote: > This patch makes default boot order machine specific instead of > set globally. The default boot order can be set per machine in > QEMUMachine default_machine_opts, or by the command line using > -machine ,boot=, or by standard -boot > option. This allow

Re: [Qemu-devel] [PATCH 1/3] nbd: Only try to send flush/discard commands if connected to the NBD server

2012-10-23 Thread Kevin Wolf
Am 22.10.2012 13:09, schrieb n...@bytemark.co.uk: > > This is unlikely to come up now, but is a necessary prerequisite for > reconnection > behaviour. > > Signed-off-by: Nick Thomas > --- > block/nbd.c | 13 +++-- > 1 files changed, 11 insertions(+), 2 deletions(-) What's the real r

Re: [Qemu-devel] [PATCH 16/37] target-i386: set kvm CPUID default feature values using static properties

2012-10-23 Thread Igor Mammedov
On Mon, 22 Oct 2012 19:20:10 -0400 Don Slutz wrote: > On 10/22/12 11:03, Igor Mammedov wrote: > > Replace setting default supported kvm features in cpu_x86_find_by_name() > > by default values in corresponding static properties. > > > > - Compile in kvm CPUID features only if CONFIG_KVM is define

Re: [Qemu-devel] [PATCH 2/3] nbd: Explicitly disconnect and fail inflight I/O requests on error, then reconnect next I/O request.

2012-10-23 Thread Kevin Wolf
Am 22.10.2012 13:09, schrieb n...@bytemark.co.uk: > > The previous behaviour when an NBD connection broke was to fail just the > broken I/O request > and (sometimes) never unlock send_mutex. Now we explicitly call > nbd_teardown_connection and > fail all NBD requests in the "inflight" state - th

[Qemu-devel] [RFC v3 0/8] QEMU: Support KVM on ARM

2012-10-23 Thread Peter Maydell
Round 3 of the QEMU patches to support KVM for ARM on Cortex-A15 hardware. It's intended for use with the kernel tree at git://github.com/virtualopensystems/linux-kvm-arm.git kvm-arm-v13-vgic-timers Still RFC pending the kernel patches actually being accepted upstream... Changes since v2: * app

[Qemu-devel] [RFC v3 5/8] linux-headers: update with VGIC related headers (not for upstream)

2012-10-23 Thread Peter Maydell
This updates the headers to match Christoffer's kvm-arm-v13-vgic-timers branch (commit e1414f8), which adds the VGIC related ioctls/definitions. --- linux-headers/asm-arm/kvm.h | 13 + linux-headers/linux/kvm.h |8 2 files changed, 21 insertions(+) diff --git a/linux-

[Qemu-devel] [RFC v3 4/8] hw/arm_gic: Add presave/postload hooks

2012-10-23 Thread Peter Maydell
Add presave/postload hooks to the ARM GIC common base class. These will be used by the KVM in-kernel GIC subclass to sync state between kernel and userspace when migrating. Signed-off-by: Peter Maydell Reviewed-by: Andreas Färber --- hw/arm_gic_common.c | 10 ++ hw/arm_gic_internal.

Re: [Qemu-devel] [PATCH 16/37] target-i386: set kvm CPUID default feature values using static properties

2012-10-23 Thread Andreas Färber
Am 23.10.2012 12:40, schrieb Igor Mammedov: > On Mon, 22 Oct 2012 19:20:10 -0400 > Don Slutz wrote: > >> On 10/22/12 11:03, Igor Mammedov wrote: >>> Replace setting default supported kvm features in cpu_x86_find_by_name() >>> by default values in corresponding static properties. >>> >>> - Compile

[Qemu-devel] [RFC v3 1/8] linux-headers: Add ARM KVM headers (not for upstream)

2012-10-23 Thread Peter Maydell
This commit adds the ARM KVM headers. This is not to go to QEMU upstream -- the correct path there is that the KVM code will be committed to a mainline upstream kernel, and then upstream QEMU can do a bulk header update from the upstream kernel, which will allow us to drop this temporary commit. T

[Qemu-devel] [RFC v3 8/8] configure: Enable KVM on ARM

2012-10-23 Thread Peter Maydell
Enable KVM on ARM hosts, now that all the necessary components for it exist. Signed-off-by: Peter Maydell --- configure |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configure b/configure index fa5657f..8173367 100755 --- a/configure +++ b/configure @@ -3850,7 +3850,7 @@

[Qemu-devel] [RFC v3 2/8] ARM: KVM: Add support for KVM on ARM architecture

2012-10-23 Thread Peter Maydell
From: Christoffer Dall Add basic support for KVM on ARM architecture. Signed-off-by: Christoffer Dall [PMM: Minor tweaks and code cleanup, switch to ONE_REG] Signed-off-by: Peter Maydell --- hw/arm_pic.c | 26 target-arm/Makefile.objs |1 + target-arm/cpu.h |

[Qemu-devel] [RFC v3 6/8] target-arm: Use MemoryListener to identify GIC base address for KVM

2012-10-23 Thread Peter Maydell
When using an in-kernel GIC with KVM, we need to tell the kernel where the GIC's memory mapped registers live. Do this by registering a MemoryListener which tracks where the board model maps the A15's private peripherals, so we can finish the GIC initialisation when the GIC is actually mapped. Sig

[Qemu-devel] [RFC v3 3/8] ARM KVM: save and load VFP registers from kernel

2012-10-23 Thread Peter Maydell
Add support for saving and restoring VFP register state from the kernel. This includes a check that the KVM-created CPU has full VFP support (as the TCG Cortex-A15 model always does), since for the moment ARM QEMU doesn't have any way to tweak optional features on created CPUs. Signed-off-by: Pete

[Qemu-devel] [RFC v3 7/8] hw/kvm/arm_gic: Implement support for KVM in-kernel ARM GIC

2012-10-23 Thread Peter Maydell
Implement support for using the KVM in-kernel GIC for ARM. Signed-off-by: Peter Maydell --- hw/a15mpcore.c |8 ++- hw/arm/Makefile.objs |1 + hw/kvm/arm_gic.c | 169 ++ 3 files changed, 177 insertions(+), 1 deletion(-) create mo

Re: [Qemu-devel] [PATCH 1/3] nbd: Only try to send flush/discard commands if connected to the NBD server

2012-10-23 Thread Nicholas Thomas
On Tue, 2012-10-23 at 12:33 +0200, Kevin Wolf wrote: > Am 22.10.2012 13:09, schrieb n...@bytemark.co.uk: > > > > This is unlikely to come up now, but is a necessary prerequisite for > > reconnection > > behaviour. > > > > Signed-off-by: Nick Thomas > > --- > > block/nbd.c | 13 +++--

Re: [Qemu-devel] [PATCH 1/3] nbd: Only try to send flush/discard commands if connected to the NBD server

2012-10-23 Thread Kevin Wolf
Am 23.10.2012 13:08, schrieb Nicholas Thomas: > On Tue, 2012-10-23 at 12:33 +0200, Kevin Wolf wrote: >> Am 22.10.2012 13:09, schrieb n...@bytemark.co.uk: >>> >>> This is unlikely to come up now, but is a necessary prerequisite for >>> reconnection >>> behaviour. >>> >>> Signed-off-by: Nick Thomas

Re: [Qemu-devel] [PATCH 08/29] migration (outgoing): add error propagation for all protocols

2012-10-23 Thread Paolo Bonzini
Il 22/10/2012 17:52, Markus Armbruster ha scritto: >> > >> > +fcntl(s->fd, F_SETFL, O_NONBLOCK); > Sure this can't fail? > Yes, we even assume that when we call socket_set_nonblock. Paolo

Re: [Qemu-devel] [PATCH 1/6] object: add object_property_add_bool

2012-10-23 Thread Markus Armbruster
Anthony Liguori writes: > Signed-off-by: Anthony Liguori > --- > include/qemu/object.h | 17 ++ > qom/object.c | 58 > + > 2 files changed, 75 insertions(+), 0 deletions(-) > > diff --git a/include/qemu/object.h b/include

Re: [Qemu-devel] [PATCH 14/29] vnc: introduce a single label for error returns

2012-10-23 Thread Paolo Bonzini
Il 22/10/2012 17:49, Markus Armbruster ha scritto: >> } >> > if (vs->lsock < 0) { >> > g_free(dpy); >> > -return -1; >> > +goto fail; > Now additionally executes > >g_free(vs->display); >vs->display = NULL; > > Silent bug fix?

Re: [Qemu-devel] [patch v4 08/16] QemuThread: make QemuThread as tls to store extra info

2012-10-23 Thread Paolo Bonzini
Il 22/10/2012 19:13, Peter Maydell ha scritto: >> > Can't we enhance qemu-tls.h to work via pthread_setspecific in case >> > __thread is not working and use that abstraction (DECLARE/DEFINE_TLS) >> > directly? > Agreed. (There were prototype patches floating around for Win32 > at least). The only r

Re: [Qemu-devel] [patch v4 08/16] QemuThread: make QemuThread as tls to store extra info

2012-10-23 Thread Peter Maydell
On 23 October 2012 12:48, Paolo Bonzini wrote: > Il 22/10/2012 19:13, Peter Maydell ha scritto: >>> > Can't we enhance qemu-tls.h to work via pthread_setspecific in case >>> > __thread is not working and use that abstraction (DECLARE/DEFINE_TLS) >>> > directly? >> Agreed. (There were prototype pat

Re: [Qemu-devel] [patch v4 05/16] memory: introduce ref, unref interface for MemoryRegionOps

2012-10-23 Thread Paolo Bonzini
Il 22/10/2012 11:38, Avi Kivity ha scritto: >> > >> > typedef struct MemoryRegionOps MemoryRegionOps; >> > typedef struct MemoryRegion MemoryRegion; >> > @@ -66,6 +67,8 @@ struct MemoryRegionOps { >> >target_phys_addr_t addr, >> >uint64_t data, >> >

Re: [Qemu-devel] [patch v4 08/16] QemuThread: make QemuThread as tls to store extra info

2012-10-23 Thread Jan Kiszka
On 2012-10-23 13:50, Peter Maydell wrote: > On 23 October 2012 12:48, Paolo Bonzini wrote: >> Il 22/10/2012 19:13, Peter Maydell ha scritto: > Can't we enhance qemu-tls.h to work via pthread_setspecific in case > __thread is not working and use that abstraction (DECLARE/DEFINE_TLS) > d

Re: [Qemu-devel] [patch v4 05/16] memory: introduce ref, unref interface for MemoryRegionOps

2012-10-23 Thread Avi Kivity
On 10/23/2012 01:51 PM, Paolo Bonzini wrote: > Il 22/10/2012 11:38, Avi Kivity ha scritto: >>> > >>> > typedef struct MemoryRegionOps MemoryRegionOps; >>> > typedef struct MemoryRegion MemoryRegion; >>> > @@ -66,6 +67,8 @@ struct MemoryRegionOps { >>> >target_phys_addr_t add

Re: [Qemu-devel] [PATCH v2 1/3] net: add public qemu_net_poll() function

2012-10-23 Thread Markus Armbruster
Stefan Hajnoczi writes: > From: Stefan Hajnoczi > > The NetClientInfo .poll() callback is being called directly by > hw/vhost_net.c. Create a public net.c function so callers do not > depend on internals. > > This change is useful because later patches change net internals. Those > changes sho

Re: [Qemu-devel] [patch v4 05/16] memory: introduce ref, unref interface for MemoryRegionOps

2012-10-23 Thread Paolo Bonzini
Il 23/10/2012 13:55, Avi Kivity ha scritto: >> > So the stop_machine idea is thrown away? > IIRC I convinced myself that it's just as bad. It may be just as bad, but it is less code (and less pervasive), which makes it less painful. Paolo

Re: [Qemu-devel] [PATCH v2 3/3] net: extract notify_link_status_changed() function

2012-10-23 Thread Markus Armbruster
Stefan Hajnoczi writes: > From: Stefan Hajnoczi > > The code to invoke the NetClientInfo .link_status_changed() callback is > duplicated in several places. Create a single > notify_link_status_changed() function and avoid duplication. > > This is useful because later patches change net internal

Re: [Qemu-devel] [patch v4 05/16] memory: introduce ref, unref interface for MemoryRegionOps

2012-10-23 Thread Avi Kivity
On 10/23/2012 01:57 PM, Paolo Bonzini wrote: > Il 23/10/2012 13:55, Avi Kivity ha scritto: >>> > So the stop_machine idea is thrown away? >> IIRC I convinced myself that it's just as bad. > > It may be just as bad, but it is less code (and less pervasive), which > makes it less painful. It save

Re: [Qemu-devel] [patch v4 05/16] memory: introduce ref, unref interface for MemoryRegionOps

2012-10-23 Thread Jan Kiszka
On 2012-10-23 13:55, Avi Kivity wrote: > On 10/23/2012 01:51 PM, Paolo Bonzini wrote: >> Il 22/10/2012 11:38, Avi Kivity ha scritto: > > typedef struct MemoryRegionOps MemoryRegionOps; > typedef struct MemoryRegion MemoryRegion; > @@ -66,6 +67,8 @@ struct MemoryRegionOps { >

Re: [Qemu-devel] [patch v4 05/16] memory: introduce ref, unref interface for MemoryRegionOps

2012-10-23 Thread Paolo Bonzini
Il 23/10/2012 14:02, Avi Kivity ha scritto: > On 10/23/2012 01:57 PM, Paolo Bonzini wrote: >> Il 23/10/2012 13:55, Avi Kivity ha scritto: > So the stop_machine idea is thrown away? >>> IIRC I convinced myself that it's just as bad. >> >> It may be just as bad, but it is less code (and less pe

Re: [Qemu-devel] [patch v4 05/16] memory: introduce ref, unref interface for MemoryRegionOps

2012-10-23 Thread Paolo Bonzini
Il 23/10/2012 14:04, Jan Kiszka ha scritto: >>> >> >>> >> So the stop_machine idea is thrown away? >> > >> > IIRC I convinced myself that it's just as bad. > One tricky part with stop machine is that legacy code may trigger it > while holding the BQL, does not expect to lose that lock even for a

Re: [Qemu-devel] [patch v4 07/16] memory: make mmio dispatch able to be out of biglock

2012-10-23 Thread Jan Kiszka
On 2012-10-22 11:23, Liu Ping Fan wrote: > Without biglock, we try to protect the mr by increase refcnt. > If we can inc refcnt, go backward and resort to biglock. > > Another point is memory radix-tree can be flushed by another > thread, so we should get the copy of terminal mr to survive > from

Re: [Qemu-devel] [RFC PATCH v3 11/19] Implement qmp and hmp commands for notification lists

2012-10-23 Thread Stefan Hajnoczi
On Fri, Sep 21, 2012 at 01:17:27PM +0200, Vasilis Liaskovitis wrote: > +MemHpInfoList *qmp_query_memory_hotplug(Error **errp) > +{ > +DimmBus *bus = main_memory_bus; > +MemHpInfoList *head = NULL, *cur_item = NULL, *info; > +struct dimm_hp_result *item, *nextitem; > + > +QTAILQ_FORE

Re: [Qemu-devel] [patch v4 05/16] memory: introduce ref, unref interface for MemoryRegionOps

2012-10-23 Thread Avi Kivity
On 10/23/2012 02:06 PM, Paolo Bonzini wrote: > Il 23/10/2012 14:02, Avi Kivity ha scritto: >> On 10/23/2012 01:57 PM, Paolo Bonzini wrote: >>> Il 23/10/2012 13:55, Avi Kivity ha scritto: >> So the stop_machine idea is thrown away? IIRC I convinced myself that it's just as bad. >>> >>> It

Re: [Qemu-devel] [patch v4 05/16] memory: introduce ref, unref interface for MemoryRegionOps

2012-10-23 Thread Jan Kiszka
On 2012-10-23 14:12, Paolo Bonzini wrote: > Il 23/10/2012 14:04, Jan Kiszka ha scritto: >> >> So the stop_machine idea is thrown away? IIRC I convinced myself that it's just as bad. >> One tricky part with stop machine is that legacy code may trigger it >> while holding the BQL,

[Qemu-devel] [PATCH 00/11] Quorum disk image corruption resiliency

2012-10-23 Thread Benoît Canet
This patchset is posted for inclusion into 1.3. It create a block driver implementing a quorum using total qemu disk images. Writes are mirrored on the $total files. For the reading part the $total files are read at the same time and a vote is done to determine if a qiov version is present $thresh

[Qemu-devel] [PATCH 02/11] quorum: Create BDRVQuorumState and BlkDriver and do init.

2012-10-23 Thread Benoît Canet
Signed-off-by: Benoit Canet --- block/quorum.c | 22 ++ 1 file changed, 22 insertions(+) diff --git a/block/quorum.c b/block/quorum.c index 65a6b55..19a9a44 100644 --- a/block/quorum.c +++ b/block/quorum.c @@ -15,6 +15,13 @@ #include "block_int.h" +typedef struct { +

[Qemu-devel] [PATCH 05/11] blkverify: Extract qemu_iovec_clone() and qemu_iovec_compare() from blkverify.

2012-10-23 Thread Benoît Canet
Signed-off-by: Benoit Canet --- block/blkverify.c | 108 + cutils.c | 103 ++ qemu-common.h |2 + 3 files changed, 107 insertions(+), 106 deletions(-) diff --git a/block/blkveri

[Qemu-devel] [PATCH 06/11] quorum: Add quorum_co_flush().

2012-10-23 Thread Benoît Canet
Signed-off-by: Benoit Canet --- block/quorum.c | 13 + 1 file changed, 13 insertions(+) diff --git a/block/quorum.c b/block/quorum.c index 878d930..1b40081 100644 --- a/block/quorum.c +++ b/block/quorum.c @@ -281,6 +281,18 @@ static BlockDriverAIOCB *quorum_aio_writev(BlockDriverS

[Qemu-devel] [PATCH 07/11] quorum: Add quorum_aio_readv.

2012-10-23 Thread Benoît Canet
Signed-off-by: Benoit Canet --- block/quorum.c | 38 +- 1 file changed, 37 insertions(+), 1 deletion(-) diff --git a/block/quorum.c b/block/quorum.c index 1b40081..51301fb 100644 --- a/block/quorum.c +++ b/block/quorum.c @@ -192,15 +192,24 @@ static void quo

[Qemu-devel] [PATCH 08/11] quorum: Add quorum mechanism.

2012-10-23 Thread Benoît Canet
Signed-off-by: Benoit Canet --- block/quorum.c | 278 +++- 1 file changed, 277 insertions(+), 1 deletion(-) diff --git a/block/quorum.c b/block/quorum.c index 51301fb..6d76c49 100644 --- a/block/quorum.c +++ b/block/quorum.c @@ -14,6 +14,20 @@

[Qemu-devel] [PATCH 09/11] quorum: Add quorum_getlength().

2012-10-23 Thread Benoît Canet
Check that every bs file return the same length. If not return -EIO to disable the quorum and avoid length discrepancy. Signed-off-by: Benoit Canet --- block/quorum.c | 20 1 file changed, 20 insertions(+) diff --git a/block/quorum.c b/block/quorum.c index 6d76c49..a01f71

Re: [Qemu-devel] [patch v4 08/16] QemuThread: make QemuThread as tls to store extra info

2012-10-23 Thread Paolo Bonzini
Il 23/10/2012 13:50, Peter Maydell ha scritto: > On 23 October 2012 12:48, Paolo Bonzini wrote: >> Il 22/10/2012 19:13, Peter Maydell ha scritto: > Can't we enhance qemu-tls.h to work via pthread_setspecific in case > __thread is not working and use that abstraction (DECLARE/DEFINE_TLS) >>

Re: [Qemu-devel] [RFC PATCH v3 05/19] Implement dimm device abstraction

2012-10-23 Thread Stefan Hajnoczi
On Fri, Sep 21, 2012 at 01:17:21PM +0200, Vasilis Liaskovitis wrote: > +static void dimm_populate(DimmDevice *s) > +{ > +DeviceState *dev= (DeviceState*)s; > +MemoryRegion *new = NULL; > + > +new = g_malloc(sizeof(MemoryRegion)); > +memory_region_init_ram(new, dev->id, s->size); > +

Re: [Qemu-devel] [patch v4 08/16] QemuThread: make QemuThread as tls to store extra info

2012-10-23 Thread Peter Maydell
On 23 October 2012 13:00, Paolo Bonzini wrote: > It does support pthread_get/setspecific, but it didn't support something > else so the qemu-tls.h variant that used pthread_get/setspecific didn't > work either. > > And it doesn't support sigaltstack in threads, so it's the only platform > where th

Re: [Qemu-devel] [patch v4 05/16] memory: introduce ref, unref interface for MemoryRegionOps

2012-10-23 Thread Avi Kivity
On 10/23/2012 02:16 PM, Jan Kiszka wrote: > On 2012-10-23 14:12, Paolo Bonzini wrote: >> Il 23/10/2012 14:04, Jan Kiszka ha scritto: >>> >>> So the stop_machine idea is thrown away? > > IIRC I convinced myself that it's just as bad. >>> One tricky part with stop machine is that le

Re: [Qemu-devel] [patch v4 05/16] memory: introduce ref, unref interface for MemoryRegionOps

2012-10-23 Thread Paolo Bonzini
Il 23/10/2012 14:15, Avi Kivity ha scritto: > On 10/23/2012 02:06 PM, Paolo Bonzini wrote: >> Il 23/10/2012 14:02, Avi Kivity ha scritto: >>> On 10/23/2012 01:57 PM, Paolo Bonzini wrote: Il 23/10/2012 13:55, Avi Kivity ha scritto: >>> So the stop_machine idea is thrown away? > IIRC I

[Qemu-devel] [PATCH 04/11] quorum: Add quorum_aio_writev and its dependencies.

2012-10-23 Thread Benoît Canet
Signed-off-by: Benoit Canet --- block/quorum.c | 112 1 file changed, 112 insertions(+) diff --git a/block/quorum.c b/block/quorum.c index 7b20f08..878d930 100644 --- a/block/quorum.c +++ b/block/quorum.c @@ -171,6 +171,116 @@ static void

Re: [Qemu-devel] [PULL 00/29] qemu-sockets error propagation + NBD server

2012-10-23 Thread Paolo Bonzini
Il 22/10/2012 21:53, Anthony Liguori ha scritto: > LINK vscclient > qemu-tool.o: In function `monitor_get_fd': > /home/anthony/git/qemu/qemu-tool.c:53: undefined reference to `error_set' > collect2: ld returned 1 exit status > make: *** [vscclient] Error 1 > > Even tried a clean build and get t

Re: [Qemu-devel] [patch v4 07/16] memory: make mmio dispatch able to be out of biglock

2012-10-23 Thread Avi Kivity
On 10/23/2012 02:12 PM, Jan Kiszka wrote: > On 2012-10-22 11:23, Liu Ping Fan wrote: >> Without biglock, we try to protect the mr by increase refcnt. >> If we can inc refcnt, go backward and resort to biglock. >> >> Another point is memory radix-tree can be flushed by another >> thread, so we shou

Re: [Qemu-devel] [patch v4 09/16] memory: introduce mmio request pending to anti nested DMA

2012-10-23 Thread Gleb Natapov
On Mon, Oct 22, 2012 at 05:23:52PM +0800, Liu Ping Fan wrote: > Rejecting the nested mmio request which does not aim at RAM, so we > can avoid the potential deadlock caused by the random lock sequence > of two device's local lock. > > Signed-off-by: Liu Ping Fan > --- > cpus.c | 1

Re: [Qemu-devel] [patch v4 05/16] memory: introduce ref, unref interface for MemoryRegionOps

2012-10-23 Thread Jan Kiszka
On 2012-10-23 14:28, Avi Kivity wrote: > On 10/23/2012 02:16 PM, Jan Kiszka wrote: >> On 2012-10-23 14:12, Paolo Bonzini wrote: >>> Il 23/10/2012 14:04, Jan Kiszka ha scritto: So the stop_machine idea is thrown away? >> >> IIRC I convinced myself that it's just as bad. >

[Qemu-devel] [PATCH 10/11] quorum: Add quorum_invalidate_cache().

2012-10-23 Thread Benoît Canet
Signed-off-by: Benoit Canet --- block/quorum.c | 11 +++ 1 file changed, 11 insertions(+) diff --git a/block/quorum.c b/block/quorum.c index a01f712..9550216 100644 --- a/block/quorum.c +++ b/block/quorum.c @@ -622,6 +622,16 @@ static int64_t quorum_getlength(BlockDriverState *bs)

Re: [Qemu-devel] [PATCH 1/5] qemu-char: Add new char backend CircularMemCharDriver

2012-10-23 Thread Luiz Capitulino
On Tue, 23 Oct 2012 13:40:13 +0800 Lei Li wrote: > >> +static int cirmem_chr_write(CharDriverState *chr, const uint8_t *buf, int > >> len) > >> +{ > >> +CirMemCharDriver *d = chr->opaque; > >> +int i; > >> + > >> +if (len < 0) { > >> +return -1; > >> +} > >> + > >> +/

Re: [Qemu-devel] [PATCH 3/5] QAPI: Introduce memchar-write QMP command

2012-10-23 Thread Luiz Capitulino
On Tue, 23 Oct 2012 14:36:17 +0800 Lei Li wrote: > On 10/23/2012 02:37 AM, Luiz Capitulino wrote: > > On Mon, 22 Oct 2012 00:47:59 +0800 > > Lei Li wrote: > > > >> Signed-off-by: Lei Li > >> --- > >> hmp-commands.hx | 22 + > >> hmp.c| 19 +++ > >>

Re: [Qemu-devel] [PATCH 16/37] target-i386: set kvm CPUID default feature values using static properties

2012-10-23 Thread Igor Mammedov
On Tue, 23 Oct 2012 12:55:00 +0200 Andreas Färber wrote: > Am 23.10.2012 12:40, schrieb Igor Mammedov: > > On Mon, 22 Oct 2012 19:20:10 -0400 > > Don Slutz wrote: > > > >> On 10/22/12 11:03, Igor Mammedov wrote: > >>> Replace setting default supported kvm features in cpu_x86_find_by_name() > >>

Re: [Qemu-devel] qemu <-> libvirt interaction broken

2012-10-23 Thread Anthony Liguori
Gerd Hoffmann writes: > On 10/23/12 10:19, Peter Maydell wrote: >> On 23 October 2012 08:03, Gerd Hoffmann wrote: >>> On 10/22/12 15:51, Peter Maydell wrote: On 22 October 2012 14:28, Gerd Hoffmann wrote: > Commit 585f60368f23e6603cf86cfdaeceb89d1169f4b8 appearently breaks the > li

[Qemu-devel] [PATCH 01/11] quorum: Create quorum.c, add QuorumSingleAIOCB and QuorumAIOCB.

2012-10-23 Thread Benoît Canet
Signed-off-by: Benoit Canet --- block/Makefile.objs |1 + block/quorum.c | 45 + 2 files changed, 46 insertions(+) create mode 100644 block/quorum.c diff --git a/block/Makefile.objs b/block/Makefile.objs index 554f429..f94e06f 100644 --- a/

[Qemu-devel] [PATCH v3 1/2] qmp: handle stop/cont in INMIGRATE state

2012-10-23 Thread Paolo Bonzini
Right now, stop followed by an incoming migration will let the virtual machine start. cont before an incoming migration instead will fail. This is bad because the actual behavior is not predictable; it is racy with respect to the start of the incoming migration. That's because incoming migration

Re: [Qemu-devel] [Bug 1066055] Re: Network performance regression with vde_switch

2012-10-23 Thread Stefan Hajnoczi
On Mon, Oct 22, 2012 at 06:50:00AM -0700, Edivaldo de Araujo Pereira wrote: > I didn't take enough time to uderstand the code, so unfortunately I fear > there is not much I could do to solve the problem, apart from trying your > suggestions. But I'll try to spend a little more time on it, until w

[Qemu-devel] [PATCH 11/11] quorum: Add quorum_co_is_allocated.

2012-10-23 Thread Benoît Canet
Signed-off-by: Benoit Canet --- block/quorum.c | 32 1 file changed, 32 insertions(+) diff --git a/block/quorum.c b/block/quorum.c index 9550216..587796d 100644 --- a/block/quorum.c +++ b/block/quorum.c @@ -632,6 +632,37 @@ static void quorum_invalidate_cache(B

Re: [Qemu-devel] [PATCH] Rename target_phys_addr_t to hwaddr

2012-10-23 Thread Paolo Bonzini
Il 23/10/2012 14:55, Anthony Liguori ha scritto: >> > Outstanding patchsets can be fixed up with the command >> > >> > git rebase -i --exec 'find -name "*.[ch]" >> > | xargs s/target_phys_addr_t/hwaddr/g' origin > We're getting pretty close to soft freeze so perhaps it's t

[Qemu-devel] [PATCH 03/11] quorum: Add quorum_open() and quorum_close().

2012-10-23 Thread Benoît Canet
Valid quorum resources look like quorum:threshold/total:path/to/image_1: ... :path/to/image_total ':' is used as a separator to allow to use networked path '\' is the escaping character for filename containing ':' '\' escape itself On the command line for quorum files "img,test.raw", "img2.raw" a

Re: [Qemu-devel] [PATCH] Rename target_phys_addr_t to hwaddr

2012-10-23 Thread Peter Maydell
On 23 October 2012 11:30, Avi Kivity wrote: > target_phys_addr_t is unwieldly, violates the C standard (_t suffixes are > reserved) and its purpose doesn't match the name (most target_phys_addr_t > addresses are not target specific). Replace it with a finger-friendly, > standards conformant hwadd

Re: [Qemu-devel] [PATCH 5/8] qemu-img: img_create(): use Error object

2012-10-23 Thread Luiz Capitulino
On Tue, 23 Oct 2012 12:08:56 +0200 Kevin Wolf wrote: > >> qemu-img doesn't have an HMP monitor, so it doesn't hurt either. If you > >> want to replace it, replace it with a copy of qemu-error.c that only > >> removes the monitor_vprintf() case. That is, in particular, leave all of > >> the loc_*(

Re: [Qemu-devel] qemu <-> libvirt interaction broken

2012-10-23 Thread Eric Blake
On 10/23/2012 06:47 AM, Anthony Liguori wrote: >>> >>> This change was postponed to after 1.2 was released to >>> give libvirt a chance to wean itself off parsing our --help >>> output. >> >> Yea, I know this has been the plan for a long time and I agree that it >> is a good move. >> >> Only probl

Re: [Qemu-devel] [PATCH 35/37] target-i386: use static properties in check_features_against_host() to print CPUID feature names

2012-10-23 Thread Igor Mammedov
On Mon, 22 Oct 2012 17:03:21 +0200 Igor Mammedov wrote: > Signed-off-by: Igor Mammedov > --- > v2: > * use separate for() for every feature word > --- > target-i386/cpu.c | 72 > +-- > 1 file changed, 43 insertions(+), 29 deletions(-) > >

Re: [Qemu-devel] [PATCH 1/2] Make default boot order machine specific

2012-10-23 Thread Anthony Liguori
Alexander Graf writes: > On 23.10.2012, at 12:09, Avik Sil wrote: > >> This patch makes default boot order machine specific instead of >> set globally. The default boot order can be set per machine in >> QEMUMachine default_machine_opts, or by the command line using >> -machine ,boot=, or by stan

[Qemu-devel] [PATCH v2] target-i386: use static properties in check_features_against_host() to print CPUID feature names

2012-10-23 Thread Igor Mammedov
Signed-off-by: Igor Mammedov --- v2: * use separate for() for every feature word v3: * fix check_features_against_host(), use X86CPU as base to count offset correctly --- target-i386/cpu.c | 72 +-- 1 file changed, 43 insertions(+), 29 d

[Qemu-devel] [PATCH v2] target-i386: use static properties to list CPUID features

2012-10-23 Thread Igor Mammedov
convert x86_cpu_list() to use QDEV_FIND_PROP_FROM_BIT() for getting CPUID feature name. In addition since x86_cpu_list() was the last user of *feature_name arrays, clean them up. Signed-off-by: Igor Mammedov --- v2: * fix x86_cpu_list(), use X86CPU as base to count offset correctly * Do not f

Re: [Qemu-devel] [PATCH 1/2] Make default boot order machine specific

2012-10-23 Thread Alexander Graf
On 23.10.2012, at 15:24, Anthony Liguori wrote: > Alexander Graf writes: > >> On 23.10.2012, at 12:09, Avik Sil wrote: >> >>> This patch makes default boot order machine specific instead of >>> set globally. The default boot order can be set per machine in >>> QEMUMachine default_machine_opts,

Re: [Qemu-devel] [PATCH 00/37 v5] target-i386: convert CPU features into properties

2012-10-23 Thread Don Slutz
On 10/22/12 11:02, Igor Mammedov wrote: v5: - Use static properties instead of dynamic ones - Compile in KVM CPUID features only if CONFIG_KVM is defined - Add "f-kvm_steal_tm" and "f-kvmclock_stable" CPUID feature names - Some qdev hacking to: - allow iterate over Property[] bef

Re: [Qemu-devel] [PATCH v3 1/2] qmp: handle stop/cont in INMIGRATE state

2012-10-23 Thread Luiz Capitulino
On Tue, 23 Oct 2012 14:54:21 +0200 Paolo Bonzini wrote: > Right now, stop followed by an incoming migration will let the > virtual machine start. cont before an incoming migration instead > will fail. > > This is bad because the actual behavior is not predictable; it is > racy with respect to t

Re: [Qemu-devel] KVM call agenda for 2012-10-23

2012-10-23 Thread Juan Quintela
Juan Quintela wrote: > Hi > > Please send in any agenda topics you are interested in. No agenda -> no call Happy hacking, Juan.

Re: [Qemu-devel] [PATCH v2] target-i386: use static properties to list CPUID features

2012-10-23 Thread Eduardo Habkost
On Tue, Oct 23, 2012 at 03:26:40PM +0200, Igor Mammedov wrote: > convert x86_cpu_list() to use QDEV_FIND_PROP_FROM_BIT() for getting > CPUID feature name. > In addition since x86_cpu_list() was the last user of *feature_name > arrays, clean them up. > > Signed-off-by: Igor Mammedov > --- > v2: >

Re: [Qemu-devel] [PATCH 00/37 v5] target-i386: convert CPU features into properties

2012-10-23 Thread Igor Mammedov
On Tue, 23 Oct 2012 09:32:53 -0400 Don Slutz wrote: > On 10/22/12 11:02, Igor Mammedov wrote: > > v5: > >- Use static properties instead of dynamic ones > >- Compile in KVM CPUID features only if CONFIG_KVM is defined > >- Add "f-kvm_steal_tm" and "f-kvmclock_stable" CPUID feature nam

Re: [Qemu-devel] [PATCH] Rename target_phys_addr_t to hwaddr

2012-10-23 Thread Paolo Bonzini
Il 23/10/2012 14:55, Anthony Liguori ha scritto: >> > target_phys_addr_t is unwieldly, violates the C standard (_t suffixes are >> > reserved) and its purpose doesn't match the name (most target_phys_addr_t >> > addresses are not target specific). Replace it with a finger-friendly, >> > standards

Re: [Qemu-devel] qemu <-> libvirt interaction broken

2012-10-23 Thread Anthony Liguori
Eric Blake writes: > On 10/23/2012 06:47 AM, Anthony Liguori wrote: > This change was postponed to after 1.2 was released to give libvirt a chance to wean itself off parsing our --help output. >>> >>> Yea, I know this has been the plan for a long time and I agree that it >>> i

Re: [Qemu-devel] [patch v4 05/16] memory: introduce ref, unref interface for MemoryRegionOps

2012-10-23 Thread Avi Kivity
On 10/23/2012 02:40 PM, Jan Kiszka wrote: > On 2012-10-23 14:28, Avi Kivity wrote: >> On 10/23/2012 02:16 PM, Jan Kiszka wrote: >>> On 2012-10-23 14:12, Paolo Bonzini wrote: Il 23/10/2012 14:04, Jan Kiszka ha scritto: > > So the stop_machine idea is thrown away? >>> >

[Qemu-devel] [PATCH v4 12/16] qemu-iotests: add mirroring test case

2012-10-23 Thread Paolo Bonzini
Signed-off-by: Paolo Bonzini --- tests/qemu-iotests/041 | 362 + tests/qemu-iotests/041.out | 5 + tests/qemu-iotests/group | 1 + 3 file modificati, 368 inserzioni(+) create mode 100755 tests/qemu-iotests/041 create mode 100644 tests/qemu-i

  1   2   >