Re: [Qemu-devel] [PATCH 16/17] migration: adjust migration_thread() process for page flipping

2013-11-28 Thread Lei Li
On 11/26/2013 10:11 PM, Paolo Bonzini wrote: Il 26/11/2013 14:53, Lei Li ha scritto: 1) ram_save_setup stage, it will send all the bytes in this stages to destination, and send_pipefd by ram_control_before_iterate at the end of it. ram_save_setup runs doesn't send anything from guest

[Qemu-devel] [PATCHv3] qdev: Validate hex properties

2013-11-28 Thread Hannes Reinecke
strtoul(l) might overflow, in which case it'll return '-1' and set the appropriate error code. So update the calls to strtoul(l) when parsing hex properties to avoid silent overflows. Signed-off-by: Hannes Reinecke h...@suse.de --- hw/core/qdev-properties.c | 20 ++-- 1 file

[Qemu-devel] [PATCH v6 01/10] qapi: Add BlockOperationType enum

2013-11-28 Thread Fam Zheng
This adds the enum of all the operations that can be taken on a block device. Signed-off-by: Fam Zheng f...@redhat.com --- qapi-schema.json | 49 + 1 file changed, 49 insertions(+) diff --git a/qapi-schema.json b/qapi-schema.json index

[Qemu-devel] [PATCH v6 04/10] block: support dropping active in bdrv_drop_intermediate

2013-11-28 Thread Fam Zheng
Dropping intermediate could be useful both for commit and stream, and BDS refcnt plus bdrv_swap could do most of the job nicely. It also need some improvements in preparation for op blockers. Signed-off-by: Fam Zheng f...@redhat.com --- block.c| 152

[Qemu-devel] [PATCH v6 08/10] block: Add checks of blocker in block operations

2013-11-28 Thread Fam Zheng
Before operate on a BlockDriverState, respective types are checked against bs-op_blockers and it will error out if there's a blocker. Signed-off-by: Fam Zheng f...@redhat.com --- block/snapshot.c | 11 +++ blockdev.c | 8 2 files changed, 19 insertions(+) diff --git

[Qemu-devel] [PATCH v6 00/10] Drop in_use from BlockDriverState and enable point-in-time snapshot exporting over NBD

2013-11-28 Thread Fam Zheng
This series adds for point-in-time snapshot NBD exporting based on blockdev-backup (variant of drive-backup with existing device as target). We get a thin point-in-time snapshot by COW mechanism of drive-backup, and export it through built in NBD server. The steps are as below: 1. (SHELL)

[Qemu-devel] [PATCH v6 02/10] block: Introduce op_blockers to BlockDriverState

2013-11-28 Thread Fam Zheng
BlockDriverState.op_blockers is an array of lists with BLOCK_OP_TYPE_MAX elements. Each list is a list of blockers of an operation type (BlockOpType), that marks this BDS as currently blocked for a certain type of operation with reason errors stored in the list. The rule of usage is: * BDS user

[Qemu-devel] [PATCH v6 03/10] block: Parse backing option to reference existing BDS

2013-11-28 Thread Fam Zheng
Signed-off-by: Fam Zheng f...@redhat.com --- block.c | 109 +- block/mirror.c| 2 +- include/block/block.h | 3 +- include/block/block_int.h | 3 ++ 4 files changed, 76 insertions(+), 41 deletions(-) diff --git

[Qemu-devel] [PATCH v6 06/10] block: Replace in_use with operation blocker

2013-11-28 Thread Fam Zheng
This drops BlockDriverState.in_use with op_blockers: - Call bdrv_op_block_all in place of bdrv_set_in_use(bs, 1). - Call bdrv_op_unblock_all in place of bdrv_set_in_use(bs, 0). - Check bdrv_op_is_blocked() in place of bdrv_in_use(bs). The specific types are used, e.g. in place of

[Qemu-devel] [PATCH v6 07/10] block: Pass error in bdrv_snapshot_create

2013-11-28 Thread Fam Zheng
This allows descent error information to be reported. Signed-off-by: Fam Zheng f...@redhat.com --- block/snapshot.c | 5 +++-- blockdev.c | 2 +- include/block/snapshot.h | 3 ++- qemu-img.c | 2 +- savevm.c | 2 +- 5 files changed, 8

[Qemu-devel] [PATCH v6 05/10] stream: Use bdrv_drop_intermediate and drop close_unused_images

2013-11-28 Thread Fam Zheng
This reuses the new bdrv_drop_intermediate. Signed-off-by: Fam Zheng f...@redhat.com --- block/stream.c | 28 +--- 1 file changed, 1 insertion(+), 27 deletions(-) diff --git a/block/stream.c b/block/stream.c index 694fd42..76bb4b8 100644 --- a/block/stream.c +++

[Qemu-devel] [PATCH v6 09/10] qmp: add command 'blockdev-backup'

2013-11-28 Thread Fam Zheng
Similar to drive-backup, but this command uses a device id as target instead of creating/opening an image file. Also add blocker on target bs, since the target is also a named device now. Signed-off-by: Fam Zheng f...@redhat.com --- block/backup.c | 21 + blockdev.c

[Qemu-devel] [PATCH v6 10/10] block: Allow backup on referenced named BlockDriverState

2013-11-28 Thread Fam Zheng
Drive backup is a read only operation on source bs. We want to allow this specific case to enable image-fleecing. Note that when image-fleecing job starts, the job still add its blocker to source bs, and any other operation on it will be blocked by that. Signed-off-by: Fam Zheng f...@redhat.com

Re: [Qemu-devel] [RFC PATCH v2 5/6] qcow2: implement bdrv_preallocate

