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

2015-12-16 Thread Gonglei (Arei)
Hi, > -Original Message- > From: Radim Krcmar [mailto:rkrc...@redhat.com] > Subject: Re: [PATCH] rtc: introduce nmi disable bit handler for cmos > > 2015-12-15 05:43-0500, Paolo Bonzini: > >> Hi Paolo, > >> > >> /* for KVM_GET/SET_VCPU_EVENTS */ > >> struct kvm_vcpu_events { > >> ... > >

Re: [Qemu-devel] [PATCH v2 0/3] virtio: proposal to optimize accesses to VQs

2015-12-16 Thread Paolo Bonzini
On 15/12/2015 23:33, Vincenzo Maffione wrote: > This patch slightly rewrites the code to reduce the number of accesses, since > many of them seems unnecessary to me. After this reduction, the bottleneck > jumps from 1 Mpps to 2 Mpps. Very nice. Did you get new numbers with the rebase? That wou

Re: [Qemu-devel] [PATCH] net: Inform the user about deprecated -net options

2015-12-16 Thread Paolo Bonzini
On 16/12/2015 08:20, Thomas Huth wrote: > Ah, ok, that makes more sense... anyway, "-device ?" also lists some > devices like "ne2k_isa", ""usb-bt-dongle" and "vmxnet3" ... I somewhat > doubt that we want to have these in the list of "-net nic" supported > devices, too. Why not? > ... hmmm, by

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

2015-12-16 Thread Paolo Bonzini
On 15/12/2015 19:53, Radim Krcmar wrote: > 2015-12-15 05:43-0500, Paolo Bonzini: >>> Hi Paolo, >>> >>> /* for KVM_GET/SET_VCPU_EVENTS */ >>> struct kvm_vcpu_events { >>> ... >>> struct { >>> __u8 injected; >>> __u8 pending; >>> __u8 masked; >>> __u

[Qemu-devel] [PATCH 1/1] qmp: process system-reset event in paused state

2015-12-16 Thread Denis V. Lunev
With pvpanic or HyperV panic devices could be moved into the paused state with ' preserve'. In this state VM reacts only to 'virsh destroy' or 'continue'. 'virsh reset' command is usually used to force guest reset. The expectation of the behavior of this command is that the guest will be force res

Re: [Qemu-devel] [PATCH 1/1] qmp: process system-reset event in paused state

2015-12-16 Thread Paolo Bonzini
On 16/12/2015 10:00, Denis V. Lunev wrote: > With pvpanic or HyperV panic devices could be moved into the paused state > with ' preserve'. In this state VM reacts only to > 'virsh destroy' or 'continue'. > > 'virsh reset' command is usually used to force guest reset. The expectation > of the beh

Re: [Qemu-devel] [PATCH v2 0/3] virtio: proposal to optimize accesses to VQs

2015-12-16 Thread Vincenzo Maffione
Assuming my TX experiments with disconnected backend (and I disable CPU dynamic scaling of performance, etc.): 1) after patch 1 and 2, virtio bottleneck jumps from ~1Mpps to 1.910 Mpps. 2) after patch 1,2 and 3, virtio bottleneck jumps to 2.039 Mpps. So I see an improvement for patch 3, and I

Re: [Qemu-devel] [PATCH 1/1] qmp: process system-reset event in paused state

2015-12-16 Thread Denis V. Lunev
On 12/16/2015 12:12 PM, Paolo Bonzini wrote: On 16/12/2015 10:00, Denis V. Lunev wrote: With pvpanic or HyperV panic devices could be moved into the paused state with ' preserve'. In this state VM reacts only to 'virsh destroy' or 'continue'. 'virsh reset' command is usually used to force gues

Re: [Qemu-devel] [PATCH v2 0/3] virtio: proposal to optimize accesses to VQs

2015-12-16 Thread Paolo Bonzini
On 16/12/2015 10:28, Vincenzo Maffione wrote: > Assuming my TX experiments with disconnected backend (and I disable > CPU dynamic scaling of performance, etc.): > 1) after patch 1 and 2, virtio bottleneck jumps from ~1Mpps to 1.910 Mpps. > 2) after patch 1,2 and 3, virtio bottleneck jumps to

Re: [Qemu-devel] [PATCH 1/1] qmp: process system-reset event in paused state

2015-12-16 Thread Paolo Bonzini
On 16/12/2015 10:32, Denis V. Lunev wrote: >>> >>> >>> 'virsh reset' command is usually used to force guest reset. The >>> expectation >>> of the behavior of this command is that the guest will be force >>> restarted. >>> This is not true at the moment. >> Does "virsh reset" + "virsh continue" wo

Re: [Qemu-devel] [PATCH 1/1] qmp: process system-reset event in paused state

2015-12-16 Thread Peter Krempa
On Wed, Dec 16, 2015 at 12:32:13 +0300, Denis V. Lunev wrote: > On 12/16/2015 12:12 PM, Paolo Bonzini wrote: > > > > On 16/12/2015 10:00, Denis V. Lunev wrote: > >> With pvpanic or HyperV panic devices could be moved into the paused state > >> with ' preserve'. In this state VM reacts only to > >>

Re: [Qemu-devel] [PATCH 1/1] qmp: process system-reset event in paused state

2015-12-16 Thread Peter Krempa
On Wed, Dec 16, 2015 at 10:12:20 +0100, Paolo Bonzini wrote: > > > On 16/12/2015 10:00, Denis V. Lunev wrote: > > With pvpanic or HyperV panic devices could be moved into the paused state > > with ' preserve'. In this state VM reacts only to > > 'virsh destroy' or 'continue'. > > > > 'virsh rese

