[Qemu-devel] [PATCH COLO-Frame v5 05/29] migration: Integrate COLO checkpoint process into loadvm

2015-05-21 Thread zhanghailiang
Switch from normal migration loadvm process into COLO checkpoint process if COLO mode is enabled. Signed-off-by: zhanghailiang zhang.zhanghaili...@huawei.com Signed-off-by: Li Zhijian lizhij...@cn.fujitsu.com Signed-off-by: Lai Jiangshan la...@cn.fujitsu.com Signed-off-by: Yang Hongyang

[Qemu-devel] [PATCH COLO-Frame v5 08/29] QEMUSizedBuffer: Introduce two help functions for qsb

2015-05-21 Thread zhanghailiang
Introduce two new QEMUSizedBuffer APIs which will be used by COLO to buffer VM state: One is qsb_put_buffer(), which put the content of a given QEMUSizedBuffer into QEMUFile, this is used to send buffered VM state to secondary. Another is qsb_fill_buffer(), read 'size' bytes of data from the file

[Qemu-devel] [PATCH COLO-Frame v5 15/29] COLO failover: Implement COLO master/slave failover work

2015-05-21 Thread zhanghailiang
If failover is requested, after some cleanup work, PVM or SVM will exit COLO mode, and resume to normal run. Signed-off-by: zhanghailiang zhang.zhanghaili...@huawei.com Signed-off-by: Li Zhijian lizhij...@cn.fujitsu.com Signed-off-by: Lai Jiangshan la...@cn.fujitsu.com ---

[Qemu-devel] [PATCH COLO-Frame v5 00/29] COarse-grain LOck-stepping(COLO) Virtual Machines for Non-stop Service

2015-05-21 Thread zhanghailiang
This is the 5th version of COLO, here is only COLO frame part, include: VM checkpoint, failover, proxy API, block replication API, not include block replication. The block part has been sent by wencongyang: [Qemu-devel] [PATCH COLO-Block v5 00/15] Block replication for continuous checkpoints we

[Qemu-devel] [PATCH COLO-Frame v5 02/29] migration: Introduce capability 'colo' to migration

2015-05-21 Thread zhanghailiang
We add helper function colo_supported() to indicate whether colo is supported or not, with which we use to control whether or not showing 'colo' string to users, they can use qmp command 'query-migrate-capabilities' or hmp command 'info migrate_capabilities' to learn if colo is supported.

[Qemu-devel] [PATCH COLO-Frame v5 17/29] COLO: Add new command parameter 'colo_nicname' 'colo_script' for net

2015-05-21 Thread zhanghailiang
The 'colo_nicname' should be assigned with network name, for exmple, 'eth2'. It will be parameter of 'colo_script', 'colo_script' should be assigned with an scirpt path. We parse these parameter in tap. Signed-off-by: zhanghailiang zhang.zhanghaili...@huawei.com Signed-off-by: Li Zhijian

[Qemu-devel] [PATCH COLO-Frame v5 14/29] COLO failover: Introduce a new command to trigger a failover

2015-05-21 Thread zhanghailiang
We leave users to use whatever heartbeat solution they want, if the heartbeat is lost, or other errors they detect, they can use command 'colo_lost_heartbeat' to tell COLO to do failover, COLO will do operations accordingly. For example, If send the command to PVM, Primary will exit COLO mode,

[Qemu-devel] [PATCH COLO-Frame v5 28/29] COLO: Implement shutdown checkpoint

2015-05-21 Thread zhanghailiang
For SVM, we forbid it shutdown directly when in COLO mode, FOR PVM's shutdown, we should do some work to ensure the consistent action between PVM and SVM. Signed-off-by: zhanghailiang zhang.zhanghaili...@huawei.com Signed-off-by: Lai Jiangshan la...@cn.fujitsu.com Signed-off-by: Li Zhijian

[Qemu-devel] [PATCH COLO-Frame v5 29/29] COLO: Add block replication into colo process

2015-05-21 Thread zhanghailiang
From: Wen Congyang we...@cn.fujitsu.com Make sure master start block replication after slave's block replication started Signed-off-by: zhanghailiang zhang.zhanghaili...@huawei.com Signed-off-by: Wen Congyang we...@cn.fujitsu.com Signed-off-by: Yang Hongyang yan...@cn.fujitsu.com Signed-off-by:

[Qemu-devel] [PATCH COLO-Frame v5 25/29] COLO: Add colo-set-checkpoint-period command

2015-05-21 Thread zhanghailiang
With this command, we can control the period of checkpoint, if there is no comparison of net packets. Signed-off-by: zhanghailiang zhang.zhanghaili...@huawei.com Signed-off-by: Li Zhijian lizhij...@cn.fujitsu.com --- hmp-commands.hx| 15 +++ hmp.c | 7

[Qemu-devel] [PATCH COLO-Frame v5 04/29] migration: Integrate COLO checkpoint process into migration

2015-05-21 Thread zhanghailiang
Add a migrate state: MIGRATION_STATUS_COLO, enter this migration state after the first live migration successfully finished. Signed-off-by: zhanghailiang zhang.zhanghaili...@huawei.com Signed-off-by: Gonglei arei.gong...@huawei.com Signed-off-by: Lai Jiangshan la...@cn.fujitsu.com ---

[Qemu-devel] [PATCH COLO-Frame v5 07/29] COLO: Add a new RunState RUN_STATE_COLO

2015-05-21 Thread zhanghailiang
Guest will enter this state when paused to save/restore VM state under colo checkpoint. Signed-off-by: zhanghailiang zhang.zhanghaili...@huawei.com Signed-off-by: Gonglei arei.gong...@huawei.com Signed-off-by: Lai Jiangshan la...@cn.fujitsu.com Reviewed-by: Dr. David Alan Gilbert

