[Qemu-devel] [PULL v2 0/5] Net patches

2013-09-06 Thread Stefan Hajnoczi
Resolved 1.7 machine type conflicts and added Aurelien's ne2k endianness fix. The following changes since commit df7131623daf4823e087eb1128f6c1c351519774: Merge remote-tracking branch 'bonzini/iommu-for-anthony' into staging (2013-09-05 13:38:53 -0500) are available in the git repository at:

Re: [Qemu-devel] [Bug] qemu-sparc64 broken

2013-09-06 Thread Richard Henderson
On 09/05/2013 09:53 PM, Stefan Weil wrote: > Am 05.09.2013 23:32, schrieb Peter Maydell: >> On 5 September 2013 21:35, Stefan Weil wrote: >>> In a first analysis of this, I noticed that it is impossible to run >>> qemu-sparc64 >>> under gdb (raised fatal signal). >> You probably just need to let t

Re: [Qemu-devel] [Bug] qemu-sparc64 broken

2013-09-06 Thread Richard Henderson
On 09/06/2013 08:15 AM, Peter Maydell wrote: > On 6 September 2013 16:12, Richard Henderson wrote: >> On 09/05/2013 09:53 PM, Stefan Weil wrote: >>> After lots of SIGSEGV, the program indeed finishes successfully, >>> so my report was wrong - SIGSEGV is not a fatal signal for sparc64. >>> That's i

Re: [Qemu-devel] [PATCH 5/5] hw: arm_gic_kvm: Add KVM VGIC save/restore logic

2013-09-06 Thread Paolo Bonzini
Il 25/08/2013 17:47, Alexander Graf ha scritto: > > On 23.08.2013, at 21:10, Christoffer Dall wrote: > >> Save and restore the ARM KVM VGIC state from the kernel. We rely on >> QEMU to marshal the GICState data structure and therefore simply >> synchronize the kernel state with the QEMU emulated

Re: [Qemu-devel] [Bug] qemu-sparc64 broken

2013-09-06 Thread Peter Maydell
On 6 September 2013 16:12, Richard Henderson wrote: > On 09/05/2013 09:53 PM, Stefan Weil wrote: >> After lots of SIGSEGV, the program indeed finishes successfully, >> so my report was wrong - SIGSEGV is not a fatal signal for sparc64. >> That's interesting - thank you for this information. > > It

Re: [Qemu-devel] [PATCH 5/5] hw: arm_gic_kvm: Add KVM VGIC save/restore logic

2013-09-06 Thread Peter Maydell
On 23 August 2013 21:10, Christoffer Dall wrote: > Save and restore the ARM KVM VGIC state from the kernel. We rely on > QEMU to marshal the GICState data structure and therefore simply > synchronize the kernel state with the QEMU emulated state in both > directions. > > We take some care on the

Re: [Qemu-devel] [PATCH] ne2000: mark I/O as LITTLE_ENDIAN

2013-09-06 Thread Stefan Hajnoczi
On Wed, Sep 04, 2013 at 10:39:12AM +0200, Stefan Hajnoczi wrote: > On Mon, Sep 02, 2013 at 01:10:34PM +0200, Aurelien Jarno wrote: > > Now that the memory subsystem is propagating the endianness correctly, > > the ne2000 device should have its I/O ports marked as LITTLE_ENDIAN, as > > PCI devices a

Re: [Qemu-devel] [RFC] Introducing CoroCheck and proposal for a blocking_fn annotation

