[Qemu-devel] [PATCH v2 1/2] memory: provide common macros for mtree_print_mr()

2016-12-21 Thread Peter Xu
mtree_print_mr() has some common codes. Generalize it. Reviewed-by: Marc-André Lureau Signed-off-by: Peter Xu --- memory.c | 34 +++--- 1 file changed, 15 insertions(+), 19 deletions(-) diff --git a/memory.c b/memory.c index 33110e9..5dcc2e1 100644 --- a/memory.c ++

[Qemu-devel] [PATCH v2 0/2] memory: extend "info mtree" with flat view dump

2016-12-21 Thread Peter Xu
v2: - fix a size error in patch 2 - add r-b for Marc-André in patch 1 Each address space has its own flatview. It's another way to observe memory info besides the default memory region hierachy, for example, if we want to know which memory region will handle the write to specific address, a flatvi

[Qemu-devel] [PATCH v2 2/2] memory: hmp: dump flat view for 'info mtree'

2016-12-21 Thread Peter Xu
Dumping flat view will be useful to debug the memory rendering logic, also it'll be much easier with it to know what memory region is handling what address range. Signed-off-by: Peter Xu --- memory.c | 31 +++ 1 file changed, 31 insertions(+) diff --git a/memory.c b/

[Qemu-devel] [PATCH v4 1/2] pcie_aer: Convert pcie_aer_init to Error

2016-12-21 Thread Cao jin
When user specify invalid value for property aer_log_max, device should fail to create, and report appropriate message. Signed-off-by: Cao jin Reviewed-by: Marcel Apfelbaum Acked-by: Dmitry Fleytman --- hw/net/e1000e.c| 2 +- hw/pci-bridge/ioh3420.c| 3 ++- hw

[Qemu-devel] [PATCH v4 2/2] pcie_aer: support configurable AER capa version

2016-12-21 Thread Cao jin
From: Dou Liyang Now, AER capa version is fixed to v2, if assigned device isn't v2, then this value will be inconsistent between guest and host Signed-off-by: Dou Liyang Signed-off-by: Cao jin Reviewed-by: Michael S. Tsirkin --- hw/net/e1000e.c| 3 ++- hw/pci-bridge/ioh34

[Qemu-devel] [PATCH v4 0/2] pcie_aer modification

2016-12-21 Thread Cao jin
Because these 2 patches target to the same function, so put them together. Cao's patch is simply a copy of v3; Dou's patch is taken from AER series, rebase on Cao's, it would be no trouble letting it in first. Both have been reviewed. v4 changelog: 1. simply put 2 reviewed patch into a series 2. r

Re: [Qemu-devel] [Qemu-ppc] [PATCHv3 for-2.9 0/6] HPT resizing for pseries guests (qemu part)

2016-12-21 Thread Andrea Bolognani
On Wed, 2016-12-21 at 15:52 +1100, David Gibson wrote: > > > I'm not sure if we need a knob.  I think in general enabling for > > > pseries-2.9 and later machine types is correct.  The difficulty is > > > that for HV guests, we can only enable it if the host kernel also has > > > support.  Explicit

Re: [Qemu-devel] [RFC 3/7] kvm: Move some kvm-stub.c code to stubs/kvm.c

2016-12-21 Thread David Hildenbrand
Am 20.12.2016 um 18:43 schrieb Eduardo Habkost: Move the kvm-stub.c code that doesn't depend on cpu.h or CONFIG_* defines to stubs/kvm.c. Notes about copyright, licensing, and authorship: * There was no copyright not on the original stubs/kvm.c file. * As include/sysemu/kvm.h and kvm-all.c are

[Qemu-devel] QEMU -smp paramater: Will multiplue threads and cores improve performance?

2016-12-21 Thread Bob Chen
Hi, -smp 16 -smp cores=4,threads=4,sockets=1 Which one has better performance? The scenario is guest VMs running on cloud server. -Bob

Re: [Qemu-devel] [RFC 4/7] kvm: Include kvm-stub.o only on CONFIG_SOFTMMU

2016-12-21 Thread David Hildenbrand
obj-$(CONFIG_LIBDECNUMBER) += libdecnumber/decContext.o obj-$(CONFIG_LIBDECNUMBER) += libdecnumber/decNumber.o @@ -138,6 +137,7 @@ obj-y += arch_init.o cpus.o monitor.o gdbstub.o balloon.o ioport.o numa.o obj-y += qtest.o bootdevice.o obj-y += hw/ obj-$(CONFIG_KVM) += kvm-all.o +obj-$(call

Re: [Qemu-devel] [PATCH RFC v2 0/4] block/qapi: refactor and optimize the qmp_query_blockstats()

2016-12-21 Thread Dou Liyang
Hi Stefan, At 12/20/2016 05:39 PM, Stefan Hajnoczi wrote: On Tue, Dec 20, 2016 at 12:32:40AM +0800, Fam Zheng wrote: On Mon, 12/19 15:02, Stefan Hajnoczi wrote: On Mon, Dec 19, 2016 at 04:51:22PM +0800, Dou Liyang wrote: These patches aim to refactor the qmp_query_blockstats() and improve the

Re: [Qemu-devel] [PATCH] intel_iommu: allow dynamic switch of IOMMU region

2016-12-21 Thread Peter Xu
On Wed, Dec 21, 2016 at 01:53:37PM +1100, David Gibson wrote: [...] > > Could you explain why here device address space has things to do with > > PCI BARs? I thought BARs are for CPU address space only (so that CPU > > can access PCI registers via MMIO manner), am I wrong? > > In short, yes. So

Re: [Qemu-devel] [PATCH 07/21] qcow2: add bitmaps extension

2016-12-21 Thread Vladimir Sementsov-Ogievskiy
16.12.2016 17:25, Max Reitz wrote: On 14.12.2016 13:23, Vladimir Sementsov-Ogievskiy wrote: 07.12.2016 21:25, Max Reitz wrote: On 22.11.2016 18:26, Vladimir Sementsov-Ogievskiy wrote: Add bitmap extension as specified in docs/specs/qcow2.txt. For now, just mirror extension header into Qcow2 st

Re: [Qemu-devel] [PATCH v6 03/17] qga/schema: improve guest-set-vcpus Returns: section

2016-12-21 Thread Markus Armbruster
Marc-André Lureau writes: > Itemize the possible return values of guest-set-vcpus. > > Signed-off-by: Marc-André Lureau > --- > qga/qapi-schema.json | 8 > 1 file changed, 4 insertions(+), 4 deletions(-) > > diff --git a/qga/qapi-schema.json b/qga/qapi-schema.json > index 94c03128fd..a

Re: [Qemu-devel] [PATCH 2/2] pcie: fix typo in comments

2016-12-21 Thread Marcel Apfelbaum
On 12/21/2016 08:29 AM, Cao jin wrote: ping No need for an r-b for this patch ,Michael or the qemu-trivial maintainer will take that. Thanks, Marce; On 11/11/2016 11:02 AM, Cao jin wrote: Signed-off-by: Cao jin --- hw/pci/pcie.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) dif