[Qemu-devel] [PATCH COLO-Frame v5 22/29] COLO: Handle nfnetlink message from proxy module

2015-05-21 Thread zhanghailiang
Proxy module will send message to qemu through nfnetlink. Now, the message only contains the result of packets comparation. We use a global variable 'packet_compare_different' to store the result. And this variable should be accessed by using atomic related function, such as 'atomic_set'

Re: [Qemu-devel] [PATCH v6 08/47] Add qemu_get_buffer_less_copy to avoid copies some of the time

2015-05-21 Thread Dr. David Alan Gilbert
* Amit Shah (amit.s...@redhat.com) wrote: On (Tue) 14 Apr 2015 [18:03:34], Dr. David Alan Gilbert (git) wrote: From: Dr. David Alan Gilbert dgilb...@redhat.com qemu_get_buffer always copies the data it reads to a users buffer, however in many cases the file buffer inside qemu_file could

Re: [Qemu-devel] [PATCH v8 01/24] hw/acpi/aml-build: Make enum values to be upper case to match coding style

2015-05-21 Thread Igor Mammedov
On Thu, 21 May 2015 10:28:28 +0800 Shannon Zhao zhaoshengl...@huawei.com wrote: From: Shannon Zhao shannon.z...@linaro.org Signed-off-by: Shannon Zhao zhaoshengl...@huawei.com Signed-off-by: Shannon Zhao shannon.z...@linaro.org Reviewed-by: Igor Mammedov imamm...@redhat.com ---

[Qemu-devel] [PATCH COLO-Frame v5 01/29] configure: Add parameter for configure to enable/disable COLO support

2015-05-21 Thread zhanghailiang
configure --enable-colo/--disable-colo to switch COLO support on/off. COLO support is off by default. Signed-off-by: zhanghailiang zhang.zhanghaili...@huawei.com Signed-off-by: Yang Hongyang yan...@cn.fujitsu.com Signed-off-by: Gonglei arei.gong...@huawei.com Signed-off-by: Lai Jiangshan

Re: [Qemu-devel] [PATCH v8 02/24] hw/arm/virt: Move common definitions to virt.h

2015-05-21 Thread Igor Mammedov
On Thu, 21 May 2015 10:28:29 +0800 Shannon Zhao zhaoshengl...@huawei.com wrote: From: Shannon Zhao shannon.z...@linaro.org Move some common definitions to virt.h. These will be used by generating ACPI tables. Signed-off-by: Shannon Zhao zhaoshengl...@huawei.com Signed-off-by: Shannon

[Qemu-devel] [PATCH COLO-Frame v5 18/29] COLO NIC: Init/remove colo nic devices when add/cleanup tap devices

2015-05-21 Thread zhanghailiang
When COLO mode, we do some init work for nic that will be used for COLO. Signed-off-by: zhanghailiang zhang.zhanghaili...@huawei.com Signed-off-by: Li Zhijian lizhij...@cn.fujitsu.com --- include/net/colo-nic.h | 20 ++ net/Makefile.objs | 1 + net/colo-nic.c | 71

[Qemu-devel] [PATCH COLO-Frame v5 19/29] COLO NIC: Implement colo nic device interface configure()

2015-05-21 Thread zhanghailiang
Implement colo nic device interface configure() add a script to configure nic devices: ${QEMU_SCRIPT_DIR}/colo-proxy-script.sh Signed-off-by: zhanghailiang zhang.zhanghaili...@huawei.com Signed-off-by: Li Zhijian lizhij...@cn.fujitsu.com --- net/colo-nic.c | 56

[Qemu-devel] [PATCH COLO-Frame v5 26/29] COLO NIC: Implement NIC checkpoint and failover

2015-05-21 Thread zhanghailiang
Signed-off-by: zhanghailiang zhang.zhanghaili...@huawei.com Signed-off-by: Li Zhijian lizhij...@cn.fujitsu.com --- include/net/colo-nic.h | 2 ++ migration/colo.c | 21 ++--- net/colo-nic.c | 23 +++ 3 files changed, 43 insertions(+), 3

Re: [Qemu-devel] [PATCH v8 14/24] hw/acpi/aml-build: Make aml_buffer() definition consistent with the spec

2015-05-21 Thread Igor Mammedov
On Thu, 21 May 2015 10:28:41 +0800 Shannon Zhao zhaoshengl...@huawei.com wrote: From: Shannon Zhao shannon.z...@linaro.org According to ACPI spec, DefBuffer can take two parameters: BufferSize and ByteList. Make it consistent with the spec. Uninitialized buffer could be requested by passing

[Qemu-devel] [PATCH COLO-Frame v5 23/29] COLO: Do checkpoint according to the result of packets comparation

2015-05-21 Thread zhanghailiang
Only do checkpoint, when the PVM's and SVM's output net packets are inconsistent, We also limit the min time between two continuous checkpoint action, to give VM a change to run. Signed-off-by: zhanghailiang zhang.zhanghaili...@huawei.com Signed-off-by: Li Zhijian lizhij...@cn.fujitsu.com ---

Re: [Qemu-devel] [PATCH v8 06/24] hw/acpi/aml-build: Add aml_interrupt() term

2015-05-21 Thread Igor Mammedov
On Thu, 21 May 2015 10:28:33 +0800 Shannon Zhao zhaoshengl...@huawei.com wrote: From: Shannon Zhao shannon.z...@linaro.org Add aml_interrupt() for describing device interrupt in resource template. These can be used to generating DSDT table for ACPI on ARM. Signed-off-by: Shannon Zhao

Re: [Qemu-devel] [PATCH v6 01/13] block: Add op blocker type device IO

2015-05-21 Thread Wen Congyang
On 05/21/2015 02:42 PM, Fam Zheng wrote: It blocks device IO. Does tt only block virtio-blk/scsi? Not all block types? Thanks Wen Congyang All bdrv_op_block_all/blk_op_block_all callers are taken care of: - virtio_blk_data_plane_create - virtio_scsi_hotplug Device creation, unblock