2013-09-06 Thread Gabriel Kerneis
On Fri, Sep 06, 2013 at 03:30:38PM +0100, Gabriel Kerneis wrote: > More precisely, here is what CoroCheck does for each file of QEMU: > - produce a .dot file that can be processed with graphviz to produce a > pdf of the annotated call graph (with wrong annotations showing up in > red - this sti

Re: [Qemu-devel] [PATCH 4/5] hw: arm_gic: Support setting/getting binary point reg

2013-09-06 Thread Peter Maydell
On 23 August 2013 21:10, Christoffer Dall wrote: > Add a binary_point field to the gic emulation structure and support > setting/getting this register now when we have it. We don't actually > support interrupt grouping yet, oh well. > > Signed-off-by: Christoffer Dall > --- > hw/intc/arm_gic.c

Re: [Qemu-devel] [RFC v2 6/6] bdrv: No silent error message discarding

2013-09-06 Thread Kevin Wolf
Am 05.09.2013 um 15:55 hat Max Reitz geschrieben: > Using NULL as errp parameters to bdrv_open, bdrv_file_open and > bdrv_create in all block drivers which do not yet implement proper error > propagation is not a good idea, since this now silently discards error > messages. Fix this by using a prop

Re: [Qemu-devel] [RFC v2 5/6] qcow2: Use Error parameter

2013-09-06 Thread Kevin Wolf
Am 05.09.2013 um 15:55 hat Max Reitz geschrieben: > Employ usage of the new Error ** parameter in qcow2_open, qcow2_create > and associated functions. > > Signed-off-by: Max Reitz > --- > block/qcow2.c | 135 > ++ > 1 file changed, 88 inse

Re: [Qemu-devel] [PATCH 3/5] hw: arm_gic: Keep track of SGI sources

2013-09-06 Thread Peter Maydell
On 23 August 2013 21:10, Christoffer Dall wrote: > Right now the arm gic emulation doesn't keep track of the source of an > SGI (which apparently Linux guests don't use, or they're fine with > assuming CPU 0 always). > > Add the necessary matrix on the GICState structure and maintain the data > wh

[Qemu-devel] [RFC] Introduce blocking_fn annotation

2013-09-06 Thread Gabriel Kerneis
A blocking function is a function that must not be called in coroutine context, for example because it might block for a long amount of time. This annotation should be used to mark normal functions that have a coroutine_fn counterpart, to make sure that the former is not used instead of the later i

[Qemu-devel] [RFC] Introducing CoroCheck and proposal for a blocking_fn annotation

2013-09-06 Thread Gabriel Kerneis
During his GSoC on writing a CPC [1] backend for QEMU, Charlie Shepherd started to explicitly annotate coroutine_fn [2]. On aspect of this refactoring work has been to split "dynamic" functions (that used qemu_in_coroutine) into a blocking version and a coroutine one. It has been agreed that it was

Re: [Qemu-devel] [PATCH 02/12] trace+libvirt: start trace processing thread in final child process

2013-09-06 Thread Michael Mueller
On Wed, 17 Jul 2013 10:08:15 +0800 Stefan Hajnoczi wrote: > On Tue, Jul 16, 2013 at 02:17:28PM +0200, Michael Mueller wrote: > > On Tue, 16 Jul 2013 11:05:11 +0800 > > Stefan Hajnoczi wrote: > > > > > On Mon, Jul 15, 2013 at 09:41:19PM +0200, Christian Borntraeger wrote: > > > > When running wi

[Qemu-devel] [PATCH v2 0/2] Fix ram_memory initialization under Xen

2013-09-06 Thread Fabio Fantoni
Hi all, The first patch fix the initialization of ram_memory in pc_init1() in pc_piix.c. The second call the initialization code of Xen while running with the Q35 chipset even if Q35 still those not work with Xen. There need some work in the HVM Loader and in libxl at least. Thanks, Anthony PE

Re: [Qemu-devel] [PATCH 1/5] hw: arm_gic: Fix gic_set_irq handling

2013-09-06 Thread Peter Maydell
On 23 August 2013 21:10, Christoffer Dall wrote: > For some reason only edge-triggered or enabled level-triggered > interrupts would set the pending state of a raised IRQ. This is not in > compliance with the specs, which indicate that the pending state is > separate from the enabled state, which

Re: [Qemu-devel] [RFC v2 4/6] block: Error parameter for create functions

2013-09-06 Thread Kevin Wolf
Am 05.09.2013 um 15:55 hat Max Reitz geschrieben: > Add an Error ** parameter to bdrv_create and its associated functions to > allow more specific error messages. > > Signed-off-by: Max Reitz > --- > block.c | 72 > +-- > block/cow.c

Re: [Qemu-devel] [RFC v4 4/5] hw/arm/digic: add UART support

2013-09-06 Thread Peter Maydell
On 6 September 2013 14:00, Antony Pavlov wrote: > On Fri, 6 Sep 2013 08:25:20 +0100 > Peter Maydell wrote: >> You can deduce its existence though -- does the >> UART let you feed two or three characters to it >> at faster than whatever the serial line speed is >> before it sets the "stop sending

Re: [Qemu-devel] [RFC v2 1/6] bdrv: Use "Error" for opening images

2013-09-06 Thread Kevin Wolf
Am 05.09.2013 um 15:55 hat Max Reitz geschrieben: > Add an Error ** parameter to BlockDriver.bdrv_open and > BlockDriver.bdrv_file_open to allow more specific error messages. > > Signed-off-by: Max Reitz > diff --git a/block/iscsi.c b/block/iscsi.c > index 2bbee1f..2464f19 100644 > --- a/block/i

Re: [Qemu-devel] [RFC v2 3/6] block: Error parameter for open functions

2013-09-06 Thread Kevin Wolf
Am 05.09.2013 um 15:55 hat Max Reitz geschrieben: > Add an Error ** parameter to bdrv_open, bdrv_file_open and associated > functions to allow more specific error messages. > > Signed-off-by: Max Reitz > --- > block.c | 98 > --- > b

Re: [Qemu-devel] [PATCH 4/4] arm: vgic device control api support

2013-09-06 Thread Peter Maydell
On 23 August 2013 20:41, Christoffer Dall wrote: > Support creating the ARM vgic device through the device control API and > setting the base address for the distributor and cpu interfaces in KVM > VMs using this API. > > Because the older KVM_CREATE_IRQCHIP interface needs the irq chip to be > cr

Re: [Qemu-devel] [PATCH v2 0/2] KVM: s390: add floating irq controller

2013-09-06 Thread Christian Borntraeger
On 06/09/13 14:19, Jens Freimann wrote:> This series adds a kvm_device that acts as a irq controller for floating > interrupts. As a first step it implements functionality to retrieve and > inject > interrupts for the purpose of migration and for hardening the reset code by > allowing user space

Re: [Qemu-devel] [PATCH 2/2] s390x/kvm: implement floating-interrupt controller device

2013-09-06 Thread Christian Borntraeger
On 06/09/13 14:19, Jens Freimann wrote: > This patch implements a floating-interrupt controller device (flic) > which interacts with the s390 flic kvm_device. > > It provides functionality to: > * clear all pending floating interrupts in the kernel at device reset > * inject/retrieve inter

Re: [Qemu-devel] [PATCH] vl.c: Implement SIGILL signal handler for triggering SIGSEGV

2013-09-06 Thread Michal Novotny
On 09/06/2013 12:50 AM, Anthony Liguori wrote: > On Thu, Sep 5, 2013 at 7:20 AM, Michal Novotny wrote: >> This is the patch to introduce SIGILL handler to be able to trigger >> SIGSEGV signal in qemu. This has been written to help debugging >> state when qemu crashes by SIGSEGV as a simple reprod

Re: [Qemu-devel] [PATCH v2 2/2] KVM: s390: add floating irq controller

2013-09-06 Thread Christian Borntraeger
On 06/09/13 14:19, Jens Freimann wrote: > This patch adds a floating irq controller as a kvm_device. > It will be necessary for migration of floating interrupts as well > as for hardening the reset code by allowing user space to explicitly > remove all pending floating interrupts. > > Signed-off-b

Re: [Qemu-devel] [PATCH v2 1/2] KVM: s390: add and extend interrupt information data structs

2013-09-06 Thread Christian Borntraeger
On 06/09/13 14:19, Jens Freimann wrote: > With the currently available struct kvm_s390_interrupt it is not possible to > inject every kind of interrupt as defined in the z/Architecture. Add > additional interruption parameters to the structures and move it to kvm.h > > Signed-off-by: Jens Freimann

Re: [Qemu-devel] [PATCH 1/2] linux-headers: update for s390 floating interrupt controller

2013-09-06 Thread Christian Borntraeger
On 06/09/13 14:19, Jens Freimann wrote: > Add symbols required for the s390 floating interrupt controller (flic) > > Signed-off-by: Jens Freimann As Peter said, this should come via a sync, but you already mentioned that in your cover-letter. I will Ack the kernel patch and let it come via that

[Qemu-devel] [PATCH v2 6/6] qemu-iotests: Additional info from qemu-img info

2013-09-06 Thread Max Reitz
Add a test for the additional information now provided by qemu-img info when used on qcow2 images. Signed-off-by: Max Reitz --- tests/qemu-iotests/064 | 72 ++ tests/qemu-iotests/064.out | 22 ++ tests/qemu-iotests/group | 1 + 3 fil

Re: [Qemu-devel] [PATCH 3/4] kvm: Common device control API functions

2013-09-06 Thread Peter Maydell
On 23 August 2013 20:41, Christoffer Dall wrote: > Introduces two simple functions: > int kvm_device_ioctl(int fd, int type, ...); > int kvm_create_device(KVMState *s, uint64_t type, bool test); > > These functions wrap the basic ioctl-based interactions with KVM in a > way similar to othe

[Qemu-devel] [PATCH v2 5/6] qemu-iotests: Discard specific info in _img_info

2013-09-06 Thread Max Reitz
In _img_info, filter out additional information specific to the image format provided by qemu-img info, since tests designed for multiple image formats would produce different outputs for every image format else. Signed-off-by: Max Reitz --- tests/qemu-iotests/common.rc | 19 ++-

[Qemu-devel] [PATCH v2 4/6] qcow2: Add support for ImageInfoSpecific

2013-09-06 Thread Max Reitz
Add a new ImageInfoSpecificQCow2 type as a subtype of ImageInfoSpecific. This contains the compatibility level as a string and an optional lazy_refcounts boolean (optional means mandatory for compat >= 1.1 and not available for compat == 0.10). In qcow2_get_info, fill the BlockDriverInfo.format_sp

[Qemu-devel] [PATCH v2 3/6] block/qapi: Human-readable ImageInfoSpecific dump

2013-09-06 Thread Max Reitz
Add a function for generically dumping the ImageInfoSpecific information in a human-readable format to block/qapi.c. Use this function in bdrv_image_info_dump and qemu-io-cmds.c:info_f to allow qemu-img info resp. qemu-io -c info to print that format specific information. Signed-off-by: Max Reitz

[Qemu-devel] [PATCH v2 0/6] Provide additional info through qemu-img info

2013-09-06 Thread Max Reitz
qemu-img info provides only pretty general information about an image. For any image format, there might be specific options which cannot be represented in a universal way; for instance, qcow2 provides the compatibility and lazy_refcount options whose values are certainly interesting but currently

[Qemu-devel] [PATCH v2 1/6] qapi: Add ImageInfoSpecific type

2013-09-06 Thread Max Reitz
Add a new type ImageInfoSpecific as a union for image format specific information in ImageInfo. Signed-off-by: Max Reitz --- qapi-schema.json | 18 +- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/qapi-schema.json b/qapi-schema.json index a51f7d2..eebf851 100644 -

[Qemu-devel] [PATCH v2 2/6] block: Add ImageInfoSpecific to BlockDriverInfo

2013-09-06 Thread Max Reitz
Add the new ImageInfoSpecific type also to BlockDriverInfo. To prevent memory leaks, this field has to be initialized to NULL every time before calling bdrv_get_info and qapi_free_ImageInfoSpecific has to be called on it when the BlockDriverInfo object is no longer required. Signed-off-by: Max Re

Re: [Qemu-devel] [RFC v2 1/6] bdrv: Use "Error" for opening images

2013-09-06 Thread Kevin Wolf
Am 05.09.2013 um 15:55 hat Max Reitz geschrieben: > Add an Error ** parameter to BlockDriver.bdrv_open and > BlockDriver.bdrv_file_open to allow more specific error messages. > > Signed-off-by: Max Reitz > diff --git a/block/raw_bsd.c b/block/raw_bsd.c > index ab2b0fd..793121a 100644 > --- a/blo

Re: [Qemu-devel] [PATCH 2/4] kvm: Introduce kvm_arch_irqchip_create

2013-09-06 Thread Peter Maydell
On 23 August 2013 20:41, Christoffer Dall wrote: > Introduce kvm_arch_irqchip_create an arch-specific hook in preparation > for architecture-specific use of the device control API to create IRQ > chips. > > Following patches will implement the ARM irqchip create method to prefer > the device contr

Re: [Qemu-devel] [RFC v4 4/5] hw/arm/digic: add UART support

2013-09-06 Thread Antony Pavlov
On Fri, 6 Sep 2013 08:25:20 +0100 Peter Maydell wrote: > On 6 September 2013 07:54, Antony Pavlov wrote: > > On Thu, 5 Sep 2013 19:17:50 +0100 > > Peter Maydell wrote: > >> Does this UART really not have a FIFO? > > > > There is no public documentation on Digic chips. > > Only Canon's engineers

[Qemu-devel] [PATCH v2] mips_malta: support up to 2GiB RAM

2013-09-06 Thread Paul Burton
A Malta board can support up to 2GiB of RAM. Since the unmapped kseg0/1 regions are only 512MiB large & the latter 256MiB of those are taken up by the IO region, access to RAM beyond 256MiB must be done through a mapped region. In the case of a Linux guest this means we need to use highmem. The ma

Re: [Qemu-devel] [PATCH 32/32] PPC: Ignore writes to L2CR

2013-09-06 Thread Julio Guerra
2013/6/30 Alexander Graf : > The L2CR register contains a number of bits that either impose configuration > which we can't deal with or mean "something is in progress until the bit is > 0 again". > > Since we don't model the former and we do want to accomodate guests using the > latter semantics, l

Re: [Qemu-devel] [PATCH 1/2] linux-headers: update for s390 floating interrupt controller

2013-09-06 Thread Peter Maydell
On 6 September 2013 13:19, Jens Freimann wrote: > @@ -839,6 +903,7 @@ struct kvm_device_attr { > #define KVM_DEV_TYPE_FSL_MPIC_20 1 > #define KVM_DEV_TYPE_FSL_MPIC_42 2 > #define KVM_DEV_TYPE_XICS 3 > +#define KVM_DEV_TYPE_FLIC 4 Christoffer's patchset swi

Re: [Qemu-devel] [PATCH 1/2] linux-headers: update for s390 floating interrupt controller

2013-09-06 Thread Peter Maydell
On 6 September 2013 13:19, Jens Freimann wrote: > Add symbols required for the s390 floating interrupt controller (flic) Updates to linux-headers should be the result of a sync against a specified mainline kernel revision, please (otherwise this should be an RFC patchset). thanks -- PMM

[Qemu-devel] [PATCH v2 2/2] KVM: s390: add floating irq controller

2013-09-06 Thread Jens Freimann
This patch adds a floating irq controller as a kvm_device. It will be necessary for migration of floating interrupts as well as for hardening the reset code by allowing user space to explicitly remove all pending floating interrupts. Signed-off-by: Jens Freimann Reviewed-by: Cornelia Huck --- D

[Qemu-devel] [PATCH 0/2] s390x/kvm: implement floating interrupt controller

2013-09-06 Thread Jens Freimann
This patchset enables the s390 floating interrupt controller kvm_device. It is used to * clear all pending floating interrupts in the kernel at device reset * inject/retrieve interrupts into the kernel (used for migration) Please note that the linux-headers changes are not yet merged by u

[Qemu-devel] [PATCH 1/2] linux-headers: update for s390 floating interrupt controller

2013-09-06 Thread Jens Freimann
Add symbols required for the s390 floating interrupt controller (flic) Signed-off-by: Jens Freimann --- linux-headers/asm-s390/kvm.h | 5 linux-headers/linux/kvm.h| 65 2 files changed, 70 insertions(+) diff --git a/linux-headers/asm-s390/k

[Qemu-devel] [PATCH v2 1/2] KVM: s390: add and extend interrupt information data structs

2013-09-06 Thread Jens Freimann
With the currently available struct kvm_s390_interrupt it is not possible to inject every kind of interrupt as defined in the z/Architecture. Add additional interruption parameters to the structures and move it to kvm.h Signed-off-by: Jens Freimann Reviewed-by: Cornelia Huck --- arch/s390/inclu

[Qemu-devel] [PATCH 2/2] s390x/kvm: implement floating-interrupt controller device

2013-09-06 Thread Jens Freimann
This patch implements a floating-interrupt controller device (flic) which interacts with the s390 flic kvm_device. It provides functionality to: * clear all pending floating interrupts in the kernel at device reset * inject/retrieve interrupts into the kernel (used for migration) Signed-o

[Qemu-devel] [PATCH v2 0/2] KVM: s390: add floating irq controller

2013-09-06 Thread Jens Freimann
This series adds a kvm_device that acts as a irq controller for floating interrupts. As a first step it implements functionality to retrieve and inject interrupts for the purpose of migration and for hardening the reset code by allowing user space to explicitly remove all pending floating interrup

Re: [Qemu-devel] [RFC PATCH v2 3/6] Makefile: introduce common-obj-m and block-obj-m for DSO

2013-09-06 Thread Paolo Bonzini
Il 06/09/2013 13:47, Fam Zheng ha scritto: > On Fri, 09/06 12:09, Paolo Bonzini wrote: >> Il 06/09/2013 09:28, Fam Zheng ha scritto: >>> Add necessary rules and flags for shared object generation. >>> $(common-obj-m) will include $(block-obj-m), like $(common-obj-y) does >>> for $(block-obj-y). The

Re: [Qemu-devel] [RFC PATCH v2 3/6] Makefile: introduce common-obj-m and block-obj-m for DSO

2013-09-06 Thread Fam Zheng
On Fri, 09/06 12:09, Paolo Bonzini wrote: > Il 06/09/2013 09:28, Fam Zheng ha scritto: > > Add necessary rules and flags for shared object generation. > > $(common-obj-m) will include $(block-obj-m), like $(common-obj-y) does > > for $(block-obj-y). The new rules introduced here are: > > > > 0) Fo

Re: [Qemu-devel] [RFC PATCH v2 2/6] rule.mak: allow per object cflags and libs

2013-09-06 Thread Fam Zheng
On Fri, 09/06 14:42, Michael Tokarev wrote: > 06.09.2013 11:28, Fam Zheng wrote: > > Adds extract-libs in LINK to expand any "per object libs", the syntax to > > define > > such a libs options is like: > > > > $(obj)/curl.o-libs = $(CURL_LIBS) > > > > in block/Makefile.objs. > > > > Sim

Re: [Qemu-devel] Block Filters

2013-09-06 Thread Fam Zheng
On Fri, 09/06 11:55, Kevin Wolf wrote: > Am 06.09.2013 um 11:18 hat Fam Zheng geschrieben: > > On Fri, 09/06 10:45, Kevin Wolf wrote: > > > Am 06.09.2013 um 09:56 hat Fam Zheng geschrieben: > > > > Since BlockDriver.bdrv_snapshot_create() is an optional operation, > > > > blockdev.c > > > > can na

Re: [Qemu-devel] [RFC PATCH v2 2/6] rule.mak: allow per object cflags and libs

2013-09-06 Thread Michael Tokarev
06.09.2013 11:28, Fam Zheng wrote: > Adds extract-libs in LINK to expand any "per object libs", the syntax to > define > such a libs options is like: > > $(obj)/curl.o-libs = $(CURL_LIBS) > > in block/Makefile.objs. > > Similarly, > > $(obj)foo.o-cflags = $(FOO_CFLAGS) > > is

Re: [Qemu-devel] savevm too slow

2013-09-06 Thread Kevin Wolf
Am 06.09.2013 um 03:31 hat xuanmao_001 geschrieben: > Hi, qemuers: > > I found that the guest disk file cache mode will affect to the time of savevm. > > the cache 'writeback' too slow. but the cache 'unsafe' is as fast as it can, > less than 10 seconds. > > here is the example I use virsh: >

[Qemu-devel] qemu-user-x86_64 segfaults on armv5 (WAS: qemu-user + networking issues / segfaults)

2013-09-06 Thread Christof Schulze
Hello Am Mittwoch, 4. September 2013, 08:35:37 schrieb Richard Henderson: > On 08/29/2013 02:27 PM, Christof Schulze wrote: > > #5 0x6012a100 in tb_gen_code (env=0x612def20, pc=18446744073699066880, > > cs_base=0, flags=4243635, cflags=0) > > at /mnt/data/build/qemu-1.6.0-ministatic/translat

[Qemu-devel] [PATCH 2/2] qcow2: Discard VM state in active L1 after creating snapshot

2013-09-06 Thread Kevin Wolf
During savevm, the VM state is written to the active L1 of the image and then a snapshot is taken. After that, the VM state isn't needed any more in the active L1 and should be discarded. This is implemented by this patch. The impact of not discarding the VM state is that a snapshot can never beco

[Qemu-devel] [PATCH 0/2] qcow2: Discard VM state in active L1 after creating snapshot

2013-09-06 Thread Kevin Wolf
This series fixes that 'savevm' becomes much slower after the first snapshot. The reason is unnecessary COW for the VM state, which is now avoided. Kevin Wolf (2): qcow2: Pass discard type to qcow2_discard_clusters() qcow2: Discard VM state in active L1 after creating snapshot block/qcow2-cl

[Qemu-devel] [PATCH 1/2] qcow2: Pass discard type to qcow2_discard_clusters()

2013-09-06 Thread Kevin Wolf
The function will be used internally instead of only being called for guest discard requests. Signed-off-by: Kevin Wolf --- block/qcow2-cluster.c | 8 block/qcow2.c | 2 +- block/qcow2.h | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/block/qcow2-c

Re: [Qemu-devel] [RFC PATCH v2 3/6] Makefile: introduce common-obj-m and block-obj-m for DSO

2013-09-06 Thread Paolo Bonzini
Il 06/09/2013 09:28, Fam Zheng ha scritto: > Add necessary rules and flags for shared object generation. > $(common-obj-m) will include $(block-obj-m), like $(common-obj-y) does > for $(block-obj-y). The new rules introduced here are: > > 0) For all %.so compiling: > > QEMU_CFLAGS += -shared