Re: [Qemu-devel] [PATCH 1/1] qmp: process system-reset event in paused state

2015-12-16 Thread Denis V. Lunev
On 12/16/2015 12:35 PM, Paolo Bonzini wrote: On 16/12/2015 10:32, Denis V. Lunev wrote: 'virsh reset' command is usually used to force guest reset. The expectation of the behavior of this command is that the guest will be force restarted. This is not true at the moment. Does "virsh reset" + "

[Qemu-devel] [PATCH 00/10] iotests: Clean up "mv $TEST_IMG $TEST_IMG.XXX"

2015-12-16 Thread Fam Zheng
Commit 794d00f71d fixed two "mv" commands into the TEST_IMG override approach. There are still more occasions of "mv", this series fixes them. The benefit is it drops the assumption that the created image is a single file, which is not true for VMDK or the coming QBM format. On top of this, those

[Qemu-devel] [PATCH 02/10] iotests: 019: Use TEST_IMG override instead of "mv"

2015-12-16 Thread Fam Zheng
Signed-off-by: Fam Zheng --- tests/qemu-iotests/019 | 13 +++-- tests/qemu-iotests/019.out | 4 ++-- 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/tests/qemu-iotests/019 b/tests/qemu-iotests/019 index f5ecbf5..0937b5c 100755 --- a/tests/qemu-iotests/019 +++ b/tests/q

[Qemu-devel] [PATCH 01/10] iotests: 018: Use TEST_IMG override instead of "mv"

2015-12-16 Thread Fam Zheng
Signed-off-by: Fam Zheng --- tests/qemu-iotests/018 | 8 tests/qemu-iotests/018.out | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/tests/qemu-iotests/018 b/tests/qemu-iotests/018 index d8a7d43..07b2de9 100755 --- a/tests/qemu-iotests/018 +++ b/tests/qemu-iotes

[Qemu-devel] [PATCH 07/10] iotests: 037: Use TEST_IMG override instead of "mv"

2015-12-16 Thread Fam Zheng
Signed-off-by: Fam Zheng --- tests/qemu-iotests/037 | 5 - tests/qemu-iotests/037.out | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/tests/qemu-iotests/037 b/tests/qemu-iotests/037 index 9171d8c..5862451 100755 --- a/tests/qemu-iotests/037 +++ b/tests/qemu-iotests/

[Qemu-devel] [PATCH 03/10] iotests: 020: Use TEST_IMG override instead of "mv"

2015-12-16 Thread Fam Zheng
Signed-off-by: Fam Zheng --- tests/qemu-iotests/020 | 7 +-- tests/qemu-iotests/020.out | 2 +- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/tests/qemu-iotests/020 b/tests/qemu-iotests/020 index 2f258dc..6625b55 100755 --- a/tests/qemu-iotests/020 +++ b/tests/qemu-iotest

[Qemu-devel] [PATCH 10/10] iotests: 095: Use TEST_IMG override instead of "mv"

2015-12-16 Thread Fam Zheng
Signed-off-by: Fam Zheng --- tests/qemu-iotests/095 | 12 ++-- tests/qemu-iotests/095.out | 8 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/tests/qemu-iotests/095 b/tests/qemu-iotests/095 index 6630181..cbe61bc 100755 --- a/tests/qemu-iotests/095 +++ b/te

[Qemu-devel] [PATCH 04/10] iotests: 024: Use TEST_IMG override instead of "mv"

2015-12-16 Thread Fam Zheng
Signed-off-by: Fam Zheng --- tests/qemu-iotests/024 | 10 -- tests/qemu-iotests/024.out | 4 ++-- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/tests/qemu-iotests/024 b/tests/qemu-iotests/024 index 9bf99e1..2c2d148 100755 --- a/tests/qemu-iotests/024 +++ b/tests/qem

Re: [Qemu-devel] [PATCH 1/1] qmp: process system-reset event in paused state

2015-12-16 Thread Denis V. Lunev
On 12/16/2015 12:50 PM, Peter Krempa wrote: On Wed, Dec 16, 2015 at 10:12:20 +0100, Paolo Bonzini wrote: On 16/12/2015 10:00, Denis V. Lunev wrote: With pvpanic or HyperV panic devices could be moved into the paused state with ' preserve'. In this state VM reacts only to 'virsh destroy' or 'co

[Qemu-devel] [PATCH 06/10] iotests: 034: Use TEST_IMG override instead of "mv"

2015-12-16 Thread Fam Zheng
Signed-off-by: Fam Zheng --- tests/qemu-iotests/034 | 6 +- tests/qemu-iotests/034.out | 2 +- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/tests/qemu-iotests/034 b/tests/qemu-iotests/034 index 69c7858..c769dd8 100755 --- a/tests/qemu-iotests/034 +++ b/tests/qemu-iotests

[Qemu-devel] [PATCH 05/10] iotests: 028: Use TEST_IMG override instead of "mv"

2015-12-16 Thread Fam Zheng
Signed-off-by: Fam Zheng --- tests/qemu-iotests/028 | 5 - tests/qemu-iotests/028.out | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/tests/qemu-iotests/028 b/tests/qemu-iotests/028 index a1f4423..009510d 100755 --- a/tests/qemu-iotests/028 +++ b/tests/qemu-iotests/

[Qemu-devel] [PATCH 08/10] iotests: 038: Use TEST_IMG override instead of "mv"

2015-12-16 Thread Fam Zheng
Signed-off-by: Fam Zheng --- tests/qemu-iotests/038 | 5 - tests/qemu-iotests/038.out | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/tests/qemu-iotests/038 b/tests/qemu-iotests/038 index cfaf00a..34fe698 100755 --- a/tests/qemu-iotests/038 +++ b/tests/qemu-iotests/