[Qemu-devel] [PATCH COLO-Frame v5 13/29] COLO RAM: Flush cached RAM into SVM's memory

2015-05-21 Thread zhanghailiang
During the time of VM's running, PVM/SVM may dirty some pages, we will transfer PVM's dirty pages to SVM and store them into SVM's RAM cache at next checkpoint time. So, the content of SVM's RAM cache will always be some with PVM's memory after checkpoint. Instead of flushing all content of SVM's

[Qemu-devel] [PATCH COLO-Frame v5 03/29] COLO: migrate colo related info to slave

2015-05-21 Thread zhanghailiang
We can know if VM in destination should go into COLO mode by refer to the info that has been migrated from PVM. Signed-off-by: zhanghailiang zhang.zhanghaili...@huawei.com Signed-off-by: Yang Hongyang yan...@cn.fujitsu.com Signed-off-by: Lai Jiangshan la...@cn.fujitsu.com Signed-off-by: Gonglei

[Qemu-devel] [PATCH COLO-Frame v5 10/29] COLO RAM: Load PVM's dirty page into SVM's RAM cache temporarily

2015-05-21 Thread zhanghailiang
The ram cache is initially the same as SVM/PVM's memory. At checkpoint, we cache the dirty RAM of PVM into RAM cache in the slave (so that RAM cache always the same as PVM's memory at every checkpoint), we will flush cached RAM to SVM after we receive all PVM's vmstate (RAM/device).

[Qemu-devel] [PATCH COLO-Frame v5 09/29] COLO: Save VM state to slave when do checkpoint

2015-05-21 Thread zhanghailiang
We should save PVM's RAM/device to slave when needed. For VM state, we will cache them in slave, we use QEMUSizedBuffer to store the data, we need know the data size of VM state, so in master, we use qsb to store VM state temporarily, and then migrate the data to slave. Signed-off-by:

[Qemu-devel] [PATCH COLO-Frame v5 20/29] COLO NIC : Implement colo nic init/destroy function

2015-05-21 Thread zhanghailiang
When in colo mode, call colo nic init/destroy function. Signed-off-by: zhanghailiang zhang.zhanghaili...@huawei.com Signed-off-by: Li Zhijian lizhij...@cn.fujitsu.com --- include/migration/migration-colo.h | 2 +- include/net/colo-nic.h | 3 ++ migration/colo.c |

[Qemu-devel] [PATCH COLO-Frame v5 12/29] arch_init: Start to trace dirty pages of SVM

2015-05-21 Thread zhanghailiang
we will use this dirty bitmap together with VM's cache RAM dirty bitmap to decide which page in cache should be flushed into VM's RAM. Signed-off-by: zhanghailiang zhang.zhanghaili...@huawei.com --- arch_init.c | 16 1 file changed, 16 insertions(+) diff --git a/arch_init.c

[Qemu-devel] [PATCH COLO-Frame v5 06/29] COLO: Implement colo checkpoint protocol

2015-05-21 Thread zhanghailiang
We need communications protocol of user-defined to control the checkpoint process. The new checkpoint request is started by Primary VM, and the interactive process like below: Checkpoint synchronizing points, Primary Secondary NEW @

[Qemu-devel] [PATCH COLO-Frame v5 24/29] COLO: Improve checkpoint efficiency by do additional periodic checkpoint

2015-05-21 Thread zhanghailiang
Besides normal checkpoint which according to the result of net packets comparing, We do additional checkpoint periodically, it will reduce the number of dirty pages when do one checkpoint, if we don't do checkpoint for a long time (This is a special case when the net packets is always consistent).

[Qemu-devel] [PATCH COLO-Frame v5 11/29] COLO VMstate: Load VM state into qsb before restore it

2015-05-21 Thread zhanghailiang
We should cache the device state before restore it, besides, we should call qemu_system_reset() before load VM state, which can ensure the data is intact. Note: If we discard qemu_system_reset(), there will be some odd error, For exmple, qemu in slave side crashes and reports: KVM: entry failed,

[Qemu-devel] [PATCH COLO-Frame v5 27/29] COLO: Disable qdev hotplug when VM is in COLO mode

2015-05-21 Thread zhanghailiang
COLO do not support qdev hotplug migration, disable it. Signed-off-by: zhanghailiang zhang.zhanghaili...@huawei.com Signed-off-by: Yang Hongyang yan...@cn.fujitsu.com --- migration/colo.c | 11 +++ 1 file changed, 11 insertions(+) diff --git a/migration/colo.c b/migration/colo.c index

[Qemu-devel] [PATCH COLO-Frame v5 21/29] COLO NIC: Some init work related with proxy module

2015-05-21 Thread zhanghailiang
Implement communication protocol with proxy module by using nfnetlink, which requires libnfnetlink libs. Tell proxy module to do initialization work and moreover ask kernel to acknowledge the request. It's is necessary for the first time because Netlink is not a reliable protocol. Signed-off-by:

[Qemu-devel] [PATCH COLO-Frame v5 16/29] COLO failover: Don't do failover during loading VM's state

2015-05-21 Thread zhanghailiang
Signed-off-by: zhanghailiang zhang.zhanghaili...@huawei.com Signed-off-by: Li Zhijian lizhij...@cn.fujitsu.com Signed-off-by: Lai Jiangshan la...@cn.fujitsu.com --- migration/colo.c | 10 ++ 1 file changed, 10 insertions(+) diff --git a/migration/colo.c b/migration/colo.c index

Re: [Qemu-devel] [PATCH v8 04/24] hw/arm/virt-acpi-build: Basic framework for building ACPI tables on ARM

