Re: [Qemu-devel] delvm does not reduce the qcow2 file size

2012-10-15 Thread Paolo Bonzini
Il 16/10/2012 08:23, Kuniyasu Suzaki ha scritto: >>> "delvm" is a command to delete a snapshot image in a qcow2 file. >>> However it does not reduce the qcow2 file size. >> >> Note that the file will not grow when new allocations are performed in >> the future. > > You mean that the qcow2 file siz

[Qemu-devel] [PATCHv3] tests/tcg: fix build

2012-10-15 Thread Catalin Patulea
Sorry this got abandoned.. here is a fresh (and slightly leaner) patch on top of master. Can anyone take a look? --- This broke when the tests were moved from tests/ to tests/tcg/. On x86_64 host/i386-linux-user non-kvm guest, test-i386 and test-mmap are broken, but at least they build. To bui

[Qemu-devel] [Patch]QEMU: Add "-ple-gap" and "-ple-window" options for per domain PLE

2012-10-15 Thread Hu, Xuekun
QEMU: Add "-ple-gap" and "-ple-window" options for per domain PLE Signed-off-by: Xuekun Hu --- linux-headers/linux/kvm.h |3 +++ qemu-options.hx | 16 sysemu.h |2 ++ target-i386/kvm.c | 13 + vl.c |

[Qemu-devel] [Patch]KVM: enabling per domain PLE

2012-10-15 Thread Hu, Xuekun
Setting the same PLE parameter arbitrarily for different workloads is not a good solution. The solution enables per domain PLE which gives user ability to set PLE parameter for different domain for better performance. Signed-off-by: Xuekun Hu --- arch/x86/include/asm/kvm_host.h |6 ++ ar

Re: [Qemu-devel] [PATCH v2 27/45] qmp: add drive-mirror command

2012-10-15 Thread Paolo Bonzini
Il 15/10/2012 19:33, Kevin Wolf ha scritto: >> > + >> > +flags = bs->open_flags | BDRV_O_RDWR; > The two questions from last time are still open: > > Jeff's patches are in now, so we can do a bdrv_reopen() to remove > BDRV_O_RDWR again when completing the mirror job. It's not a big change, so

Re: [Qemu-devel] [PATCH] vfio-pci: Add KVM INTx acceleration

2012-10-15 Thread Michael S. Tsirkin
On Mon, Oct 15, 2012 at 02:28:15PM -0600, Alex Williamson wrote: > This makes use of the new level irqfd support enabling bypass of > qemu userspace both on INTx injection and unmask. This significantly > boosts the performance of devices making use of legacy interrupts. > > Signed-off-by: Alex W

Re: [Qemu-devel] [PATCH v2 26/45] mirror: introduce mirror job

2012-10-15 Thread Paolo Bonzini
Il 15/10/2012 18:57, Kevin Wolf ha scritto: > Am 26.09.2012 17:56, schrieb Paolo Bonzini: >> This patch adds the implementation of a new job that mirrors a disk to >> a new image while letting the guest continue using the old image. >> The target is treated as a "black box" and data is copied from

Re: [Qemu-devel] [PATCH] vnc: fix "info vnc" with "-vnc ..., reverse=on"