Re: [Qemu-devel] [PATCH v7 00/10] Convert msix_init() to error

2016-12-21 Thread Marcel Apfelbaum
On 12/21/2016 08:16 AM, Cao jin wrote: ping Misses the Acked-by: Marcel Apfelbaum from V6, if it helps. Thanks, Marcel On 11/14/2016 03:25 PM, Cao jin wrote: v7 changelog: 1. fix the segfaut bug in patch 2. So drop the all the R-b of it, please take a look, there is detailed descrip

Re: [Qemu-devel] [PATCH] smbios: stop ignoring command line options for TARGET_ARM

2016-12-21 Thread Igor Mammedov
On Fri, 16 Dec 2016 15:23:19 + Leif Lindholm wrote: > Commit c30e1565 ("smbios: implement smbios support for mach-virt") > enabled automatic generation of SMBIOS tables for TARGET_ARM, and > actually provides data for the "virt" machine. > > However, do_smbios_option() still had an #ifdef TA

Re: [Qemu-devel] qemu-2.8-rc4 is broken

2016-12-21 Thread Stefan Hajnoczi
On Wed, Dec 21, 2016 at 5:57 AM, Pavel Dovgalyuk wrote: >> -Original Message- >> From: Stefan Hajnoczi [mailto:stefa...@gmail.com] >> On Tue, Dec 20, 2016 at 11:10 AM, Pavel Dovgalyuk wrote: >> >> From: Stefan Hajnoczi [mailto:stefa...@gmail.com] >> >> On Tue, Dec 20, 2016 at 10:45:44AM +

Re: [Qemu-devel] [PATCH RFC v2 0/4] block/qapi: refactor and optimize the qmp_query_blockstats()

2016-12-21 Thread Stefan Hajnoczi
On Wed, Dec 21, 2016 at 05:13:39PM +0800, Dou Liyang wrote: > Hi Stefan, > > At 12/20/2016 05:39 PM, Stefan Hajnoczi wrote: > > On Tue, Dec 20, 2016 at 12:32:40AM +0800, Fam Zheng wrote: > > > On Mon, 12/19 15:02, Stefan Hajnoczi wrote: > > > > On Mon, Dec 19, 2016 at 04:51:22PM +0800, Dou Liyang

Re: [Qemu-devel] [RFC 0/7] Move accel, KVM, Xen, qtest files to accel/ subdir

2016-12-21 Thread Paolo Bonzini
On 20/12/2016 18:43, Eduardo Habkost wrote: > This moves the KVM and Xen files to the an accel/ subdir. > > Instead of moving the *-stubs.c file to accel/ as-is, I tried to > move most of the stub code to libqemustub.a. This way the obj-y > logic for accel/ is simpler: obj-y includes accel/ only

Re: [Qemu-devel] QEMU -smp paramater: Will multiplue threads and cores improve performance?

2016-12-21 Thread Stefan Hajnoczi
On Wed, Dec 21, 2016 at 04:44:08PM +0800, Bob Chen wrote: > -smp 16 > > -smp cores=4,threads=4,sockets=1 > > > Which one has better performance? The scenario is guest VMs running on > cloud server. It's more complicated than that. The CPU topology (cores, threads, sockets) can be used by guest

Re: [Qemu-devel] QEMU -smp paramater: Will multiplue threads and cores improve performance?

2016-12-21 Thread Daniel P. Berrange
On Wed, Dec 21, 2016 at 11:23:42AM +, Stefan Hajnoczi wrote: > On Wed, Dec 21, 2016 at 04:44:08PM +0800, Bob Chen wrote: > > -smp 16 > > > > -smp cores=4,threads=4,sockets=1 > > > > > > Which one has better performance? The scenario is guest VMs running on > > cloud server. > > It's more co

Re: [Qemu-devel] [PATCH for-2.9 05/10] memhp: consolidate scattered MHPD device declaration

2016-12-21 Thread Marcel Apfelbaum
On 12/20/2016 06:34 PM, Igor Mammedov wrote: On Tue, 20 Dec 2016 13:00:35 +0200 Marcel Apfelbaum wrote: On 12/06/2016 01:32 AM, Igor Mammedov wrote: since static and dynamic parts of memory MHPD device are now in the same table (DSDT), there is no point keeping them scattered across the table

Re: [Qemu-devel] [Qemu-block] [PATCH 4/4] block: Add VFIO based NVMe driver

2016-12-21 Thread Stefan Hajnoczi
On Wed, Dec 21, 2016 at 12:31:39AM +0800, Fam Zheng wrote: > This is a new protocol driver that exclusively opens a host NVMe > controller through VFIO. It achieves better latency than linux-aio. This is an interesting block driver to have for performance comparisons. Definitely something that is

Re: [Qemu-devel] [PATCH for-2.9 06/10] memhp: merge build_memory_devices() into build_memory_hotplug_aml()

