Re: [Qemu-devel] [PATCH 3/4] error: Clean up errors with embedded newlines (again), part 2

2015-12-15 Thread Markus Armbruster
Fam Zheng writes: > On Mon, 12/14 10:42, Markus Armbruster wrote: >> Laszlo Ersek writes: >> >> > On 12/10/15 18:23, Markus Armbruster wrote: >> >> The arguments of error_setg() & friends should yield a short error >> >> string without newlines. >> >> >> >> A few places try to append additiona

Re: [Qemu-devel] net: vmxnet3: memory leakage issue

2015-12-15 Thread P J P
+-- On Tue, 15 Dec 2015, Dmitry Fleytman wrote --+ | Hello Prasad, | | Looks good. | Reviewed-by: Dmitry Fleytman Great! Thank you. -- Prasad J Pandit / Red Hat Product Security Team 47AF CE69 3A90 54AA 9045 1053 DD13 3D32 FE5B 041F

Re: [Qemu-devel] [PATCH v3 5/7] vmxnet3: The vmxnet3 device is a PCIE endpoint

2015-12-15 Thread Jason Wang
On 12/15/2015 02:09 PM, Shmulik Ladkani wrote: > Hi Jason, > > On Tue, 15 Dec 2015 10:35:59 +0800 Jason Wang wrote: >>> Another attempt I've made is to indroduce a new type vmxnet3e (the >>> pcie variant of vmxnet3). >>> I dropped this approach since it was way too cumbersome, introducing >>> lo

Re: [Qemu-devel] [PATCH v2 6/6] vmw_pvscsi: Introduce 'x-disable-pcie' backword compatability property

2015-12-15 Thread Shmulik Ladkani
Hi, On Mon, 14 Dec 2015 20:26:35 +0200 "Michael S. Tsirkin" wrote: > > > It's set internally by machine types to avoid breaking > > > migration. I don't see any reason for users to set it. > > > > But they do set it :) albeit only through machine types. I don't think > > it's different from of

Re: [Qemu-devel] [RFC PATCH v0 8/9] target-i386: Set apic_id during CPU initfn

2015-12-15 Thread Bharata B Rao
On Mon, Dec 14, 2015 at 03:44:06PM -0200, Eduardo Habkost wrote: > On Thu, Dec 10, 2015 at 11:45:43AM +0530, Bharata B Rao wrote: > > Move back the setting of apic_id to instance_init routine (x86_cpu_initfn) > > This is needed to initialize X86 CPUs using generic cpu-package device. > > Could you

Re: [Qemu-devel] [RFC v6 00/14] Slow-path for atomic instruction translation

2015-12-15 Thread alvise rigo
Hi Andreas, On Mon, Dec 14, 2015 at 11:09 PM, Andreas Tobler wrote: > Alvise, > > On 14.12.15 09:41, Alvise Rigo wrote: >> >> This is the sixth iteration of the patch series which applies to the >> upstream branch of QEMU (v2.5.0-rc3). >> >> Changes versus previous versions are at the bottom of t

[Qemu-devel] [PATCH COLO-Frame v12 02/38] migration: Introduce capability 'x-colo' to migration

2015-12-15 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 'x-colo' string to users, they can use qmp command 'query-migrate-capabilities' or hmp command 'info migrate_capabilities' to learn if colo is supported. Cc: Ju

[Qemu-devel] [PATCH COLO-Frame v12 10/38] COLO: Implement colo checkpoint protocol

2015-12-15 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

[Qemu-devel] [PATCH COLO-Frame v12 20/38] COLO: synchronize PVM's state to SVM periodically