2012-10-15 Thread Michael Tokarev
On 10.10.2012 16:30, Paolo Bonzini wrote: [] > --- a/ui/vnc.c > +++ b/ui/vnc.c > @@ -372,6 +372,10 @@ VncInfo *qmp_query_vnc(Error **errp) > } > } > > +if (vnc_display->lsock == -1) { FWIW, can't we use "< 0" condition in all cases like this - for testing whenever a

Re: [Qemu-devel] delvm does not reduce the qcow2 file size

2012-10-15 Thread Kuniyasu Suzaki
Hello, From: Paolo Bonzini Subject: Re: delvm does not reduce the qcow2 file size Date: Mon, 15 Oct 2012 15:25:16 +0200 > Il 15/10/2012 11:33, Kuniyasu Suzaki ha scritto: > > Hello, > > > > "delvm" is a command to delete a snapshot image in a qcow2 file. > > However it does not reduce the qcow

Re: [Qemu-devel] CPU utilization between physical CPU and virtual CPU in KVM

2012-10-15 Thread Dennis Chen
Any body can be help about this or a little bit clues? Thanks! On Mon, Oct 8, 2012 at 3:01 PM, Dennis Chen wrote: > Hi All, > > I am confused by the following observed scenario: > > In my 4-CPU (KVM supported, 2 core with 2 thread for each) host > machine box, I create only one VM with 3-vCPU t

Re: [Qemu-devel] [PATCH] Add nvram to default boot device list

2012-10-15 Thread Avik Sil
On 10/12/2012 05:33 AM, Alexander Graf wrote: > > On 12.10.2012, at 00:59, David Gibson wrote: > >> On Thu, Oct 11, 2012 at 07:34:42AM +0530, Avik Sil wrote: >>> This patch adds nvram specified boot device into qemu default >>> boot_devices list. This helps firmware to boot from nvram specified >

Re: [Qemu-devel] fixing qemu-0.1X endless loop in qcow2_alloc_cluster_offset

2012-10-15 Thread 周洲仪
Hi Kevin > Am 15.10.2012 16:28, schrieb Andreas Färber: > >> What I'm suggesting (not even compile tested!) is: > >> > >> Signed-off-by: Kevin Wolf > >> > >> diff --git a/block/qcow2.c b/block/qcow2.c > >> index 48e1b95..d665675 100644 > >> --- a/block/qcow2.c > >> +++ b/block/qcow2.c > >> @@ -388

Re: [Qemu-devel] qemu-img: document 'info --backing-chain

2012-10-15 Thread Kashyap Chamarthy
On Tue, Oct 16, 2012 at 2:37 AM, Eric Blake wrote: > On 10/13/2012 11:30 PM, Kashyap Chamarthy wrote: > >>From a6233277e17338f571dda27cd9192d764f824b18 Mon Sep 17 00:00:00 2001 > > From: Kashyap Chamarthy > > Date: Sun, 14 Oct 2012 09:51:18 +0530 > > Subject: [PATCH v2] qemu-img: document 'info

[Qemu-devel] [PATCH 07/12] qdev-core: isolate reset register/unregister code

2012-10-15 Thread Igor Mammedov
From: Eduardo Habkost The reset register/unregister code is specific to qemu-system-*, so isolate it so it can be moved to qdev-system.c. Signed-off-by: Eduardo Habkost --- hw/qdev-core.c | 24 ++-- 1 file changed, 18 insertions(+), 6 deletions(-) diff --git a/hw/qdev-core

[Qemu-devel] [PATCH 12/12] qom: make CPU a child of DeviceState

2012-10-15 Thread Igor Mammedov
Signed-off-by: Igor Mammedov Signed-off-by: Eduardo Habkost --- [ehabkost: change CPU type declaration to have TYPE_DEVICE as parent] --- include/qemu/cpu.h | 6 +++--- qom/cpu.c | 3 ++- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/include/qemu/cpu.h b/include/qemu/

[Qemu-devel] [PATCH 01/12] qdev: split up header so it can be used in cpu.h

2012-10-15 Thread Igor Mammedov
From: Anthony Liguori Header file dependency is a frickin' nightmare right now. cpu.h tends to get included in our 'include everything' header files but qdev also needs to include those headers mainly for qdev-properties since it knows about CharDriverState and friends. We can solve this for no

[Qemu-devel] [PATCH 06/12] qdev: move vmstate handling to qdev-system.c

2012-10-15 Thread Igor Mammedov
From: Eduardo Habkost Add GCC_WEAK symbols to qdev-core.c, so that qdev-core.o can be used without qdev-system.o (i.e. by *-user). Signed-off-by: Eduardo Habkost --- hw/qdev-core.c | 23 +++ hw/qdev-core.h | 2 ++ hw/qdev-system.c | 22 ++ 3 files c

[Qemu-devel] [PATCH 03/12] qdev: separate core from the code used only by qemu-system-*

2012-10-15 Thread Igor Mammedov
From: Eduardo Habkost This change should help on two things: - Allowing DeviceState to be used by *-user; - Writing qdev unit tests without pulling too many dependencies. Note that there are two parts that depend on code compiled only on qemu-system-*, but are still inside qdev.c: - vmstate h

[Qemu-devel] [PATCH 05/12] qdev-core: isolate vmstate handling into separate functions

2012-10-15 Thread Igor Mammedov
From: Eduardo Habkost Those functions will eventually be moved somewhere else, and won't get included on *-user. Signed-off-by: Eduardo Habkost --- hw/qdev-core.c | 26 ++ 1 file changed, 18 insertions(+), 8 deletions(-) diff --git a/hw/qdev-core.c b/hw/qdev-core.c ind

[Qemu-devel] [PATCH 09/12] move qemu_irq typedef out of cpu-common.h

2012-10-15 Thread Igor Mammedov
it's necessary for making CPU child of DEVICE without causing circular header deps. Signed-off-by: Igor Mammedov --- [imammedo: sysemu.h doesn't need irq.h since 013c2f150] --- hw/arm-misc.h | 1 + hw/bt.h | 2 ++ hw/devices.h | 2 ++ hw/omap.h | 1 + hw/soc_dma.h | 1 + hw/xen.h

[Qemu-devel] [PATCH 08/12] qdev: move reset register/unregister code to qdev-system.c

2012-10-15 Thread Igor Mammedov
From: Eduardo Habkost Also, add weak symbols that will be used if qdev-system.o is not compiled in (i.e. on *-user). Signed-off-by: Eduardo Habkost --- hw/qdev-core.c | 16 +++- hw/qdev-core.h | 3 +++ hw/qdev-system.c | 15 +++ 3 files changed, 25 insertions(+), 9

[Qemu-devel] [PATCH 10/12] qdev: use full qdev.h include path on qdev*.c

2012-10-15 Thread Igor Mammedov
From: Eduardo Habkost This way, the files can be moved to the qom/ directory as-is. Signed-off-by: Eduardo Habkost --- hw/qdev-core.c | 2 +- hw/qdev-properties.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/hw/qdev-core.c b/hw/qdev-core.c index a756e07..fbb7cb5

[Qemu-devel] [PATCH 04/12] qdev: rename qdev.c to qdev-core.c

2012-10-15 Thread Igor Mammedov
From: Eduardo Habkost Just to make clear that it's the qdev core code, corresponding to qdev-core.h. Signed-off-by: Eduardo Habkost --- hw/Makefile.objs | 2 +- hw/qdev-core.c | 716 +++ hw/qdev.c| 716

[Qemu-devel] [PATCH 02/12] qapi-types.h doesn't really need to include qemu-common.h

2012-10-15 Thread Igor Mammedov
needed to prevent build breakage when CPU becomes a child of DeviceState Signed-off-by: Igor Mammedov Signed-off-by: Eduardo Habkost --- [ehabkost: include too] --- scripts/qapi-types.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/scripts/qapi-types.py b/scripts/qap

[Qemu-devel] [PATCH v3 00/12] make CPU child of DeviceState and include qdev core in *-user