2013-11-28 Thread Hu Tao
On Wed, Nov 27, 2013 at 11:13:40AM +0100, Peter Lieven wrote: Am 27.11.2013 11:07, schrieb Fam Zheng: On 2013年11月27日 18:03, Peter Lieven wrote: Am 27.11.2013 07:40, schrieb Fam Zheng: On 2013年11月27日 14:01, Hu Tao wrote: On Wed, Nov 27, 2013 at 11:01:23AM +0800, Fam Zheng wrote: On

Re: [Qemu-devel] [RFC] create a single workqueue for each vm to update vm irq routing table

2013-11-28 Thread Paolo Bonzini
Il 28/11/2013 07:27, Zhanghaoyu (A) ha scritto: Without synchronize_rcu you could have VCPU writes to routing table e = entry from IRQ routing table kvm_irq_routing_update(kvm, new); VCPU resumes execution

Re: [Qemu-devel] [RFC] create a single workqueue for each vm to update vm irq routing table

2013-11-28 Thread Zhanghaoyu (A)
No, this would be exactly the same code that is running now: mutex_lock(kvm-irq_lock); old = kvm-irq_routing; kvm_irq_routing_update(kvm, new); mutex_unlock(kvm-irq_lock); synchronize_rcu(); kfree(old);

Re: [Qemu-devel] [RFC] create a single workqueue for each vm to update vm irq routing table