Re: [Qemu-devel] [RFC] qcow2 journalling draft

2013-09-06 Thread Fam Zheng
On Fri, 09/06 11:57, Kevin Wolf wrote: > Am 06.09.2013 um 11:20 hat Fam Zheng geschrieben: > > On Wed, 09/04 11:39, Kevin Wolf wrote: > > > First of all, excuse any inconsistencies in the following mail. I wrote > > > it from top to bottom, and there was some thought process involved in > > > almos

Re: [Qemu-devel] [RFC] qcow2 journalling draft

2013-09-06 Thread Fam Zheng
On Tue, 09/03 15:45, Kevin Wolf wrote: > This contains an extension of the qcow2 spec that introduces journalling > to the image format, plus some preliminary type definitions and > function prototypes in the qcow2 code. > > Journalling functionality is a crucial feature for the design of data > d

Re: [Qemu-devel] [RFC] qcow2 journalling draft

2013-09-06 Thread Kevin Wolf
Am 06.09.2013 um 11:20 hat Fam Zheng geschrieben: > On Wed, 09/04 11:39, Kevin Wolf wrote: > > First of all, excuse any inconsistencies in the following mail. I wrote > > it from top to bottom, and there was some thought process involved in > > almost every paragraph... > > > > Am 04.09.2013 um 10