2016-12-21 Thread Marcel Apfelbaum
On 12/06/2016 01:32 AM, Igor Mammedov wrote: It consolidates memory hotplug AML in one place within DSDT Signed-off-by: Igor Mammedov --- include/hw/acpi/memory_hotplug.h | 2 -- hw/acpi/memory_hotplug.c | 14 - hw/i386/acpi-build.c | 61 ++-

[Qemu-devel] QXL VGA on ppc64?

2016-12-21 Thread Michal Suchánek
Hello, I heard this configuration is not working very well. However, just enabling QXL in configuration and spapr.c I get a kvm emulation error. So what issues does the configuration have and what is needed to enable it? I am interested in resizing guest display to match client screen size. Th

Re: [Qemu-devel] [PATCH for-2.9 07/10] memhp: move GPE handler_E03 into build_memory_hotplug_aml()

2016-12-21 Thread Marcel Apfelbaum
On 12/06/2016 01:32 AM, Igor Mammedov wrote: From this patch all the memory hotplug related AML bits are consolidated in one place within DSTD. Follow up patches will utilize that to simplify memory hotplug related C/AML code. I didn't quite understand what you mean... Signed-off-by: Igor M

Re: [Qemu-devel] [PATCH for-2.9 08/10] memhp: move memory hotplug only defines to memory_hotplug.c

2016-12-21 Thread Marcel Apfelbaum
On 12/06/2016 01:32 AM, Igor Mammedov wrote: Move defines used locally only by memory_hotplug.c into it from header files. Signed-off-by: Igor Mammedov --- include/hw/acpi/memory_hotplug.h | 3 --- include/hw/acpi/pc-hotplug.h | 22 -- hw/acpi/memory_hotplug.c

Re: [Qemu-devel] [PATCH] smbios: stop ignoring command line options for TARGET_ARM

2016-12-21 Thread Leif Lindholm
On Wed, Dec 21, 2016 at 11:51:02AM +0100, Igor Mammedov wrote: > On Fri, 16 Dec 2016 15:23:19 + > > Verified on ARM mach-virt with UEFI shell "smbiosview" command and QEMU > > command line parameter -smbios type=0,version=foobar. > > > > arch_init.c| 6 +++--- > > include/hw/s

Re: [Qemu-devel] Strange/wrong behavior with iSCSI Tape devices in QEMU 2.8.0-rc4

2016-12-21 Thread Holger Schranz
Hi, sorry for an additional mail. Attached is the iscsiadm information which Fam requested. Best regards Holger Am 21.12.2016 um 12:51 schrieb Holger Schranz: Hi Fam, John, meanwhile i have installed the 2.8.0 from the official wiki.qemu.org (tarball says rc4 ??). About dmesg, I have attac

Re: [Qemu-devel] [PATCH for-2.9 06/10] memhp: merge build_memory_devices() into build_memory_hotplug_aml()

2016-12-21 Thread Igor Mammedov
On Wed, 21 Dec 2016 14:10:33 +0200 Marcel Apfelbaum wrote: > On 12/06/2016 01:32 AM, Igor Mammedov wrote: > > It consolidates memory hotplug AML in one place within DSDT > > > > Signed-off-by: Igor Mammedov > > --- > > include/hw/acpi/memory_hotplug.h | 2 -- > > hw/acpi/memory_hotplug.c

Re: [Qemu-devel] [RFC 0/7] Move accel, KVM, Xen, qtest files to accel/ subdir

2016-12-21 Thread Eduardo Habkost
On Wed, Dec 21, 2016 at 12:21:44PM +0100, Paolo Bonzini wrote: > > > On 20/12/2016 18:43, Eduardo Habkost wrote: > > This moves the KVM and Xen files to the an accel/ subdir. > > > > Instead of moving the *-stubs.c file to accel/ as-is, I tried to > > move most of the stub code to libqemustub.a.

[Qemu-devel] [PATCHv5] multiboot: copy the cmdline verbatim, unescape module strings

2016-12-21 Thread Vlad Lungu
get_opt_value() truncates the value at the first comma Use memcpy() instead Unescape the module filename and parameters with get_opt_value() before calling mb_add_cmdline() Signed-off-by: Vlad Lungu --- hw/i386/multiboot.c | 21 +++-- 1 file changed, 11 insertions(+), 10 deletion

Re: [Qemu-devel] [PATCHv4] multiboot: copy the cmdline verbatim, unescape module strings

2016-12-21 Thread Vlad Lungu
Resubmitted with errors fixed. Regards, Vlad On 12/21/2016 01:01 AM, no-re...@patchew.org wrote: > Hi, > > Your series seems to have some coding style problems. See output below for > more information: > > Subject: [Qemu-devel] [PATCHv4] multiboot: copy the cmdline verbatim, > unescape module

Re: [Qemu-devel] [PATCH for-2.9 07/10] memhp: move GPE handler_E03 into build_memory_hotplug_aml()

2016-12-21 Thread Igor Mammedov
On Wed, 21 Dec 2016 14:31:45 +0200 Marcel Apfelbaum wrote: > On 12/06/2016 01:32 AM, Igor Mammedov wrote: > > From this patch all the memory hotplug related AML > > bits are consolidated in one place within DSTD. > > Follow up patches will utilize that to simplify > > memory hotplug related C/AML

Re: [Qemu-devel] [RFC 0/7] Move accel, KVM, Xen, qtest files to accel/ subdir

2016-12-21 Thread Paolo Bonzini
On 21/12/2016 14:14, Eduardo Habkost wrote: > On Wed, Dec 21, 2016 at 12:21:44PM +0100, Paolo Bonzini wrote: >> >> >> On 20/12/2016 18:43, Eduardo Habkost wrote: >>> This moves the KVM and Xen files to the an accel/ subdir. >>> >>> Instead of moving the *-stubs.c file to accel/ as-is, I tried to

Re: [Qemu-devel] [PATCH] smbios: stop ignoring command line options for TARGET_ARM