2013-11-28 Thread Gleb Natapov
On Thu, Nov 28, 2013 at 09:55:42AM +0100, Paolo Bonzini wrote: Il 28/11/2013 07:27, Zhanghaoyu (A) ha scritto: Without synchronize_rcu you could have VCPU writes to routing table e = entry from IRQ routing table kvm_irq_routing_update(kvm,

Re: [Qemu-devel] [RFC] create a single workqueue for each vm to update vm irq routing table

2013-11-28 Thread Gleb Natapov
On Thu, Nov 28, 2013 at 09:14:22AM +, Zhanghaoyu (A) wrote: No, this would be exactly the same code that is running now: mutex_lock(kvm-irq_lock); old = kvm-irq_routing; kvm_irq_routing_update(kvm, new);

Re: [Qemu-devel] [RFC] create a single workqueue for each vm to update vm irq routing table

2013-11-28 Thread Paolo Bonzini
Il 28/11/2013 10:19, Gleb Natapov ha scritto: Not changing current behaviour is certainly safer, but I am still not 100% convinced we have to ensure this. Suppose guest does: 1: change msi interrupt by writing to pci register 2: read the pci register to flush the write 3: zero idt I

Re: [Qemu-devel] [RFC] create a single workqueue for each vm to update vm irq routing table

2013-11-28 Thread Gleb Natapov
On Thu, Nov 28, 2013 at 10:29:36AM +0100, Paolo Bonzini wrote: Il 28/11/2013 10:19, Gleb Natapov ha scritto: Not changing current behaviour is certainly safer, but I am still not 100% convinced we have to ensure this. Suppose guest does: 1: change msi interrupt by writing to pci

Re: [Qemu-devel] [RFC] create a single workqueue for each vm to update vm irq routing table

2013-11-28 Thread Avi Kivity
On 11/28/2013 11:19 AM, Gleb Natapov wrote: On Thu, Nov 28, 2013 at 09:55:42AM +0100, Paolo Bonzini wrote: Il 28/11/2013 07:27, Zhanghaoyu (A) ha scritto: Without synchronize_rcu you could have VCPU writes to routing table e = entry from IRQ routing

Re: [Qemu-devel] [RFC] create a single workqueue for each vm to update vm irq routing table

2013-11-28 Thread Paolo Bonzini
Il 28/11/2013 10:49, Avi Kivity ha scritto: Linux is safe, it does interrupt migration from within the interrupt handler. If you do that before the device-specific EOI, you won't get another interrupt until programming the MSI is complete. Is virtio safe? IIRC it can post multiple

Re: [Qemu-devel] [PATCH] SPARC: Add and use CPU_FEATURE_CASA

2013-11-28 Thread Sebastian Huber
Hello, On 2013-11-26 15:04, Sebastian Huber wrote: The LEON3 processor has support for the CASA instruction which is normally only available for SPARC V9 processors. Binutils 2.24 and GCC 4.9 will support this instruction for LEON3. GCC uses it to generate C11 atomic operations. ---

Re: [Qemu-devel] [RFC PATCH v2 5/6] qcow2: implement bdrv_preallocate

2013-11-28 Thread Peter Lieven
On 28.11.2013 09:48, Hu Tao wrote: On Wed, Nov 27, 2013 at 11:13:40AM +0100, Peter Lieven wrote: Am 27.11.2013 11:07, schrieb Fam Zheng: On 2013年11月27日 18:03, Peter Lieven wrote: Am 27.11.2013 07:40, schrieb Fam Zheng: On 2013年11月27日 14:01, Hu Tao wrote: On Wed, Nov 27, 2013 at 11:01:23AM

Re: [Qemu-devel] [RFC] create a single workqueue for each vm to update vm irq routing table

2013-11-28 Thread Gleb Natapov
On Thu, Nov 28, 2013 at 11:49:00AM +0200, Avi Kivity wrote: On 11/28/2013 11:19 AM, Gleb Natapov wrote: On Thu, Nov 28, 2013 at 09:55:42AM +0100, Paolo Bonzini wrote: Il 28/11/2013 07:27, Zhanghaoyu (A) ha scritto: Without synchronize_rcu you could have VCPU writes to routing table

Re: [Qemu-devel] [RFC] create a single workqueue for each vm to update vm irq routing table

2013-11-28 Thread Avi Kivity
On 11/28/2013 12:11 PM, Gleb Natapov wrote: On Thu, Nov 28, 2013 at 11:49:00AM +0200, Avi Kivity wrote: On 11/28/2013 11:19 AM, Gleb Natapov wrote: On Thu, Nov 28, 2013 at 09:55:42AM +0100, Paolo Bonzini wrote: Il 28/11/2013 07:27, Zhanghaoyu (A) ha scritto: Without synchronize_rcu you could

Re: [Qemu-devel] [RFC] create a single workqueue for each vm to update vm irq routing table

2013-11-28 Thread Avi Kivity
On 11/28/2013 11:53 AM, Paolo Bonzini wrote: Il 28/11/2013 10:49, Avi Kivity ha scritto: Linux is safe, it does interrupt migration from within the interrupt handler. If you do that before the device-specific EOI, you won't get another interrupt until programming the MSI is complete. Is

Re: [Qemu-devel] [PATCH rebased for-1.8] i386: pc: align gpa-hpa on 1GB boundary (v6)

2013-11-28 Thread Michael S. Tsirkin
On Mon, Nov 25, 2013 at 06:43:13PM +0100, Paolo Bonzini wrote: v2: condition enablement of new mapping to new machine types (Paolo) v3: fix changelog v4: rebase v5: ensure alignment of piecetwo on 2MB GPA (Igor) do not register zero-sized piece-one(Igor) v6: fix memory leak

[Qemu-devel] [PATCH v2] SPARC: Add and use CPU_FEATURE_CASA

2013-11-28 Thread Sebastian Huber
The LEON3 processor has support for the CASA instruction which is normally only available for SPARC V9 processors. Binutils 2.24 and GCC 4.9 will support this instruction for LEON3. GCC uses it to generate C11 atomic operations. The CAS synthetic instruction uses an ASI of 0x80. If

Re: [Qemu-devel] [PATCH] block: Close backing file early in bdrv_img_create

2013-11-28 Thread Kevin Wolf
Am 27.11.2013 um 21:05 hat Max Reitz geschrieben: Leaving the backing file open although it is not needed anymore can cause problems if it is opened through a block driver which allows exclusive access only and if the create function of the block driver used for the top image (the one being

Re: [Qemu-devel] [RFC] create a single workqueue for each vm to update vm irq routing table

2013-11-28 Thread Paolo Bonzini
Il 28/11/2013 11:16, Avi Kivity ha scritto: The QRCU I linked would work great latency-wise (it has roughly the same latency of an rwsem but readers are lock-free). However, the locked operations in the read path would hurt because of cache misses, so it's not good either. I guess srcu

Re: [Qemu-devel] [RFC] create a single workqueue for each vm to update vm irq routing table

2013-11-28 Thread Avi Kivity
On 11/28/2013 12:40 PM, Paolo Bonzini wrote: Il 28/11/2013 11:16, Avi Kivity ha scritto: The QRCU I linked would work great latency-wise (it has roughly the same latency of an rwsem but readers are lock-free). However, the locked operations in the read path would hurt because of cache misses,

[Qemu-devel] [PATCH 2/2] scsi-disk: fix VERIFY emulation

2013-11-28 Thread Paolo Bonzini
VERIFY emulation was completely botched (and remained botched through all the refactorings). The command must be emulated both in check-medium mode (BYTCHK=00, which we implement by doing nothing) and in check-bytes mode (which we do not implement yet). Unlike WRITE AND VERIFY (which we treat

[Qemu-devel] [PATCH 0/2] scsi: fix VERIFY command

2013-11-28 Thread Paolo Bonzini
Windows executes the VERIFY command if the user forces a disk check at the next startup. QEMU crashes on it; fix it by doing exactly nothing to VERIFY a bunch of sectors. Paolo Bonzini (2): scsi-bus: fix transfer length and direction for VERIFY command scsi-disk: fix VERIFY emulation

[Qemu-devel] [PATCH 1/2] scsi-bus: fix transfer length and direction for VERIFY command

2013-11-28 Thread Paolo Bonzini
The amount of bytes to transfer depends on the BYTCHK field. If any data is transferred, it is sent to the device. Cc: qemu-sta...@nongnu.org Signed-off-by: Paolo Bonzini pbonz...@redhat.com --- hw/scsi/scsi-bus.c | 13 - 1 file changed, 12 insertions(+), 1 deletion(-) diff --git

[Qemu-devel] [PATCH] block: Use BDRV_O_NO_BACKING where appropriate

2013-11-28 Thread Kevin Wolf
If you open an image temporarily just because you want to check its size or get it flushed, there's no real reason to open the whole backing file chain. Signed-off-by: Kevin Wolf kw...@redhat.com --- block.c | 3 ++- block/qcow2.c | 3 ++- block/vmdk.c | 2 +- 3 files changed, 5

Re: [Qemu-devel] [RFC] create a single workqueue for each vm to update vm irq routing table

2013-11-28 Thread Gleb Natapov
On Thu, Nov 28, 2013 at 12:12:55PM +0200, Avi Kivity wrote: On 11/28/2013 12:11 PM, Gleb Natapov wrote: On Thu, Nov 28, 2013 at 11:49:00AM +0200, Avi Kivity wrote: On 11/28/2013 11:19 AM, Gleb Natapov wrote: On Thu, Nov 28, 2013 at 09:55:42AM +0100, Paolo Bonzini wrote: Il 28/11/2013 07:27,

Re: [Qemu-devel] [RFC] create a single workqueue for each vm to update vm irq routing table

2013-11-28 Thread Gleb Natapov
On Thu, Nov 28, 2013 at 11:40:06AM +0100, Paolo Bonzini wrote: Il 28/11/2013 11:16, Avi Kivity ha scritto: The QRCU I linked would work great latency-wise (it has roughly the same latency of an rwsem but readers are lock-free). However, the locked operations in the read path would hurt

Re: [Qemu-devel] [RFC] create a single workqueue for each vm to update vm irq routing table

2013-11-28 Thread Paolo Bonzini
Il 28/11/2013 12:09, Gleb Natapov ha scritto: - if there are no callbacks, but there are readers, synchronize_srcu busy-loops for some time checking if the readers complete. After a while (20 us for synchronize_srcu, 120 us for synchronize_srcu_expedited) it gives up and starts using a

Re: [Qemu-devel] [RFC] create a single workqueue for each vm to update vm irq routing table

2013-11-28 Thread Avi Kivity
On 11/28/2013 01:10 PM, Paolo Bonzini wrote: Il 28/11/2013 12:09, Gleb Natapov ha scritto: - if there are no callbacks, but there are readers, synchronize_srcu busy-loops for some time checking if the readers complete. After a while (20 us for synchronize_srcu, 120 us for

Re: [Qemu-devel] [RFC] create a single workqueue for each vm to update vm irq routing table

2013-11-28 Thread Avi Kivity
On 11/28/2013 01:02 PM, Gleb Natapov wrote: On Thu, Nov 28, 2013 at 12:12:55PM +0200, Avi Kivity wrote: On 11/28/2013 12:11 PM, Gleb Natapov wrote: On Thu, Nov 28, 2013 at 11:49:00AM +0200, Avi Kivity wrote: On 11/28/2013 11:19 AM, Gleb Natapov wrote: On Thu, Nov 28, 2013 at 09:55:42AM

Re: [Qemu-devel] [RFC] create a single workqueue for each vm to update vm irq routing table

2013-11-28 Thread Gleb Natapov
On Thu, Nov 28, 2013 at 01:18:54PM +0200, Avi Kivity wrote: On 11/28/2013 01:02 PM, Gleb Natapov wrote: On Thu, Nov 28, 2013 at 12:12:55PM +0200, Avi Kivity wrote: On 11/28/2013 12:11 PM, Gleb Natapov wrote: On Thu, Nov 28, 2013 at 11:49:00AM +0200, Avi Kivity wrote: On 11/28/2013 11:19 AM,

Re: [Qemu-devel] [RFC] create a single workqueue for each vm to update vm irq routing table

2013-11-28 Thread Gleb Natapov
On Thu, Nov 28, 2013 at 12:10:40PM +0100, Paolo Bonzini wrote: Il 28/11/2013 12:09, Gleb Natapov ha scritto: - if there are no callbacks, but there are readers, synchronize_srcu busy-loops for some time checking if the readers complete. After a while (20 us for synchronize_srcu, 120 us

Re: [Qemu-devel] [RFC] create a single workqueue for each vm to update vm irq routing table

2013-11-28 Thread Michael S. Tsirkin
On Thu, Nov 28, 2013 at 01:22:45PM +0200, Gleb Natapov wrote: On Thu, Nov 28, 2013 at 01:18:54PM +0200, Avi Kivity wrote: On 11/28/2013 01:02 PM, Gleb Natapov wrote: On Thu, Nov 28, 2013 at 12:12:55PM +0200, Avi Kivity wrote: On 11/28/2013 12:11 PM, Gleb Natapov wrote: On Thu, Nov 28,

Re: [Qemu-devel] [RFC] create a single workqueue for each vm to update vm irq routing table

2013-11-28 Thread Avi Kivity
On 11/28/2013 01:22 PM, Gleb Natapov wrote: On Thu, Nov 28, 2013 at 01:18:54PM +0200, Avi Kivity wrote: On 11/28/2013 01:02 PM, Gleb Natapov wrote: On Thu, Nov 28, 2013 at 12:12:55PM +0200, Avi Kivity wrote: On 11/28/2013 12:11 PM, Gleb Natapov wrote: On Thu, Nov 28, 2013 at 11:49:00AM

Re: [Qemu-devel] [RFC] create a single workqueue for each vm to update vm irq routing table

2013-11-28 Thread Paolo Bonzini
Il 28/11/2013 12:23, Gleb Natapov ha scritto: Unless what ? :) Unless reader is scheduled out? Yes. Or unless my brain is scheduled out in the middle of a sentence. So we will have to disable preemption in a reader to prevent big latencies for a writer, no? I don't think that's

Re: [Qemu-devel] [RFC] create a single workqueue for each vm to update vm irq routing table

2013-11-28 Thread Gleb Natapov
On Thu, Nov 28, 2013 at 01:33:48PM +0200, Michael S. Tsirkin wrote: On Thu, Nov 28, 2013 at 01:22:45PM +0200, Gleb Natapov wrote: On Thu, Nov 28, 2013 at 01:18:54PM +0200, Avi Kivity wrote: On 11/28/2013 01:02 PM, Gleb Natapov wrote: On Thu, Nov 28, 2013 at 12:12:55PM +0200, Avi Kivity

Re: [Qemu-devel] [PATCH v2 0/2] qemu-iotests: Filter out qemu-io in all tests

2013-11-28 Thread Kevin Wolf
Am 27.11.2013 um 03:01 hat Fam Zheng geschrieben: On 2013年11月20日 10:25, Fam Zheng wrote: The second patch is too large as a mail, you can pull from: https://github.com/famz/qemu.git 035-filter-qemu-io v2: Rebase to current master. [01] Add Reviewed-by for Eric. [02] Update

Re: [Qemu-devel] [PATCH] qom: abort on error in property setter if caller passed errp == NULL

2013-11-28 Thread Igor Mammedov
On Wed, 27 Nov 2013 21:58:18 -0700 Eric Blake ebl...@redhat.com wrote: On 11/27/2013 06:24 PM, Igor Mammedov wrote: in case if caller setting property doesn't care about error and passes in NULL as errp argument but error occurs in property setter, it is silently discarded leaving object

Re: [Qemu-devel] [PATCH] qom: abort on error in property setter if caller passed errp == NULL

2013-11-28 Thread Igor Mammedov
On Thu, 28 Nov 2013 15:10:50 +1000 Peter Crosthwaite peter.crosthwa...@xilinx.com wrote: Hi, On Thu, Nov 28, 2013 at 11:24 AM, Igor Mammedov imamm...@redhat.com wrote: in case if caller setting property doesn't care about error and passes in NULL as errp argument but error occurs in

[Qemu-devel] [PATCH 4/7] configure: Enable KVM for aarch64 host/target combination

2013-11-28 Thread Peter Maydell
Enable KVM if the host and target CPU are both aarch64. Note that host aarch64 + target arm is not valid for KVM acceleration: the 64 bit kernel does not support the ioctl interface for 32 bit CPUs. 32 bit VMs on 64 bit hosts need to be created using the 64 bit ioctl interface; when QEMU supports

[Qemu-devel] [PATCH 0/7] target-arm: Support AArch64 KVM

2013-11-28 Thread Peter Maydell
This patchset adds support for basic AArch64 KVM VM control. It sits on top of the mach-virt + cpu-host patchset I sent out last week. The core of these patches is the work done by Mian M. Hamayun; I've just taken that, refactored it a bit to sit on top of the mach-virt+cpu-host patchset instead

[Qemu-devel] [PATCH 5/7] hw/arm/boot: Allow easier swapping in of different loader code

2013-11-28 Thread Peter Maydell
For AArch64 we will obviously require a different set of primary and secondary boot loader code fragments. However currently we hardcode the offsets into the loader code where we must write the entrypoint and other data into arm_load_kernel(). This makes it hard to substitute a different loader

[Qemu-devel] [PATCH 1/7] target-arm/kvm: Split 32 bit only code into its own file

2013-11-28 Thread Peter Maydell
Split ARM KVM support code which is 32 bit specific out into its own file, which we only compile on 32 bit hosts. This will give us a place to add the 64 bit support code without adding lots of ifdefs to kvm.c. Signed-off-by: Peter Maydell peter.mayd...@linaro.org --- target-arm/Makefile.objs |

[Qemu-devel] [PATCH 2/7] target-arm: Clean up handling of AArch64 PSTATE

2013-11-28 Thread Peter Maydell
The env-pstate field is a little odd since it doesn't strictly speaking represent an architectural register. However it's convenient for QEMU to use it to hold the various PSTATE architectural bits in the same format the architecture specifies for SPSR registers (since this is the same format the

[Qemu-devel] [PATCH 3/7] target-arm: Add minimal KVM AArch64 support

2013-11-28 Thread Peter Maydell
From: Mian M. Hamayun m.hama...@virtualopensystems.com Add the bare minimum set of functions needed for control of an AArch64 KVM vcpu: * CPU initialization * minimal get/put register functions which only handle the basic state of the CPU Signed-off-by: Mian M. Hamayun

Re: [Qemu-devel] [PATCH] qom: abort on error in property setter if caller passed errp == NULL

2013-11-28 Thread Paolo Bonzini
Il 28/11/2013 14:23, Igor Mammedov ha scritto: object_property_set(Foo, bar, baz, abort_on_err); that is just another way to put burden on caller, instead of doing it in one place. It's also much more self-documenting. The problem is that there is one very good case where you want the

Re: [Qemu-devel] [PATCH] qom: abort on error in property setter if caller passed errp == NULL

2013-11-28 Thread Andreas Färber
Am 28.11.2013 14:48, schrieb Igor Mammedov: On Thu, 28 Nov 2013 14:42:38 +0100 Andreas Färber afaer...@suse.de wrote: I will be more than happy to review and apply your patch (or contribute further ones) going through (mis)uses of error_is_set(). I've sent such one for target-i386/cpu.c see

[Qemu-devel] [PATCH 0/9] vmstate code split + unit tests

2013-11-28 Thread Eduardo Habkost
This series separates the QEMUFile and VMState code from savevm.c, and adds a few unit tests to the VMState code. Eduardo Habkost (9): qemu-file: Make a few functions non-static migration: Move QEMU_VM_* defines to migration/migration.h savevm: Convert all tabs to spaces savevm.c: Coding

[Qemu-devel] [PATCH 5/9] savevm.c: Coding style fix

2013-11-28 Thread Eduardo Habkost
Signed-off-by: Eduardo Habkost ehabk...@redhat.com --- I am submitting this as a separate patch because I don't know if this will be the preferred way of breaking that line. --- savevm.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/savevm.c b/savevm.c index

[Qemu-devel] [PATCH 2/9] migration: Move QEMU_VM_* defines to migration/migration.h

2013-11-28 Thread Eduardo Habkost
The VMState code will be moved to vmstate.c and it uses some of the QEMU_VM_* constants, so move it to a header. Signed-off-by: Eduardo Habkost ehabk...@redhat.com --- include/migration/migration.h | 11 +++ savevm.c | 11 --- 2 files changed, 11

[Qemu-devel] [PATCH 3/9] savevm: Convert all tabs to spaces

2013-11-28 Thread Eduardo Habkost
Signed-off-by: Eduardo Habkost ehabk...@redhat.com --- savevm.c | 18 +- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/savevm.c b/savevm.c index 46643f1..3cdd5f2 100644 --- a/savevm.c +++ b/savevm.c @@ -53,7 +53,7 @@ #define ARP_OP_REQUEST_REV 0x3 static int

[Qemu-devel] [PATCH 7/9] qemu-file: Move QEMUFile code to qemu-file.c

2013-11-28 Thread Eduardo Habkost
Signed-off-by: Eduardo Habkost ehabk...@redhat.com --- Makefile.objs | 1 + qemu-file.c | 826 ++ savevm.c | 820 - 3 files changed, 827 insertions(+), 820 deletions(-) create

[Qemu-devel] [PATCH 8/9] savevm: Small comment about why timer QEMUFile/VMState code is in savevm.c

2013-11-28 Thread Eduardo Habkost
Signed-off-by: Eduardo Habkost ehabk...@redhat.com --- savevm.c | 8 ++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/savevm.c b/savevm.c index 8eeb5ef..a2c2173 100644 --- a/savevm.c +++ b/savevm.c @@ -166,7 +166,9 @@ static QEMUFile *qemu_fopen_bdrv(BlockDriverState *bs,

[Qemu-devel] [PATCH 6/9] vmstate: Move VMState code to vmstate.c

2013-11-28 Thread Eduardo Habkost
This will allow unit tests to be written for VMState code without pulling dependencies from the savevm code. Signed-off-by: Eduardo Habkost ehabk...@redhat.com --- Makefile.objs | 1 + savevm.c | 645 - vmstate.c | 650

[Qemu-devel] [PATCH 9/9] tests: Some unit tests for vmstate.c

2013-11-28 Thread Eduardo Habkost
* Basic load/save tests * Tests for loading older versions * Tests for .field_exists() handling Signed-off-by: Eduardo Habkost ehabk...@redhat.com --- tests/.gitignore | 1 + tests/Makefile | 4 + tests/test-vmstate.c | 357 +++ 3

Re: [Qemu-devel] [PATCHv3] qdev: Validate hex properties

2013-11-28 Thread Andreas Färber
Am 28.11.2013 09:39, schrieb Hannes Reinecke: strtoul(l) might overflow, in which case it'll return '-1' and set the appropriate error code. So update the calls to strtoul(l) when parsing hex properties to avoid silent overflows. Signed-off-by: Hannes Reinecke h...@suse.de ---

Re: [Qemu-devel] [PATCH 8/9] savevm: Small comment about why timer QEMUFile/VMState code is in savevm.c

2013-11-28 Thread Andreas Färber
Am 28.11.2013 15:01, schrieb Eduardo Habkost: Signed-off-by: Eduardo Habkost ehabk...@redhat.com --- savevm.c | 8 ++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/savevm.c b/savevm.c index 8eeb5ef..a2c2173 100644 --- a/savevm.c +++ b/savevm.c @@ -166,7 +166,9 @@

Re: [Qemu-devel] [PATCH 8/9] savevm: Small comment about why timer QEMUFile/VMState code is in savevm.c

2013-11-28 Thread Eduardo Habkost
On Thu, Nov 28, 2013 at 03:13:39PM +0100, Andreas Färber wrote: Am 28.11.2013 15:01, schrieb Eduardo Habkost: Signed-off-by: Eduardo Habkost ehabk...@redhat.com --- savevm.c | 8 ++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/savevm.c b/savevm.c index

Re: [Qemu-devel] [PATCH V2 0/8] qapi script: support enum as discriminator and better enum name

2013-11-28 Thread Luiz Capitulino
On Thu, 28 Nov 2013 14:19:48 +0800 Wenchao Xia xiaw...@linux.vnet.ibm.com wrote: 于 2013/11/26 0:47, Luiz Capitulino 写道: On Wed, 13 Nov 2013 06:25:00 +0800 Wenchao Xia xiaw...@linux.vnet.ibm.com wrote: This series is respined from RFC series at:

Re: [Qemu-devel] [PATCH 2/2] hw/mips: use sizes.h macros

2013-11-28 Thread Andreas Färber
Am 28.11.2013 07:29, schrieb Antony Pavlov: Signed-off-by: Antony Pavlov antonynpav...@gmail.com Reviewed-by: Richard Henderson r...@twiddle.net Are the int - long changes caused by the BIT() macro usage? Otherwise I would've recommended to put that in a follow-up patch. But either way,

[Qemu-devel] [RFC PATCH 01/15] console: export QemuConsole index, width, height

2013-11-28 Thread Gerd Hoffmann
Add functions to query QemuConsole properties. Signed-off-by: Gerd Hoffmann kra...@redhat.com --- include/ui/console.h | 3 +++ ui/console.c | 24 2 files changed, 27 insertions(+) diff --git a/include/ui/console.h b/include/ui/console.h index 98edf41..09138e5

[Qemu-devel] [RFC PATCH 03/15] input: define event types using qapi

2013-11-28 Thread Gerd Hoffmann
Define input event types, using qapi. So we get nicely autogenerated types for our input events. And when it comes to qmp support some day things will be alot easier. Types are modeled after the linux input layer. There are separate event types for each value. There is a sync to indicate the

[Qemu-devel] [RFC PATCH 00/15] input: rewrite qemu input layer

2013-11-28 Thread Gerd Hoffmann
Hi, This patch series is the first draft of a input layer rewrite. New core code is largely in place. There is some windup for the legacy functions, to keep things working while switching over users one by one. Some ui code is converted to make clear how the new input layer should be used.

[Qemu-devel] [RFC PATCH 05/15] input: keyboard: add helper functions to core

2013-11-28 Thread Gerd Hoffmann
A bunch of helper functions to manage keyboard events, to make life simpler for the ui code when submitting keyboard events. Signed-off-by: Gerd Hoffmann kra...@redhat.com --- include/ui/input.h | 3 +++ ui/input.c | 19 +++ 2 files changed, 22 insertions(+) diff --git

[Qemu-devel] [RFC PATCH 13/15] input: mouse: switch legacy handlers to new core

2013-11-28 Thread Gerd Hoffmann
legacy mouse event handlers are registered in the new core, so they receive events submitted to the new input core. legacy kbd_mouse_event() continues to use the old code paths. So new-core event handlers wouldn't see events submitted via kbd_mouse_event. This leads to the constrain that we we

[Qemu-devel] [RFC PATCH 02/15] input: rename file to legacy

2013-11-28 Thread Gerd Hoffmann
Rename ui/input.c to ui/input-legacy.c. We are going to replace it step by step. Signed-off-by: Gerd Hoffmann kra...@redhat.com --- ui/Makefile.objs | 2 +- ui/{input.c = input-legacy.c} | 0 2 files changed, 1 insertion(+), 1 deletion(-) rename ui/{input.c = input-legacy.c}

[Qemu-devel] [RFC PATCH 14/15] input: mouse: switch gtk ui to new core

2013-11-28 Thread Gerd Hoffmann
Signed-off-by: Gerd Hoffmann kra...@redhat.com --- ui/gtk.c | 58 +++--- 1 file changed, 19 insertions(+), 39 deletions(-) diff --git a/ui/gtk.c b/ui/gtk.c index 3a97b36..3c37d2e 100644 --- a/ui/gtk.c +++ b/ui/gtk.c @@ -197,7 +197,7 @@ static

[Qemu-devel] [RFC PATCH 10/15] input: mouse: add helpers functions to core

2013-11-28 Thread Gerd Hoffmann
Likewise a bunch of helper functions to manage mouse button and movement events, again to make life easier for the ui code. Signed-off-by: Gerd Hoffmann kra...@redhat.com --- include/ui/input.h | 14 +++ ui/input.c | 71 ++ 2

[Qemu-devel] [RFC PATCH 07/15] input: keyboard: switch qmp_send_key() to new core.

2013-11-28 Thread Gerd Hoffmann
Signed-off-by: Gerd Hoffmann kra...@redhat.com --- ui/input-legacy.c | 10 ++ 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/ui/input-legacy.c b/ui/input-legacy.c index 0163a46..d7dd880 100644 --- a/ui/input-legacy.c +++ b/ui/input-legacy.c @@ -260,10 +260,7 @@ static void

[Qemu-devel] [RFC PATCH 08/15] input: keyboard: switch gtk ui to new core

2013-11-28 Thread Gerd Hoffmann
Signed-off-by: Gerd Hoffmann kra...@redhat.com --- ui/gtk.c | 19 --- 1 file changed, 4 insertions(+), 15 deletions(-) diff --git a/ui/gtk.c b/ui/gtk.c index b5f4f0b..3a97b36 100644 --- a/ui/gtk.c +++ b/ui/gtk.c @@ -54,6 +54,7 @@ #include math.h #include ui/console.h

Re: [Qemu-devel] [PATCH RFC 2/3] qapi script: add support of event

2013-11-28 Thread Luiz Capitulino
On Thu, 28 Nov 2013 15:16:08 +0800 Wenchao Xia xiaw...@linux.vnet.ibm.com wrote: 于 2013/11/28 8:48, Luiz Capitulino 写道: On Wed, 13 Nov 2013 09:44:52 +0800 Wenchao Xia xiaw...@linux.vnet.ibm.com wrote: Nested structure is not supported now, so following define is not valid: { 'event':

[Qemu-devel] [RFC PATCH 09/15] input: keyboard: switch sdl ui to new core [wip]

2013-11-28 Thread Gerd Hoffmann
FIXME: pause key not handled yet. Signed-off-by: Gerd Hoffmann kra...@redhat.com --- ui/sdl.c | 23 ++- 1 file changed, 10 insertions(+), 13 deletions(-) diff --git a/ui/sdl.c b/ui/sdl.c index 9d8583c..1b1224a 100644 --- a/ui/sdl.c +++ b/ui/sdl.c @@ -30,6 +30,7 @@

[Qemu-devel] [RFC PATCH 11/15] input: mouse: add graphic_rotate support

2013-11-28 Thread Gerd Hoffmann
Transform absolute mouse events according to graphic_rotate. Legacy input code does it for both absolute and relative events, but the logic is broken for relative coordinates, so this is most likely not used anyway. Signed-off-by: Gerd Hoffmann kra...@redhat.com --- ui/input.c | 33

[Qemu-devel] [RFC PATCH 12/15] input: mouse: add qemu_input_is_absolute()

2013-11-28 Thread Gerd Hoffmann
Same as kbd_mouse_is_absolute(), but using new input core. Signed-off-by: Gerd Hoffmann kra...@redhat.com --- include/ui/input.h | 1 + ui/input.c | 8 2 files changed, 9 insertions(+) diff --git a/include/ui/input.h b/include/ui/input.h index 0d79342..43b9afc 100644 ---

Re: [Qemu-devel] [PATCH v2 0/2] qemu-iotests: Filter out qemu-io in all tests

2013-11-28 Thread Fam Zheng
On Thu, Nov 28, 2013 at 7:56 PM, Kevin Wolf kw...@redhat.com wrote: Am 27.11.2013 um 03:01 hat Fam Zheng geschrieben: On 2013年11月20日 10:25, Fam Zheng wrote: The second patch is too large as a mail, you can pull from: https://github.com/famz/qemu.git 035-filter-qemu-io v2: Rebase to

Re: [Qemu-devel] [PATCH] trace-events: Clean up after removal of old usb-host code

2013-11-28 Thread Gerd Hoffmann
On Mo, 2013-11-25 at 13:08 +0100, arm...@redhat.com wrote: From: Markus Armbruster arm...@redhat.com Commit b5613fd neglected to drop the trace events along with the code. Added to usb patch queue. thanks, Gerd

Re: [Qemu-devel] [PATCH v2 0/2] qemu-iotests: Filter out qemu-io in all tests

2013-11-28 Thread Fam Zheng
On Thu, Nov 28, 2013 at 7:56 PM, Kevin Wolf kw...@redhat.com wrote: Am 27.11.2013 um 03:01 hat Fam Zheng geschrieben: On 2013年11月20日 10:25, Fam Zheng wrote: The second patch is too large as a mail, you can pull from: https://github.com/famz/qemu.git 035-filter-qemu-io v2: Rebase to

Re: [Qemu-devel] [RFC qom-cpu v4 00/10] i386: add cpu hot remove support

2013-11-28 Thread Igor Mammedov
On Wed, 9 Oct 2013 17:43:08 +0800 Chen Fan chen.fan.f...@cn.fujitsu.com wrote: Via implementing ACPI standard methods _EJ0 in bios, after Guest OS hot remove one vCPU, it is able to send a signal to QEMU, then QEMU could notify the assigned vCPU of exiting. meanwhile, and intruduce the QOM

[Qemu-devel] [RFC PATCH 04/15] input: add core bits of the new input layer

2013-11-28 Thread Gerd Hoffmann
Register and unregister handlers. Event dispatcher code. Signed-off-by: Gerd Hoffmann kra...@redhat.com --- include/ui/input.h | 32 + ui/Makefile.objs | 2 +- ui/input.c | 83 ++ 3 files changed, 116

Re: [Qemu-devel] [RFC qom-cpu v4 10/10] cpus: reclaim allocated vCPU objects

2013-11-28 Thread Igor Mammedov
On Wed, 9 Oct 2013 17:43:18 +0800 Chen Fan chen.fan.f...@cn.fujitsu.com wrote: After ACPI get a signal to eject a vCPU, then it will notify the vCPU thread to exit in KVM, and the vCPU must be removed from CPU list, before the vCPU really removed, there will release the all related vCPU

[Qemu-devel] [RFC PATCH 06/15] input: keyboard: switch legacy handlers to new core

2013-11-28 Thread Gerd Hoffmann
legacy kbd event handlers are registered in the new core, so they receive events from the new input core code. keycode - scancode translation needed here. legacy kbd_put_keycode() sends events to the new core. scancode - keycode translation needed here. So with this patch the new input core is

Re: [Qemu-devel] [PATCH v2 0/2] qemu-iotests: Filter out qemu-io in all tests

2013-11-28 Thread Kevin Wolf
Am 28.11.2013 um 15:34 hat Fam Zheng geschrieben: On Thu, Nov 28, 2013 at 7:56 PM, Kevin Wolf kw...@redhat.com wrote: Am 27.11.2013 um 03:01 hat Fam Zheng geschrieben: On 2013年11月20日 10:25, Fam Zheng wrote: The second patch is too large as a mail, you can pull from:

Re: [Qemu-devel] [PATCH 0/3] usb-host-libusb: streams support

2013-11-28 Thread Gerd Hoffmann
On Do, 2013-11-21 at 17:20 +0100, Hans de Goede wrote: Hi Gerd, Here is a new version of the 3 patches to add streams support to usb-host-libusb, with the error when building with an older libusbx fixed. Added to usb patch queue. thanks, Gerd

[Qemu-devel] [RFC PATCH 15/15] input: mouse: switch sdl ui to new core

2013-11-28 Thread Gerd Hoffmann
Signed-off-by: Gerd Hoffmann kra...@redhat.com --- ui/sdl.c | 65 +--- 1 file changed, 34 insertions(+), 31 deletions(-) diff --git a/ui/sdl.c b/ui/sdl.c index 1b1224a..13076e3 100644 --- a/ui/sdl.c +++ b/ui/sdl.c @@ -357,7 +357,7 @@

Re: [Qemu-devel] [PATCH V2 0/8] qapi script: support enum as discriminator and better enum name

2013-11-28 Thread Kevin Wolf
Am 12.11.2013 um 23:25 hat Wenchao Xia geschrieben: This series is respined from RFC series at: http://lists.nongnu.org/archive/html/qemu-devel/2013-11/msg00363.html Patch 1-6 add support for enum as discriminator. Patch 7 improve enum name generation, now AIOContext-AIO_CONTEXT, X86CPU-

Re: [Qemu-devel] [RFC PATCH v3 0/4] Create ARM KVM VGIC with device control API

2013-11-28 Thread Peter Maydell
On 19 November 2013 06:16, Christoffer Dall christoffer.d...@linaro.org wrote: This patch series adds generic support for issuing device control related ioctls and supports creating the ARM KVM-accelerated VGIC using the device control API while maintaining backwards compatibility for older

Re: [Qemu-devel] [PATCH] qom: abort on error in property setter if caller passed errp == NULL

2013-11-28 Thread Markus Armbruster
Igor Mammedov imamm...@redhat.com writes: On Thu, 28 Nov 2013 15:10:50 +1000 Peter Crosthwaite peter.crosthwa...@xilinx.com wrote: Hi, On Thu, Nov 28, 2013 at 11:24 AM, Igor Mammedov imamm...@redhat.com wrote: in case if caller setting property doesn't care about error and passes in

Re: [Qemu-devel] [PATCH] qom: abort on error in property setter if caller passed errp == NULL

2013-11-28 Thread Markus Armbruster
Paolo Bonzini pbonz...@redhat.com writes: Il 28/11/2013 14:23, Igor Mammedov ha scritto: object_property_set(Foo, bar, baz, abort_on_err); that is just another way to put burden on caller, instead of doing it in one place. It's also much more self-documenting. The problem is that there

Re: [Qemu-devel] Linux multiqueue block layer thoughts

2013-11-28 Thread Jens Axboe
On Wed, Nov 27 2013, Stefan Hajnoczi wrote: I finally got around to reading the Linux multiqueue block layer paper and wanted to share some thoughts about how it relates to QEMU and dataplane/QContext: http://kernel.dk/blk-mq.pdf I think Jens has virtio-blk multiqueue patches. So let's

  1   2   3   >