[Qemu-devel] [PATCH 09/10] iotests: 050: Use TEST_IMG override instead of "mv"

2015-12-16 Thread Fam Zheng
Signed-off-by: Fam Zheng --- tests/qemu-iotests/050 | 9 +++-- tests/qemu-iotests/050.out | 4 ++-- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/tests/qemu-iotests/050 b/tests/qemu-iotests/050 index 07802bc..13006dd 100755 --- a/tests/qemu-iotests/050 +++ b/tests/qemu-io

Re: [Qemu-devel] guest kernel in the host RAM

2015-12-16 Thread Miao Yan
2015-12-15 19:27 GMT+08:00 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 th

Re: [Qemu-devel] [PATCH 4/6] Migration: Emit event at start of pass

2015-12-16 Thread Dr. David Alan Gilbert
* Eric Blake (ebl...@redhat.com) wrote: > On 12/15/2015 12:02 PM, Dr. David Alan Gilbert (git) wrote: > > From: "Dr. David Alan Gilbert" > > > > Emit an event each time we sync the dirty bitmap on the source; > > this helps libvirt use postcopy by giving it a kick when it > > might be a good idea

Re: [Qemu-devel] [PATCH 1/6] migration: Export migrate_set_state()

2015-12-16 Thread Juan Quintela
"Dr. David Alan Gilbert (git)" wrote: > From: 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 Why do we need to change the prototype? If you don't have a Migratio

Re: [Qemu-devel] [PATCH 2/6] migration: Add state records for migration incoming

2015-12-16 Thread Juan Quintela
"Dr. David Alan Gilbert (git)" wrote: > From: 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: zhanghai

Re: [Qemu-devel] [PATCH 3/6] Postcopy: Send events/change state on incoming side

2015-12-16 Thread Juan Quintela
"Dr. David Alan Gilbert (git)" wrote: > From: "Dr. David Alan Gilbert" > > I missed the calls to send migration events on the destination side > as we enter postcopy. > Take care when adding them not to do it after state has been freed. > > Signed-off-by: Dr. David Alan Gilbert Reviewed-by: Jua

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

