[Qemu-devel] [PATCH v3 7/8] target/s390x: Allow to enable "idtes" feature for TCG

2017-07-10 Thread Richard Henderson
From: David Hildenbrand STFL bit 4 and 5 are just indications to the guest, which TLB entries an IDTE call will clear. These are performance indicators for the guest. STFL bit 4: INVALIDATE DAT TABLE ENTRY (IDTE) performs the invalidation-and-clearing operation by selectively clearin

[Qemu-devel] [PATCH v3 2/8] target/s390x: Implement CONVERT UNICODE insns

2017-07-10 Thread Richard Henderson
Signed-off-by: Richard Henderson --- target/s390x/helper.h | 6 + target/s390x/mem_helper.c | 310 + target/s390x/translate.c | 43 +++ target/s390x/insn-data.def | 13 ++ 4 files changed, 372 insertions(+) diff --git a/target/s390x/hel

[Qemu-devel] [PATCH v3 6/8] target/s390x: Mark ETF3 and ETF3_ENH facilities as available

2017-07-10 Thread Richard Henderson
Reviewed-by: Aurelien Jarno Signed-off-by: Richard Henderson --- target/s390x/cpu_models.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/target/s390x/cpu_models.c b/target/s390x/cpu_models.c index 2c86b24..a4afdd9 100644 --- a/target/s390x/cpu_models.c +++ b/target/s390x/cpu_models.c @@

[Qemu-devel] [PATCH v3 1/8] target/s390x: Implement CSST