2016-12-21 Thread Igor Mammedov
On Wed, 21 Dec 2016 12:35:09 + Leif Lindholm wrote: > On Wed, Dec 21, 2016 at 11:51:02AM +0100, Igor Mammedov wrote: > > On Fri, 16 Dec 2016 15:23:19 + > > > Verified on ARM mach-virt with UEFI shell "smbiosview" command and QEMU > > > command line parameter -smbios type=0,version=fooba

Re: [Qemu-devel] [ANNOUNCE] QEMU 2.8.0 is now available

2016-12-21 Thread Michael Roth
Quoting Holger Schranz (2016-12-20 23:18:00) > Hi Michael, > > could it be, that the link to qemu-2.8.0.tar.bz2 is linked to the > qemu-2.8.0-rc4.tar.bz2? The link for signature seems it is correct. Argh, yes only one link was updated. Both links are correct now. Thanks! > > Best regards > >

[Qemu-devel] [PATCH 05/10] aio-posix: split aio_dispatch_handlers out of aio_dispatch

2016-12-21 Thread Paolo Bonzini
This simplifies the handling of dispatch_fds. Signed-off-by: Paolo Bonzini --- aio-posix.c | 43 +-- 1 file changed, 25 insertions(+), 18 deletions(-) diff --git a/aio-posix.c b/aio-posix.c index 1585571..25198d9 100644 --- a/aio-posix.c +++ b/aio-posix.c

[Qemu-devel] [PATCH 03/10] aio: make ctx->list_lock a QemuLockCnt, subsuming ctx->walking_bh

2016-12-21 Thread Paolo Bonzini
This will make it possible to walk the list of bottom halves without holding the AioContext lock---and in turn to call bottom half handlers without holding the lock. Reviewed-by: Stefan Hajnoczi Signed-off-by: Paolo Bonzini --- async.c | 35 --- inclu

[Qemu-devel] [PATCH 01/10] aio: rename bh_lock to list_lock