2015-12-16 Thread Gonglei (Arei)
> > On 15/12/2015 19:53, Radim Krcmar wrote: > > 2015-12-15 05:43-0500, Paolo Bonzini: > >>> Hi Paolo, > >>> > >>> /* for KVM_GET/SET_VCPU_EVENTS */ > >>> struct kvm_vcpu_events { > >>> ... > >>> struct { > >>> __u8 injected; > >>> __u8 pending; > >>> __u8 masked; >

Re: [Qemu-devel] [PATCH 4/6] Migration: Emit event at start of pass

2015-12-16 Thread Juan Quintela
"Dr. David Alan Gilbert (git)" wrote: > From: "Dr. David Alan Gilbert" > > Emit an event each time we sync the dirty bitmap on the source; > this helps libvirt use postcopy by giving it a kick when it > might be a good idea to start the postcopy. > > Signed-off-by: Dr. David Alan Gilbert Review

Re: [Qemu-devel] [PATCH 6/6] multithread decompression: Avoid one copy

2015-12-16 Thread Juan Quintela
"Dr. David Alan Gilbert (git)" wrote: > From: "Dr. David Alan Gilbert" > > qemu_get_buffer does a copy, we can avoid the memcpy, and > we can then remove the extra buffer. > > Signed-off-by: Dr. David Alan Gilbert Reviewed-by: Juan Quintela

Re: [Qemu-devel] [PATCH 5/6] Use qemu_get_buffer_in_place for xbzrle data

2015-12-16 Thread Juan Quintela
"Dr. David Alan Gilbert (git)" wrote: > From: "Dr. David Alan Gilbert" > > Avoid a data copy (if we're lucky) in the xbzrle code. > > Signed-off-by: Dr. David Alan Gilbert Reviewed-by: Juan Quintela

Re: [Qemu-devel] [PATCH v2 0/3] virtio: proposal to optimize accesses to VQs

2015-12-16 Thread Vincenzo Maffione
2015-12-16 10:34 GMT+01:00 Paolo Bonzini : > > > On 16/12/2015 10:28, Vincenzo Maffione wrote: >> Assuming my TX experiments with disconnected backend (and I disable >> CPU dynamic scaling of performance, etc.): >> 1) after patch 1 and 2, virtio bottleneck jumps from ~1Mpps to 1.910 Mpps. >> 2)

[Qemu-devel] [PATCH] iov: avoid memcpy for "simple" iov_from_buf/iov_to_buf

2015-12-16 Thread Paolo Bonzini
memcpy can take a large amount of time for small reads and writes. For virtio it is a common case that the first iovec can satisfy the whole read or write. In that case, and if bytes is a constant to avoid excessive growth of code, inline the first iteration into the caller. Signed-off-by: Paolo

[Qemu-devel] [PATCH 3/8] memory: reorder MemoryRegion fields

2015-12-16 Thread Paolo Bonzini
Order fields so that all fields accessed during a RAM read/write fit in the same cache line. Signed-off-by: Paolo Bonzini --- include/exec/memory.h | 24 ++-- 1 file changed, 14 insertions(+), 10 deletions(-) diff --git a/include/exec/memory.h b/include/exec/memory.h index 9

[Qemu-devel] [PATCH 5/8] memory: split address_space_read and address_space_write

2015-12-16 Thread Paolo Bonzini
Rather than dispatching on is_write for every iteration, make address_space_rw call one of the two functions. The amount of duplicate logic is pretty small, and memory_access_is_direct can be tweaked so that it inlines better in the callers. Signed-off-by: Paolo Bonzini --- exec.c | 208 +++

[Qemu-devel] [PATCH 4/8] memory: avoid unnecessary object_ref/unref

2015-12-16 Thread Paolo Bonzini
For the common case of DMA into non-hotplugged RAM, it is unnecessary but expensive to do object_ref/unref. Add back an owner field to MemoryRegion, so that these memory regions can skip the reference counting. Signed-off-by: Paolo Bonzini --- include/exec/memory.h | 1 + memory.c

[Qemu-devel] [PATCH] memory: try to inline constant-length reads

2015-12-16 Thread Paolo Bonzini
memcpy can take a large amount of time for small reads and writes. Handle the common case of reading s/g descriptors from memory (there is no corresponding "write" case that is as common, because writes often use address_space_st* functions) by inlining the relevant parts of address_space_read into

[Qemu-devel] [PATCH 1/8] exec: always call qemu_get_ram_ptr within rcu_read_lock

2015-12-16 Thread Paolo Bonzini
Simplify the code and document the assumption. The only caller that is not within rcu_read_lock is memory_region_get_ram_ptr. Signed-off-by: Paolo Bonzini --- exec.c| 22 +- include/exec/memory.h | 9 +++-- memory.c | 14 ++ 3 fi

[Qemu-devel] [PATCH 7/8] memory: inline a few small accessors

2015-12-16 Thread Paolo Bonzini
These are used in the address_space_* fast paths. Signed-off-by: Paolo Bonzini --- include/exec/memory.h | 22 ++ memory.c | 20 2 files changed, 18 insertions(+), 24 deletions(-) diff --git a/include/exec/memory.h b/include/exec/memory.h in

Re: [Qemu-devel] [PATCH v2 0/3] virtio: proposal to optimize accesses to VQs

2015-12-16 Thread Michael S. Tsirkin
On Wed, Dec 16, 2015 at 11:39:46AM +0100, Vincenzo Maffione wrote: > 2015-12-16 10:34 GMT+01:00 Paolo Bonzini : > > > > > > On 16/12/2015 10:28, Vincenzo Maffione wrote: > >> Assuming my TX experiments with disconnected backend (and I disable > >> CPU dynamic scaling of performance, etc.): > >> 1

[Qemu-devel] [PATCH 2/8] exec: make qemu_ram_ptr_length more similar to qemu_get_ram_ptr

2015-12-16 Thread Paolo Bonzini
Notably, use qemu_get_ram_block to enjoy the MRU optimization. Signed-off-by: Paolo Bonzini --- exec.c | 46 +++--- 1 file changed, 23 insertions(+), 23 deletions(-) diff --git a/exec.c b/exec.c index 1a5ea1f..026a9f2 100644 --- a/exec.c +++ b/exec.c @@ -

[Qemu-devel] [PATCH 0/8] Optimize address_space_read/write/map

2015-12-16 Thread Paolo Bonzini
Avoid unnecessary object_ref/unref and rcu_read_lock/unlock. Inline constant-length reads to avoid variable-sized memcpy. Paolo Paolo Bonzini (8): exec: always call qemu_get_ram_ptr within rcu_read_lock exec: make qemu_ram_ptr_length more similar to qemu_get_ram_ptr memory: reorder MemoryRe

[Qemu-devel] [PATCH 8/8] memory: try to inline constant-length reads

2015-12-16 Thread Paolo Bonzini
memcpy can take a large amount of time for small reads and writes. Handle the common case of reading s/g descriptors from memory (there is no corresponding "write" case that is as common, because writes often use address_space_st* functions) by inlining the relevant parts of address_space_read into

[Qemu-devel] [PATCH 6/8] memory: extract first iteration of address_space_read and address_space_write

2015-12-16 Thread Paolo Bonzini
We want to inline the case where there is only one iteration, because then the compiler can also inline the memcpy. As a start, extract everything after the first address_space_translate call. Signed-off-by: Paolo Bonzini --- exec.c| 87 ++

Re: [Qemu-devel] [RFC] qemu-system-arm: cortex-m gdb registers

2015-12-16 Thread Peter Maydell
On 16 December 2015 at 00:16, Christopher Friedt wrote: > Just to update everyone, there is a thread on gdb-patches here [1] > that is awaiting consensus before a patch is submitted that we may > pull into qemu. > > [1] https://goo.gl/FyUvQu Thanks for following up with the GDB developers. -- PM

Re: [Qemu-devel] [Qemu-arm] [PATCH v2 1/2] Use error_fatal to simplify obvious fatal errors

2015-12-16 Thread Peter Maydell
On 16 December 2015 at 07:43, Markus Armbruster wrote: > Peter Maydell writes: >> Do you mean by this that you're planning to send a v3, or would you >> like me to apply v2 to target-arm.next? > > I only changed PATCH 1's commit message since v2 (current version > appended). I plan to include th

Re: [Qemu-devel] [PATCH v2 0/3] virtio: proposal to optimize accesses to VQs

2015-12-16 Thread Vincenzo Maffione
2015-12-16 12:02 GMT+01:00 Michael S. Tsirkin : > On Wed, Dec 16, 2015 at 11:39:46AM +0100, Vincenzo Maffione wrote: >> 2015-12-16 10:34 GMT+01:00 Paolo Bonzini : >> > >> > >> > On 16/12/2015 10:28, Vincenzo Maffione wrote: >> >> Assuming my TX experiments with disconnected backend (and I disable >

[Qemu-devel] [PATCH] rcu: optimize rcu_read_lock

2015-12-16 Thread Paolo Bonzini
rcu_read_lock cannot change rcu_gp_ongoing from true to false (the previous value of p_rcu_reader->ctr is zero), hence there is no need to check p_rcu_reader->waiting and wake up a concurrent synchronize_rcu. While at it mark the wakeup as unlikely in rcu_read_unlock. Signed-off-by: Paolo Bonzini

Re: [Qemu-devel] [PATCH v2 0/3] virtio: proposal to optimize accesses to VQs

2015-12-16 Thread Paolo Bonzini
On 16/12/2015 11:39, Vincenzo Maffione wrote: > No problems. > > I have some additional (orthogonal) curiosities: > > 1) Assuming "hw/virtio/dataplane/vring.c" is what I think it is (VQ > data structures directly accessible in the host virtual memory, with > guest-phyisical-to-host-virtual ma

[Qemu-devel] [PATCH v2 1/6] migration: Export migrate_set_state()

2015-12-16 Thread Dr. David Alan Gilbert (git)
From: zhanghailiang Change the first parameter of migrate_set_state(), and export it. We will use it in a later patch to update incoming state. Signed-off-by: zhanghailiang Reviewed-by: Dr. David Alan Gilbert dgilbert: Updated comment as per Juan's review --- include/migration/migration.h |

[Qemu-devel] [PATCH v2 6/6] multithread decompression: Avoid one copy

2015-12-16 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" qemu_get_buffer does a copy, we can avoid the memcpy, and we can then remove the extra buffer. Signed-off-by: Dr. David Alan Gilbert Reviewed-by: Liang Li Reviewed-by: Juan Quintela --- migration/ram.c | 11 +++ 1 file changed, 3 insertions(+), 8 deleti

[Qemu-devel] [PATCH v2 0/6] Migration: Small fixes and improvements

2015-12-16 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" This is a set of 4 small fixes and improvements I've been collecting during the 2.5 freeze; I've added in a couple of Zhanghailiang's patches that are easier to merge before rather than after. (Of which one I've added a small fix of my own, see the message) Jiri wa

[Qemu-devel] [PATCH v2 2/6] migration: Add state records for migration incoming

2015-12-16 Thread Dr. David Alan Gilbert (git)
From: 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 dgilbert: Fixed early free of MigraitonIncomin

[Qemu-devel] [PATCH v2 4/6] Migration: Emit event at start of pass

2015-12-16 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" Emit an event each time we sync the dirty bitmap on the source; this helps libvirt use postcopy by giving it a kick when it might be a good idea to start the postcopy. Signed-off-by: Dr. David Alan Gilbert --- docs/qmp-events.txt | 14 ++ migration/ra

[Qemu-devel] [PATCH v2 5/6] Use qemu_get_buffer_in_place for xbzrle data

2015-12-16 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" Avoid a data copy (if we're lucky) in the xbzrle code. Signed-off-by: Dr. David Alan Gilbert Reviewed-by: Juan Quintela --- migration/ram.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/migration/ram.c b/migration/ram.c index 102d1f2.

[Qemu-devel] [PATCH v2 3/6] Postcopy: Send events/change state on incoming side

2015-12-16 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" I missed the calls to send migration events on the destination side as we enter postcopy. Take care when adding them not to do it after state has been freed. Signed-off-by: Dr. David Alan Gilbert Reviewed-by: zhanghailiang Reviewed-by: Juan Quintela --- migrati

Re: [Qemu-devel] [PATCH 1/1] qmp: process system-reset event in paused state

2015-12-16 Thread Paolo Bonzini
On 16/12/2015 10:50, Peter Krempa wrote: > We check that the state is "paused" and continue the vCPUs only in > that case. The panic devices will move the VM to 'crashed' state. > The code that is issuing 'system_reset' does not modify the state > in any way. Ok, thanks. > I'd say NACK here.

Re: [Qemu-devel] [PATCH 26/74] pc: acpi: memhp: move MHPD._STA method into SSDT

2015-12-16 Thread Marcel Apfelbaum
On 12/10/2015 01:41 AM, Igor Mammedov wrote: Signed-off-by: Igor Mammedov --- hw/acpi/memory_hotplug_acpi_table.c | 12 hw/i386/acpi-dsdt-mem-hotplug.dsl | 8 2 files changed, 12 insertions(+), 8 deletions(-) diff --git a/hw/acpi/memory_hotplug_acpi_table.c b/hw/ac

[Qemu-devel] -loadvm and disk only snapshot

2015-12-16 Thread Vasiliy Tolstov
Hi. I'm try to find some info how to run qemu vm from snapshot, but all pages contains info about running vm from full vm snapshot with memory state. What happening when i'm run qemu with -loadvm from disk only snapshot (created byblockdev-snapshot-internal-sync)? -- Vasiliy Tolstov, e-mail: v.to

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

2015-12-16 Thread Paolo Bonzini
On 16/12/2015 11:28, Gonglei (Arei) wrote: > I'll move the global nmi_disabled into RTCState, then I have to add a global > RTCState > Variable so that other C files can use the rtc_state->external_nmi_disabled. Hmm, I think it should be done differently. This is a layering violation, the NMI_

[Qemu-devel] [Minios-devel] [PATCH v7 0/] Begin to disentangle libxenctrl and provide some stable libraries

2015-12-16 Thread Ian Campbell
In <1431963008.4944.80.ca...@citrix.com> I proposed stabilising some parts of the libxenctrl API/ABI by disaggregating into separate libraries. This is v7 of that set of series against: xen qemu-xen qemu-xen-traditional mini-os NB: Samuel+minios-devel will only get the mini-os sid

[Qemu-devel] [PATCH QEMU-XEN v7 0/8] Begin to disentangle libxenctrl and provide some stable libraries

2015-12-16 Thread Ian Campbell
We intend to stabilise some parts of the libxenctrl interface by splitting out some functionality into separate stable libraries. This is the qemu-xen part of the first phase of that change. This mail is (or is intended to be) a reply to a "0/" super-intro mail covering all of the related patch s

[Qemu-devel] [PATCH QEMU-XEN v7 4/8] xen: Switch uses of xc_map_foreign_range into xc_map_foreign_pages

2015-12-16 Thread Ian Campbell
In Xen 4.7 we are refactoring parts libxenctrl into a number of separate libraries which will provide backward and forward API and ABI compatiblity. One such library will be libxenforeignmemory which provides access to privileged foreign mappings and which will provide an interface equivalent to x

[Qemu-devel] [PATCH QEMU-XEN v7 3/8] xen: Switch to libxengnttab interface for compat shims.

2015-12-16 Thread Ian Campbell
In Xen 4.7 we are refactoring parts libxenctrl into a number of separate libraries which will provide backward and forward API and ABI compatiblity. One such library will be libxengnttab which provides access to grant tables. In preparation for this switch the compatibility layer in xen_common.h

[Qemu-devel] [PATCH QEMU-XEN v7 6/8] xen: Use stable library interfaces when they are available.

2015-12-16 Thread Ian Campbell
In Xen 4.7 we are refactoring parts libxenctrl into a number of separate libraries which will provide backward and forward API and ABI compatiblity. Specifically libxenevtchn, libxengnttab and libxenforeignmemory. Previous patches have already laid the groundwork for using these by switching the

[Qemu-devel] [PATCH QEMU-XEN v7 5/8] xen: Switch uses of xc_map_foreign_{pages, bulk} to use libxenforeignmemory API.

2015-12-16 Thread Ian Campbell
In Xen 4.7 we are refactoring parts libxenctrl into a number of separate libraries which will provide backward and forward API and ABI compatiblity. One such library will be libxenforeignmemory which provides access to privileged foreign mappings and which will provide an interface equivalent to x

[Qemu-devel] [PATCH QEMU-XEN v7 2/8] xen: Switch to libxenevtchn interface for compat shims.

2015-12-16 Thread Ian Campbell
In Xen 4.7 we are refactoring parts libxenctrl into a number of separate libraries which will provide backward and forward API and ABI compatiblity. One such library will be libxenevtchn which provides access to event channels. In preparation for this switch the compatibility layer in xen_common.

[Qemu-devel] [PATCH QEMU-XEN v7 1/8] xen_console: correctly cleanup primary console on teardown.

2015-12-16 Thread Ian Campbell
All of the work in con_disconnect applies to the primary console case (when xendev->dev is NULL). Therefore remove the early check and bail and allow it to fall through. All of the existing code is correctly conditional already. The ->dev and ->gnttabdev handles are either both set or neither. For

[Qemu-devel] [PATCH QEMU-XEN v7 8/8] xen: make it possible to build without the Xen PV domain builder

2015-12-16 Thread Ian Campbell
Until the previous patch this relied on xc_fd(), which was only implemented for Xen 4.0 and earlier. Given this wasn't working since Xen 4.0 I have marked this as disabled by default. Removing this support drops the use of a bunch of symbols from libxenctrl, specifically: - xc_domain_create

[Qemu-devel] [PATCH QEMU-XEN v7 7/8] xen: domainbuild: reopen libxenctrl interface after forking for domain watcher.

2015-12-16 Thread Ian Campbell
Using an existing libxenctrl handle after a fork was never particularly safe (especially if foreign mappings existed at the time of the fork) and the xc fd has been unavailable for many releases. Reopen the handle after fork and therefore do away with xc_fd(). Signed-off-by: Ian Campbell Acked-b

Re: [Qemu-devel] [PATCH v2 1/6] migration: Export migrate_set_state()

2015-12-16 Thread Juan Quintela
"Dr. David Alan Gilbert (git)" wrote: > From: zhanghailiang > > Change the first parameter of migrate_set_state(), and export it. > We will use it in a later patch to update incoming state. > > Signed-off-by: zhanghailiang > Reviewed-by: Dr. David Alan Gilbert Reviewed-by: Juan Quintela

Re: [Qemu-devel] [PATCH v2 4/6] Migration: Emit event at start of pass

2015-12-16 Thread Juan Quintela
"Dr. David Alan Gilbert (git)" wrote: > From: "Dr. David Alan Gilbert" > > Emit an event each time we sync the dirty bitmap on the source; > this helps libvirt use postcopy by giving it a kick when it > might be a good idea to start the postcopy. > > Signed-off-by: Dr. David Alan Gilbert Review

Re: [Qemu-devel] [RFC PATCH 00/40] Sneak peek of virtio and dataplane changes for 2.6

2015-12-16 Thread Christian Borntraeger
On 12/09/2015 09:35 PM, Paolo Bonzini wrote: > > > On 26/11/2015 11:39, Paolo Bonzini wrote: >> I would really prefer to get rid of vring.c as soon as the infrastructure >> makes it possible---even if it's faster. We know what makes virtio.c >> slower, and it's simpler to fix virtio.c than to con

[Qemu-devel] [PATCH 08/12] Support for N25Q256A/N25Q512A

2015-12-16 Thread marcin . krzeminski
From: Marcin Krzeminski Signed-off-by: Marcin Krzeminski --- hw/block/m25p80.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/hw/block/m25p80.c b/hw/block/m25p80.c index f0f637e..a41c2f1 100644 --- a/hw/block/m25p80.c +++ b/hw/block/m25p80.c @@ -214,6 +214,8 @@ static const FlashPartInfo

[Qemu-devel] [PATCH 12/12] Read flag status register command support added.

2015-12-16 Thread marcin . krzeminski
From: Marcin Krzeminski Signed-off-by: Marcin Krzeminski --- hw/block/m25p80.c | 8 1 file changed, 8 insertions(+) diff --git a/hw/block/m25p80.c b/hw/block/m25p80.c index fadd6ec..ef05ad3 100644 --- a/hw/block/m25p80.c +++ b/hw/block/m25p80.c @@ -258,6 +258,7 @@ typedef enum {

[Qemu-devel] [PATCH 03/12] Reset enable and reset memory commands support.

2015-12-16 Thread marcin . krzeminski
From: Marcin Krzeminski Signed-off-by: Marcin Krzeminski --- hw/block/m25p80.c | 15 +++ 1 file changed, 15 insertions(+) diff --git a/hw/block/m25p80.c b/hw/block/m25p80.c index bcb66a5..5e07b57 100644 --- a/hw/block/m25p80.c +++ b/hw/block/m25p80.c @@ -231,6 +231,10 @@ typedef en

[Qemu-devel] [PATCH 04/12] Changed variable type to allow serial eeprom emulation (changing 0->1).

2015-12-16 Thread marcin . krzeminski
From: Marcin Krzeminski Signed-off-by: Marcin Krzeminski --- hw/block/m25p80.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/block/m25p80.c b/hw/block/m25p80.c index 5e07b57..fbbfd1d 100644 --- a/hw/block/m25p80.c +++ b/hw/block/m25p80.c @@ -60,7 +60,7 @@ typedef struct

[Qemu-devel] [PATCH 01/12] Removed unused variable.

2015-12-16 Thread marcin . krzeminski
From: Marcin Krzeminski Signed-off-by: Marcin Krzeminski --- hw/block/m25p80.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/hw/block/m25p80.c b/hw/block/m25p80.c index efc43dd..bfd493f 100644 --- a/hw/block/m25p80.c +++ b/hw/block/m25p80.c @@ -244,8 +244,6 @@ typedef enum { typedef str

[Qemu-devel] [PATCH 05/12] Added support for serial eeproms - AT25128A/AT25256A

2015-12-16 Thread marcin . krzeminski
From: Marcin Krzeminski Signed-off-by: Marcin Krzeminski --- hw/block/m25p80.c | 5 + 1 file changed, 5 insertions(+) diff --git a/hw/block/m25p80.c b/hw/block/m25p80.c index fbbfd1d..1a547ae 100644 --- a/hw/block/m25p80.c +++ b/hw/block/m25p80.c @@ -94,6 +94,11 @@ static const FlashPartIn

[Qemu-devel] [PATCH 07/12] Added support for extend address mode commands.

2015-12-16 Thread marcin . krzeminski
From: Marcin Krzeminski Signed-off-by: Marcin Krzeminski --- hw/block/m25p80.c | 28 1 file changed, 28 insertions(+) diff --git a/hw/block/m25p80.c b/hw/block/m25p80.c index 6d5d90d..f0f637e 100644 --- a/hw/block/m25p80.c +++ b/hw/block/m25p80.c @@ -47,6 +47,9 @@

[Qemu-devel] [PATCH 02/12] Added reset-pin emulation in model.

2015-12-16 Thread marcin . krzeminski
From: Marcin Krzeminski Signed-off-by: Marcin Krzeminski --- hw/block/m25p80.c | 38 +- 1 file changed, 37 insertions(+), 1 deletion(-) diff --git a/hw/block/m25p80.c b/hw/block/m25p80.c index bfd493f..bcb66a5 100644 --- a/hw/block/m25p80.c +++ b/hw/block/m2

[Qemu-devel] [PATCH 06/12] 4byte address mode support added.

2015-12-16 Thread marcin . krzeminski
From: Marcin Krzeminski Signed-off-by: Marcin Krzeminski --- hw/block/m25p80.c | 31 --- 1 file changed, 28 insertions(+), 3 deletions(-) diff --git a/hw/block/m25p80.c b/hw/block/m25p80.c index 1a547ae..6d5d90d 100644 --- a/hw/block/m25p80.c +++ b/hw/block/m25p80.c

[Qemu-devel] [PATCH 00/12] Support for new flash devices/4bytes commands

2015-12-16 Thread marcin . krzeminski
From: Marcin Krzeminski Hello, This patch series adds support for flash devices: N25Q256A,N25Q512A,MX66U51235 and S25FL512S, with needed 4bytes commands. Additionally support for serial eeproms AT25128A/AT25256A has been added. Since this patchset has more functionality than first version, it is

[Qemu-devel] [PATCH 11/12] Support for mx66u51235 and s25fl512s

2015-12-16 Thread marcin . krzeminski
From: Marcin Krzeminski Signed-off-by: Pawel Lenkow --- hw/block/m25p80.c | 52 ++-- 1 file changed, 50 insertions(+), 2 deletions(-) diff --git a/hw/block/m25p80.c b/hw/block/m25p80.c index 25ec666..fadd6ec 100644 --- a/hw/block/m25p80.c +++ b/h

[Qemu-devel] [PATCH 09/12] Support for 6Bytes jdec.

2015-12-16 Thread marcin . krzeminski
From: Marcin Krzeminski Signed-off-by: Pawel Lenkow --- hw/block/m25p80.c | 61 +-- 1 file changed, 41 insertions(+), 20 deletions(-) diff --git a/hw/block/m25p80.c b/hw/block/m25p80.c index a41c2f1..6fc55a3 100644 --- a/hw/block/m25p80.c +++

Re: [Qemu-devel] [PATCH 00/12] Support for new flash devices/4bytes commands

2015-12-16 Thread Krzeminski, Marcin (Nokia - PL/Wroclaw)
Corrected Peters address ( it seem that maintainers file has wrong email address). > -Original Message- > From: marcin.krzemin...@nokia.com [mailto:marcin.krzemin...@nokia.com] > Sent: Wednesday, December 16, 2015 1:57 PM > To: qemu-devel@nongnu.org > Cc: Lenkow, Pawel (Nokia - PL/Wroclaw

[Qemu-devel] [PATCH 10/12] Support for quad commands.

2015-12-16 Thread marcin . krzeminski
From: Marcin Krzeminski Signed-off-by: Pawel Lenkow --- hw/block/m25p80.c | 38 -- 1 file changed, 36 insertions(+), 2 deletions(-) diff --git a/hw/block/m25p80.c b/hw/block/m25p80.c index 6fc55a3..25ec666 100644 --- a/hw/block/m25p80.c +++ b/hw/block/m25p80

Re: [Qemu-devel] [PATCH 25/74] pc: acpi: memhp: prepare context in SSDT for moving memhp DSDT code

2015-12-16 Thread Marcel Apfelbaum
On 12/10/2015 01:41 AM, Igor Mammedov wrote: Signed-off-by: Igor Mammedov --- hw/acpi/Makefile.objs | 2 +- hw/acpi/memory_hotplug_acpi_table.c | 40 + hw/i386/acpi-build.c| 3 +++ include/hw/acpi/memory_hotplug.h| 4 +

[Qemu-devel] [PATCH 2/2] ohci: clear pending SOF on suspend

2015-12-16 Thread Laurent Vivier
On overcommitted CPU, kernel can be so slow that an interrupt can be triggered by the device whereas the driver is not ready to receive it. This drives us into an infinite loop. On suspend, if a SOF interrupt is raised between the stop of the device processing and the change of the device internal

[Qemu-devel] [PATCH 1/2] ohci: delay first SOF interrupt

2015-12-16 Thread Laurent Vivier
On overcommitted CPU, kernel can be so slow that an interrupt can be triggered by the device whereas the driver is not ready to receive it. This drives us into an infinite loop. This does not happen on real hardware because real hardware never send interrupt immediately after the controller has be

[Qemu-devel] [PATCH 0/2] ohci: try to mimic real hardware command latency

2015-12-16 Thread Laurent Vivier
OHCI linux driver has some critical sections not protected against device interrupts. Because of real hardware latency, it is generally not a problem as interrupts cannot be triggered fast enough to happen during these critical sections. But theoretically, it can happen. And with QEMU used on an o

Re: [Qemu-devel] [PATCH v2 0/3] virtio: proposal to optimize accesses to VQs

2015-12-16 Thread Vincenzo Maffione
2015-12-16 12:37 GMT+01:00 Paolo Bonzini : > > > On 16/12/2015 11:39, Vincenzo Maffione wrote: >> No problems. >> >> I have some additional (orthogonal) curiosities: >> >> 1) Assuming "hw/virtio/dataplane/vring.c" is what I think it is (VQ >> data structures directly accessible in the host virtua

Re: [Qemu-devel] [PATCH 26/74] pc: acpi: memhp: move MHPD._STA method into SSDT

2015-12-16 Thread Igor Mammedov
On Wed, 16 Dec 2015 14:08:17 +0200 Marcel Apfelbaum wrote: > On 12/10/2015 01:41 AM, Igor Mammedov wrote: > > Signed-off-by: Igor Mammedov > > --- > > hw/acpi/memory_hotplug_acpi_table.c | 12 > > hw/i386/acpi-dsdt-mem-hotplug.dsl | 8 > > 2 files changed, 12 inserti

Re: [Qemu-devel] [PATCH 25/74] pc: acpi: memhp: prepare context in SSDT for moving memhp DSDT code

2015-12-16 Thread Igor Mammedov
On Wed, 16 Dec 2015 15:25:46 +0200 Marcel Apfelbaum wrote: > On 12/10/2015 01:41 AM, Igor Mammedov wrote: > > Signed-off-by: Igor Mammedov > > --- > > hw/acpi/Makefile.objs | 2 +- > > hw/acpi/memory_hotplug_acpi_table.c | 40 > > + > > hw/i38

Re: [Qemu-devel] [PATCH QEMU-XEN v7 5/8] xen: Switch uses of xc_map_foreign_{pages, bulk} to use libxenforeignmemory API.

2015-12-16 Thread Stefano Stabellini
On Wed, 16 Dec 2015, Ian Campbell wrote: > In Xen 4.7 we are refactoring parts libxenctrl into a number of > separate libraries which will provide backward and forward API and ABI > compatiblity. > > One such library will be libxenforeignmemory which provides access to > privileged foreign mapping

Re: [Qemu-devel] [RFC PATCH 00/40] Sneak peek of virtio and dataplane changes for 2.6

2015-12-16 Thread Christian Borntraeger
On 12/16/2015 01:54 PM, Christian Borntraeger wrote: > On 12/09/2015 09:35 PM, Paolo Bonzini wrote: >> >> >> On 26/11/2015 11:39, Paolo Bonzini wrote: >>> I would really prefer to get rid of vring.c as soon as the infrastructure >>> makes it possible---even if it's faster. We know what makes virtio

Re: [Qemu-devel] [PATCH QEMU-XEN v7 5/8] xen: Switch uses of xc_map_foreign_{pages, bulk} to use libxenforeignmemory API.

2015-12-16 Thread Ian Campbell
On Wed, 2015-12-16 at 14:39 +, Stefano Stabellini wrote: >  > Why not move the definition of xenforeignmemory_open and > xenforeignmemory_unmap here too? I failed to spot they were also the same. Will do. Ian.

  1   2   3   >