Re: [Qemu-devel] Block Filters

2013-09-06 Thread Kevin Wolf
Am 06.09.2013 um 11:18 hat Fam Zheng geschrieben: > On Fri, 09/06 10:45, Kevin Wolf wrote: > > Am 06.09.2013 um 09:56 hat Fam Zheng geschrieben: > > > Since BlockDriver.bdrv_snapshot_create() is an optional operation, > > > blockdev.c > > > can navigate down the tree from top node, until hitting s

[Qemu-devel] [PATCH V2] qemu-xen: vt-d bugfix for pci rom

2013-09-06 Thread Liu, Jinsong
Liu, Jinsong wrote: > From 7d93370e8005499d18507b8cd9fa71f4ae794e19 Mon Sep 17 00:00:00 2001 > From: Liu Jinsong > Date: Fri, 6 Sep 2013 16:34:56 +0800 > Subject: [PATCH] qemu-xen: vt-d bugfix for pci rom > Sorry, update 'From: Liu Jinsong ' and add some error log. === >From 7d93370e80

Re: [Qemu-devel] [RFC PATCH v2 4/6] module: implement module loading function

2013-09-06 Thread Paolo Bonzini
Il 06/09/2013 09:28, Fam Zheng ha scritto: > Added three types of modules: > > typedef enum { > MODULE_LOAD_BLOCK = 0, > MODULE_LOAD_UI, > MODULE_LOAD_NET, > MODULE_LOAD_MAX, > } module_load_type; > > and their loading function: > > void module_load(mo

Re: [Qemu-devel] [PATCH v2] spapr-rtas: use softmmu for accessing rtas call parameters

2013-09-06 Thread Alexey Kardashevskiy
On 09/06/2013 06:45 PM, Alexander Graf wrote: > > On 06.09.2013, at 10:10, Alexey Kardashevskiy wrote: > >> On the real hardware, RTAS is called in real mode and therefore >> ignores top 4 bits of the address passed in the call. >> >> This fixes QEMU to use softmmu which can chop top 4 bits >> if

Re: [Qemu-devel] [RFC PATCH 1/6] make.rule: fix $(obj) to a real relative path

2013-09-06 Thread Paolo Bonzini
Il 05/09/2013 12:20, Fam Zheng ha scritto: > Makefile.target includes rule.mak and unnested common-obj-y, then prefix > them with '../', this will ignore object specific QEMU_CFLAGS in subdir > Makefile.objs: > > $(obj)/curl.o: QEMU_CFLAGS += $(CURL_CFLAGS) > > Because $(obj) here is './block

Re: [Qemu-devel] [RFC] qcow2 journalling draft

2013-09-06 Thread Fam Zheng
On Wed, 09/04 11:39, Kevin Wolf wrote: > First of all, excuse any inconsistencies in the following mail. I wrote > it from top to bottom, and there was some thought process involved in > almost every paragraph... > > Am 04.09.2013 um 10:03 hat Stefan Hajnoczi geschrieben: > > On Tue, Sep 03, 2013

Re: [Qemu-devel] Block Filters

2013-09-06 Thread Fam Zheng
On Fri, 09/06 10:45, Kevin Wolf wrote: > Am 06.09.2013 um 09:56 hat Fam Zheng geschrieben: > > On Tue, 09/03 18:24, Benoît Canet wrote: > > > > > > Hello list, > > > > > > I am thinking about QEMU block filters lately. > > > > > > I am not a block.c/blockdev.c expert so tell me what you think of

Re: [Qemu-devel] [PATCH v3 19/29] tcg-aarch64: Introduce tcg_fmt_Rd_uimm_s

2013-09-06 Thread Claudio Fontana
On 05.09.2013 17:41, Richard Henderson wrote: > On 09/05/2013 06:32 AM, Claudio Fontana wrote: >>> { >>> -uint32_t half, base, shift, movk = 0; >>> -/* construct halfwords of the immediate with MOVZ/MOVK with LSL */ >>> -/* using MOVZ 0x5280 | extended reg.. */ >>> -base = (val

Re: [Qemu-devel] [PATCH 1/2] qem-xen: add later wakeup logic when qemu wakeup

2013-09-06 Thread Liu, Jinsong
Stefano Stabellini wrote: > On Tue, 3 Sep 2013, Liu, Jinsong wrote: >> Anthony PERARD wrote: >>> On 01/09/13 10:51, Liu, Jinsong wrote: From 86ad3bb83a984ad7bbc00b81d6a0bfc1abc543ca Mon Sep 17 00:00:00 2001 From: Liu Jinsong Date: Sun, 1 Sep 2013 23:39:14 +0800 Subject: [PATCH

[Qemu-devel] [PATCH] qemu-xen: vt-d bugfix for pci rom

2013-09-06 Thread Liu, Jinsong
>From 7d93370e8005499d18507b8cd9fa71f4ae794e19 Mon Sep 17 00:00:00 2001 From: Liu Jinsong Date: Fri, 6 Sep 2013 16:34:56 +0800 Subject: [PATCH] qemu-xen: vt-d bugfix for pci rom Remove incorrect memory_region_init_rom_device() from xen_pt_register_regions(), otherwise vt-d device with pci rom can

Re: [Qemu-devel] [PATCH v2] spapr-rtas: use softmmu for accessing rtas call parameters

2013-09-06 Thread Alexander Graf
On 06.09.2013, at 10:10, Alexey Kardashevskiy wrote: > On the real hardware, RTAS is called in real mode and therefore > ignores top 4 bits of the address passed in the call. > > This fixes QEMU to use softmmu which can chop top 4 bits > if MSR DR is not set. > > Signed-off-by: Alexey Kardashev

Re: [Qemu-devel] Block Filters

2013-09-06 Thread Kevin Wolf
Am 06.09.2013 um 09:56 hat Fam Zheng geschrieben: > On Tue, 09/03 18:24, Benoît Canet wrote: > > > > Hello list, > > > > I am thinking about QEMU block filters lately. > > > > I am not a block.c/blockdev.c expert so tell me what you think of the > > following. > > > > The use cases I see would

Re: [Qemu-devel] [RFC PATCH 4/6] Makefile: introduce common-obj-m and block-obj-m for DSO

2013-09-06 Thread Paolo Bonzini
Il 05/09/2013 23:45, Peter Maydell ha scritto: > On 5 September 2013 20:41, Paolo Bonzini wrote: >> Libtool used to be really bad, but most performance problems have been >> solved. > > How about the "it silently creates things in dot-directories, > recompiles things at random times when it reall

[Qemu-devel] [PATCH v2] spapr-rtas: use softmmu for accessing rtas call parameters

2013-09-06 Thread Alexey Kardashevskiy
On the real hardware, RTAS is called in real mode and therefore ignores top 4 bits of the address passed in the call. This fixes QEMU to use softmmu which can chop top 4 bits if MSR DR is not set. Signed-off-by: Alexey Kardashevskiy --- Changes: v2: * masking from replaced with the use of cpu_ld

Re: [Qemu-devel] Block Filters

2013-09-06 Thread Fam Zheng
On Tue, 09/03 18:24, Benoît Canet wrote: > > Hello list, > > I am thinking about QEMU block filters lately. > > I am not a block.c/blockdev.c expert so tell me what you think of the > following. > > The use cases I see would be: > > -$user want to have some real cryptography on top of qcow2/q

Re: [Qemu-devel] Block Filters

2013-09-06 Thread Fam Zheng
On Fri, 09/06 09:42, Kevin Wolf wrote: > Am 05.09.2013 um 19:29 hat Benoît Canet geschrieben: > > Le Thursday 05 Sep 2013 à 18:18:45 (+0800), Fam Zheng a écrit : > > > On Thu, 09/05 12:01, Stefan Hajnoczi wrote: > > > > On Wed, Sep 04, 2013 at 08:15:36PM +0200, Benoît Canet wrote: > > > > > > Propa

Re: [Qemu-devel] Block Filters

2013-09-06 Thread Kevin Wolf
Am 05.09.2013 um 19:29 hat Benoît Canet geschrieben: > Le Thursday 05 Sep 2013 à 18:18:45 (+0800), Fam Zheng a écrit : > > On Thu, 09/05 12:01, Stefan Hajnoczi wrote: > > > On Wed, Sep 04, 2013 at 08:15:36PM +0200, Benoît Canet wrote: > > > > > Propagate operations like snapshot down the tree. blo

Re: [Qemu-devel] [PATCH v2 3/3] audio: remove CONFIG_MIXEMU configure option and enable mixemu by default

2013-09-06 Thread Gerd Hoffmann
On Do, 2013-09-05 at 18:24 -0400, Bandan Das wrote: > Set mixer property to on by default. The "by default" in the commit message is a bit misleading. There is no default any more once CONFIG_MIXEMU is gone ... > Also, always include two versions > of devices (with and without mixemu) so that us

[Qemu-devel] [RFC PATCH v2 6/6] qed: build as shared library

2013-09-06 Thread Fam Zheng
Another example of DSO build but with multiple files in a module. Signed-off-by: Fam Zheng --- block/Makefile.objs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/block/Makefile.objs b/block/Makefile.objs index b1e1520..4cb2ab9 100644 --- a/block/Makefile.objs +++ b/block

[Qemu-devel] [RFC PATCH v2 5/6] curl: build as shared library

2013-09-06 Thread Fam Zheng
Curl block driver is built as shared object module when enabled. We have per object cflags and libs support now, move CURL_CFLAGS and CURL_LIBS from global option variables to a per object basis. "make install" is not installing it yet, manually copy it to ${prefix}/qemu/block/curl.so to make it l

[Qemu-devel] [RFC PATCH v2 3/6] Makefile: introduce common-obj-m and block-obj-m for DSO

2013-09-06 Thread Fam Zheng
Add necessary rules and flags for shared object generation. $(common-obj-m) will include $(block-obj-m), like $(common-obj-y) does for $(block-obj-y). The new rules introduced here are: 0) For all %.so compiling: QEMU_CFLAGS += -shared -fPIC 1) %.o in $(common-obj-m) is compiled to %.o, with

[Qemu-devel] [RFC PATCH v2 4/6] module: implement module loading function

2013-09-06 Thread Fam Zheng
Added three types of modules: typedef enum { MODULE_LOAD_BLOCK = 0, MODULE_LOAD_UI, MODULE_LOAD_NET, MODULE_LOAD_MAX, } module_load_type; and their loading function: void module_load(module_load_type). which loads all ".so" files in a subdir under "${

[Qemu-devel] [RFC PATCH v2 2/6] rule.mak: allow per object cflags and libs

2013-09-06 Thread Fam Zheng
Adds extract-libs in LINK to expand any "per object libs", the syntax to define such a libs options is like: $(obj)/curl.o-libs = $(CURL_LIBS) in block/Makefile.objs. Similarly, $(obj)foo.o-cflags = $(FOO_CFLAGS) is also supported. Signed-off-by: Fam Zheng --- rules.mak | 8

[Qemu-devel] [RFC PATCH v2 1/6] make.rule: fix $(obj) to a real relative path

2013-09-06 Thread Fam Zheng
Makefile.target includes rule.mak and unnested common-obj-y, then prefix them with '../', this will ignore object specific QEMU_CFLAGS in subdir Makefile.objs: $(obj)/curl.o: QEMU_CFLAGS += $(CURL_CFLAGS) Because $(obj) here is './block', instead of '../block'. This doesn't hurt compiling bec

[Qemu-devel] [RFC PATCH v2 0/6] Shared Library Module Support

2013-09-06 Thread Fam Zheng
This series implements feature of shared object building as described in: http://wiki.qemu.org/Features/Modules It's achieved in three steps, with extra bonus to change curl and qed to a shared library module in the end (only to demonstrate the usage, no "make install" support of .so files yet).

Re: [Qemu-devel] [RFC] qcow2 journalling draft

2013-09-06 Thread Kevin Wolf
Am 05.09.2013 um 17:26 hat Benoît Canet geschrieben: > Le Thursday 05 Sep 2013 à 11:24:40 (+0200), Stefan Hajnoczi a écrit : > > On Wed, Sep 04, 2013 at 11:55:23AM +0200, Benoît Canet wrote: > > > > > I'm not sure if multiple journals will work in practice. Doesn't this > > > > > re-introduce the

Re: [Qemu-devel] [RFC PATCH 4/6] Makefile: introduce common-obj-m and block-obj-m for DSO

2013-09-06 Thread Fam Zheng
On Fri, 09/06 00:20, Richard Henderson wrote: > On 09/05/2013 10:53 PM, Fam Zheng wrote: > > OK. Thanks for pointing out. The problem with ar file is that > > --whole-archive > > needs to be done specificly to modules .a, other libs shouldn't be linked > > with > > this flag. > > See also: > >

Re: [Qemu-devel] [PATCH v2 2/3] hda-codec: make mixemu selectable at runtime

2013-09-06 Thread Gerd Hoffmann
> --- a/hw/audio/hda-codec.c > +++ b/hw/audio/hda-codec.c > @@ -118,7 +118,20 @@ static void hda_codec_parse_fmt(uint32_t format, struct > audsettings *as) > #define QEMU_HDA_AMP_NONE(0) > #define QEMU_HDA_AMP_STEPS 0x4a > > +#ifdef CONFIG_MIXEMU > +#define PARAM mixemu > +#define HD

[Qemu-devel] [PATCH 03/19] tcg-ia64: Handle constant calls

2013-09-06 Thread Richard Henderson
Using only indirect calls results in 3 bundles (one to load the descriptor address), and 4 stop bits. By looking through the descriptor to the constants, we can perform the call with 2 bundles and only 1 stop bit. Signed-off-by: Richard Henderson --- tcg/ia64/tcg-target.c | 38 +

Re: [Qemu-devel] [RFC v4 4/5] hw/arm/digic: add UART support

2013-09-06 Thread Peter Maydell
On 6 September 2013 07:54, Antony Pavlov wrote: > On Thu, 5 Sep 2013 19:17:50 +0100 > Peter Maydell wrote: >> Does this UART really not have a FIFO? > > There is no public documentation on Digic chips. > Only Canon's engineers know something about Digic's FIFO (if it exists :). You can deduce it

Re: [Qemu-devel] [RFC PATCH 4/6] Makefile: introduce common-obj-m and block-obj-m for DSO

2013-09-06 Thread Richard Henderson
On 09/05/2013 10:53 PM, Fam Zheng wrote: > OK. Thanks for pointing out. The problem with ar file is that --whole-archive > needs to be done specificly to modules .a, other libs shouldn't be linked with > this flag. See also: --whole-archive foo.a --no-whole-archive r~

[Qemu-devel] [PATCH 06/19] tcg-ia64: Avoid unnecessary stop bit in tcg_out_alu

2013-09-06 Thread Richard Henderson
When performing an operation with two input registers, we'd leave the stop bit (and thus an extra cycle) that's only needed when one or the other input is a constant. Signed-off-by: Richard Henderson --- tcg/ia64/tcg-target.c | 17 ++--- 1 file changed, 6 insertions(+), 11 deletions(

Re: [Qemu-devel] [RFC v4 2/5] hw/arm/digic: prepare DIGIC-based boards support

2013-09-06 Thread Antony Pavlov
On Thu, 5 Sep 2013 18:54:30 +0100 Peter Maydell wrote: > On 5 September 2013 08:52, Antony Pavlov wrote: > > Also this patch adds initial support for Canon > > PowerShot A1100 IS compact camera. > > > > Signed-off-by: Antony Pavlov > > --- > > hw/arm/Makefile.objs | 2 +- > > hw/arm/digic_bo

[Qemu-devel] [PATCH 18/19] tcg-ia64: Convert to new ldst helpers

2013-09-06 Thread Richard Henderson
Still inline, but updated to the new routines. Always use the LE helpers, reusing the bswap between the fast and slot paths. Signed-off-by: Richard Henderson --- tcg/ia64/tcg-target.c | 140 -- 1 file changed, 79 insertions(+), 61 deletions(-) di

[Qemu-devel] [PATCH 13/19] tcg-ia64 Introduce tcg_opc_bswap64_i

2013-09-06 Thread Richard Henderson
Signed-off-by: Richard Henderson --- tcg/ia64/tcg-target.c | 63 +++ 1 file changed, 28 insertions(+), 35 deletions(-) diff --git a/tcg/ia64/tcg-target.c b/tcg/ia64/tcg-target.c index 6c95920..3c177c6 100644 --- a/tcg/ia64/tcg-target.c +++ b/tcg/ia

[Qemu-devel] [PATCH 17/19] tcg-i64: Reduce code duplication in tcg_out_qemu_ld

2013-09-06 Thread Richard Henderson
The only differences were in the bswap insns emitted. Signed-off-by: Richard Henderson --- tcg/ia64/tcg-target.c | 60 --- 1 file changed, 23 insertions(+), 37 deletions(-) diff --git a/tcg/ia64/tcg-target.c b/tcg/ia64/tcg-target.c index 819bca3..

<    1   2