2016-12-21 Thread Paolo Bonzini
This will be used for AioHandlers too. There is going to be little or no contention, so it is better to reuse the same lock. Reviewed-by: Stefan Hajnoczi Signed-off-by: Paolo Bonzini --- async.c | 20 ++-- include/block/aio.h | 2 +- 2 files changed, 11 insertions(

[Qemu-devel] [PATCH v2 00/10] aio_context_acquire/release pushdown, part 1

2016-12-21 Thread Paolo Bonzini
This is the first step of pushing down the AioContext lock. Bottom halves are already protected by their own lock, use it also for walking_bh and for the handlers list (including walking_handlers). The (lock, walking_foo) pair is wrapped into the QemuLockCnt primitive. Paolo v1->v2: reb

[Qemu-devel] [PATCH 10/10] async: optimize aio_bh_poll

2016-12-21 Thread Paolo Bonzini
Avoid entering the slow path of qemu_lockcnt_dec_and_lock if no bottom half has to be deleted. Reviewed-by: Stefan Hajnoczi Signed-off-by: Paolo Bonzini --- async.c | 10 +- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/async.c b/async.c index 2305e11..0d218ab 100644 ---

Re: [Qemu-devel] [Qemu-block] [PATCH 4/4] block: Add VFIO based NVMe driver

2016-12-21 Thread Fam Zheng
On Wed, 12/21 11:59, Stefan Hajnoczi wrote: > On Wed, Dec 21, 2016 at 12:31:39AM +0800, Fam Zheng wrote: > > This is a new protocol driver that exclusively opens a host NVMe > > controller through VFIO. It achieves better latency than linux-aio. > > This is an interesting block driver to have for

[Qemu-devel] [PATCH 02/10] qemu-thread: introduce QemuLockCnt

2016-12-21 Thread Paolo Bonzini
A QemuLockCnt comprises a counter and a mutex, with primitives to increment and decrement the counter, and to take and release the mutex. It can be used to do lock-free visits to a data structure whenever mutexes would be too heavy-weight and the critical section is too long for RCU. This could b

[Qemu-devel] [PATCH 06/10] aio: tweak walking in dispatch phase

2016-12-21 Thread Paolo Bonzini
Preparing for the following patch, use QLIST_FOREACH_SAFE and modify the placement of walking_handlers increment/decrement. Reviewed-by: Stefan Hajnoczi Signed-off-by: Paolo Bonzini --- aio-posix.c | 26 -- aio-win32.c | 26 -- 2 files changed, 24

[Qemu-devel] [PATCH 09/10] aio: document locking

2016-12-21 Thread Paolo Bonzini
Reviewed-by: Stefan Hajnoczi Signed-off-by: Paolo Bonzini --- docs/multiple-iothreads.txt | 13 + include/block/aio.h | 32 2 files changed, 21 insertions(+), 24 deletions(-) diff --git a/docs/multiple-iothreads.txt b/docs/multiple-iothreads.

Re: [Qemu-devel] [PATCH for-2.9 v3 0/5] Sheepdog cleanups

2016-12-21 Thread Paolo Bonzini
On 29/11/2016 12:32, Paolo Bonzini wrote: > Cleaning up the code and removing duplication makes it simpler to > later adapt it for the multiqueue work. > > Tested against sheepdog 1.0. I also tested taking snapshots and reverting > to older snapshots, but the latter only worked with "dog vdi ro

[Qemu-devel] [PATCH 08/10] aio-win32: remove walking_handlers, protecting AioHandler list with list_lock

2016-12-21 Thread Paolo Bonzini
Reviewed-by: Stefan Hajnoczi Signed-off-by: Paolo Bonzini --- aio-win32.c | 73 +++-- 1 file changed, 47 insertions(+), 26 deletions(-) diff --git a/aio-win32.c b/aio-win32.c index 1ad459d..900524c 100644 --- a/aio-win32.c +++ b/aio-win32.

[Qemu-devel] [PATCH 04/10] qemu-thread: optimize QemuLockCnt with futexes on Linux

2016-12-21 Thread Paolo Bonzini
This is complex, but I think it is reasonably documented in the source. Signed-off-by: Paolo Bonzini --- docs/lockcnt.txt | 9 +- include/qemu/futex.h | 36 ++ include/qemu/thread.h| 2 + util/lockcnt.c | 282 +++ uti

Re: [Qemu-devel] [RFC 0/7] Move accel, KVM, Xen, qtest files to accel/ subdir

2016-12-21 Thread Eduardo Habkost
On Wed, Dec 21, 2016 at 02:47:54PM +0100, Paolo Bonzini wrote: > > > On 21/12/2016 14:14, Eduardo Habkost wrote: > > On Wed, Dec 21, 2016 at 12:21:44PM +0100, Paolo Bonzini wrote: > >> > >> > >> On 20/12/2016 18:43, Eduardo Habkost wrote: > >>> This moves the KVM and Xen files to the an accel/ su

[Qemu-devel] [PATCH 07/10] aio-posix: remove walking_handlers, protecting AioHandler list with list_lock

2016-12-21 Thread Paolo Bonzini
Signed-off-by: Paolo Bonzini --- aio-posix.c | 64 - 1 file changed, 38 insertions(+), 26 deletions(-) diff --git a/aio-posix.c b/aio-posix.c index f83b7af..9b13182 100644 --- a/aio-posix.c +++ b/aio-posix.c @@ -16,7 +16,7 @@ #include

Re: [Qemu-devel] [PATCH for-2.9 V4 2/2] Add a new qmp command to do checkpoint, get replication error

2016-12-21 Thread Eric Blake
On 12/21/2016 12:56 AM, Zhang Chen wrote: >>> +void qmp_xen_get_replication_error(Error **errp) >>> +{ >>> +replication_get_error_all(errp); >>> +} >> Is this trying to cause a replication error, or is it trying to collect >> status on whether an error has occurred? The name 'get

[Qemu-devel] [PULL v1 0/7] Merge qcrypto 2016/12/21

2016-12-21 Thread Daniel P. Berrange
The following changes since commit 82ecffa8c050bf5bbc13329e9b65eac1caa5b55c: Open 2.9 development tree (2016-12-20 16:20:16 +) are available in the git repository at: git://github.com/berrange/qemu tags/pull-qcrypto-2016-12-21-1 for you to fetch changes up to d1c7d71dcec794de02838cbb96a

[Qemu-devel] [PULL v1 7/7] crypto: add HMAC algorithms testcases

2016-12-21 Thread Daniel P. Berrange
From: "Longpeng(Mike)" This patch add HMAC algorithms testcases Signed-off-by: Longpeng(Mike) Signed-off-by: Daniel P. Berrange --- tests/Makefile.include | 2 + tests/test-crypto-hmac.c | 266 +++ 2 files changed, 268 insertions(+) create mode

[Qemu-devel] [PULL v1 5/7] crypto: support HMAC algorithms based on glib

2016-12-21 Thread Daniel P. Berrange
From: "Longpeng(Mike)" This patch add glib-backed HMAC algorithms support Signed-off-by: Longpeng(Mike) Signed-off-by: Daniel P. Berrange --- crypto/hmac-glib.c | 122 + 1 file changed, 122 insertions(+) diff --git a/crypto/hmac-glib.c b/cr

[Qemu-devel] [PULL v1 1/7] cipher: fix leak on initialization error

2016-12-21 Thread Daniel P. Berrange
From: Marc-André Lureau On error path, ctx may be leaked. Assign ctx earlier, and call qcrypto_cipher_free() on error. Spotted thanks to ASAN. Signed-off-by: Marc-André Lureau Signed-off-by: Daniel P. Berrange --- crypto/cipher-nettle.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions

[Qemu-devel] [PULL v1 2/7] crypto: add 3des-ede support when using libgcrypt/nettle

2016-12-21 Thread Daniel P. Berrange
From: "Longpeng(Mike)" Libgcrypt and nettle support 3des-ede, so this patch add 3des-ede support when using libgcrypt or nettle. Reviewed-by: Gonglei Signed-off-by: Longpeng(Mike) Signed-off-by: Daniel P. Berrange --- crypto/cipher-gcrypt.c | 6 +++ crypto/cipher-nettle.c | 37 +++

[Qemu-devel] [PULL v1 4/7] crypto: support HMAC algorithms based on libgcrypt

2016-12-21 Thread Daniel P. Berrange
From: "Longpeng(Mike)" This patch add HMAC algorithms based on libgcrypt support Signed-off-by: Longpeng(Mike) Signed-off-by: Daniel P. Berrange --- crypto/hmac-gcrypt.c | 111 ++- 1 file changed, 109 insertions(+), 2 deletions(-) diff --git a/

[Qemu-devel] [PULL v1 3/7] crypto: add HMAC algorithms framework

2016-12-21 Thread Daniel P. Berrange
From: "Longpeng(Mike)" This patch introduce HMAC algorithms framework. Signed-off-by: Longpeng(Mike) Signed-off-by: Daniel P. Berrange --- crypto/Makefile.objs | 4 ++ crypto/hmac-gcrypt.c | 45 ++ crypto/hmac-glib.c | 44 ++ crypto/hmac-nettle.c | 45 ++

[Qemu-devel] [PULL v1 6/7] crypto: support HMAC algorithms based on nettle

2016-12-21 Thread Daniel P. Berrange
From: "Longpeng(Mike)" This patch add nettle-backed HMAC algorithms support Signed-off-by: Longpeng(Mike) Signed-off-by: Daniel P. Berrange --- crypto/hmac-nettle.c | 136 +-- 1 file changed, 133 insertions(+), 3 deletions(-) diff --git a/crypt

[Qemu-devel] [PATCH 14/24] block: add bdrv_can_store_new_dirty_bitmap

2016-12-21 Thread Vladimir Sementsov-Ogievskiy
This will be needed to check some restrictions before making bitmap persistent in qmp-block-dirty-bitmap-add (this functionality will be added by future patch) Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Max Reitz --- block.c | 22 ++ include/b

[Qemu-devel] [PATCH 23/24] qcow2: add .bdrv_remove_persistent_dirty_bitmap

2016-12-21 Thread Vladimir Sementsov-Ogievskiy
Realize .bdrv_remove_persistent_dirty_bitmap interface. Signed-off-by: Vladimir Sementsov-Ogievskiy --- block/qcow2-bitmap.c | 40 block/qcow2.c| 1 + block/qcow2.h| 3 +++ 3 files changed, 44 insertions(+) diff --git a/block/qcow2-bitm

[Qemu-devel] [PATCH 12/24] block/dirty-bitmap: add bdrv_dirty_bitmap_next()

2016-12-21 Thread Vladimir Sementsov-Ogievskiy
Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Max Reitz --- block/dirty-bitmap.c | 7 +++ include/block/dirty-bitmap.h | 3 +++ 2 files changed, 10 insertions(+) diff --git a/block/dirty-bitmap.c b/block/dirty-bitmap.c index 4d026df..fe34d48 100644 --- a/block/dirty-bitma

[Qemu-devel] [PATCH 04/24] tests: add hbitmap iter test

2016-12-21 Thread Vladimir Sementsov-Ogievskiy
Test that hbitmap iter is resistant to bitmap resetting. Signed-off-by: Vladimir Sementsov-Ogievskiy Signed-off-by: Denis V. Lunev Reviewed-by: Max Reitz Reviewed-by: John Snow --- tests/test-hbitmap.c | 19 +++ 1 file changed, 19 insertions(+) diff --git a/tests/test-hbitmap

[Qemu-devel] [PATCH 05/24] block: fix bdrv_dirty_bitmap_granularity signature

2016-12-21 Thread Vladimir Sementsov-Ogievskiy
Make getter signature const-correct. This allows other functions with const dirty bitmap parameter use bdrv_dirty_bitmap_granularity(). Reviewed-by: Eric Blake Reviewed-by: John Snow Reviewed-by: Kevin Wolf Signed-off-by: Vladimir Sementsov-Ogievskiy --- block/dirty-bitmap.c | 2 +- i

[Qemu-devel] [PATCH 15/24] qcow2: add .bdrv_can_store_new_dirty_bitmap

2016-12-21 Thread Vladimir Sementsov-Ogievskiy
Realize .bdrv_can_store_new_dirty_bitmap interface. Signed-off-by: Vladimir Sementsov-Ogievskiy --- block/qcow2-bitmap.c | 40 block/qcow2.c| 1 + block/qcow2.h| 4 3 files changed, 45 insertions(+) diff --git a/block/qcow2-bitmap.

[Qemu-devel] [PATCH 08/24] block: introduce auto-loading bitmaps

2016-12-21 Thread Vladimir Sementsov-Ogievskiy
Auto loading bitmaps are bitmaps stored in the disk image, which should be loaded when the image is opened and become BdrvDirtyBitmaps for the corresponding drive. Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: John Snow --- block.c | 14 ++ include/block

[Qemu-devel] [PATCH 11/24] block: introduce persistent dirty bitmaps

2016-12-21 Thread Vladimir Sementsov-Ogievskiy
New field BdrvDirtyBitmap.persistent means, that bitmap should be saved on bdrv_close, using format driver. Format driver should maintain bitmap storing. Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Max Reitz --- block.c | 32 bl

[Qemu-devel] [PATCH 06/24] block/dirty-bitmap: add deserialize_ones func

2016-12-21 Thread Vladimir Sementsov-Ogievskiy
Add bdrv_dirty_bitmap_deserialize_ones() function, which is needed for qcow2 bitmap loading, to handle unallocated bitmap parts, marked as all-ones. Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Kevin Wolf Reviewed-by: John Snow --- block/dirty-bitmap.c | 7 +++ include

[Qemu-devel] [PATCH 19/24] iotests: test qcow2 persistent dirty bitmap

2016-12-21 Thread Vladimir Sementsov-Ogievskiy
Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Max Reitz --- tests/qemu-iotests/165 | 89 ++ tests/qemu-iotests/165.out | 5 +++ tests/qemu-iotests/group | 1 + 3 files changed, 95 insertions(+) create mode 100755 tests/qemu-iotests/

[Qemu-devel] [PATCH 21/24] qcow2-bitmap: refcounts

2016-12-21 Thread Vladimir Sementsov-Ogievskiy
Calculate refcounts for qcow2 bitmaps. It is needed for qcow2's qemu-img check implementation. Signed-off-by: Vladimir Sementsov-Ogievskiy --- block/qcow2-bitmap.c | 80 ++ block/qcow2-refcount.c | 6 block/qcow2.h | 3 ++ 3 files

[Qemu-devel] [PATCH 07/24] qcow2: add bitmaps extension

2016-12-21 Thread Vladimir Sementsov-Ogievskiy
Add bitmap extension as specified in docs/specs/qcow2.txt. For now, just mirror extension header into Qcow2 state and check constraints. For now, disable image resize if it has bitmaps. It will be fixed later. Signed-off-by: Vladimir Sementsov-Ogievskiy --- block/qcow2.c | 119 +

[Qemu-devel] [PATCH 10/24] block/dirty-bitmap: add autoload field to BdrvDirtyBitmap

2016-12-21 Thread Vladimir Sementsov-Ogievskiy
Mirror AUTO flag from Qcow2 bitmap in BdrvDirtyBitmap. This will be needed in future, to save this flag back to Qcow2 for persistent bitmaps. Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Max Reitz --- block/dirty-bitmap.c | 16 block/qcow2-bitmap.c |

[Qemu-devel] [PATCH 03/24] hbitmap: improve dirty iter

2016-12-21 Thread Vladimir Sementsov-Ogievskiy
Make dirty iter resistant to resetting bits in corresponding HBitmap. Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Max Reitz Reviewed-by: John Snow --- include/qemu/hbitmap.h | 26 -- util/hbitmap.c | 23 ++- 2 files changed, 26 i

[Qemu-devel] [PATCH 16/24] qmp: add persistent flag to block-dirty-bitmap-add

2016-12-21 Thread Vladimir Sementsov-Ogievskiy
Add optional 'persistent' flag to qmp command block-dirty-bitmap-add. Default is false. Signed-off-by: Vladimir Sementsov-Ogievskiy Signed-off-by: Denis V. Lunev Reviewed-by: Max Reitz --- blockdev.c| 18 +- docs/qmp-commands.txt | 3 +++ qapi/block-core.json | 7

[Qemu-devel] [PATCH 01/24] specs/qcow2: fix bitmap granularity qemu-specific note

2016-12-21 Thread Vladimir Sementsov-Ogievskiy
Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: John Snow --- docs/specs/qcow2.txt | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/docs/specs/qcow2.txt b/docs/specs/qcow2.txt index 80cdfd0..dda53dd 100644 --- a/docs/specs/qcow2.txt +++ b/docs/specs/qcow2.txt @@ -47

[Qemu-devel] [PATCH 02/24] specs/qcow2: do not use wording 'bitmap header'

2016-12-21 Thread Vladimir Sementsov-Ogievskiy
A bitmap directory entry is sometimes called a 'bitmap header'. This patch leaves only one name - 'bitmap directory entry'. The name 'bitmap header' creates misunderstandings with 'qcow2 header' and 'qcow2 bitmap header extension' (which is extension of qcow2 header) Signed-off-by: Vladimir Sement

Re: [Qemu-devel] [PATCH 18/24] qmp: add x-debug-block-dirty-bitmap-sha256

2016-12-21 Thread Vladimir Sementsov-Ogievskiy
21.12.2016 17:54, Vladimir Sementsov-Ogievskiy wrote: Signed-off-by: Vladimir Sementsov-Ogievskiy --- block/dirty-bitmap.c | 5 + blockdev.c | 29 + include/block/dirty-bitmap.h | 2 ++ include/qemu/hbitmap.h | 8

[Qemu-devel] [PATCH 18/24] qmp: add x-debug-block-dirty-bitmap-sha256

2016-12-21 Thread Vladimir Sementsov-Ogievskiy
Signed-off-by: Vladimir Sementsov-Ogievskiy --- block/dirty-bitmap.c | 5 + blockdev.c | 29 + include/block/dirty-bitmap.h | 2 ++ include/qemu/hbitmap.h | 8 qapi/block-core.json | 27 +++

[Qemu-devel] [PATCH 13/24] qcow2: add .bdrv_store_persistent_dirty_bitmaps()

2016-12-21 Thread Vladimir Sementsov-Ogievskiy
Realize block bitmap storing interface, to allow qcow2 images store persistent bitmaps. Signed-off-by: Vladimir Sementsov-Ogievskiy --- block/qcow2-bitmap.c | 509 +-- block/qcow2.c| 1 + block/qcow2.h| 1 + 3 files changed, 496

[Qemu-devel] [PATCH 20/24] qcow2-refcount: rename inc_refcounts() and make it public

2016-12-21 Thread Vladimir Sementsov-Ogievskiy
This is needed for the following patch, which will introduce refcounts checking for qcow2 bitmaps. Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Max Reitz --- block/qcow2-refcount.c | 53 ++ block/qcow2.h | 4 2 files cha

[Qemu-devel] [PATCH 17/24] qmp: add autoload parameter to block-dirty-bitmap-add

2016-12-21 Thread Vladimir Sementsov-Ogievskiy
Optional. Default is false. Signed-off-by: Vladimir Sementsov-Ogievskiy Signed-off-by: Denis V. Lunev Reviewed-by: Max Reitz --- blockdev.c| 18 -- docs/qmp-commands.txt | 4 qapi/block-core.json | 6 +- 3 files changed, 25 insertions(+), 3 deletions(-)

[Qemu-devel] [PATCH 24/24] qcow2-bitmap: cache bitmap list in BDRVQcow2State

2016-12-21 Thread Vladimir Sementsov-Ogievskiy
Do not reload bitmap list every time it is needed. Signed-off-by: Vladimir Sementsov-Ogievskiy --- block/qcow2-bitmap.c | 121 ++- block/qcow2.c| 2 + block/qcow2.h| 4 ++ 3 files changed, 87 insertions(+), 40 deletions(-) diff

[Qemu-devel] [PATCH 22/24] block/dirty-bitmap: deep release dirty bitmaps

2016-12-21 Thread Vladimir Sementsov-Ogievskiy
Remove persistent bitmap from its storage on bdrv_release_dirty_bitmap. Signed-off-by: Vladimir Sementsov-Ogievskiy --- block/dirty-bitmap.c | 21 ++--- include/block/block_int.h | 3 +++ 2 files changed, 21 insertions(+), 3 deletions(-) diff --git a/block/dirty-bitmap.c b

[Qemu-devel] [PATCH v10 00/24] qcow2: persistent dirty bitmaps

2016-12-21 Thread Vladimir Sementsov-Ogievskiy
Hi all! There is a new update of qcow2-bitmap series - v10. web: https://src.openvz.org/users/vsementsov/repos/qemu/browse?at=qcow2-bitmap-v10 git: https://src.openvz.org/scm/~vsementsov/qemu.git (tag qcow2-bitmap-v10) v10: 07: rm John's r-b not add Max's r-b fix subject s/dirty bitmap

[Qemu-devel] [PATCH 09/24] qcow2: add .bdrv_load_autoloading_dirty_bitmaps

2016-12-21 Thread Vladimir Sementsov-Ogievskiy
Auto loading bitmaps are bitmaps in Qcow2, with the AUTO flag set. They are loaded when the image is opened and become BdrvDirtyBitmaps for the corresponding drive. Extra data in bitmaps is not supported for now. Signed-off-by: Vladimir Sementsov-Ogievskiy --- block/Makefile.objs | 2 +- blo

[Qemu-devel] ping Re: [PATCH v4 00/17] Dirty bitmaps postcopy migration

2016-12-21 Thread Vladimir Sementsov-Ogievskiy
Ping Hi all! What about this? 22.11.2016 20:54, Vladimir Sementsov-Ogievskiy wrote: Hi all! There is a new version of dirty bitmap postcopy migration series. v4: clone: tag postcopy-v4 from https://src.openvz.org/scm/~vsementsov/qemu.git online: https://src.openvz.org/users/vsementsov/repos/

[Qemu-devel] checkpatch.pl false positive (was Re: [PATCH v4 0/7] q35: add negotiable broadcast SMI)

2016-12-21 Thread Eduardo Habkost
On Tue, Dec 20, 2016 at 03:01:17PM -0800, no-re...@patchew.org wrote: [...] > Checking PATCH 4/7: hw/i386/pc: introduce 2.9 machine types with 0x20 fw_cfg > file slots... > ERROR: Macros with multiple statements should be enclosed in a do - while loop > #126: FILE: include/hw/compat.h:4: > +#defin

Re: [Qemu-devel] [PATCH v10 00/24] qcow2: persistent dirty bitmaps

2016-12-21 Thread no-reply
Hi, Your series failed automatic build test. Please find the testing commands and their output below. If you have docker installed, you can probably reproduce it locally. Type: series Message-id: 1482332102-131788-1-git-send-email-vsement...@virtuozzo.com Subject: [Qemu-devel] [PATCH v10 00/24] q

Re: [Qemu-devel] [RFC 0/7] Move accel, KVM, Xen, qtest files to accel/ subdir

2016-12-21 Thread Paolo Bonzini
On 21/12/2016 15:15, Eduardo Habkost wrote: >> >> ifeq ($(CONFIG_SOFTMMU),y) >> obj-$(CONFIG_KVM) += kvm-all.c >> obj-$(call lnot, $(CONFIG_KVM)) += kvm-stub.c >> endif >> >> similar to what is done already in Makefile.objs? > I assume you mean: > > ifeq ($(CONFIG_SOFTMMU),y) > obj-$(CONFIG_KV

Re: [Qemu-devel] [PATCH 3/4] util: Add VFIO helper library

2016-12-21 Thread Paolo Bonzini
On 20/12/2016 17:31, Fam Zheng wrote: > +hbitmap_iter_init(&iter, s->free_chunks, 1); > +if (contiguous) { > +while (true) { > +bool satisfy = true; > +next = hbitmap_iter_next(&iter); > +if (next < 0) { > +return NULL; > +

Re: [Qemu-devel] [PATCH 3/4] util: Add VFIO helper library

2016-12-21 Thread Fam Zheng
On Wed, 12/21 16:46, Paolo Bonzini wrote: > > > On 20/12/2016 17:31, Fam Zheng wrote: > > +hbitmap_iter_init(&iter, s->free_chunks, 1); > > +if (contiguous) { > > +while (true) { > > +bool satisfy = true; > > +next = hbitmap_iter_next(&iter); > > +

Re: [Qemu-devel] [PATCH v10 00/24] qcow2: persistent dirty bitmaps

2016-12-21 Thread Vladimir Sementsov-Ogievskiy
Last patch breaks it. Fix will look like diff --git a/block/qcow2-bitmap.c b/block/qcow2-bitmap.c index b9f3d62..dd987a1 100644 --- a/block/qcow2-bitmap.c +++ b/block/qcow2-bitmap.c @@ -79,7 +79,7 @@ typedef struct Qcow2BitmapTable { } Qcow2BitmapTable; typedef QSIMPLEQ_HEAD(Qcow2BitmapTableLi

Re: [Qemu-devel] [PATCH v6 05/17] docs: add master qapi texi files

2016-12-21 Thread Markus Armbruster
Marc-André Lureau writes: > The qapi2texi script generates a file to be included in a texi file. Add > "QEMU QMP Reference Manual" and "QEMU Guest Agent Protocol Reference" > master texi files. > > Signed-off-by: Marc-André Lureau This is v5 (which got my R-by) with a "Documentation syntax" sec

Re: [Qemu-devel] [PATCH 20/67] ahci: clear aiocb in ncq_cb

2016-12-21 Thread Michael Roth
Quoting John Snow (2016-12-19 17:07:17) > Hi, some more considerations: > > > e7bd708ec85e40fd51569bb90c52d6613ffd8f45 > atapi: classify read_cd as conditionally returning data > > This fixes problems with certain operating systems being unable to read > from the CDROM. applied. > > > 99868a

Re: [Qemu-devel] [PATCH 3/4] util: Add VFIO helper library

2016-12-21 Thread Paolo Bonzini
On 21/12/2016 17:19, Fam Zheng wrote: > It's clever! It'd be a bit more complicated than that, though. Things like > queues etc in block/nvme.c have to be preserved, and if we already ensure > that, > ram blocks can be preserved similarly, but indeed bounce buffers can be > handled > that way.

[Qemu-devel] Cannot add iothreads label in libvirt xml configuration file

2016-12-21 Thread Weiwei Jia
Hi, I cannot add iothreads (https://libvirt.org/formatdomain.html#elementsIOThreadsAllocation) in the libvirt xml configuration file. Once I add "4" and other related config for IOthreads into the libvirt xml configuration file with virsh command and save it, these iothreads related configuration

Re: [Qemu-devel] Cannot add iothreads label in libvirt xml configuration file

2016-12-21 Thread Weiwei Jia
Sorry to add my libvirt and qemu version. Libvirt version: 2.4.0 QEMU version: 2.3.0 Thanks, Weiwei Jia On Wed, Dec 21, 2016 at 12:11 PM, Weiwei Jia wrote: > Hi, > > I cannot add iothreads > (https://libvirt.org/formatdomain.html#elementsIOThreadsAllocation) in > the libvirt xml configuration

Re: [Qemu-devel] checkpatch.pl false positive (was Re: [PATCH v4 0/7] q35: add negotiable broadcast SMI)

2016-12-21 Thread Paolo Bonzini
On 21/12/2016 16:22, Eduardo Habkost wrote: > On Tue, Dec 20, 2016 at 03:01:17PM -0800, no-re...@patchew.org wrote: > [...] >> Checking PATCH 4/7: hw/i386/pc: introduce 2.9 machine types with 0x20 fw_cfg >> file slots... >> ERROR: Macros with multiple statements should be enclosed in a do - whil

  1   2   >