2012-10-15 Thread Igor Mammedov
v2: This version removes the CONFIG_USER_ONLY ifdefs, and use weak symbols to move the vmstate and qemu_register_reset() handling to qdev-system.c v3: - rebased on top of 8b4a3df (today's master) - slight code reshuffling in (see commit's changelog) "qdev: separate core from the code

[Qemu-devel] [Bug 1066909] Re: App-level clone emulation for microblaze is broken

2012-10-15 Thread Bugdal
Here is a minimal test case showing the problem. ** Attachment added: "minimal test case" https://bugs.launchpad.net/qemu/+bug/1066909/+attachment/3399581/+files/badclone.s -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https:/

Re: [Qemu-devel] [PATCH qom-cpu v2 5/7] cpus: Pass CPUState to qemu_cpu_kick_thread()

2012-10-15 Thread Igor Mammedov
On Fri, 12 Oct 2012 03:26:41 +0200 Andreas Färber wrote: > CPUArchState is no longer needed there. > > Signed-off-by: Andreas Färber > --- > cpus.c |9 - > 1 Datei geändert, 4 Zeilen hinzugefügt(+), 5 Zeilen entfernt(-) > > diff --git a/cpus.c b/cpus.c > index 849ea8a..54b765e 100

Re: [Qemu-devel] [PATCH qom-cpu v2 4/7] cpus: Pass CPUState to qemu_cpu_is_self()

2012-10-15 Thread Igor Mammedov
On Fri, 12 Oct 2012 03:26:40 +0200 Andreas Färber wrote: > Change return type to bool, move to include/qemu/cpu.h and > add documentation. > > Signed-off-by: Andreas Färber > --- > cpus.c | 10 -- > exec.c |3 ++- > hw/apic.c |6 -- > incl

Re: [Qemu-devel] [RFC 02/13] qdev: split up header so it can be used in cpu.h

2012-10-15 Thread Andreas Färber
Am 04.10.2012 21:15, schrieb Eduardo Habkost: > From: Anthony Liguori > > Header file dependency is a frickin' nightmare right now. cpu.h tends to get > included in our 'include everything' header files but qdev also needs to > include > those headers mainly for qdev-properties since it knows a

Re: [Qemu-devel] [PATCH qom-cpu v2 3/7] target-i386: Pass X86CPU to cpu_x86_load_seg_cache_sipi()

2012-10-15 Thread Igor Mammedov
On Fri, 12 Oct 2012 03:26:39 +0200 Andreas Färber wrote: > Simplifies the call in apic_sipi() again and needed for moving halted > field to CPUState. > > Signed-off-by: Andreas Färber > --- > hw/apic.c |2 +- > target-i386/cpu.h |4 +++- > 2 Dateien geändert, 4 Zeilen hinzugefü

Re: [Qemu-devel] [PATCH qom-cpu v2 2/7] apic: Store X86CPU in APICCommonState

2012-10-15 Thread Igor Mammedov
On Fri, 12 Oct 2012 03:26:38 +0200 Andreas Färber wrote: > Prepares for using a link<> property to connect APIC with CPU and for > changing the CPU APIs to CPUState. > > Resolve Coding Style warnings by moving the closing parenthesis of > foreach_apic() macro to next line. > > Signed-off-by: An

Re: [Qemu-devel] [PATCH qom-cpu v2 1/7] target-i386: Inline APIC cpu_env property setting

2012-10-15 Thread Igor Mammedov
On Fri, 12 Oct 2012 03:26:37 +0200 Andreas Färber wrote: > This prepares for changing the variable type from void*. > > Signed-off-by: Andreas Färber > Cc: Igor Mammedov > --- > hw/apic_common.c |1 - > target-i386/cpu.c |5 - > 2 Dateien geändert, 4 Zeilen hinzugefügt(+), 2 Zeil

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

2012-10-15 Thread Edivaldo de Araujo Pereira
Hi Stefan, Thank you, very much for taking the time to help me, and excuse me for not seeing your answer early... I've run the procedure you pointed me out, and the result is: 0d8d7690850eb0cf2b2b60933cf47669a6b6f18f is the first bad commit commit 0d8d7690850eb0cf2b2b60933cf47669a6b6f18f Author:

Re: [Qemu-devel] [RFC 3/7] block: bdrv_img_create(): move param printing to qemu-img

2012-10-15 Thread Luiz Capitulino
On Fri, 12 Oct 2012 10:29:37 +0200 Paolo Bonzini wrote: > Il 11/10/2012 23:27, Luiz Capitulino ha scritto: > > bdrv_img_create() is being used by the transaction QMP command and > > therefore shouldn't print directly to the user. > > > > Move the param printing to qemu-img instead. Has the side

Re: [Qemu-devel] [PATCH] Call MADV_HUGEPAGE for guest RAM allocations

2012-10-15 Thread Michael Tokarev
On 15.10.2012 22:57, Luiz Capitulino wrote: > On Fri, 5 Oct 2012 16:47:57 -0300 > Luiz Capitulino wrote: > >> This makes it possible for QEMU to use transparent huge pages (THP) >> when transparent_hugepage/enabled=madvise. Otherwise THP is only >> used when it's enabled system wide. >> >> Signed

Re: [Qemu-devel] qemu-img: document 'info --backing-chain

2012-10-15 Thread Eric Blake
On 10/13/2012 11:30 PM, Kashyap Chamarthy wrote: >>From a6233277e17338f571dda27cd9192d764f824b18 Mon Sep 17 00:00:00 2001 > From: Kashyap Chamarthy > Date: Sun, 14 Oct 2012 09:51:18 +0530 > Subject: [PATCH v2] qemu-img: document 'info --backing-chain' > > Signed-off-by: Kashyap Chamarthy > --- >

Re: [Qemu-devel] [PATCH] qemu: Update Linux headers