2015-12-15 Thread zhanghailiang
Do checkpoint periodically, the default interval is 200ms. Signed-off-by: zhanghailiang Signed-off-by: Li Zhijian Reviewed-by: Dr. David Alan Gilbert --- v12: - Add Reviewed-by tag v11: - Fix wrong sleep time for checkpoint period. (Dave's review comment) Signed-off-by: zhanghailiang --- mig

[Qemu-devel] [PATCH COLO-Frame v12 07/38] migration: Integrate COLO checkpoint process into loadvm

2015-12-15 Thread zhanghailiang
Switch from normal migration loadvm process into COLO checkpoint process if COLO mode is enabled. We add three new members to struct MigrationIncomingState, 'have_colo_incoming_thread' and 'colo_incoming_thread' record the colo related threads for secondary VM, 'migration_incoming_co' records the

[Qemu-devel] [PATCH COLO-Frame v12 09/38] COLO/migration: Create a new communication path from destination to source

2015-12-15 Thread zhanghailiang
This new communication path will be used for returning messages from destination to source. Signed-off-by: zhanghailiang Signed-off-by: Li Zhijian Reviewed-by: Dr. David Alan Gilbert --- v12: - Add Reviewed-by tag v11: - Rebase master to use qemu_file_get_return_path() for opening return path v

[Qemu-devel] [PATCH COLO-Frame v12 23/38] COLO: Implement failover work for Primary VM

2015-12-15 Thread zhanghailiang
For PVM, if there is failover request from users. The colo thread will exit the loop while the failover BH does the cleanup work and resumes VM. Signed-off-by: zhanghailiang Signed-off-by: Li Zhijian --- v12: - Fix error report and remove unnecessary check in primary_vm_do_failover() (Dave's su

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

2015-12-15 Thread zhanghailiang
This is the 12th version of COLO. As usual, this version of COLO is only support periodic checkpoint, just like MicroCheckpointing and Remus does. Here is only COLO frame part, you can get the whole codes from github: https://github.com/coloft/qemu/commits/colo-v2.3-periodic-mode Test procedure:

[Qemu-devel] [PATCH COLO-Frame v12 11/38] COLO: Add a new RunState RUN_STATE_COLO

2015-12-15 Thread zhanghailiang
Guest will enter this state when paused to save/restore VM state under colo checkpoint. Cc: Eric Blake Cc: Markus Armbruster Signed-off-by: zhanghailiang Signed-off-by: Li Zhijian Signed-off-by: Gonglei Reviewed-by: Dr. David Alan Gilbert Reviewed-by: Eric Blake --- qapi-schema.json | 5 ++

[Qemu-devel] [PATCH COLO-Frame v12 05/38] migration: Add state records for migration incoming

2015-12-15 Thread zhanghailiang
For migration destination, we also need to know its state, we will use it in COLO. Here we add a new member 'state' for MigrationIncomingState, and also use migrate_set_state() to modify its value. Signed-off-by: zhanghailiang Reviewed-by: Dr. David Alan Gilbert --- v11: - Split exporting migra

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

2015-12-15 Thread zhanghailiang
configure --enable-colo/--disable-colo to switch COLO support on/off. COLO support is On by default. Signed-off-by: zhanghailiang Signed-off-by: Li Zhijian Signed-off-by: Gonglei Reviewed-by: Dr. David Alan Gilbert --- v11: - Turn COLO on in default (Eric's suggestion) Signed-off-by: zhanghai

[Qemu-devel] [PATCH COLO-Frame v12 03/38] COLO: migrate colo related info to secondary node

2015-12-15 Thread zhanghailiang
We can know if VM in destination should go into COLO mode by refer to the info that been migrated from PVM. We skip this section if colo is not enabled (i.e. migrate_set_capability colo off), so that, It not break compatibility with migration however the --enable-colo/disable-colo on the source/d

[Qemu-devel] [PATCH COLO-Frame v12 04/38] migration: Export migrate_set_state()

2015-12-15 Thread zhanghailiang
Fix the first parameter of migrate_set_state(), and export it. We will use it in later. Signed-off-by: zhanghailiang Reviewed-by: Dr. David Alan Gilbert --- v12: - Add Reviewed-by tag v11: - New patch which is split from patch 'migration: Add state records for migration incoming' (Juan's sugge

[Qemu-devel] [PATCH COLO-Frame v12 06/38] migration: Integrate COLO checkpoint process into migration

2015-12-15 Thread zhanghailiang
Add a migrate state: MIGRATION_STATUS_COLO, enter this migration state after the first live migration successfully finished. We reuse migration thread, so if colo is enabled by user, migration thread will go into the process of colo. Signed-off-by: zhanghailiang Signed-off-by: Li Zhijian Signed

[Qemu-devel] [PATCH COLO-Frame v12 24/38] COLO: Implement failover work for Secondary VM

2015-12-15 Thread zhanghailiang
If users require SVM to takeover work, colo incoming thread should exit from loop while failover BH helps backing to migration incoming coroutine. Signed-off-by: zhanghailiang Signed-off-by: Li Zhijian Reviewed-by: Dr. David Alan Gilbert v12: - Improve error message that suggested by Dave - Add

[Qemu-devel] [PATCH COLO-Frame v12 15/38] COLO: Load PVM's dirty pages into SVM's RAM cache temporarily

2015-12-15 Thread zhanghailiang
We should not load PVM's state directly into SVM, because there maybe some errors happen when SVM is receving data, which will break SVM. We need to ensure receving all data before load the state into SVM. We use an extra memory to cache these data (PVM's ram). The ram cache in secondary side is i

[Qemu-devel] [PATCH COLO-Frame v12 08/38] migration: Rename the'file' member of MigrationState

2015-12-15 Thread zhanghailiang
Rename the 'file' member of MigrationState to 'to_dst_file'. Signed-off-by: zhanghailiang Reviewed-by: Dr. David Alan Gilbert --- v12: - Add Reviewed-by tag - Add the missed modification for RDMA migration. (Found by Wen Congyang) v11: - Only rename 'file' member of MigrationState Signed-off-by

[Qemu-devel] [PATCH COLO-Frame v12 17/38] COLO: Load VMState into qsb before restore it

2015-12-15 Thread zhanghailiang
We should not destroy the state of SVM (Secondary VM) until we receive the whole state from the PVM (Primary VM), in case the primary fails in the middle of sending the state, so, here we cache the device state in Secondary before restore it. Besides, we should call qemu_system_reset() before loa

[Qemu-devel] [PATCH COLO-Frame v12 35/38] filter-buffer: Introduce a helper function to enable/disable default filter

2015-12-15 Thread zhanghailiang
The default buffer filter doesn't buffer packets in default, but we need to buffer packets for COLO or Micro-checkpoint, Here we add a helper function to enable/disable filter's buffer capability. Signed-off-by: zhanghailiang Cc: Jason Wang Cc: Yang Hongyang --- v12: - Rename the heler function

[Qemu-devel] [PATCH COLO-Frame v12 12/38] QEMUSizedBuffer: Introduce two help functions for qsb

2015-12-15 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 i

[Qemu-devel] [PATCH COLO-Frame v12 16/38] ram/COLO: Record the dirty pages that SVM received

2015-12-15 Thread zhanghailiang
We record the address of the dirty pages that received, it will help flushing pages that cached into SVM. We record them by re-using migration dirty bitmap. Signed-off-by: zhanghailiang Reviewed-by: Dr. David Alan Gilbert --- v12: - Add Reviewed-by tag v11: - Split a new helper function from ori

[Qemu-devel] [PATCH COLO-Frame v12 21/38] COLO failover: Introduce a new command to trigger a failover

2015-12-15 Thread zhanghailiang
We leave users to choose whatever heartbeat solution they want, if the heartbeat is lost, or other errors they detect, they can use experimental command 'x_colo_lost_heartbeat' to tell COLO to do failover, COLO will do operations accordingly. For example, if the command is sent to the PVM, the Pri

[Qemu-devel] [PATCH COLO-Frame v12 29/38] COLO: Update the global runstate after going into colo state

2015-12-15 Thread zhanghailiang
If we start qemu with -S, the runstate will change from 'prelaunch' to 'running' after going into colo state. So it is necessary to update the global runstate after going into colo state. Signed-off-by: zhanghailiang Signed-off-by: Li Zhijian --- migration/colo.c | 5 + 1 file changed, 5 in

[Qemu-devel] [PATCH COLO-Frame v12 34/38] filter-buffer: Accept zero interval

2015-12-15 Thread zhanghailiang
For default buffer filter, its 'interval' value is zero, so here we should accept zero interval. Signed-off-by: zhanghailiang Reviewed-by: Yang Hongyang Cc: Jason Wang --- v12: - Add Reviewed-by tag v11: - Add comment v10: - new patch Signed-off-by: zhanghailiang --- net/filter-buffer.c | 10

[Qemu-devel] [PATCH COLO-Frame v12 22/38] COLO failover: Introduce state to record failover process

2015-12-15 Thread zhanghailiang
When handling failover, we do different things according to the different stage of failover process, here we introduce a global atomic variable to record the status of failover. We add four failover status to indicate the different stage of failover process. You should use the helpers to get and s

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

2015-12-15 Thread zhanghailiang
Make sure master start block replication after slave's block replication started. Signed-off-by: zhanghailiang Signed-off-by: Wen Congyang Signed-off-by: Li Zhijian --- migration/colo.c | 60 trace-events | 2 ++ 2 files changed, 6

[Qemu-devel] [PATCH COLO-Frame v12 27/38] COLO failover: Don't do failover during loading VM's state

2015-12-15 Thread zhanghailiang
We should not do failover work while the main thread is loading VM's state, otherwise it will destroy the consistent of VM's memory and device state. Here we add a new failover status 'RELAUNCH' which means we should relaunch the process of failover. Signed-off-by: zhanghailiang Signed-off-by: L

[Qemu-devel] [PATCH COLO-Frame v12 18/38] COLO: Flush PVM's cached RAM into SVM's memory

2015-12-15 Thread zhanghailiang
During the time of VM's running, PVM 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 PVM's RAM

[Qemu-devel] [PATCH COLO-Frame v12 28/38] COLO: Process shutdown command for VM in COLO state

2015-12-15 Thread zhanghailiang
If VM is in COLO FT state, we should do some extra work before normal shutdown process. SVM will ignore the shutdown command if this command is issued directly to it, PVM will send the shutdown command to SVM if it gets this command. Cc: Paolo Bonzini Signed-off-by: zhanghailiang Signed-off-by:

[Qemu-devel] [PATCH COLO-Frame v12 37/38] colo: Use default buffer-filter to buffer and release packets

2015-12-15 Thread zhanghailiang
Enable default filter to buffer packets and release the packets after a checkpoint. Signed-off-by: zhanghailiang Cc: Jason Wang Cc: Yang Hongyang --- v12: - Add a helper function to check if all netdev supports buffer packets. - Flush buffered packets when do failover. v11: - Use new helper fun

Re: [Qemu-devel] [RFC PATCH v0 2/9] cpu: Store CPU typename in MachineState

2015-12-15 Thread Bharata B Rao
On Mon, Dec 14, 2015 at 03:29:49PM -0200, Eduardo Habkost wrote: > On Thu, Dec 10, 2015 at 11:45:37AM +0530, Bharata B Rao wrote: > > Storing CPU typename in MachineState lets us to create CPU threads > > for all architectures in uniform manner from arch-neutral code. > > > > TODO: Touching only i

[Qemu-devel] [PATCH COLO-Frame v12 26/38] COLO failover: Shutdown related socket fd when do failover

2015-12-15 Thread zhanghailiang
If the net connection between COLO's two sides is broken while colo/colo incoming thread is blocked in 'read'/'write' socket fd. It will not detect this error until connect timeout. It will be a long time. Here we shutdown all the related socket file descriptors to wake up the blocking operation

[Qemu-devel] [PATCH COLO-Frame v12 13/38] COLO: Save PVM state to secondary side when do checkpoint

2015-12-15 Thread zhanghailiang
The main process of checkpoint is to synchronize SVM with PVM. VM's state includes ram and device state. So we will migrate PVM's state to SVM when do checkpoint, just like migration does. We will cache PVM's state in slave, we use QEMUSizedBuffer to store the data, we need to know the size of VM

[Qemu-devel] [PATCH COLO-Frame v12 33/38] net/filter-buffer: Add default filter-buffer for each netdev

2015-12-15 Thread zhanghailiang
We add each netdev (except vhost-net) a default filter-buffer, which will be used for COLO or Micro-checkpoint to buffer VM's packets. The name of default filter-buffer is 'nop'. For the default filter-buffer, it will not buffer any packets in default. So it has no side effect for the netdev. Sign

[Qemu-devel] [PATCH COLO-Frame v12 19/38] COLO: Add checkpoint-delay parameter for migrate-set-parameters

2015-12-15 Thread zhanghailiang
Add checkpoint-delay parameter for migrate-set-parameters, so that we can control the checkpoint frequency when COLO is in periodic mode. Cc: Luiz Capitulino Cc: Eric Blake Cc: Markus Armbruster Signed-off-by: zhanghailiang Signed-off-by: Li Zhijian Reviewed-by: Dr. David Alan Gilbert --- v1

[Qemu-devel] [PATCH COLO-Frame v12 31/38] COLO: Separate the process of saving/loading ram and device state

2015-12-15 Thread zhanghailiang
We separate the process of saving/loading ram and device state when do checkpoint, we add new helpers for save/load ram/device. With this change, we can directly transfer ram from master to slave without using QEMUSizeBuffer as assistant, which also reduce the size of extra memory been used during

[Qemu-devel] [PATCH COLO-Frame v12 36/38] filter-buffer: Introduce a helper function to release packets

2015-12-15 Thread zhanghailiang
We need to release all the packets from VM in COLO or Micro-checkpoint, here we add a new helper function to realse the packets that buffered by default buffer-filter Signed-off-by: zhanghailiang Cc: Jason Wang Cc: Yang Hongyang --- v12: - Rename this helper function v11: - New patch Signed-of

[Qemu-devel] [PATCH COLO-Frame v12 30/38] savevm: Split load vm state function qemu_loadvm_state

2015-12-15 Thread zhanghailiang
qemu_loadvm_state is too long, and we can simplify it by splitting up with three helper functions. Signed-off-by: zhanghailiang --- migration/savevm.c | 161 - 1 file changed, 97 insertions(+), 64 deletions(-) diff --git a/migration/savevm.c b

Re: [Qemu-devel] net: vmxnet3: memory leakage issue

2015-12-15 Thread Jason Wang
On 12/15/2015 04:00 PM, P J P wrote: > +-- On Tue, 15 Dec 2015, Dmitry Fleytman wrote --+ > | Hello Prasad, > | > | Looks good. > | Reviewed-by: Dmitry Fleytman > > Great! Thank you. > -- > Prasad J Pandit / Red Hat Product Security Team > 47AF CE69 3A90 54AA 9045 1053 DD13 3D32 FE5B 041F > Pa

Re: [Qemu-devel] [RFC PATCH v0 1/9] vl: Don't allow CPU toplogies with partially filled cores

2015-12-15 Thread Bharata B Rao
On Mon, Dec 14, 2015 at 03:37:52PM -0200, Eduardo Habkost wrote: > On Fri, Dec 11, 2015 at 08:54:31AM +0530, Bharata B Rao wrote: > > On Thu, Dec 10, 2015 at 10:25:28AM +, Daniel P. Berrange wrote: > > > On Thu, Dec 10, 2015 at 11:45:36AM +0530, Bharata B Rao wrote: > > > > Prevent guests from

[Qemu-devel] [PATCH COLO-Frame v12 25/38] qmp event: Add event notification for COLO error

2015-12-15 Thread zhanghailiang
If some errors happen during VM's COLO FT stage, it's important to notify the users of this event. Together with 'colo_lost_heartbeat', users can intervene in COLO's failover work immediately. If users don't want to get involved in COLO's failover verdict, it is still necessary to notify users th

[Qemu-devel] [PATCH COLO-Frame v12 14/38] ram: Split host_from_stream_offset() into two helper functions

2015-12-15 Thread zhanghailiang
Split host_from_stream_offset() into two parts: One is to get ram block, which the block idstr may be get from migration stream, the other is to get hva (host) address from block and the offset. Besides, we will do the check working in a new helper offset_in_ramblock(). Signed-off-by: zhanghailian

[Qemu-devel] [PATCH COLO-Frame v12 32/38] COLO: Split qemu_savevm_state_begin out of checkpoint process

2015-12-15 Thread zhanghailiang
It is unnecessary to call qemu_savevm_state_begin() in every checkponit process. It mainly sets up devices and does the first device state pass. These data will not change during the later checkpoint process. So, we split it out of colo_do_checkpoint_transaction(), in this way, we can reduce these

Re: [Qemu-devel] net: vmxnet3: memory leakage issue

2015-12-15 Thread Miao Yan
2015-12-14 19:58 GMT+08:00 P J P : > Hello Dmitry, Jason > > +-- On Sun, 13 Dec 2015, Dmitry Fleytman wrote --+ > | According to Linux driver code VMXNET3_CMD_QUIESCE_DEV does not flip > | paused/active states. It always disables device, see vmxnet3_resume() for > | > | >

[Qemu-devel] [PATCH] net/slirp: Tell the users when they are using deprecated options

2015-12-15 Thread Thomas Huth
We don't want to support the legacy -tftp, -bootp, -smb and -net channel options forever. So let's start telling the users that they will go away in a future version. Signed-off-by: Thomas Huth --- net/slirp.c | 3 +++ os-posix.c | 3 +++ vl.c| 6 ++ 3 files changed, 12 insertions(+

[Qemu-devel] [PATCH] MAINTAINERS: Add an entry for the net/slirp.c file

2015-12-15 Thread Thomas Huth
The file net/slirp.c should be listed in the SLIRP section, too. Signed-off-by: Thomas Huth --- MAINTAINERS | 1 + 1 file changed, 1 insertion(+) diff --git a/MAINTAINERS b/MAINTAINERS index e8cee1e..a87b113 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -1192,6 +1192,7 @@ SLIRP M: Jan Kiszka

Re: [Qemu-devel] net: vmxnet3: memory leakage issue

2015-12-15 Thread P J P
Hello Jason, +-- On Tue, 15 Dec 2015, Jason Wang wrote --+ | Patch looks good to me. Queued for 2.6 first. | | If you want to make this for 2.5, you may probably want to send a formal | patch with my "Reviewed-by: " to Peter directly consider we are near to | release. And use "For 2.5" as a pre

Re: [Qemu-devel] [PATCH RFC] virtio: proposal to optimize accesses to VQs

2015-12-15 Thread Vincenzo Maffione
> @@ -415,15 +399,15 @@ void virtqueue_get_avail_bytes(VirtQueue *vq, unsigned > int *in_bytes, > exit(1); > } > > -if (vring_desc_flags(vdev, desc_pa, i) & VRING_DESC_F_WRITE) { > -in_total += vring_desc_len(vdev, desc_pa, i); > +

Re: [Qemu-devel] [PATCH] rtc: introduce nmi disable bit handler for cmos

2015-12-15 Thread Gonglei (Arei)
Hi Paolo, /* for KVM_GET/SET_VCPU_EVENTS */ struct kvm_vcpu_events { ... struct { __u8 injected; __u8 pending; __u8 masked; __u8 pad; } nmi; ... I found that the nmi.masked property does these enable or disable NMI jobs. S

Re: [Qemu-devel] [PATCH COLO-Frame v12 26/38] COLO failover: Shutdown related socket fd when do failover

2015-12-15 Thread Dr. David Alan Gilbert
* zhanghailiang (zhang.zhanghaili...@huawei.com) wrote: > If the net connection between COLO's two sides is broken while colo/colo > incoming > thread is blocked in 'read'/'write' socket fd. It will not detect this error > until > connect timeout. It will be a long time. > > Here we shutdown all

Re: [Qemu-devel] [PATCH COLO-Frame v12 01/38] configure: Add parameter for configure to enable/disable COLO support

2015-12-15 Thread Wen Congyang
On 12/15/2015 04:22 PM, zhanghailiang wrote: > configure --enable-colo/--disable-colo to switch COLO > support on/off. > COLO support is On by default. > > Signed-off-by: zhanghailiang > Signed-off-by: Li Zhijian > Signed-off-by: Gonglei > Reviewed-by: Dr. David Alan Gilbert > --- > v11: > - T

Re: [Qemu-devel] [PATCH 00/34] kvm_stat: Cleanup and fixup

2015-12-15 Thread Cornelia Huck
On Thu, 10 Dec 2015 13:12:30 +0100 Janosch Frank wrote: > Kvm_stat is a very helpful script for checking the state of VMs, but > when I tried to introduce new features it broke every few lines. > > This patch series aims to make the script more readable and durable, > so future additions to it w

Re: [Qemu-devel] [PATCH v4 RFC] spec: add qcow2-dirty-bitmaps specification

2015-12-15 Thread Kevin Wolf
Am 14.12.2015 um 21:05 hat Max Reitz geschrieben: > On 14.12.2015 18:43, Vladimir Sementsov-Ogievskiy wrote: > > The new feature for qcow2: storing dirty bitmaps. > > > > Only dirty bitmaps relative to this qcow2 image should be stored in it. > > > > Strings started from +# are RFC-strings, not t

[Qemu-devel] [PULL 2/5] usb-mtp: free objects on a mtp reset

2015-12-15 Thread Gerd Hoffmann
From: Bandan Das On a reset, call usb_mtp_object_free on all objects and their children Signed-off-by: Bandan Das Message-id: 1448314625-3855-3-git-send-email-...@redhat.com Signed-off-by: Gerd Hoffmann --- hw/usb/dev-mtp.c | 1 + 1 file changed, 1 insertion(+) diff --git a/hw/usb/dev-mtp.c

[Qemu-devel] [PULL 5/5] ehci: make idt processing more robust

2015-12-15 Thread Gerd Hoffmann
Make ehci_process_itd return an error in case we didn't do any actual iso transfer because we've found no active transaction. That'll avoid ehci happily run in circles forever if the guest builds a loop out of idts. This is CVE-2015-8558. Cc: qemu-sta...@nongnu.org Reported-by: Qinghao Tang Tes

[Qemu-devel] [PULL 4/5] usb-mtp: add support for basic mtp events

2015-12-15 Thread Gerd Hoffmann
From: Bandan Das When the host polls for events, we check our events qlist and send one event at a time. Also, note that the event packet needs to be sent in one go, so I increased the max packet size to 64. Tested with a linux guest. Signed-off-by: Bandan Das Message-id: 1448314625-3855-5-git

[Qemu-devel] [PULL 3/5] usb-mtp: Add support for inotify based file monitoring

2015-12-15 Thread Gerd Hoffmann
From: Bandan Das For now, we use inotify watches to track only a small number of events, namely, add, delete and modify. Note that for delete, the kernel already deactivates the watch for us and we just need to take care of modifying our internal state. inotify is a linux only mechanism. Sugges

[Qemu-devel] [PULL 0/5] usb: ehci idt fix, event support for mtp

2015-12-15 Thread Gerd Hoffmann
-20151215-1 for you to fetch changes up to 156a2e4dbffa85997636a7a39ef12da6f1b40254: ehci: make idt processing more robust (2015-12-15 09:49:03 +0100) usb: ehci idt fix, event support for mtp

[Qemu-devel] [PULL 1/5] usb-mtp: use a list for keeping track of children

2015-12-15 Thread Gerd Hoffmann
From: Bandan Das To support adding/removal of objects, we will need to update the object cache hierarchy we have built internally. Convert to using a Qlist for easier management. Signed-off-by: Bandan Das Message-id: 1448314625-3855-2-git-send-email-...@redhat.com Signed-off-by: Gerd Hoffmann

Re: [Qemu-devel] [PATCH v4 RFC] spec: add qcow2-dirty-bitmaps specification

2015-12-15 Thread Vladimir Sementsov-Ogievskiy
Thanks everyone for comments! On 15.12.2015 07:18, Fam Zheng wrote: On Mon, 12/14 21:05, Max Reitz wrote: On 14.12.2015 18:43, Vladimir Sementsov-Ogievskiy wrote: The new feature for qcow2: storing dirty bitmaps. Only dirty bitmaps relative to this qcow2 image should be stored in it. Strings

Re: [Qemu-devel] [PATCH 11/12] audio: Clean up inappropriate and unreachable use of hw_error()

2015-12-15 Thread Gerd Hoffmann
On Do, 2015-12-10 at 11:29 +0100, Markus Armbruster wrote: > audio_init() should not use hw_error(), because dumping CPU registers > is unhelpful there, and aborting is wrong, because it can be called > called from an audio device's realize() method. > > The two uses of hw_error() come from commit

Re: [Qemu-devel] net: vmxnet3: memory leakage issue

2015-12-15 Thread P J P
Hello Miao, +-- On Tue, 15 Dec 2015, Miao Yan wrote --+ | So far as I know, vmxnet3 doesn't have a flow control spec. Same is true for | e1000 emulation layer in esxi, writing to flow control register bits is | ignored. Maybe there are some buffering or throttling layer in-between that | do n

[Qemu-devel] [PULL 0/5] coreaudio: use new-in-OSX-10.6 APIs, cleanups.

2015-12-15 Thread Gerd Hoffmann
:37:55 +) are available in the git repository at: git://git.kraxel.org/qemu tags/pull-audio-20151215-1 for you to fetch changes up to 2f79a18fdd6e8e75ab9bd4edc90a641ab730824d: audio/coreaudio.c: Avoid deprecated AudioDeviceAdd/RemoveIOProc APIs (2015-12-15 11:08:12 +0100

[Qemu-devel] [PULL 5/5] audio/coreaudio.c: Avoid deprecated AudioDeviceAdd/RemoveIOProc APIs

2015-12-15 Thread Gerd Hoffmann
From: Peter Maydell The AudioDeviceAddIOProc() and AudioDeviceRemoveIOProc() functions were deprecated in OSX 10.5. Since we don't support any earlier versions of OSX, we can simply replace them with the new APIs AudioDeviceCreateIOProcID() and AudioDeviceRemoveIOProcID(). Signed-off-by: Peter M

[Qemu-devel] [PULL 1/5] audio/coreaudio.c: Factor out use of AudioHardwareGetProperty

2015-12-15 Thread Gerd Hoffmann
From: Peter Maydell The CoreAudio function AudioHardwareGetProperty has been deprecated starting with OSX 10.6, so factor out our call to it so we can provide an equivalent with the new APIs when they exist. Signed-off-by: Peter Maydell Message-id: 1448747724-15572-2-git-send-email-peter.mayd..

[Qemu-devel] [PULL 4/5] audio/coreaudio.c: Use new-in-OSX-10.6 APIs when available

2015-12-15 Thread Gerd Hoffmann
From: Peter Maydell Use the new-in-OSX 10.6 API AudioObjectGetPropertyData() instead of the deprecated AudioDeviceGetProperty() and AudioDeviceSetProperty() functions when possible. Signed-off-by: Peter Maydell Message-id: 1448747724-15572-5-git-send-email-peter.mayd...@linaro.org Signed-off-by

[Qemu-devel] [PULL 3/5] audio/coreaudio.c: Factor out uses of AudioDeviceGet/SetProperty

2015-12-15 Thread Gerd Hoffmann
From: Peter Maydell The CoreAudio APIs AudioDeviceGetProperty and AudioDeviceSetProperty are deprecated from OSX 10.6, so factor out our calls to them so we can provide versions which use the replacement APIs on OSX newer than 10.5. Signed-off-by: Peter Maydell Message-id: 1448747724-15572-4-gi

[Qemu-devel] [PULL 2/5] audio/coreaudio.c: Use new-in-OSX-10.6 API for getting default voice

2015-12-15 Thread Gerd Hoffmann
From: Peter Maydell If we're building for OSX 10.6 or better, use the new API AudioObjectGetPropertyData for getting the default voice. Signed-off-by: Peter Maydell Message-id: 1448747724-15572-3-git-send-email-peter.mayd...@linaro.org Signed-off-by: Gerd Hoffmann --- audio/coreaudio.c | 27 +

Re: [Qemu-devel] [PATCH COLO-Frame v12 27/38] COLO failover: Don't do failover during loading VM's state

2015-12-15 Thread Dr. David Alan Gilbert
* zhanghailiang (zhang.zhanghaili...@huawei.com) wrote: > We should not do failover work while the main thread is loading > VM's state, otherwise it will destroy the consistent of VM's memory and > device state. > > Here we add a new failover status 'RELAUNCH' which means we should > relaunch the

Re: [Qemu-devel] [PATCH COLO-Frame v12 26/38] COLO failover: Shutdown related socket fd when do failover

2015-12-15 Thread Dr. David Alan Gilbert
* zhanghailiang (zhang.zhanghaili...@huawei.com) wrote: > If the net connection between COLO's two sides is broken while colo/colo > incoming > thread is blocked in 'read'/'write' socket fd. It will not detect this error > until > connect timeout. It will be a long time. > > Here we shutdown all

[Qemu-devel] [PATCH For 2.5] net: vmxnet3: avoid memory leakage in activate_device

2015-12-15 Thread P J P
Hello Peter, Patch below is reviewed and queued currently for 2.6. Could you please include it in 2.5? -> https://lists.gnu.org/archive/html/qemu-devel/2015-12/msg02352.html === From 1a18f291a5d22c0dfa680cf82ada2e021e19bf97 Mon Sep 17 00:00:00 2001 From: Prasad J Pandit Date: Tue, 15 D

Re: [Qemu-devel] [PATCH RFC] virtio: proposal to optimize accesses to VQs

2015-12-15 Thread Paolo Bonzini
> > if (!indirect) > > total_bufs = num_bufs; > > Here (http://article.gmane.org/gmane.comp.emulators.qemu.block/6620) you > meant > > +in_total += desc.len; > > and > > +out_total += desc.len; > Yes, I did... I changed the patch and will

Re: [Qemu-devel] [PATCH v1 0/3] Convert VNC server to QIOChannel

2015-12-15 Thread Gerd Hoffmann
On Mi, 2015-11-18 at 18:52 +, Daniel P. Berrange wrote: > This is an update of patches previously shown in an RFC posting > > RFC: https://lists.gnu.org/archive/html/qemu-devel/2015-09/msg00829.html > > This series depends on the previously posted series: > > "[PATCH v3 0/9] Introduce I/

Re: [Qemu-devel] [PATCH v2] ui/curses: Fix color attribute of monitor for curses

2015-12-15 Thread Gerd Hoffmann
On Mi, 2015-12-02 at 03:44 +0900, OGAWA Hirofumi wrote: > Current text_console_update() writes totally broken color attributes > to console_write_ch(). The format now is writing, > > [WRONG] > bold << 21 | fg << 12 | bg << 8 | char > fg == 3bits curses color number > bg == 3bits

[Qemu-devel] [PATCH RFC v2 0/2] MSI/MSIX: fix to catch and report errors

2015-12-15 Thread Cao jin
msi_init() & msix_init() are supporting functions for PCI devices. catch the errors they produced and report. V2 changelog: 1. Modify as per Markus`s review a. Try to cleanup on function fail, as possible as I can. b. For .init() function, use error_report_err() and return non-zero value. c.

[Qemu-devel] [PATCH v2 RFC 2/2] Add param Error** to msix_init() & modify the callers

2015-12-15 Thread Cao jin
msix_init() is a supporting function in PCI device initialization, in order to convert .init() to .realize(), it should be modified first. Also modify the callers. Signed-off-by: Cao jin --- hw/block/nvme.c| 32 + hw/misc/ivshmem.c | 7 +++--- hw/net/rocker/

[Qemu-devel] [PATCH] raw-posix: Make aio=native option binding

2015-12-15 Thread Kevin Wolf
Traditionally, aio=native was treated as an advice that could simply be ignored if an error occurs while initialising Linux AIO or the feature wasn't compiled in. This behaviour was deprecated in commit 96518254 (qemu 2.3; error during init) and commit 1501ecc1 (qemu 2.5; not compiled in). This pa

[Qemu-devel] [PATCH RFC v2 1/2] Add param Error** to msi_init() & modify the callers

2015-12-15 Thread Cao jin
msi_init() is a supporting function in PCI device initialization, in order to convert .init() to .realize(), it should be modified first. Also modify the callers Bonus: add more comment for msi_init(). Signed-off-by: Cao jin --- hw/audio/intel-hda.c | 10 - hw/ide/ich.c

Re: [Qemu-devel] [PATCH] rtc: introduce nmi disable bit handler for cmos

2015-12-15 Thread Paolo Bonzini
> Hi Paolo, > > /* for KVM_GET/SET_VCPU_EVENTS */ > struct kvm_vcpu_events { > ... > struct { > __u8 injected; > __u8 pending; > __u8 masked; > __u8 pad; > } nmi; > ... > > I found that the nmi.masked property does these enable or di

Re: [Qemu-devel] [PATCH For 2.5] net: vmxnet3: avoid memory leakage in activate_device

2015-12-15 Thread Peter Maydell
On 15 December 2015 at 10:29, P J P wrote: > Hello Peter, > > Patch below is reviewed and queued currently for 2.6. Could you please > include it in 2.5? > > -> https://lists.gnu.org/archive/html/qemu-devel/2015-12/msg02352.html No, sorry. It is too late by a long way. It can be cc'd to qemu-

Re: [Qemu-devel] [PATCH v2 01/14] q35: Remove MCHPCIState.guest_info field

2015-12-15 Thread Marcel Apfelbaum
On 12/11/2015 08:42 PM, Eduardo Habkost wrote: The field is not used for anything. Signed-off-by: Eduardo Habkost --- hw/i386/pc_q35.c | 1 - include/hw/pci-host/q35.h | 1 - 2 files changed, 2 deletions(-) diff --git a/hw/i386/pc_q35.c b/hw/i386/pc_q35.c index 9da751b..43ee8bb 10

Re: [Qemu-devel] [PATCH v2 02/14] pc: Group and document related PCMachineState/PCMachineclass fields

2015-12-15 Thread Marcel Apfelbaum
On 12/11/2015 08:42 PM, Eduardo Habkost wrote: Group related PCMachineState and PCMachineClass fields into sections, and move existing field descriptions to doc comments. Signed-off-by: Eduardo Habkost --- include/hw/i386/pc.h | 48 1 file cha

Re: [Qemu-devel] [PATCH v2 03/14] pc: Move PcGuestInfo declaration to top of file

2015-12-15 Thread Marcel Apfelbaum
On 12/11/2015 08:42 PM, Eduardo Habkost wrote: The struct will be used inside PCMachineState. Signed-off-by: Eduardo Habkost --- include/hw/i386/pc.h | 31 --- 1 file changed, 16 insertions(+), 15 deletions(-) diff --git a/include/hw/i386/pc.h b/include/hw/i386/p

Re: [Qemu-devel] [PATCH COLO-Frame v12 01/38] configure: Add parameter for configure to enable/disable COLO support

2015-12-15 Thread Hailiang Zhang
On 2015/12/15 17:46, Wen Congyang wrote: On 12/15/2015 04:22 PM, zhanghailiang wrote: configure --enable-colo/--disable-colo to switch COLO support on/off. COLO support is On by default. Signed-off-by: zhanghailiang Signed-off-by: Li Zhijian Signed-off-by: Gonglei Reviewed-by: Dr. David Alan

Re: [Qemu-devel] [PATCH] arm: explicitly mark loads as little-endian

2015-12-15 Thread Peter Maydell
On 4 December 2015 at 12:28, Paolo Bonzini wrote: > ARM softmmu is always compiled as little endian; BE8/BE32 can be > done as part of CPU emulation. Thus, devices need not use the > endian-dependent loads and swaps. > > Signed-off-by: Paolo Bonzini I have applied this to target-arm.next with a

Re: [Qemu-devel] [PATCH v2] i.MX: add support for lower and upper interrupt in GPIO.

2015-12-15 Thread Peter Maydell
On 2 December 2015 at 19:55, Peter Maydell wrote: > On 2 December 2015 at 19:07, Jean-Christophe DUBOIS > wrote: >> Hi Peter, >> >> Just curious if you are expecting any kind of update on this patch? > > Oops, I see I put it in my list of things to go out after 2.5 is > released, but forgot to s

[Qemu-devel] guest kernel in the host RAM

2015-12-15 Thread Denis V. Lunev
Hello, Paolo! There is a plan or idea to improve current implementation of Clear Containers for QEMU. Patches about NVDIMM are floating in the list, you have proposed special boot firmware for a case. The idea is that we could boot with the uncompressed Linux kernel in the guest which serves 2 p

Re: [Qemu-devel] [PATCH] arm: soc-dma: use hwaddr instead of target_ulong in printf

2015-12-15 Thread Peter Maydell
On 4 December 2015 at 16:52, Peter Maydell wrote: > On 4 December 2015 at 16:39, Paolo Bonzini wrote: >> >>> I don't think we've ever said "we should transition away from HWADDR_*", >>> but whether we should is an interesting question, which is why I asked. >>> Does retaining the format macros to

Re: [Qemu-devel] [PATCH For 2.5] net: vmxnet3: avoid memory leakage in activate_device

2015-12-15 Thread P J P
+-- On Tue, 15 Dec 2015, Peter Maydell wrote --+ | > -> https://lists.gnu.org/archive/html/qemu-devel/2015-12/msg02352.html | | No, sorry. It is too late by a long way. It can be cc'd to | qemu-stable and go into 2.5.1. I see, okay. I'll send it there. Thank you. -- Prasad J Pandit / Red Hat Pr

Re: [Qemu-devel] [PATCH COLO-Frame v12 28/38] COLO: Process shutdown command for VM in COLO state

2015-12-15 Thread Dr. David Alan Gilbert
* zhanghailiang (zhang.zhanghaili...@huawei.com) wrote: > If VM is in COLO FT state, we should do some extra work before normal shutdown > process. SVM will ignore the shutdown command if this command is issued > directly > to it, PVM will send the shutdown command to SVM if it gets this command.

Re: [Qemu-devel] [PATCH COLO-Frame v12 01/38] configure: Add parameter for configure to enable/disable COLO support

2015-12-15 Thread Hailiang Zhang
On 2015/12/15 17:46, Wen Congyang wrote: On 12/15/2015 04:22 PM, zhanghailiang wrote: configure --enable-colo/--disable-colo to switch COLO support on/off. COLO support is On by default. Signed-off-by: zhanghailiang Signed-off-by: Li Zhijian Signed-off-by: Gonglei Reviewed-by: Dr. David Alan

Re: [Qemu-devel] [PATCH] arm: soc-dma: use hwaddr instead of target_ulong in printf

2015-12-15 Thread Paolo Bonzini
On 15/12/2015 12:28, Peter Maydell wrote: > Now in target-arm.next. I also did s/__FUNCTION__/__func__/ > since checkpatch complains about it and we're touching these lines > of code anyway. Thanks! Paolo

Re: [Qemu-devel] [PATCH v2 04/14] pc: Eliminate struct PcGuestInfoState

2015-12-15 Thread Marcel Apfelbaum
On 12/11/2015 08:42 PM, Eduardo Habkost wrote: Instead of allocating a new struct just for PcGuestInfo and the mchine_done Notifier, place them inside PCMachineState. "machine_done", . ^^ "it" it doesn't worth a new version, maybe the maintainer can take care of it. Signed-off

Re: [Qemu-devel] [PATCH 06/12] hw/arm/virt: Fix property "gic-version" error handling

2015-12-15 Thread Peter Maydell
On 10 December 2015 at 10:29, Markus Armbruster wrote: > virt_set_gic_version() calls exit(1) when passed an invalid property > value. Property setters are not supposed to do that. Screwed up in > commit b92ad39. Harmless, because the property belongs to a machine. > Set an error object instead

Re: [Qemu-devel] [PATCH v2 05/14] pc: Simplify pc_memory_init() signature

2015-12-15 Thread Marcel Apfelbaum
On 12/11/2015 08:42 PM, Eduardo Habkost wrote: We can get the PcGuestInfo struct directly from PCMachineState, and the return value is not needed at all. Signed-off-by: Eduardo Habkost --- hw/i386/pc.c | 11 +-- hw/i386/pc_piix.c| 2 +- hw/i386/pc_q35.c | 2 +- in

  1   2   3   >