2015-05-21 Thread Igor Mammedov
On Thu, 21 May 2015 10:28:31 +0800 Shannon Zhao zhaoshengl...@huawei.com wrote: From: Shannon Zhao shannon.z...@linaro.org Introduce a preliminary framework in virt-acpi-build.c with the main ACPI build functions. It exposes the generated ACPI contents to guest over fw_cfg. The required

Re: [Qemu-devel] [PATCH COLO v4 01/15] docs: block replication's description

2015-05-21 Thread Wen Congyang
On 05/21/2015 12:31 AM, Andrey Korolyov wrote: On Thu, May 14, 2015 at 6:38 PM, Dr. David Alan Gilbert dgilb...@redhat.com wrote: * Wen Congyang (ghost...@gmail.com) wrote: At 2015/5/14 19:19, Dr. David Alan Gilbert Wrote: One thing I wanted to check I understand; how much RAM do the active

Re: [Qemu-devel] [PATCH v8 07/24] hw/arm/virt-acpi-build: Generation of DSDT table for virt devices

2015-05-21 Thread Igor Mammedov
On Thu, 21 May 2015 10:28:34 +0800 Shannon Zhao zhaoshengl...@huawei.com wrote: From: Shannon Zhao shannon.z...@linaro.org DSDT consists of the usual common table header plus a definition block in AML encoding which describes all devices in the platform. After initializing DSDT with

Re: [Qemu-devel] [PATCH COLO-Block v5 00/15] Block replication for continuous checkpoints

2015-05-21 Thread Wen Congyang
On 05/21/2015 12:52 PM, Wen Congyang wrote: Block replication is a very important feature which is used for continuous checkpoints(for example: COLO). Usage: Please refer to docs/block-replication.txt You can get the patch here:

[Qemu-devel] [PATCH v6 05/13] virtio-blk: Don't handle output when there is device IO op blocker

2015-05-21 Thread Fam Zheng
virtio-blk now listens to op blocker change of the associated block backend. Up on setting op blocker on BLOCK_OP_TYPE_DEVICE_IO: non-dataplane: 1) Set VirtIOBlock.paused 2) In virtio_blk_handle_output, do nothing if VirtIOBlock.paused dataplane: 1) Clear the host event notifier

[Qemu-devel] [PATCH v6 01/13] block: Add op blocker type device IO

2015-05-21 Thread Fam Zheng
It blocks device IO. All bdrv_op_block_all/blk_op_block_all callers are taken care of: - virtio_blk_data_plane_create - virtio_scsi_hotplug Device creation, unblock it. - bdrv_set_backing_hd Backing hd is not used by device, so blocking is OK. - backup_start Blocking target when

[Qemu-devel] [PATCH v6 12/13] block: Block device IO during bdrv_drain and bdrv_drain_all

2015-05-21 Thread Fam Zheng
We don't want new requests from guest, so block the operation around the nested poll. It also avoids looping forever when iothread is submitting a lot of requests. Signed-off-by: Fam Zheng f...@redhat.com --- block/io.c | 22 -- 1 file changed, 20 insertions(+), 2

Re: [Qemu-devel] Removing old/unused audio backends

2015-05-21 Thread Gerd Hoffmann
On Do, 2015-05-21 at 00:05 +0200, Kővágó Zoltán wrote: Here are the drivers that could go in my opinion: esd: no longer maintained, last release in 2008, replaced by PulseAudio fmod: not sure about this one, but apparently it's some no longer developed library that's also proprietary. sdl:

[Qemu-devel] [PATCH v6 04/13] virtio-blk: Move complete_request to 'ops' structure

2015-05-21 Thread Fam Zheng
Should more ops be added to differentiate code between dataplane and non-dataplane, the new saved_ops approach will be cleaner than messing with N pointers. Signed-off-by: Fam Zheng f...@redhat.com Reviewed-by: Max Reitz mre...@redhat.com --- hw/block/dataplane/virtio-blk.c | 13 -

[Qemu-devel] [PATCH v6 00/13] Fix transactional snapshot with dataplane and NBD export

2015-05-21 Thread Fam Zheng
v6: Patch 13: unset block after bdrv_swap(). Reported by Paolo. Unlike the iohandler in main loop, iothreads currently process the event notifier used by virtio-blk ioeventfd in nested aio_poll. This is dangerous without proper protection, because guest requests could sneak to block layer where

[Qemu-devel] [PATCH v6 11/13] blockdev: Block device IO during blockdev-backup transaction