2012-10-15 Thread Alex Williamson
On Mon, 2012-10-15 at 15:54 -0500, Anthony Liguori wrote: > Alex Williamson writes: > > > Based on v3.7-rc1-3-g29bb4cc > > Normally this would go through qemu-kvm/uq/master but since this is from > Linus' tree, it's less of a concern. > > Nonetheless, I'd prefer we did it from v3.7-rc1 instead

Re: [Qemu-devel] [PATCHv3] qemu-img rebase: use empty string to rebase without backing file

2012-10-15 Thread Eric Blake
On 10/15/2012 02:50 PM, Alex Bligh wrote: > This patch allows an empty filename to be passed as the new base image name > for qemu-img rebase to mean base the image on no backing file (i.e. > independent of any backing file). According to Eric Blake, qemu-img rebase > already supports this when '-u

[Qemu-devel] [PATCH v2] qemu: Update Linux headers

2012-10-15 Thread Alex Williamson
Based on v3.7-rc1 Signed-off-by: Alex Williamson --- Using tag v3.7-rc1 instead of random HEAD, although the patch turns out identical to v1. linux-headers/asm-x86/kvm.h | 17 + linux-headers/linux/kvm.h | 25 + linux-headers/linux/

[Qemu-devel] [PATCH v2] qmp: fix __accept() in qmp.py

2012-10-15 Thread Jeff Cody
In QEMUMonitorProtocol, commit e9d17b6 removed the __sockfile creation from __negotiate_capabilities(), which breaks _accept(). This causes failures in qemu-io python based tests (i.e. tests 030 and 040). This patch creates the sockfile in __accept() as well. Signed-off-by: Jeff Cody --- QMP/q

Re: [Qemu-devel] [PATCH] qemu: Update Linux headers

2012-10-15 Thread Anthony Liguori
Alex Williamson writes: > Based on v3.7-rc1-3-g29bb4cc Normally this would go through qemu-kvm/uq/master but since this is from Linus' tree, it's less of a concern. Nonetheless, I'd prefer we did it from v3.7-rc1 instead of a random git snapshot. Regards, Anthony Liguori > > Signed-off-by: A

Re: [Qemu-devel] [PATCH] qmp: fix __accept() in qmp.py

2012-10-15 Thread Jeff Cody
On 10/15/2012 02:57 PM, Jeff Cody wrote: > In QEMUMonitorProtocol, commit e9d17b6 removed the __sockfile creation > from __negotiate_capabilities(), which breaks _accept(). This causes > failures in qemu-io python based tests (i.e. tests 030 and 040). > > This patch creates the sockfile in __acce

Re: [Qemu-devel] [PATCH] qemu-img rebase: allow empty file name as new backing file to mean rebase with no backing file [attempt 2]