2017-07-10 Thread Richard Henderson
Signed-off-by: Richard Henderson --- target/s390x/helper.h | 1 + target/s390x/cpu_models.c | 2 + target/s390x/mem_helper.c | 189 + target/s390x/translate.c | 13 +++- target/s390x/insn-data.def | 2 + 5 files changed, 206 insertions(+

Re: [Qemu-devel] [Qemu-ppc] [RFC drcVI PATCH] spapr: reset DRCs on migration pre_load

2017-07-10 Thread Daniel Henrique Barboza
On 07/10/2017 03:39 AM, David Gibson wrote: On Fri, Jul 07, 2017 at 06:20:37PM -0300, Daniel Henrique Barboza wrote: "spapr: Remove 'awaiting_allocation' DRC flag" removed the flag that was originally was being used to prevent a race condition between hot unplug and hotplug. The DRC code base

[Qemu-devel] [Bug 1691109] Re: qemu-kvm not working as nested inside ESX 6.0

2017-07-10 Thread Michael Johnson
It appears that the recent qemu packages released for 16.04 set the machine type to "pc-i440fx-zesty" instead of "pc-i440fx-xenial". If you override this and make it use "pc-i440fx-xenial" instances boot again. FYI, if you are using OpenStack, this can be done by editing nova.conf, [libvirt] sect

[Qemu-devel] [PATCH] xen-mapcache: Fix the bug when overlapping emulated DMA operations may cause inconsistency in guest memory mappings

2017-07-10 Thread Alexey G
(Sorry, sent to a wrong mailing list first instead of QEMU-devel) Under certain circumstances normal xen-mapcache functioning may be broken by guest's actions. This may lead to either QEMU performing exit() due to a caught bad pointer (and with QEMU process gone the guest domain simply appears hun

Re: [Qemu-devel] [PATCH v2 5/5] target/arm: use DISAS_EXIT for eret handling

2017-07-10 Thread Richard Henderson
On 07/10/2017 09:21 AM, Alex Bennée wrote: Previously DISAS_JUMP did ensure this but with the optimisation of 8a6b28c7 (optimize indirect branches) we might not leave the loop. This means if any pending interrupts are cleared by changing IRQ flags we might never get around to servicing them. You

Re: [Qemu-devel] [PATCH v2 3/5] target/arm/translate.h: expand comment on DISAS_EXIT

2017-07-10 Thread Richard Henderson
On 07/10/2017 09:21 AM, Alex Bennée wrote: We already have an exit condition, DISAS_UPDATE which will exit the run-loop. Expand on the difference with DISAS_EXIT in the comments. Signed-off-by: Alex Bennée --- target/arm/translate.h | 5 - 1 file changed, 4 insertions(+), 1 deletion(-)

Re: [Qemu-devel] [RFC 5/5] vifo: introduce new VFIO ioctl VFIO_DEVICE_PCI_GET_DIRTY_BITMAP

2017-07-10 Thread Alex Williamson
On Fri, 7 Jul 2017 06:40:58 + "Tian, Kevin" wrote: > > From: Alex Williamson [mailto:alex.william...@redhat.com] > > Sent: Saturday, July 1, 2017 1:00 AM > > > > On Fri, 30 Jun 2017 05:14:40 + > > "Tian, Kevin" wrote: > > > > > > From: Alex Williamson [mailto:alex.william...@redhat.c

Re: [Qemu-devel] [PATCH v2 4/5] target/arm: use DISAS_JUMP for ISB handling

2017-07-10 Thread Richard Henderson
On 07/10/2017 09:21 AM, Alex Bennée wrote: -s->is_jmp = DISAS_UPDATE; +gen_a64_set_pc_im(s->pc); +s->is_jmp = DISAS_JUMP; Better would be gen_goto_tb. The destination is known, so there's no need to go through lookup_and_goto_ptr. You still get the icount_decr check a

Re: [Qemu-devel] [PATCH v2 2/5] target/arm/translate: make DISAS_UPDATE match declared semantics

2017-07-10 Thread Richard Henderson
On 07/10/2017 09:21 AM, Alex Bennée wrote: -case DISAS_UPDATE: -gen_set_pc_im(dc, dc->pc); -/* fall through */ case DISAS_JUMP: gen_goto_ptr(); break; +case DISAS_UPDATE: +gen_set_pc_im(dc, dc->pc);

Re: [Qemu-devel] [PATCH v14 15/21] qom: support non-scalar properties with -object

2017-07-10 Thread Manos Pitsidianakis
Is there a specific reason this patch wasn't finished? If I'm not wrong using non-scalar properties with -object is still not possible, yet would be a very useful feature for drivers with UserCreatable objects. Archive link since this is an old patch: https://lists.gnu.org/archive/html/qemu-de

[Qemu-devel] [PATCH v2 4/5] target/arm: use DISAS_JUMP for ISB handling

2017-07-10 Thread Alex Bennée
While an ISB will ensure any raised IRQs happen on the next instruction it doesn't cause any to get raised by itself. We can therefor use DISAS_JUMP for ISB instructions and rely on the exit_request check at the top of each TB to deal with exiting if needed. Signed-off-by: Alex Bennée --- target

[Qemu-devel] [PATCH v2 3/5] target/arm/translate.h: expand comment on DISAS_EXIT

2017-07-10 Thread Alex Bennée
We already have an exit condition, DISAS_UPDATE which will exit the run-loop. Expand on the difference with DISAS_EXIT in the comments. Signed-off-by: Alex Bennée --- target/arm/translate.h | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/target/arm/translate.h b/target/ar

[Qemu-devel] [PATCH v2 5/5] target/arm: use DISAS_EXIT for eret handling

2017-07-10 Thread Alex Bennée
Previously DISAS_JUMP did ensure this but with the optimisation of 8a6b28c7 (optimize indirect branches) we might not leave the loop. This means if any pending interrupts are cleared by changing IRQ flags we might never get around to servicing them. You usually notice this by seeing the lookup_tb_p

[Qemu-devel] [PATCH v2 0/5] arm: fixes for eret, isb and DISAS_UPDATE handling

2017-07-10 Thread Alex Bennée
Hi, This is a quick iteration from the previous series: https://lists.nongnu.org/archive/html/qemu-devel/2017-07/msg02371.html Which was born out of the fix: https://lists.nongnu.org/archive/html/qemu-devel/2017-07/msg01831.html Following feedback I reverted the attempt to use DISAS_UPDATE

[Qemu-devel] [PATCH v2 2/5] target/arm/translate: make DISAS_UPDATE match declared semantics

2017-07-10 Thread Alex Bennée
DISAS_UPDATE should be used when the wider CPU state other than just the PC has been updated and we should therefor exit the TCG runtime and return to the main execution loop rather assuming DISAS_JUMP would do that. Signed-off-by: Alex Bennée --- target/arm/translate-a64.c | 14 +++---

[Qemu-devel] [PATCH v2 1/5] include/exec/exec-all: document common exit conditions

2017-07-10 Thread Alex Bennée
As a precursor to later patches attempt to come up with a more concrete wording for what each of the common exit cases would be. CC: Emilio G. Cota CC: Richard Henderson CC: Lluís Vilanova Signed-off-by: Alex Bennée --- include/exec/exec-all.h | 29 ++--- 1 file change

[Qemu-devel] [PULL 2/2] vfio/pci: Fixup v0 PCIe capabilities

2017-07-10 Thread Alex Williamson
Intel 82599 VFs report a PCIe capability version of 0, which is invalid. The earliest version of the PCIe spec used version 1. This causes Windows to fail startup on the device and it will be disabled with error code 10. Our choices are either to drop the PCIe cap on such devices, which has the

[Qemu-devel] [PULL 1/2] vfio: Test realized when using VFIOGroup.device_list iterator

2017-07-10 Thread Alex Williamson
VFIOGroup.device_list is effectively our reference tracking mechanism such that we can teardown a group when all of the device references are removed. However, we also use this list from our machine reset handler for processing resets that affect multiple devices. Generally device removals are fu

[Qemu-devel] [PULL 0/2] VFIO fixes 2017-07-10

2017-07-10 Thread Alex Williamson
The following changes since commit 6b06e3e49eb8c91cc286c16d6bf3181ac296f33d: Merge remote-tracking branch 'remotes/ericb/tags/pull-nbd-2017-07-10-v2' into staging (2017-07-10 16:12:47 +0100) are available in the git repository at: git://github.com/awilliam/qemu-vfio.git tags/vfio-updates-20

Re: [Qemu-devel] [PATCH v1 2/6] target/arm/translate.c: make DISAS_UPDATE match declared semantics

2017-07-10 Thread Richard Henderson
On 07/10/2017 08:35 AM, Alex Bennée wrote: Well this was more in the guise of having well defined semantics across all the translators. I agree just keeping DISAS_EXIT is cleaner w.r.t the ARM code. I hope we can do that within the context of (or after) LLuis' changes. Doing it beforehand is ju

Re: [Qemu-devel] [PATCH v1 2/6] target/arm/translate.c: make DISAS_UPDATE match declared semantics

2017-07-10 Thread Alex Bennée
Richard Henderson writes: > On 07/10/2017 06:13 AM, Peter Maydell wrote: >> On 10 July 2017 at 16:47, Alex Bennée wrote: >>> DISAS_UPDATE should be used when the wider CPU state other than just >>> the PC has been updated and we should therefor exit the TCG runtime >>> and return to the main ex

Re: [Qemu-devel] [RFC PATCH] include/exec/cpu-defs.h: try and make SoftMMU page size match target

2017-07-10 Thread Alex Bennée
Richard Henderson writes: > On 07/10/2017 04:28 AM, Alex Bennée wrote: >> While the SoftMMU is not emulating the target MMU of a system there is >> a relationship between its page size and that of the target. If the >> target MMU is full featured the functions called to re-fill the >> entries in

Re: [Qemu-devel] [PATCH 0/2] qom: Fix ambiguous path detection when ambiguous=NULL

2017-07-10 Thread Eduardo Habkost
On Fri, Jul 07, 2017 at 06:30:50PM -0300, Eduardo Habkost wrote: > object_resolve_path*() ambiguous path detection breaks when > ambiguous==NULL and the object tree have 3 objects of the same type and > only 2 of them are under the same parent. e.g.: > > /container/obj1 (TYPE_FOO) > /container/

Re: [Qemu-devel] change x86 default machine type to Q35?

2017-07-10 Thread Eduardo Habkost
(CCing libvir-list) On Mon, Jul 10, 2017 at 07:45:54PM +0300, Michael S. Tsirkin wrote: > On Mon, Jul 10, 2017 at 10:59:43AM -0300, Eduardo Habkost wrote: > > On Mon, Jul 10, 2017 at 10:42:26AM +0300, Marcel Apfelbaum wrote: > > > On 07/07/2017 21:03, Eduardo Habkost wrote: > > > > On Fri, Jul 07,

Re: [Qemu-devel] [PATCHv7 5/6] fw_cfg: move qdev_init_nofail() from fw_cfg_init1() to callers

2017-07-10 Thread Eduardo Habkost
On Mon, Jul 10, 2017 at 05:23:36PM +0200, Igor Mammedov wrote: > On Mon, 10 Jul 2017 11:53:31 -0300 > Eduardo Habkost wrote: > > > On Mon, Jul 10, 2017 at 10:01:47AM +0200, Igor Mammedov wrote: > > > On Fri, 7 Jul 2017 17:20:25 +0100 > > > Mark Cave-Ayland wrote: > > > > > > > On 07/07/17 16:

Re: [Qemu-devel] [PATCH] virtio-serial: add enable_backend callback

2017-07-10 Thread Pavel Butsykin
On 10.07.2017 17:13, Laurent Vivier wrote: On 07/07/2017 16:21, Pavel Butsykin wrote: We should guarantee that RAM will not be modified while VM has a stopped state, otherwise it can lead to negative consequences during post-copy migration. In RUN_STATE_FINISH_MIGRATE step, it's expected that RA

[Qemu-devel] [PULL 9/9] migration: Make compression_threads use save/load_setup/cleanup()

2017-07-10 Thread Dr. David Alan Gilbert (git)
From: Juan Quintela Once there, be consistent and use compress_thread_{save,load}_{setup,cleanup}. Signed-off-by: Juan Quintela Reviewed-by: Dr. David Alan Gilbert Message-Id: <20170628095228.4661-6-quint...@redhat.com> Signed-off-by: Dr. David Alan Gilbert --- migration/migration.c | 5 ---

[Qemu-devel] [PULL 5/9] migration: Rename save_live_setup() to save_setup()

2017-07-10 Thread Dr. David Alan Gilbert (git)
From: Juan Quintela We are going to use it now for more than save live regions. Once there rename qemu_savevm_state_begin() to qemu_savevm_state_setup(). Signed-off-by: Juan Quintela Reviewed-by: Dr. David Alan Gilbert Message-Id: <20170628095228.4661-2-quint...@redhat.com> Signed-off-by: Dr.

[Qemu-devel] [PULL 8/9] migration: Convert ram to use new load_setup()/load_cleanup()

2017-07-10 Thread Dr. David Alan Gilbert (git)
From: Juan Quintela Once there, I rename ram_migration_cleanup() to ram_save_cleanup(). Notice that this is the first pass, and I only passed XBZRLE to the new scheme. Moved decoded_buf to inside XBZRLE struct. As a bonus, I don't have to export xbzrle functions from ram.c. Signed-off-by: Juan

[Qemu-devel] [PULL 7/9] migration: Create load_setup()/cleanup() methods

2017-07-10 Thread Dr. David Alan Gilbert (git)
From: Juan Quintela We need to do things at load time and at cleanup time. Signed-off-by: Juan Quintela -- Move the printing of the error message so we can print the device giving the error. Add call to postcopy stuff Message-Id: <20170628095228.4661-4-quint...@redhat.com> Reviewed-by: Dr. Da

[Qemu-devel] [PULL 1/9] migration: fix handling for --only-migratable

2017-07-10 Thread Dr. David Alan Gilbert (git)
From: Peter Xu MigrateState object is not ready at that time, so we'll get an assertion. Use qemu_global_option() instead. Reported-by: Eduardo Habkost Suggested-by: Eduardo Habkost Reviewed-by: Eduardo Habkost Reviewed-by: Juan Quintela Fixes: 3df663e ("migration: move only_migratable to Mi

[Qemu-devel] [PULL 4/9] doc: update TYPE_MIGRATION documents

2017-07-10 Thread Dr. David Alan Gilbert (git)
From: Peter Xu [Peter collected Eduardo's patch comment and formatted into patch] Suggested-by: Eduardo Habkost Signed-off-by: Peter Xu Message-Id: <1499242883-2184-5-git-send-email-pet...@redhat.com> Reviewed-by: Eduardo Habkost Signed-off-by: Dr. David Alan Gilbert --- migration/migration

[Qemu-devel] [PULL 3/9] doc: add item for "-M enforce-config-section"

2017-07-10 Thread Dr. David Alan Gilbert (git)
From: Peter Xu It's never documented, and now we have one more parameter for it (which obsoletes this one). Document it properly. Suggested-by: Eduardo Habkost Signed-off-by: Peter Xu Message-Id: <1499396048-21657-1-git-send-email-pet...@redhat.com> Reviewed-by: Greg Kurz Reviewed-by: Eduardo

[Qemu-devel] [PULL 6/9] migration: Rename cleanup() to save_cleanup()

2017-07-10 Thread Dr. David Alan Gilbert (git)
From: Juan Quintela We need a cleanup for loads, so we rename here to be consistent. Signed-off-by: Juan Quintela Reviewed-by: Dr. David Alan Gilbert -- Rename htab_cleanup to htap_save_cleanup as dave suggestion Message-Id: <20170628095228.4661-3-quint...@redhat.com> Signed-off-by: Dr. Davi

Re: [Qemu-devel] [PATCH v2 0/2] Add global device ID in virt machine

2017-07-10 Thread Peter Maydell
On 23 May 2017 at 12:12, Diana Craciun wrote: > The NXP DPAA2 is a hardware architecture designed for high-speeed network > packet processing. The DPAA2 hardware components are managed by a hardware > component called the Management Complex (or MC) which provides an > object-base abstraction for s

[Qemu-devel] [PULL 0/9] migration queue

2017-07-10 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" The following changes since commit 6b06e3e49eb8c91cc286c16d6bf3181ac296f33d: Merge remote-tracking branch 'remotes/ericb/tags/pull-nbd-2017-07-10-v2' into staging (2017-07-10 16:12:47 +0100) are available in the git repository at: git://github.com/dagrh/qemu

[Qemu-devel] [PULL 2/9] vl: move global property, migrate init earlier

2017-07-10 Thread Dr. David Alan Gilbert (git)
From: Peter Xu Currently drive_init_func() may call migrate_get_current() while the migrate object is still not ready yet at that time. Move the migration object init earlier, along with the global properties, right after acceleration init. This fixes a breakage for iotest 055, which caused an a

[Qemu-devel] [Bug 1686170] Re: qemu-system-x86_64+gdb: unable to correctly disassemble "real mode" (i8086) instructions after attaching to QEMU started with "-S -s" options

2017-07-10 Thread Duane Voth
Apparently none of the 32bit x86 modes are supported in 2.9 version of qemu-system-x86_64. I realize the desire to simplify the code, and separate i386 from x86_64, but x86_64 really does need to support all the modes in which the processor can operate. True that for major operating systems the p

[Qemu-devel] [PATCH 1/5] qcow2: make qcow2_do_open a coroutine_fn

2017-07-10 Thread Paolo Bonzini
It is called from qcow2_invalidate_cache in coroutine context, so always load metadata from a coroutine. --- block/qcow2.c | 45 - 1 file changed, 40 insertions(+), 5 deletions(-) diff --git a/block/qcow2.c b/block/qcow2.c index cb081ea47f..b5de67d113 1

Re: [Qemu-devel] [PATCH 00/22] tcg: per-thread TCG

2017-07-10 Thread Richard Henderson
On 07/09/2017 11:50 PM, Alex Bennée wrote: Side issue. Have we considered the impact on codegen buffer utilisation by doing an "off-code_gen_buffer" no cache translation the first time we ever see a TB? No we haven't. Possibly because we'd need additional infrastructure to do even that -- we'

[Qemu-devel] [PATCH 5/5] block: convert bdrv_check callback to coroutine_fn

2017-07-10 Thread Paolo Bonzini
Suggested-by: Kevin Wolf Signed-off-by: Paolo Bonzini --- block.c | 43 --- block/parallels.c | 17 +++-- block/qcow2.c | 23 +++ block/qed-check.c | 1 + block/qed-table.c

[Qemu-devel] [RFC PATCH 0/5] move bdrv_invalidate_cache, bdrv_check to coroutines

2017-07-10 Thread Paolo Bonzini
bdrv_invalidate_cache and bdrv_check are reading/processing metadata, which is usually protected by a lock (CoMutex). However, they are not called from coroutine context, so they are not using the same protection. This series moves these functions into coroutine context, as suggested by Kevin for

[Qemu-devel] [PATCH 4/5] qcow2: introduce qcow2_write_caches and qcow2_flush_caches

2017-07-10 Thread Paolo Bonzini
Avoid recursively taking s->lock during bdrv_check. Signed-off-by: Paolo Bonzini --- block/qcow2-refcount.c | 28 block/qcow2.c | 20 block/qcow2.h | 2 ++ 3 files changed, 34 insertions(+), 16 deletions(-) diff --git a/block/

[Qemu-devel] [PATCH 2/5] qed: make bdrv_qed_do_open a coroutine_fn

2017-07-10 Thread Paolo Bonzini
It is called from bdrv_invalidate_cache in coroutine context, so always load metadata from a coroutine. --- block/qed.c | 40 +--- 1 file changed, 37 insertions(+), 3 deletions(-) diff --git a/block/qed.c b/block/qed.c index d43cb55923..3c2867c946 100644 --- a/

Re: [Qemu-devel] [RISU PATCH 00/11] Misc fixes, documentation and patterns

2017-07-10 Thread Peter Maydell
On 4 July 2017 at 15:48, Alex Bennée wrote: > Hi Peter, > > A bit of a mixed set of patches here for you to pick from as you > will. The first 2 are additional tracing fixes including a fix for > segfaulting when generating a trace. > > The next two are documentation patches as requested. > > Then

[Qemu-devel] [PATCH 3/5] block: convert bdrv_invalidate_cache callback to coroutine_fn

2017-07-10 Thread Paolo Bonzini
QED's bdrv_invalidate_cache implementation would like to reuse functions that acquire/release the metadata locks. Call it from coroutine context to simplify the logic. Signed-off-by: Paolo Bonzini --- block.c | 41 + block/iscsi.c

Re: [Qemu-devel] [RFC PATCH] include/exec/cpu-defs.h: try and make SoftMMU page size match target

2017-07-10 Thread Richard Henderson
On 07/10/2017 04:28 AM, Alex Bennée wrote: While the SoftMMU is not emulating the target MMU of a system there is a relationship between its page size and that of the target. If the target MMU is full featured the functions called to re-fill the entries in the SoftMMU entries start moving up the

Re: [Qemu-devel] change x86 default machine type to Q35?

2017-07-10 Thread Michael S. Tsirkin
On Mon, Jul 10, 2017 at 10:59:43AM -0300, Eduardo Habkost wrote: > On Mon, Jul 10, 2017 at 10:42:26AM +0300, Marcel Apfelbaum wrote: > > On 07/07/2017 21:03, Eduardo Habkost wrote: > > > On Fri, Jul 07, 2017 at 06:17:57PM +0300, Michael S. Tsirkin wrote: > > > > On Fri, Jul 07, 2017 at 10:39:49AM -

Re: [Qemu-devel] [PATCH] virtio-serial: add enable_backend callback

2017-07-10 Thread Michael S. Tsirkin
On Mon, Jul 10, 2017 at 04:13:54PM +0200, Laurent Vivier wrote: > > static void virtconsole_realize(DeviceState *dev, Error **errp) > > { > > VirtIOSerialPort *port = VIRTIO_SERIAL_PORT(dev); > > @@ -233,6 +253,7 @@ static void virtserialport_class_init(ObjectClass > > *klass, void *data) >

Re: [Qemu-devel] [PULL v2 00/11] NBD patches

2017-07-10 Thread Peter Maydell
On 10 July 2017 at 16:04, Eric Blake wrote: > The following changes since commit 94c56652b9079cfb9d560a6dde7ecb15eb9ef9c7: > > Merge remote-tracking branch 'remotes/kevin/tags/for-upstream' into staging > (2017-07-10 14:06:49 +0100) > > are available in the git repository at: > > git://repo.o

Re: [Qemu-devel] [PATCH v1 2/6] target/arm/translate.c: make DISAS_UPDATE match declared semantics

2017-07-10 Thread Richard Henderson
On 07/10/2017 06:13 AM, Peter Maydell wrote: On 10 July 2017 at 16:47, Alex Bennée wrote: DISAS_UPDATE should be used when the wider CPU state other than just the PC has been updated and we should therefor exit the TCG runtime and return to the main execution loop rather assuming DISAS_JUMP wou

[Qemu-devel] [PATCH v7 12/16] migration: add postcopy migration of dirty bitmaps

2017-07-10 Thread Vladimir Sementsov-Ogievskiy
Postcopy migration of dirty bitmaps. Only named dirty bitmaps, associated with root nodes and non-root named nodes are migrated. If destination qemu is already containing a dirty bitmap with the same name as a migrated bitmap (for the same node), then, if their granularities are the same the migra

[Qemu-devel] [PATCH v7 00/16] Dirty bitmaps postcopy migration

2017-07-10 Thread Vladimir Sementsov-Ogievskiy
Hi all! There is a new version of dirty bitmap postcopy migration series. v7 clone: tag postcopy-v7 from https://src.openvz.org/scm/~vsementsov/qemu.git online: https://src.openvz.org/users/vsementsov/repos/qemu/browse?at=postcopy-v7 - rebased on dirty-bitmap byte-based interfaces (based on

[Qemu-devel] [PATCH v7 03/16] migration: split common postcopy out of ram postcopy

2017-07-10 Thread Vladimir Sementsov-Ogievskiy
Split common postcopy staff from ram postcopy staff. Signed-off-by: Vladimir Sementsov-Ogievskiy --- migration/migration.c | 39 ++- migration/migration.h | 2 ++ migration/savevm.c| 48 +++- 3 files changed, 67

[Qemu-devel] [PATCH v7 15/16] iotests: add dirty bitmap migration test

2017-07-10 Thread Vladimir Sementsov-Ogievskiy
The test starts two vms (vm_a, vm_b), create dirty bitmap in the first one, do several writes to corresponding device and then migrate vm_a to vm_b with dirty bitmaps. Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Max Reitz --- tests/qemu-iotests/169 | 86

[Qemu-devel] [PATCH v7 11/16] block/dirty-bitmap: add bdrv_dirty_bitmap_set_frozen

2017-07-10 Thread Vladimir Sementsov-Ogievskiy
Make it possible to set bitmap 'frozen' without a successor. This is needed to protect the bitmap during outgoing bitmap postcopy migration. Signed-off-by: Vladimir Sementsov-Ogievskiy --- block/dirty-bitmap.c | 22 -- include/block/dirty-bitmap.h | 1 + 2 files chan

Re: [Qemu-devel] [PATCH v1 4/6] target/arm/translate-a64: get rid of DISAS_EXIT

2017-07-10 Thread Richard Henderson
On 07/10/2017 05:47 AM, Alex Bennée wrote: We already have an exit condition that declares we should exit to the run-loop because wider CPU state changes have been made. Use DISAS_UPDATE and kill the architecture specific DISAS_EXIT. Signed-off-by: Alex Bennée --- target/arm/translate-a64.c |

[Qemu-devel] [PATCH v7 06/16] qapi: add dirty-bitmaps migration capability

2017-07-10 Thread Vladimir Sementsov-Ogievskiy
Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: John Snow Reviewed-by: Eric Blake Reviewed-by: Juan Quintela --- migration/migration.c | 9 + migration/migration.h | 1 + qapi-schema.json | 4 +++- 3 files changed, 13 insertions(+), 1 deletion(-) diff --git a/migration/m

[Qemu-devel] [PATCH v7 05/16] block/dirty-bitmap: add bdrv_dirty_bitmap_enable_successor()

2017-07-10 Thread Vladimir Sementsov-Ogievskiy
Enabling bitmap successor is necessary to enable successors of bitmaps being migrated before target vm start. Signed-off-by: Vladimir Sementsov-Ogievskiy --- block/dirty-bitmap.c | 8 include/block/dirty-bitmap.h | 1 + 2 files changed, 9 insertions(+) diff --git a/block/dirty-

[Qemu-devel] [PATCH v7 04/16] migration: introduce postcopy-only pending

2017-07-10 Thread Vladimir Sementsov-Ogievskiy
There would be savevm states (dirty-bitmap) which can migrate only in postcopy stage. The corresponding pending is introduced here. Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Juan Quintela --- include/migration/register.h | 17 +++-- migration/block.c| 7 +

[Qemu-devel] [PATCH v7 07/16] block/dirty-bitmap: add bdrv_dirty_bitmap_release_successor

2017-07-10 Thread Vladimir Sementsov-Ogievskiy
To just release successor and unfreeze bitmap without any additional work. Signed-off-by: Vladimir Sementsov-Ogievskiy Signed-off-by: Denis V. Lunev --- block/dirty-bitmap.c | 13 + include/block/dirty-bitmap.h | 2 ++ 2 files changed, 15 insertions(+) diff --git a/block/d

[Qemu-devel] [PATCH v7 16/16] iotests: add dirty bitmap postcopy test

2017-07-10 Thread Vladimir Sementsov-Ogievskiy
Test - start two vms (vm_a, vm_b) - in a - do writes from set A - do writes from set B - fix bitmap sha256 - clear bitmap - do writes from set A - start migration - than, in b - wait vm start (postcopy should start) - do writes from set B - check bitmap sha256

[Qemu-devel] [PATCH v7 10/16] migration: add is_active_iterate handler

2017-07-10 Thread Vladimir Sementsov-Ogievskiy
Only-postcopy savevm states (dirty-bitmap) don't need live iteration, so to disable them and stop transporting empty sections there is a new savevm handler. Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Juan Quintela --- include/migration/register.h | 1 + migration/savevm.c

[Qemu-devel] [PATCH v7 01/16] migration: add has_postcopy savevm handler

2017-07-10 Thread Vladimir Sementsov-Ogievskiy
Now postcopy-able states are recognized by not NULL save_live_complete_postcopy handler. But when we have several different postcopy-able states, it is not convenient. Ram postcopy may be disabled, while some other postcopy enabled, in this case Ram state should behave as it is not postcopy-able.

[Qemu-devel] [PATCH v7 13/16] iotests: add add_incoming_migration to VM class

2017-07-10 Thread Vladimir Sementsov-Ogievskiy
Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: John Snow --- tests/qemu-iotests/iotests.py | 6 ++ 1 file changed, 6 insertions(+) diff --git a/tests/qemu-iotests/iotests.py b/tests/qemu-iotests/iotests.py index abcf3c10e2..f64277d0b4 100644 --- a/tests/qemu-iotests/iotests.py +++

[Qemu-devel] [PATCH v7 14/16] iotests: add default node-name

2017-07-10 Thread Vladimir Sementsov-Ogievskiy
When testing migration, auto-generated by qemu node-names differs in source and destination qemu and migration fails. After this patch, auto-generated by iotest nodenames will be the same. Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Max Reitz --- tests/qemu-iotests/iotests.py | 2 +

[Qemu-devel] [PATCH v7 02/16] migration: fix ram_save_pending

2017-07-10 Thread Vladimir Sementsov-Ogievskiy
Fill postcopy-able pending only if ram postcopy is enabled. It is necessary because of there will be other postcopy-able states and when ram postcopy is disabled, it should not spoil common postcopy related pending. Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Dr. David Alan Gilbert

[Qemu-devel] [PATCH v7 09/16] migration/qemu-file: add qemu_put_counted_string()

2017-07-10 Thread Vladimir Sementsov-Ogievskiy
Add function opposite to qemu_get_counted_string. qemu_put_counted_string puts one-byte length of the string (string should not be longer than 255 characters), and then it puts the string, without last zero byte. Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: John Snow Reviewed-by: Jua

Re: [Qemu-devel] [PULL 22/42] configure: factor out list of supported Xen/KVM/HAX targets

2017-07-10 Thread Anthony PERARD
On Mon, Jul 10, 2017 at 04:49:18PM +0100, Peter Maydell wrote: > On 5 July 2017 at 08:14, Paolo Bonzini wrote: > > This will be useful when the functions are called, early in the configure > > process, to filter out targets that do not support hardware acceleration. > > > > Signed-off-by: Paolo Bo

[Qemu-devel] [PATCH v7 08/16] migration: include migrate_dirty_bitmaps in migrate_postcopy

2017-07-10 Thread Vladimir Sementsov-Ogievskiy
Enable postcopy if dirty bitmap migration is endabled. Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Juan Quintela --- migration/migration.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/migration/migration.c b/migration/migration.c index dac67eab69..48adc812bc

Re: [Qemu-devel] [PATCH v22 25/30] qmp: add x-debug-block-dirty-bitmap-sha256

2017-07-10 Thread John Snow
On 07/10/2017 02:49 AM, Markus Armbruster wrote: > John Snow writes: > >> On 07/07/2017 09:53 AM, Markus Armbruster wrote: >>> Vladimir Sementsov-Ogievskiy writes: >>> 07.07.2017 12:00, Markus Armbruster wrote: > "Daniel P. Berrange" writes: > >> On Fri, Jul 07, 2017 at 10:05

Re: [Qemu-devel] [PULL 22/42] configure: factor out list of supported Xen/KVM/HAX targets

2017-07-10 Thread Paolo Bonzini
On 10/07/2017 18:24, Peter Maydell wrote: > On 10 July 2017 at 17:14, Paolo Bonzini wrote: >> On 10/07/2017 17:49, Peter Maydell wrote: >>> On 5 July 2017 at 08:14, Paolo Bonzini wrote: This will be useful when the functions are called, early in the configure process, to filter out targ

Re: [Qemu-devel] [PATCH 11/11] block/snapshot: do not take AioContext lock

2017-07-10 Thread Paolo Bonzini
On 10/07/2017 18:24, Stefan Hajnoczi wrote: > On Thu, Jul 06, 2017 at 06:38:28PM +0200, Paolo Bonzini wrote: >> Snapshots are only created/destroyed/loaded under the BQL, while no >> other I/O is happening. Snapshot information could be accessed while >> other I/O is happening, but also under the

Re: [Qemu-devel] [PATCH] fixup! qom: Fix ambiguous path detection when ambiguous=NULL

2017-07-10 Thread Igor Mammedov
On Mon, 10 Jul 2017 12:33:31 -0300 Eduardo Habkost wrote: > On Mon, Jul 10, 2017 at 11:45:57AM -0300, Eduardo Habkost wrote: > > On Mon, Jul 10, 2017 at 10:10:41AM +0200, Igor Mammedov wrote: > > > On Fri, 7 Jul 2017 18:30:51 -0300 > > > Eduardo Habkost wrote: > [...] > > > > + > > > > +

Re: [Qemu-devel] [RFC PATCH 00/11] Block layer thread-safety, next part

2017-07-10 Thread Stefan Hajnoczi
On Thu, Jul 06, 2017 at 06:38:17PM +0200, Paolo Bonzini wrote: > Here, patches 1-6 make the remaining part of the block layer thread safe. > Patches 7-11 start removing aio_context_acquire/release, so the line > count goes down instead of up. > > This is the penultimate series. The remaining part

Re: [Qemu-devel] [PULL 22/42] configure: factor out list of supported Xen/KVM/HAX targets

2017-07-10 Thread Peter Maydell
On 10 July 2017 at 17:14, Paolo Bonzini wrote: > On 10/07/2017 17:49, Peter Maydell wrote: >> On 5 July 2017 at 08:14, Paolo Bonzini wrote: >>> This will be useful when the functions are called, early in the configure >>> process, to filter out targets that do not support hardware acceleration. >

Re: [Qemu-devel] [PATCH 11/11] block/snapshot: do not take AioContext lock

2017-07-10 Thread Stefan Hajnoczi
On Thu, Jul 06, 2017 at 06:38:28PM +0200, Paolo Bonzini wrote: > Snapshots are only created/destroyed/loaded under the BQL, while no > other I/O is happening. Snapshot information could be accessed while > other I/O is happening, but also under the BQL so they cannot be > modified concurrently. T

Re: [Qemu-devel] [PATCH v5 2/2] live-block-ops.txt: Rename, rewrite, and improve it

2017-07-10 Thread John Snow
On 07/10/2017 03:53 AM, Kashyap Chamarthy wrote: > > They are useful suggestions. :-) I'm a stickler for English, and I like > to get it right. Appreciate the patience! > Hardly any such thing as "right". It's all very subjective.

Re: [Qemu-devel] [PATCH 01/11] block: prepare write threshold code for thread safety

2017-07-10 Thread Eric Blake
On 07/10/2017 11:16 AM, Paolo Bonzini wrote: > On 10/07/2017 15:21, Stefan Hajnoczi wrote: >> On Thu, Jul 06, 2017 at 06:38:18PM +0200, Paolo Bonzini wrote: >>> Code refactoring only. >>> >>> Signed-off-by: Paolo Bonzini >>> --- >>> block/write-threshold.c | 28 >>> 1

Re: [Qemu-devel] [PATCH 01/11] block: prepare write threshold code for thread safety

2017-07-10 Thread Paolo Bonzini
On 10/07/2017 15:21, Stefan Hajnoczi wrote: > On Thu, Jul 06, 2017 at 06:38:18PM +0200, Paolo Bonzini wrote: >> Code refactoring only. >> >> Signed-off-by: Paolo Bonzini >> --- >> block/write-threshold.c | 28 >> 1 file changed, 16 insertions(+), 12 deletions(-) >> >>

Re: [Qemu-devel] [PULL 22/42] configure: factor out list of supported Xen/KVM/HAX targets

2017-07-10 Thread Paolo Bonzini
On 10/07/2017 17:49, Peter Maydell wrote: > On 5 July 2017 at 08:14, Paolo Bonzini wrote: >> This will be useful when the functions are called, early in the configure >> process, to filter out targets that do not support hardware acceleration. >> >> Signed-off-by: Paolo Bonzini > >> +supported_x

Re: [Qemu-devel] [PATCH v1 2/6] target/arm/translate.c: make DISAS_UPDATE match declared semantics

2017-07-10 Thread Peter Maydell
On 10 July 2017 at 16:47, Alex Bennée wrote: > DISAS_UPDATE should be used when the wider CPU state other than just > the PC has been updated and we should therefor exit the TCG runtime > and return to the main execution loop rather assuming DISAS_JUMP would > do that. > > As some DISAS_UPDATE use

Re: [Qemu-devel] [PATCH 03/11] util: use RCU accessors for notifiers

2017-07-10 Thread Paolo Bonzini
On 10/07/2017 17:52, Stefan Hajnoczi wrote: > On Thu, Jul 06, 2017 at 06:38:20PM +0200, Paolo Bonzini wrote: >> void notifier_list_notify(NotifierList *list, void *data) >> { >> Notifier *notifier, *next; >> >> -QLIST_FOREACH_SAFE(notifier, &list->notifiers, node, next) { >> +QLIST

Re: [Qemu-devel] [PATCH] tcg/mips: reserve a register for the guest_base.

2017-07-10 Thread Richard Henderson
On 07/09/2017 11:12 PM, Jiang Biao wrote: Reserve a register for the guest_base using ppc code for reference. By doing so, we do not have to recompute it for every memory load. Signed-off-by: Jiang Biao Signed-off-by: Richard Henderson --- tcg/mips/tcg-target.inc.c | 17 + 1 f

Re: [Qemu-devel] [PATCH 08/11] block: drain I/O around key management

2017-07-10 Thread Stefan Hajnoczi
On Thu, Jul 06, 2017 at 06:38:25PM +0200, Paolo Bonzini wrote: > The resulting drained section is a replacement for the AioContext. > > Signed-off-by: Paolo Bonzini > --- > blockdev.c | 8 ++-- > 1 file changed, 2 insertions(+), 6 deletions(-) Reviewed-by: Stefan Hajnoczi signature.asc D

Re: [Qemu-devel] [PATCH 17/22] tcg: distribute profiling counters across TCGContext's

2017-07-10 Thread Emilio G. Cota
On Sun, Jul 09, 2017 at 11:44:10 -1000, Richard Henderson wrote: > On 07/09/2017 11:14 AM, Emilio G. Cota wrote: > >On Sun, Jul 09, 2017 at 10:45:55 -1000, Richard Henderson wrote: > >>On 07/08/2017 09:50 PM, Emilio G. Cota wrote: > >>>+/* includes aborted translations because of exceptions */

Re: [Qemu-devel] [PATCH 07/11] block: do not acquire AioContext in check_to_replace_node

2017-07-10 Thread Stefan Hajnoczi
On Thu, Jul 06, 2017 at 06:38:24PM +0200, Paolo Bonzini wrote: > The only caller does it already. > > Signed-off-by: Paolo Bonzini > --- > block.c | 13 +++-- > 1 file changed, 3 insertions(+), 10 deletions(-) Reviewed-by: Stefan Hajnoczi signature.asc Description: PGP signature

Re: [Qemu-devel] [PATCH 06/11] block: add a few more notes on locking

2017-07-10 Thread Stefan Hajnoczi
On Thu, Jul 06, 2017 at 06:38:23PM +0200, Paolo Bonzini wrote: > Signed-off-by: Paolo Bonzini > --- > include/block/block_int.h | 10 +++--- > 1 file changed, 7 insertions(+), 3 deletions(-) Reviewed-by: Stefan Hajnoczi signature.asc Description: PGP signature

Re: [Qemu-devel] [PATCH 05/11] block-backup: add reqs_lock

2017-07-10 Thread Stefan Hajnoczi
On Thu, Jul 06, 2017 at 06:38:22PM +0200, Paolo Bonzini wrote: > Protect the list of inflight reqs and the CoQueues for dependent > requests. > > Signed-off-by: Paolo Bonzini > --- > block/backup.c | 20 +++- > block/replication.c | 2 +- > include/block/b

Re: [Qemu-devel] [PATCH 03/11] util: use RCU accessors for notifiers

2017-07-10 Thread Stefan Hajnoczi
On Thu, Jul 06, 2017 at 06:38:20PM +0200, Paolo Bonzini wrote: > void notifier_list_notify(NotifierList *list, void *data) > { > Notifier *notifier, *next; > > -QLIST_FOREACH_SAFE(notifier, &list->notifiers, node, next) { > +QLIST_FOREACH_SAFE_RCU(notifier, &list->notifiers, node,

Re: [Qemu-devel] [PULL 22/42] configure: factor out list of supported Xen/KVM/HAX targets

2017-07-10 Thread Peter Maydell
On 5 July 2017 at 08:14, Paolo Bonzini wrote: > This will be useful when the functions are called, early in the configure > process, to filter out targets that do not support hardware acceleration. > > Signed-off-by: Paolo Bonzini > +supported_xen_target() { > +test "$xen" = "yes" || return

Re: [Qemu-devel] [PATCH 04/11] block: make before-write notifiers thread-safe

2017-07-10 Thread Stefan Hajnoczi
On Thu, Jul 06, 2017 at 06:38:21PM +0200, Paolo Bonzini wrote: > Reads access the list in RCU style, so be careful to avoid use-after-free > scenarios in the backup block job. Apart from this, all that's needed > is protecting updates with a mutex. > > Signed-off-by: Paolo Bonzini > --- > block

[Qemu-devel] [PATCH v1 2/6] target/arm/translate.c: make DISAS_UPDATE match declared semantics

2017-07-10 Thread Alex Bennée
DISAS_UPDATE should be used when the wider CPU state other than just the PC has been updated and we should therefor exit the TCG runtime and return to the main execution loop rather assuming DISAS_JUMP would do that. As some DISAS_UPDATE users may update the PC dynamically via a helper we also pus

[Qemu-devel] [PATCH v1 3/6] target/arm/translate-a64: make DISAS_UPDATE match declared semantics

2017-07-10 Thread Alex Bennée
DISAS_UPDATE should be used when the wider CPU state other than just the PC has been updated and we should therefor exit the TCG runtime and return to the main execution loop rather assuming DISAS_JUMP would do that. As some DISAS_UPDATE users may update the PC dynamically via a helper we also pus

[Qemu-devel] [PATCH v1 6/6] target/arm: ensure eret exits the run-loop via DISAS_UPDATE

2017-07-10 Thread Alex Bennée
Previously DISAS_JUMP did ensure this but with the optimisation of 8a6b28c7 (optimize indirect branches) we might not leave the loop. This means if any pending interrupts are cleared by changing IRQ flags we might never get around to servicing them. You usually notice this by seeing the lookup_tb_p

[Qemu-devel] [PATCH v1 5/6] target/arm: use DISAS_JUMP for ISB handling

2017-07-10 Thread Alex Bennée
While an ISB will ensure any raised IRQs happen on the next instruction it doesn't cause any to get raised by itself. We can therefor use DISAS_JUMP for ISB instructions and rely on the exit_request check at the top of each TB to deal with exiting if needed. Signed-off-by: Alex Bennée --- target

[Qemu-devel] [PATCH v1 0/6] DISAS_UPDATE fixes for eret

2017-07-10 Thread Alex Bennée
Hi, This is a follow-up to the eret patch I posted on Friday: https://lists.nongnu.org/archive/html/qemu-devel/2017-07/msg01831.html It fixes the same bug but does it in a slightly more holistic way. We start by expanding the commentary on the common DISAS_n exit flags in exec-all.h. I then up

<    1   2   3   4   5   >