2015-05-21 Thread Fam Zheng
Signed-off-by: Fam Zheng f...@redhat.com --- blockdev.c | 10 +- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/blockdev.c b/blockdev.c index ae52d27..bd28183 100644 --- a/blockdev.c +++ b/blockdev.c @@ -1649,6 +1649,7 @@ typedef struct BlockdevBackupState {

Re: [Qemu-devel] [PATCH v6 07/47] Move copy out of qemu_peek_buffer

2015-05-21 Thread Amit Shah
On (Tue) 14 Apr 2015 [18:03:33], Dr. David Alan Gilbert (git) wrote: From: Dr. David Alan Gilbert dgilb...@redhat.com qemu_peek_buffer currently copies the data it reads into a buffer, however the next patch wants access to the buffer without the copy, hence rework to remove the copy to the

Re: [Qemu-devel] [PATCH v6 01/13] block: Add op blocker type device IO

2015-05-21 Thread Wen Congyang
On 05/21/2015 02:42 PM, Fam Zheng wrote: It blocks device IO. All bdrv_op_block_all/blk_op_block_all callers are taken care of: - virtio_blk_data_plane_create - virtio_scsi_hotplug Device creation, unblock it. - bdrv_set_backing_hd Backing hd is not used by device, so blocking

Re: [Qemu-devel] [PATCH 08/14] target-arm: Allow cp access functions to indicate traps to EL2 or EL3

2015-05-21 Thread Peter Maydell
On 21 May 2015 at 06:47, Edgar E. Iglesias edgar.igles...@xilinx.com wrote: On Tue, May 19, 2015 at 07:33:28PM +0100, Peter Maydell wrote: case CP_ACCESS_TRAP_UNCATEGORIZED: syndrome = syn_uncategorized(); It looks like you need a: target_el = exception_target_el(env); here,

Re: [Qemu-devel] [PATCH v6 08/47] Add qemu_get_buffer_less_copy to avoid copies some of the time

2015-05-21 Thread Amit Shah
On (Tue) 14 Apr 2015 [18:03:34], Dr. David Alan Gilbert (git) wrote: From: Dr. David Alan Gilbert dgilb...@redhat.com qemu_get_buffer always copies the data it reads to a users buffer, however in many cases the file buffer inside qemu_file could be given back to the caller, avoiding the

Re: [Qemu-devel] [PATCH v6 01/13] block: Add op blocker type device IO

2015-05-21 Thread Fam Zheng
On Thu, 05/21 15:06, Wen Congyang wrote: On 05/21/2015 02:42 PM, Fam Zheng wrote: It blocks device IO. All bdrv_op_block_all/blk_op_block_all callers are taken care of: - virtio_blk_data_plane_create - virtio_scsi_hotplug Device creation, unblock it. -

[Qemu-devel] [PATCH v6 02/13] block: Add op blocker notifier list

2015-05-21 Thread Fam Zheng
BDS users can register a notifier and get notified about op blocker changes. Signed-off-by: Fam Zheng f...@redhat.com Reviewed-by: Max Reitz mre...@redhat.com --- block.c | 35 +++ include/block/block.h | 8

[Qemu-devel] [PATCH v6 06/13] virtio-scsi-dataplane: Add device IO op blocker listener

2015-05-21 Thread Fam Zheng
When a disk is attached to scsi-bus, virtio_scsi_hotplug will take care of protecting the block device with op blockers. Currently we haven't enabled block jobs (like what's done in virtio_blk_data_plane_create), but it is necessary to honor device IO op blocker first before we do. This is useful

[Qemu-devel] [PATCH v6 03/13] block-backend: Add blk_op_blocker_add_notifier

2015-05-21 Thread Fam Zheng
Forward the call to bdrv_op_blocker_add_notifier. Signed-off-by: Fam Zheng f...@redhat.com Reviewed-by: Max Reitz mre...@redhat.com --- block/block-backend.c | 6 ++ include/sysemu/block-backend.h | 2 ++ 2 files changed, 8 insertions(+) diff --git a/block/block-backend.c

[Qemu-devel] [PATCH v6 13/13] block/mirror: Block device IO during mirror exit

2015-05-21 Thread Fam Zheng
When mirror should complete, the source and target are in sync. But we call bdrv_swap() only a while later in the main loop bh. If the guest writes something before that, target will not get the new data. Block device IO before bdrv_drain and unblock it after bdrw_swap(). Reported-by: Wen

[Qemu-devel] [PATCH v6 08/13] blockdev: Block device IO during internal snapshot transaction