2012-10-15 Thread Alex Bligh
--On 15 October 2012 14:44:59 -0600 Eric Blake wrote: Rather long on the subject line; 'git shortlog -30' will give you a taste for typical commit summary length. Also, you will usually see [PATCHv2] as the prefix, rather than [PATCH]...[attempt 2] as a suffix, since 'git am' only strips a [

[Qemu-devel] [PATCHv3] qemu-img rebase: use empty string to rebase without backing file

2012-10-15 Thread Alex Bligh
This patch allows an empty filename to be passed as the new base image name for qemu-img rebase to mean base the image on no backing file (i.e. independent of any backing file). According to Eric Blake, qemu-img rebase already supports this when '-u' is used; this adds support when -u is not used.

Re: [Qemu-devel] [PATCH] qemu-img rebase: allow empty file name as new backing file to mean rebase with no backing file [attempt 2]

2012-10-15 Thread Eric Blake
On 10/15/2012 02:23 PM, Alex Bligh wrote: Rather long on the subject line; 'git shortlog -30' will give you a taste for typical commit summary length. Also, you will usually see [PATCHv2] as the prefix, rather than [PATCH]...[attempt 2] as a suffix, since 'git am' only strips a [] prefix. It mig

Re: [Qemu-devel] [PATCH 0/2] A few race conditions in E1000 device fixed

2012-10-15 Thread Dmitry Fleytman
Hello, Please, ignore 1st patch for now. Although it fixes the problem observed it looks like there is a better and easier solution (many thanks to Intel Guys that explained e1000 operation in details: http://sourceforge.net/mailarchive/forum.php?thread_name=CAGHCxhcad%3Dzx7ihX5zoDB%3DZOLGGuZty%3

Re: [Qemu-devel] [PATCH] qemu-img rebase: allow backing file to be specified as '-'

2012-10-15 Thread Alex Bligh
Eric, --On 15 October 2012 13:28:11 -0600 Eric Blake wrote: Missing a Signed-off-by; as such, it cannot be taken as is. New patch sent under separate cover with Signed-Off-By: line. @@ -1580,7 +1581,7 @@ static int img_rebase(int argc, char **argv) if (!unsafe) { uint64_t num_s

[Qemu-devel] [PATCH] vfio-pci: Add KVM INTx acceleration

2012-10-15 Thread Alex Williamson
This makes use of the new level irqfd support enabling bypass of qemu userspace both on INTx injection and unmask. This significantly boosts the performance of devices making use of legacy interrupts. Signed-off-by: Alex Williamson --- My INTx routing workaround below will probably raise some e

[Qemu-devel] [PATCH] qemu-img rebase: allow empty file name as new backing file to mean rebase with no backing file [attempt 2]

2012-10-15 Thread Alex Bligh
This patch allows an empty filename to be passed as the new base image name for qemu-img rebase to mean base the image on no backing file (i.e. independent of any backing file). According to Eric Blake, qemu-imag rebase already supports this when '-u' is used; this adds support when -u is not used.

[Qemu-devel] [PATCH 3/6] chardev: create new QOM types for each sub chardev type

2012-10-15 Thread Anthony Liguori
Signed-off-by: Anthony Liguori --- console.c | 10 +- console.h |2 +- hw/msmouse.c |7 +- hw/msmouse.h |2 +- qemu-char.c | 479 +++-- qemu-char.h | 13 ++ spice-qemu-char.c | 31 ++-- 7 file

Re: [Qemu-devel] [PATCH 1/4] exec: Split up and tidy code_gen_buffer

2012-10-15 Thread Richard Henderson
On 2012-10-13 23:33, Blue Swirl wrote: > /src/qemu/exec.c:4208: error: format '%ld' expects type 'long int', > but argument 4 has type 'size_t' Dang it. And here I thought I was helping get the type right for win64. That printf format should be changed to %zd... r~

[Qemu-devel] [PATCH 4/6] chardev: implement realize

2012-10-15 Thread Anthony Liguori
This can be used to initialize an object independently of setting properties. This makes the 'open' method legacy. Signed-off-by: Anthony Liguori --- qemu-char.c | 48 +--- qemu-char.h |3 +++ 2 files changed, 48 insertions(+), 3 deletions(-) di

[Qemu-devel] [PATCH] qemu: Update Linux headers

2012-10-15 Thread Alex Williamson
Based on v3.7-rc1-3-g29bb4cc Signed-off-by: Alex Williamson --- Trying to get KVM_IRQFD_FLAG_RESAMPLE and friends for vfio-pci linux-headers/asm-x86/kvm.h | 17 + linux-headers/linux/kvm.h | 25 + linux-headers/linux/kvm_para.h

[Qemu-devel] [PATCH 2/6] chardev: convert to QOM (shallow pass)

2012-10-15 Thread Anthony Liguori
This just adds an Object to all chardev objects. Signed-off-by: Anthony Liguori --- console.c |4 ++-- qemu-char.c | 47 ++- qemu-char.h |6 ++ spice-qemu-char.c |2 +- 4 files changed, 39 insertions(+), 20 deletio

Re: [Qemu-devel] [RFC v1 0/7] IOMMU support

2012-10-15 Thread Benjamin Herrenschmidt
On Mon, 2012-10-15 at 12:45 +0200, Avi Kivity wrote: > > I haven't had a chance to review in details yet, but one thing I > noticed > > is that you basically have a single read/write protection > information > > for a translation. > > > > This is a loss of functionality to some extent (well, maybe

[Qemu-devel] [RFC PATCH 0/6] chardev: convert to QOM

2012-10-15 Thread Anthony Liguori
Hi, This has long been on my TODO list. I wanted to put this forward since Gerd has a chardev hotplug series. I think there are a few good reasons to go the QOM route here. Most notably: 1) the conversion cleans up all of the printfs into proper error messages 2) it becomes possible to introsp

Re: [Qemu-devel] [PATCH v4 24/26] qidl: add QAPI-based code generator

2012-10-15 Thread Michael Roth
On Mon, Oct 15, 2012 at 11:35:46AM -0500, Michael Roth wrote: > On Mon, Oct 15, 2012 at 03:08:51PM +0200, Paolo Bonzini wrote: > > Il 15/10/2012 10:12, Paolo Bonzini ha scritto: > > > Il 12/10/2012 23:11, Michael Roth ha scritto: > > >> +elif field['type'].startswith('enum '): > > >> +

[Qemu-devel] [PATCH 6/6] chardev: convert file backend to realize

2012-10-15 Thread Anthony Liguori
Signed-off-by: Anthony Liguori --- qemu-char.c | 89 +- 1 files changed, 75 insertions(+), 14 deletions(-) diff --git a/qemu-char.c b/qemu-char.c index bc0fdbe..93a515f 100644 --- a/qemu-char.c +++ b/qemu-char.c @@ -540,9 +540,14 @@ stati

[Qemu-devel] [PATCH 5/6] chardev: switch the easy backends to realize

2012-10-15 Thread Anthony Liguori
For backends that take no options, switching to realize is trivially easy. Signed-off-by: Anthony Liguori --- qemu-char.c | 12 ++-- qemu-char.h |2 +- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/qemu-char.c b/qemu-char.c index e9a81c7..bc0fdbe 100644 --- a/qemu-

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

2012-10-15 Thread Anthony Liguori
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/qemu/object.h index cc75fee..f4dc2ea 1006

Re: [Qemu-devel] [PATCH] qemu-img rebase: allow backing file to be specified as '-'

2012-10-15 Thread Eric Blake
On 10/15/2012 12:42 PM, Alex Bligh wrote: > Eric, > > --On 15 October 2012 12:11:02 -0600 Eric Blake wrote: > >> On the other hand, if you don't use -u, then qemu-img complains: >> >> $ qemu-img rebase -b '' bar >> qemu-img: Could not open new backing file '' >> >> So I think a better patch wo

[Qemu-devel] [Bug 1066909] [NEW] App-level clone emulation for microblaze is broken

2012-10-15 Thread Bugdal
Public bug reported: When CLONE_THREAD is used, the new process starts with the program counter pointing to the system call instruction, rather than the instruction immediately following it. This causes an infinite cascade (linear growth, not exponential) of thread creation, which quickly crashes

[Qemu-devel] [PATCH] qmp: fix __accept() in qmp.py

2012-10-15 Thread Jeff Cody
In QEMUMonitorProtocol, commit e9d17b6 removed the __sockfile creation from __negotiate_capabilities(), which breaks _accept(). This causes failures in qemu-io python based tests (i.e. tests 030 and 040). This patch creates the sockfile in __accept() as well. --- QMP/qmp.py | 1 + 1 file changed

Re: [Qemu-devel] [PATCH] Call MADV_HUGEPAGE for guest RAM allocations

2012-10-15 Thread Luiz Capitulino
On Fri, 5 Oct 2012 16:47:57 -0300 Luiz Capitulino wrote: > This makes it possible for QEMU to use transparent huge pages (THP) > when transparent_hugepage/enabled=madvise. Otherwise THP is only > used when it's enabled system wide. > > Signed-off-by: Luiz Capitulino ping? > --- > exec.c | 1

Re: [Qemu-devel] [PATCH] qemu-img rebase: allow backing file to be specified as '-'

2012-10-15 Thread Alex Bligh
Eric, --On 15 October 2012 12:11:02 -0600 Eric Blake wrote: On the other hand, if you don't use -u, then qemu-img complains: $ qemu-img rebase -b '' bar qemu-img: Could not open new backing file '' So I think a better patch would be to allow rebase-by-pull to work the same as unsafe rebase

[Qemu-devel] [PATCH] Memory-API: Make eventfd adhere to device endianness

2012-10-15 Thread Alexander Graf
Our memory API MMIO regions know the concept of device endianness. This is used to automatically swap endianness between devices and host CPU, depending on whether buses in between would swizzle the bits. The ioeventfd value comparison does not adhere to that semantic though. Probably because nobo

Re: [Qemu-devel] [PATCH] qemu-img rebase: allow backing file to be specified as '-'

2012-10-15 Thread Eric Blake
On 10/15/2012 12:07 PM, Eric Blake wrote: > On 10/15/2012 11:29 AM, Alex Bligh wrote: >> This patch allows qemu-img rebase to rebase an image to >> have no backing file, as opposed to merely allowing it to >> rebase to an existing backing file. > > You can already do that by rebasing to the empty

Re: [Qemu-devel] [PATCH] qemu-img rebase: allow backing file to be specified as '-'

2012-10-15 Thread Eric Blake
On 10/15/2012 11:29 AM, Alex Bligh wrote: > This patch allows qemu-img rebase to rebase an image to > have no backing file, as opposed to merely allowing it to > rebase to an existing backing file. You can already do that by rebasing to the empty string. And it is feasible (although unlikely) to

Re: [Qemu-devel] [PATCH v3 9/9] chardev: add hotplug support.

2012-10-15 Thread Eric Blake
On 10/15/2012 02:06 AM, Gerd Hoffmann wrote: > This patch adds chardev_add and chardev_del monitor commands. > > They work simliar to the netdev_{add,del} commands. The hmp version of s/simliar/similar/ > chardev_add accepts like the -chardev command line option does. The qmp > version expects

Re: [Qemu-devel] [PATCH v2 0/3] qemu-img: Add --backing-chain option to info command

2012-10-15 Thread Eric Blake
On 10/15/2012 06:44 AM, Stefan Hajnoczi wrote: > This series adds the --backing-chain option for enumerating the backing file > chain. Given the topmost image it will print qemu-img info information for > each image file in the chain. > > Special care needs to be taken when image files form an in

Re: [Qemu-devel] [PATCH v2 28/45] mirror: implement completion

2012-10-15 Thread Kevin Wolf
Am 26.09.2012 17:56, schrieb Paolo Bonzini: > Switching to the target of the migration is done mostly asynchronously, > and reported to management via the BLOCK_JOB_COMPLETED event; the only > synchronous phase is opening the backing files. bdrv_open_backing_file > can always be done, even for mig

Re: [Qemu-devel] [PATCH v2 3/3] qemu-iotests: Add 041 backing file chain infinite loop test

2012-10-15 Thread Eric Blake
On 10/15/2012 06:44 AM, Stefan Hajnoczi wrote: > This new test verifies that qemu-img info --backing-chain safely aborts > when an image file has a backing file infinite loop. > > Signed-off-by: Stefan Hajnoczi > --- > tests/qemu-iotests/041 | 90 >

[Qemu-devel] [PATCH] qemu-img rebase: allow backing file to be specified as '-'

2012-10-15 Thread Alex Bligh
This patch allows qemu-img rebase to rebase an image to have no backing file, as opposed to merely allowing it to rebase to an existing backing file. Patch below, or pull from git at: https://github.com/abligh/qemu.git Commit visible at: https://github.com/abligh/qemu/commit/4d5b3b431d8dd276f4c

Re: [Qemu-devel] [PATCH v2] chardev: add hotplug support.

2012-10-15 Thread Eric Blake
On 10/15/2012 12:51 AM, Lei Li wrote: > On 10/12/2012 08:39 PM, Gerd Hoffmann wrote: >> This patch adds chardev_add and chardev_del monitor commands. >> >> chardev_del is pretty straight forward, it just takes an id argument and >> zaps the chardev specified. >> >> chardev_add is more tricky as the

[Qemu-devel] [PATCH v11 11/14] target-mips: Add ASE DSP accumulator instructions

2012-10-15 Thread Jia Liu
Add MIPS ASE DSP Accumulator and DSPControl Access instructions. Signed-off-by: Jia Liu --- target-mips/dsp_helper.c | 609 ++ target-mips/helper.h | 35 +++ target-mips/translate.c | 355 +++ 3 files changed, 999 inser

Re: [Qemu-devel] [PATCH v2 27/45] qmp: add drive-mirror command

2012-10-15 Thread Kevin Wolf
Am 26.09.2012 17:56, schrieb Paolo Bonzini: > This adds the monitor commands that start the mirroring job. > > Signed-off-by: Paolo Bonzini > --- > blockdev.c | 125 > ++- > hmp-commands.hx | 21 ++ > hmp.c| 28 +++

[Qemu-devel] [PATCH v11 14/14] target-mips: Change TODO file

2012-10-15 Thread Jia Liu
Change DSP r1 & DSP r2 into microMIPS DSP encodings in TODO file. Signed-off-by: Jia Liu --- target-mips/TODO |3 +-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/target-mips/TODO b/target-mips/TODO index 2a3546f..c5566f2 100644 --- a/target-mips/TODO +++ b/target-mips/TODO

[Qemu-devel] [PATCH v11 12/14] target-mips: Add ASE DSP processors

2012-10-15 Thread Jia Liu
Add 74kf and mips64dspr2-generic-cpu model for test. Signed-off-by: Jia Liu --- target-mips/translate_init.c | 52 ++ 1 file changed, 52 insertions(+) diff --git a/target-mips/translate_init.c b/target-mips/translate_init.c index c39138f..e559283 100644

[Qemu-devel] [PATCH v11 05/14] target-mips: Add ASE DSP load instructions

2012-10-15 Thread Jia Liu
Add MIPS ASE DSP Load instructions. Signed-off-by: Jia Liu --- target-mips/translate.c | 89 +++ 1 file changed, 89 insertions(+) diff --git a/target-mips/translate.c b/target-mips/translate.c index f1e5bb0..7f08700 100644 --- a/target-mips/translat

[Qemu-devel] [PATCH 1/2] Fix a race condition in E1000 device implementation:

2012-10-15 Thread Dmitry Fleytman
Device driver enables RX on shutdown after HW reset in case device is configured for wake on LAN. Although RX is enabled corresponding rings are not initialized and descrptor addresses of RX ring are invalid. If packet arrives with proper timing QEMU crashes due to invalid guest memory access attem

[Qemu-devel] [PATCH 2/2] Fix a race condition in E1000 device live migration. One of data-transfer related flags not in migrated fields list.

2012-10-15 Thread Dmitry Fleytman
Signed-off-by: Dmitry Fleytman --- hw/e1000.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/hw/e1000.c b/hw/e1000.c index 1e66ecf..efbe0c9 100644 --- a/hw/e1000.c +++ b/hw/e1000.c @@ -92,7 +92,7 @@ typedef struct E1000State_st { uint32_t rxbuf_size; uint32_t r

[Qemu-devel] [PATCH 0/2] A few race conditions in E1000 device fixed

2012-10-15 Thread Dmitry Fleytman
Following patches fix a few race conditions in E1000 code: 1st patch fixes race condition between driver shutdown and device shutdown (see patch comment) It also work-arounds race condition in e1000 Linux driver between RX enable and RX rings init (Separate patch for the second problem sen

Re: [Qemu-devel] [PATCH v2 26/45] mirror: introduce mirror job

2012-10-15 Thread Kevin Wolf
Am 26.09.2012 17:56, schrieb Paolo Bonzini: > This patch adds the implementation of a new job that mirrors a disk to > a new image while letting the guest continue using the old image. > The target is treated as a "black box" and data is copied from the > source to the target in the background. Th

[Qemu-devel] [PATCH v11 02/14] target-mips: Add ASE DSP resources access check

2012-10-15 Thread Jia Liu
Add MIPS ASE DSP resources access check. Signed-off-by: Jia Liu --- linux-user/main.c |6 ++ target-mips/cpu.h | 23 +-- target-mips/helper.c|3 +++ target-mips/translate.c | 23 +++ 4 files changed, 53 insertions(+), 2 dele

[Qemu-devel] [PATCH v11 10/14] target-mips: Add ASE DSP compare-pick instructions

2012-10-15 Thread Jia Liu
Add MIPS ASE DSP Compare-Pick instructions. Signed-off-by: Jia Liu --- target-mips/dsp_helper.c | 233 + target-mips/helper.h | 52 +++ target-mips/translate.c | 372 ++ 3 files changed, 657 insertions(+) diff

Re: [Qemu-devel] [RFC v1 3/7] memory: iommu support

2012-10-15 Thread Avi Kivity
On 10/12/2012 04:51 AM, Benjamin Herrenschmidt wrote: > On Thu, 2012-10-11 at 15:57 +0200, Avi Kivity wrote: >> >> Map/unmap is supported via address_space_map(), which calls >> >> ->translate(). I don't see how a lower-level map/unmap helps, >> unless >> >> the hardware supplies such a function.

[Qemu-devel] [PATCH v11 07/14] target-mips: Add ASE DSP GPR based shift instructions

2012-10-15 Thread Jia Liu
Add MIPS ASE DSP GPR-Based Shift instructions. Signed-off-by: Jia Liu --- target-mips/dsp_helper.c | 256 target-mips/helper.h | 38 ++ target-mips/translate.c | 328 ++ 3 files changed, 622 insertions(

[Qemu-devel] [PATCH v11 09/14] target-mips: Add ASE DSP bit/manipulation instructions

2012-10-15 Thread Jia Liu
Add MIPS ASE DSP Bit/Manipulation instructions. Signed-off-by: Jia Liu --- target-mips/dsp_helper.c | 55 +++ target-mips/helper.h |7 ++ target-mips/translate.c | 231 ++ 3 files changed, 293 insertions(+) diff --git a/target-mips

[Qemu-devel] [PATCH v11 04/14] target-mips: Add ASE DSP branch instructions

2012-10-15 Thread Jia Liu
Add MIPS ASE DSP Branch instructions. Signed-off-by: Jia Liu --- target-mips/translate.c | 36 1 file changed, 36 insertions(+) diff --git a/target-mips/translate.c b/target-mips/translate.c index b023d6f..f1e5bb0 100644 --- a/target-mips/translate.c +++ b

[Qemu-devel] [PATCH v11 03/14] target-mips: Use correct acc value to index cpu_HI/cpu_LO rather than using a fix number

2012-10-15 Thread Jia Liu
Use correct acc value to index cpu_HI/cpu_LO rather than using a fix number. Signed-off-by: Jia Liu --- target-mips/translate.c | 122 --- 1 file changed, 95 insertions(+), 27 deletions(-) diff --git a/target-mips/translate.c b/target-mips/translate.

[Qemu-devel] [PATCH v11 01/14] target-mips: Add ASE DSP internal functions

2012-10-15 Thread Jia Liu
Add internal functions using by MIPS ASE DSP instructions. Signed-off-by: Jia Liu --- target-mips/Makefile.objs |2 +- target-mips/dsp_helper.c | 1086 + 2 files changed, 1087 insertions(+), 1 deletion(-) create mode 100644 target-mips/dsp_helper

Re: [Qemu-devel] [PATCH v10 00/14] QEMU MIPS ASE DSP support

2012-10-15 Thread Jia Liu
Hi Andreas On Mon, Oct 15, 2012 at 9:54 PM, Andreas Färber wrote: > Am 15.10.2012 12:35, schrieb Jia Liu: >> ping~~ Aurelien >> >> Any more comment except the TODO one? > > I briefly looked through 01-12 and nothing caught my eye. > > Since you'll be resending anyway, could you rethink the subjec

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

2012-10-15 Thread Igor Mammedov
"CPU as DEVICE" http://lists.gnu.org/archive/html/qemu-devel/2012-10/msg00719.html latest known tree for testing: https://github.com/ehabkost/qemu-hacks/commits/work/cpu-devicestate-qdev-core may be we could agree on proposed RFC.

Re: [Qemu-devel] [PATCH v4 26/26] qidl: unit tests and build infrastructure

2012-10-15 Thread Michael Roth
On Mon, Oct 15, 2012 at 12:05:09PM +0200, Paolo Bonzini wrote: > Il 12/10/2012 23:11, Michael Roth ha scritto: > > +%.qidl.c: %.c $(SRC_PATH)/qidl.h $(addprefix $(SRC_PATH)/scripts/,lexer.py > > qidl.py qidl_parser.py qapi.py qapi_visit.py) > > The rule here is wrong, because %.qidl.c is never pr

Re: [Qemu-devel] [PATCH v4 24/26] qidl: add QAPI-based code generator

2012-10-15 Thread Michael Roth
On Mon, Oct 15, 2012 at 03:08:51PM +0200, Paolo Bonzini wrote: > Il 15/10/2012 10:12, Paolo Bonzini ha scritto: > > Il 12/10/2012 23:11, Michael Roth ha scritto: > >> +elif field['type'].startswith('enum '): > >> +typename = 'int' > > > > Note that there is support for enum pro

Re: [Qemu-devel] [PATCH v2 23/45] block: export dirty bitmap information in query-block

2012-10-15 Thread Kevin Wolf
Am 26.09.2012 17:56, schrieb Paolo Bonzini: > Signed-off-by: Paolo Bonzini > --- > v1->v2: new > > block.c | 6 ++ > qapi-schema.json | 20 ++-- > 2 file modificati, 24 inserzioni(+), 2 rimozioni(-) > > diff --git a/block.c b/block.c > index 2c1273c..074325

Re: [Qemu-devel] [PATCH v3 21/22] qidl: qidl.h, definitions for qidl annotations

2012-10-15 Thread Michael Roth
On Mon, Oct 15, 2012 at 03:37:18PM +0200, Paolo Bonzini wrote: > Il 05/10/2012 18:47, Michael Roth ha scritto: > > On Fri, Oct 05, 2012 at 05:53:09PM +0200, Paolo Bonzini wrote: > >> Il 05/10/2012 17:41, Michael Roth ha scritto: > >>> On Fri, Oct 05, 2012 at 05:07:46PM +0200, Paolo Bonzini wrote: >

Re: [Qemu-devel] [PATCH v2 19/45] block: add bdrv_query_info

2012-10-15 Thread Kevin Wolf
Am 26.09.2012 17:56, schrieb Paolo Bonzini: > Extract it out of the implementation of "info block". > > Signed-off-by: Paolo Bonzini > --- > v1->v2: moved bdrv_query_info close to qmp_query_block. > Fixed conflicts for the new field 'encryption_key_missing' > too. > > bl

Re: [Qemu-devel] [libvirt] Problems using netdev_del+netdev_add w/o corresponding device_del+device_add

2012-10-15 Thread Laine Stump
On 10/15/2012 05:25 AM, Daniel P. Berrange wrote: > On Mon, Oct 15, 2012 at 10:30:07AM +0200, Stefan Hajnoczi wrote: >> On Sat, Oct 13, 2012 at 04:47:14PM -0400, Laine Stump wrote: >>> Here is the sequence sent to disconnect only the host side, then >>> reconnect it with a new tap device. (although

Re: [Qemu-devel] [PATCH v3 22/22] qidl: unit tests and build infrastructure

2012-10-15 Thread Michael Roth
On Mon, Oct 15, 2012 at 10:52:37AM +0200, Kevin Wolf wrote: > Am 12.10.2012 23:39, schrieb Michael Roth: > > On Fri, Oct 05, 2012 at 10:24:30AM +0200, Paolo Bonzini wrote: > >> Il 04/10/2012 19:33, Michael Roth ha scritto: > >>> + > >>> +%.qidl.c: %.c $(SRC_PATH)/qidl.h $(addprefix > >>> $(SRC_PAT

  1   2   >