2015-05-21 Thread Fam Zheng
Signed-off-by: Fam Zheng f...@redhat.com --- blockdev.c | 12 +--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/blockdev.c b/blockdev.c index 5eaf77e..7f763d9 100644 --- a/blockdev.c +++ b/blockdev.c @@ -1262,6 +1262,7 @@ typedef struct InternalSnapshotState {

[Qemu-devel] [PATCH v6 10/13] blockdev: Block device IO during drive-backup transaction

2015-05-21 Thread Fam Zheng
Signed-off-by: Fam Zheng f...@redhat.com --- blockdev.c | 9 - 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/blockdev.c b/blockdev.c index 923fc90..ae52d27 100644 --- a/blockdev.c +++ b/blockdev.c @@ -1575,6 +1575,7 @@ typedef struct DriveBackupState { BlockDriverState

[Qemu-devel] [PATCH v6 09/13] blockdev: Block device IO during external snapshot transaction

2015-05-21 Thread Fam Zheng
Signed-off-by: Fam Zheng f...@redhat.com --- blockdev.c | 18 -- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/blockdev.c b/blockdev.c index 7f763d9..923fc90 100644 --- a/blockdev.c +++ b/blockdev.c @@ -1404,6 +1404,7 @@ typedef struct ExternalSnapshotState {

[Qemu-devel] [PATCH v6 07/13] nbd-server: Clear can_read when device io blocker is set

2015-05-21 Thread Fam Zheng
So that NBD export cannot submit IO during bdrv_drain_all(). Signed-off-by: Fam Zheng f...@redhat.com --- nbd.c | 24 1 file changed, 24 insertions(+) diff --git a/nbd.c b/nbd.c index 06b501b..b5026af 100644 --- a/nbd.c +++ b/nbd.c @@ -160,6 +160,8 @@ struct NBDExport {

[Qemu-devel] [Bug 1456804] Re: kvm_irqchip_commit_routes: Assertion `ret == 0' failed.

2015-05-21 Thread Jason Wang
Using almost the same XML but still could not reproduce this by myself. What's the version of guest driver inside? I'm using 12/19/2014 62.70.104.9800? -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU.

Re: [Qemu-devel] [RFC PATCH] hw/arm/virt: Added preliminary GICv3 support for kvm mode

2015-05-21 Thread Pavel Fedin
Hello! Sorry, missed this message, catching up... After a closer look, kvm_arch_irqchip_create is called here with test mode = true. With that option, at kernel level, we only check the kvm device registered its ops and do not go further (see kvm_ioctl_create_device in kvm_main.c): typically

Re: [Qemu-devel] [PATCH v3 1/3] cpus: Add Error argument to cpu_exec_init()

2015-05-21 Thread Igor Mammedov
On Thu, 21 May 2015 10:32:06 +0530 Bharata B Rao bhar...@linux.vnet.ibm.com wrote: Add an Error argument to cpu_exec_init() to let users collect the error. This is in preparation to change the CPU enumeration logic in cpu_exec_init(). With the new enumeration logic, cpu_exec_init() can fail

Re: [Qemu-devel] [PATCH v6 08/47] Add qemu_get_buffer_less_copy to avoid copies some of the time

2015-05-21 Thread Amit Shah
On (Thu) 21 May 2015 [09:45:19], Dr. David Alan Gilbert wrote: * Amit Shah (amit.s...@redhat.com) wrote: So we've got to assume that buf was allocated by the calling function, and since we're modifying the pointer (alternative idea to one above), should we unallocate it here? Can lead to

Re: [Qemu-devel] [PATCH v3 2/3] cpus: Convert cpu_index into a bitmap

2015-05-21 Thread Igor Mammedov
On Thu, 21 May 2015 10:32:07 +0530 Bharata B Rao bhar...@linux.vnet.ibm.com wrote: Currently CPUState.cpu_index is monotonically increasing and a newly created CPU always gets the next higher index. The next available index is calculated by counting the existing number of CPUs. This is fine

Re: [Qemu-devel] [PATCH v6 17/47] ram_debug_dump_bitmap: Dump a migration bitmap as text

2015-05-21 Thread Amit Shah
On (Tue) 14 Apr 2015 [18:03:43], Dr. David Alan Gilbert (git) wrote: From: Dr. David Alan Gilbert dgilb...@redhat.com Misses out lines that are all the expected value so the output can be quite compact depending on the circumstance. s/Misses out lines/Prints out lines to stderr/ s/the

Re: [Qemu-devel] [PATCH v8 02/24] hw/arm/virt: Move common definitions to virt.h

2015-05-21 Thread Peter Maydell
On 21 May 2015 at 09:25, Igor Mammedov imamm...@redhat.com wrote: On Thu, 21 May 2015 10:28:29 +0800 Shannon Zhao zhaoshengl...@huawei.com wrote: --- /dev/null +++ b/include/hw/arm/virt.h @@ -0,0 +1,56 @@ +/* + * + * Copyright (c) 2015 Linaro Limited out of curiosity, git blame - tells

Re: [Qemu-devel] [RFC PATCH] hw/arm/virt: Added preliminary GICv3 support for kvm mode

2015-05-21 Thread Eric Auger
Hi Pavel, On 05/21/2015 08:47 AM, Pavel Fedin wrote: Hello! Sorry, missed this message, catching up... After a closer look, kvm_arch_irqchip_create is called here with test mode = true. With that option, at kernel level, we only check the kvm device registered its ops and do not go further

Re: [Qemu-devel] [PATCH v3 3/3] ppc: Move cpu_exec_init() call to realize function

2015-05-21 Thread Igor Mammedov
On Thu, 21 May 2015 10:32:08 +0530 Bharata B Rao bhar...@linux.vnet.ibm.com wrote: Move cpu_exec_init() call from instance_init to realize. This allows any failures from cpu_exec_init() to be handled appropriately. Also add corresponding cpu_exec_exit() call from unrealize. Signed-off-by:

Re: [Qemu-devel] [PATCH v8 07/24] hw/arm/virt-acpi-build: Generation of DSDT table for virt devices

2015-05-21 Thread Shannon Zhao
On 2015/5/21 16:42, Igor Mammedov wrote: On Thu, 21 May 2015 10:28:34 +0800 Shannon Zhao zhaoshengl...@huawei.com wrote: From: Shannon Zhao shannon.z...@linaro.org DSDT consists of the usual common table header plus a definition block in AML encoding which describes all devices in the

Re: [Qemu-devel] [PATCH v8 07/24] hw/arm/virt-acpi-build: Generation of DSDT table for virt devices

2015-05-21 Thread Igor Mammedov
On Thu, 21 May 2015 17:10:00 +0800 Shannon Zhao zhaoshengl...@huawei.com wrote: On 2015/5/21 16:42, Igor Mammedov wrote: On Thu, 21 May 2015 10:28:34 +0800 Shannon Zhao zhaoshengl...@huawei.com wrote: From: Shannon Zhao shannon.z...@linaro.org DSDT consists of the usual common

Re: [Qemu-devel] [PULL 0/5] vnc patch queue

2015-05-21 Thread Peter Maydell
On 20 May 2015 at 09:34, Gerd Hoffmann kra...@redhat.com wrote: Hi, Flushing the vnc patch queue, with a collection of small bug fixes. please pull, Gerd The following changes since commit eba05e922e8e7f307bc5d4104a78797e55124e97: Merge remote-tracking branch

Re: [Qemu-devel] [PATCH 3/8] fdc: Introduce fdctrl-phase

2015-05-21 Thread Kevin Wolf
Am 20.05.2015 um 14:07 hat Peter Maydell geschrieben: On 20 May 2015 at 12:55, John Snow js...@redhat.com wrote: So even if /currently/ we can reconstitute it from the register values, we may eventually be unable to. post_load will work for now, but I fear the case (in ten years) when

Re: [Qemu-devel] [PATCH v8 02/24] hw/arm/virt: Move common definitions to virt.h

2015-05-21 Thread Laszlo Ersek
On 05/21/15 10:25, Igor Mammedov wrote: On Thu, 21 May 2015 10:28:29 +0800 Shannon Zhao zhaoshengl...@huawei.com wrote: From: Shannon Zhao shannon.z...@linaro.org Move some common definitions to virt.h. These will be used by generating ACPI tables. Signed-off-by: Shannon Zhao

Re: [Qemu-devel] Announcing qboot, a minimal x86 firmware for QEMU

2015-05-21 Thread Avi Kivity
On 05/21/2015 07:21 PM, Paolo Bonzini wrote: On 21/05/2015 17:48, Avi Kivity wrote: Lovely! Note you have memcpy.o instead of memcpy.c. Doh, and it's not used anyway. Check the repository, and let me know if OSv boots with it (it probably needs ACPI; Linux doesn't boot virtio without ACPI).

Re: [Qemu-devel] Removing old/unused audio backends

2015-05-21 Thread Cole Robinson
On 05/21/2015 02:52 AM, Gerd Hoffmann wrote: On Do, 2015-05-21 at 00:05 +0200, Kővágó Zoltán wrote: Here are the drivers that could go in my opinion: esd: no longer maintained, last release in 2008, replaced by PulseAudio fmod: not sure about this one, but apparently it's some no longer

Re: [Qemu-devel] [PATCH v3 2/2] semihosting: add --semihosting-config arg sub-argument

2015-05-21 Thread Liviu Ionescu
On 21 May 2015, at 21:35, Maciej W. Rozycki ma...@linux-mips.org wrote: On Thu, 21 May 2015, Liviu Ionescu wrote: p.s. and I think there are major differences between using -append to pass arguments to the kernel and passing arguments to semihosting, this being one of the reasons for

Re: [Qemu-devel] Broken SuperH atomics in qemu app-level emulation

2015-05-21 Thread Aurelien Jarno
On 2015-05-20 12:16, Richard Henderson wrote: On 05/17/2015 08:05 PM, Rich Felker wrote: At the very least qemu-sh4 should provide a correct value of AT_HWCAP so we get working atomics with -cpu SH7785. And since the GUSA atomic model can't work with app-level emulation, I really think

Re: [Qemu-devel] [PATCH] virtio: Notice when the system doesn't support MSIx at all

2015-05-21 Thread Mark Cave-Ayland
On 20/05/15 16:10, Richard Henderson wrote: On 05/20/2015 02:59 AM, Michael S. Tsirkin wrote: On Tue, May 19, 2015 at 01:29:51PM -0700, Richard Henderson wrote: And do not issue an error_report in that case. Signed-off-by: Richard Henderson r...@twiddle.net --- hw/virtio/virtio-pci.c | 15

Re: [Qemu-devel] [PATCH 0/2] configure: increase glib requirement to 2.22

2015-05-21 Thread John Snow
On 05/13/2015 05:33 AM, Paolo Bonzini wrote: On 13/05/2015 00:18, John Snow wrote: As discussed during the QEMU 2.3 development freeze. == For convenience, this branch is available at: https://github.com/jnsnow/qemu.git branch glib-version-fix

Re: [Qemu-devel] [PATCH v3 2/2] semihosting: add --semihosting-config arg sub-argument

2015-05-21 Thread Maciej W. Rozycki
On Thu, 21 May 2015, Liviu Ionescu wrote: p.s. and I think there are major differences between using -append to pass arguments to the kernel and passing arguments to semihosting, this being one of the reasons for suggesting a new command. Out of curiosity, why do you think there are

Re: [Qemu-devel] [PATCH 3/8] fdc: Introduce fdctrl-phase

2015-05-21 Thread Dr. David Alan Gilbert
* Peter Maydell (peter.mayd...@linaro.org) wrote: On 21 May 2015 at 12:09, Markus Armbruster arm...@redhat.com wrote: Kevin Wolf kw...@redhat.com writes: Am 21.05.2015 um 12:11 hat Peter Maydell geschrieben: 2b add a subsection, send the subsection always in new qemu, if receiving from

[Qemu-devel] [PATCH 6/6] Move loadvm_handlers into MigrationIncomingState

2015-05-21 Thread Dr. David Alan Gilbert (git)
From: Dr. David Alan Gilbert dgilb...@redhat.com In postcopy we need the loadvm_handlers to be used in a couple of different instances of the loadvm loop/routine, and thus it can't be local any more. Signed-off-by: Dr. David Alan Gilbert dgilb...@redhat.com Reviewed-by: David Gibson

[Qemu-devel] [PATCH 5/6] Move copy out of qemu_peek_buffer

2015-05-21 Thread Dr. David Alan Gilbert (git)
From: Dr. David Alan Gilbert dgilb...@redhat.com qemu_peek_buffer currently copies the data it reads into a buffer, however a future patch wants access to the buffer without the copy, hence rework to remove the copy to the layer above. Signed-off-by: Dr. David Alan Gilbert dgilb...@redhat.com

Re: [Qemu-devel] [PATCH v6 01/13] block: Add op blocker type device IO

2015-05-21 Thread Fam Zheng
On Thu, 05/21 16:00, Wen Congyang wrote: On 05/21/2015 02:42 PM, Fam Zheng wrote: It blocks device IO. Does tt only block virtio-blk/scsi? Not all block types? It's only necessary for dataplane enabled devices, which are virtio-blk and virtio-scsi at the moment. Other types are OK. Fam

[Qemu-devel] [PATCH v2 1/8] fdc: Rename fdctrl_reset_fifo() to fdctrl_to_command_phase()

2015-05-21 Thread Kevin Wolf
What all callers of fdctrl_reset_fifo() really want to do is to start the command phase, where writes to the data port initiate a new command. The function doesn't only clear the FIFO, but also sets up the state so that a new command can be received. Rename it to reflect this. Signed-off-by:

[Qemu-devel] [PATCH v2 7/8] fdc: Fix MSR.RQM flag

2015-05-21 Thread Kevin Wolf
The RQM bit in MSR should be set whenever the guest is supposed to access the FIFO, and it should be cleared in all other cases. This is important so the guest can't continue writing/reading the FIFO beyond the length that it's suppossed to access (see CVE-2015-3456). Commit e9077462 fixed the

[Qemu-devel] [PATCH v2 0/8] fdc: Clean up and fix command processing

2015-05-21 Thread Kevin Wolf
The hotfix for CVE-2015-3456 fixed the security problem, but didn't fully correct the behaviour of the emulated floppy controller. This series fixes the bug that was the root cause for the problem, and does some cleanup in the FIFO access functions to make the command processing more obvious.

[Qemu-devel] [PATCH] exec: optimize phys_page_set_level

2015-05-21 Thread Paolo Bonzini
phys_page_set_level is writing zeroes to a struct that has just been filled in by phys_map_node_alloc. Instead, tell phys_map_node_alloc whether to fill in the page as a leaf or as a non-leaf. memcpy is faster than struct assignment, which copies each bitfield individually. Arguably a compiler

Re: [Qemu-devel] [PULL 00/18] target-alpha fpu improvments

2015-05-21 Thread Peter Maydell
On 20 May 2015 at 20:05, Richard Henderson r...@twiddle.net wrote: No change since the patch set of May 12. Thanks, r~ The following changes since commit 385057cbec9b4a0eb6150330c572e875ed714965: Merge remote-tracking branch 'remotes/armbru/tags/pull-qapi-2015-05-15' into staging

Re: [Qemu-devel] [PATCH] tci: do not use CPUArchState in tcg-target.h

2015-05-21 Thread Paolo Bonzini
On 20/05/2015 21:21, Richard Henderson wrote: On 05/19/2015 12:59 AM, Paolo Bonzini wrote: tcg-target.h does not use any QEMU-specific symbols, save for tci's usage of CPUArchState. Pull that up to tcg/tcg.h. Reviewed-by: Richard Henderson r...@twiddle.net This will make it possible to

Re: [Qemu-devel] [PATCH 10/10] ui: convert VNC to use generic cipher API

2015-05-21 Thread Eric Blake
On 05/21/2015 04:56 AM, Daniel P. Berrange wrote: Switch the VNC server over to use the generic cipher API, this allows it to use the pluggable DES implementations, instead of being hardcoded to use QEMU's built-in impl. Signed-off-by: Daniel P. Berrange berra...@redhat.com --- ui/vnc.c |

Re: [Qemu-devel] [PATCH COLO-Frame v5 00/29] COarse-grain LOck-stepping(COLO) Virtual Machines for Non-stop Service

2015-05-21 Thread Dr. David Alan Gilbert
* zhanghailiang (zhang.zhanghaili...@huawei.com) wrote: This is the 5th version of COLO, here is only COLO frame part, include: VM checkpoint, failover, proxy API, block replication API, not include block replication. The block part has been sent by wencongyang: [Qemu-devel] [PATCH

Re: [Qemu-devel] [PATCH COLO v4 01/15] docs: block replication's description

2015-05-21 Thread Andrey Korolyov
On Thu, May 21, 2015 at 11:35 AM, Wen Congyang we...@cn.fujitsu.com wrote: On 05/21/2015 12:31 AM, Andrey Korolyov wrote: On Thu, May 14, 2015 at 6:38 PM, Dr. David Alan Gilbert dgilb...@redhat.com wrote: * Wen Congyang (ghost...@gmail.com) wrote: At 2015/5/14 19:19, Dr. David Alan Gilbert

Re: [Qemu-devel] [PULL 00/12] QOM devices patch queue 2015-05-20

2015-05-21 Thread Daniel P. Berrange
On Thu, May 21, 2015 at 12:18:30PM +0100, Peter Maydell wrote: On 20 May 2015 at 16:51, Andreas Färber afaer...@suse.de wrote: Hello Peter, This is my QOM (devices) patch queue. Please pull. Regards, Andreas Cc: Peter Maydell peter.mayd...@linaro.org Cc: Eduardo Habkost

Re: [Qemu-devel] [PATCH] configure: Don't exit until all errors have been detected

2015-05-21 Thread Peter Maydell
On 8 May 2015 at 13:40, Juan Quintela quint...@redhat.com wrote: Currently, it exits until each error, so if you are installing on a new machine, it requires lots of configure runs until you get all the dependencies that you need. With this change, it shows all the errors with the selected

[Qemu-devel] [PATCH 4/6] Create MigrationIncomingState

2015-05-21 Thread Dr. David Alan Gilbert (git)
From: Dr. David Alan Gilbert dgilb...@redhat.com There are currently lots of pieces of incoming migration state scattered around, and postcopy is adding more, and it seems better to try and keep it together. allocate MIS in process_incoming_migration_co Signed-off-by: Dr. David Alan Gilbert

[Qemu-devel] [PATCH 2/6] Split header writing out of qemu_savevm_state_begin

2015-05-21 Thread Dr. David Alan Gilbert (git)
From: Dr. David Alan Gilbert dgilb...@redhat.com Split qemu_savevm_state_begin to: qemu_savevm_state_header That writes the initial file header. qemu_savevm_state_beginThat sets up devices and does the first device pass. Used later in postcopy.

[Qemu-devel] KVM call agenda for 2015-05-26

2015-05-21 Thread Juan Quintela
Hi Please, send any topic that you are interested in covering. Call details: By popular demand, a google calendar public entry with it https://www.google.com/calendar/embed?src=dG9iMXRqcXAzN3Y4ZXZwNzRoMHE4a3BqcXNAZ3JvdXAuY2FsZW5kYXIuZ29vZ2xlLmNvbQ (Let me know if you have any problems

[Qemu-devel] [PATCH 1/6] Add qemu_get_counted_string to read a string prefixed by a count byte

2015-05-21 Thread Dr. David Alan Gilbert (git)
From: Dr. David Alan Gilbert dgilb...@redhat.com and use it in loadvm_state and ram_load. Where ever it's used, check the return and error if it failed. Minor: ram_load was using a 257 byte array for its string, the maximum length is 255 bytes + 0 terminator, so fix to 256

  1   2   3   >