Re: [Qemu-devel] [PATCH v6 04/10] migration: let MigrationState be a qdev

2017-06-28 Thread Peter Xu
On Tue, Jun 27, 2017 at 11:47:18AM -0300, Eduardo Habkost wrote: > On Tue, Jun 27, 2017 at 12:10:13PM +0800, Peter Xu wrote: > [...] > > + > > +static const TypeInfo migration_type = { > > +.name = TYPE_MIGRATION, > > +.parent = TYPE_DEVICE, > > As TYPE_MIGRATION isn't really a device and

Re: [Qemu-devel] [PATCH 0/8] VT-d: some enhancements on iotlb and tools

2017-06-28 Thread Peter Xu
On Tue, Jun 27, 2017 at 05:42:59PM +0300, Michael S. Tsirkin wrote: > On Tue, Jun 27, 2017 at 05:03:31PM +0800, Peter Xu wrote: > > Patch 1: fixes a very rare PT path issue on iova value. It didn't > > break anything since it's merely not touched (only if when IOMMU > > enabled, then set one device

Re: [Qemu-devel] [Qemu-ppc] [PATCH] target/ppc/cpu-models: set POWER9_v1.0 as POWER9 DD1

2017-06-28 Thread Thomas Huth
On 28.06.2017 03:42, jos...@linux.vnet.ibm.com wrote: > On Fri, Jun 23, 2017 at 04:10:55PM +0200, Laurent Vivier wrote: >> On 23/06/2017 11:21, David Gibson wrote: >>> On Thu, Jun 22, 2017 at 01:31:24PM +0200, Thomas Huth wrote: On 22.06.2017 13:26, Laurent Vivier wrote: > CPU_POWERPC_POWE

Re: [Qemu-devel] [PATCHv6 3/5] fw_cfg: move assert() and linking of fw_cfg device to the machine into instance_init()

2017-06-28 Thread Mark Cave-Ayland
On 27/06/17 01:49, Eduardo Habkost wrote: > On Sun, Jun 25, 2017 at 07:58:04PM +0100, Mark Cave-Ayland wrote: >> On 23/06/17 19:50, Eduardo Habkost wrote: >> Really, please go back to the earlier discussion around fw_cfg_init1() and you'll see my original point (which matches what you ju

Re: [Qemu-devel] [RFC] QMP design: Fixing query-block and friends

2017-06-28 Thread Markus Armbruster
Eric Blake writes: > On 06/27/2017 11:31 AM, Kevin Wolf wrote: >> Hi, >> >> I haven't really liked query-block for a long time, but now that >> blockdev-add and -blockdev have settled, it might finally be the time to >> actually do something about it. In fact, if used together with these >> mode

[Qemu-devel] [PATCH v6 11/10] migration: add comment for TYPE_MIGRATE

2017-06-28 Thread Peter Xu
It'll be strange that the migration object inherits TYPE_DEVICE. Add some explanations to it. Signed-off-by: Peter Xu --- migration/migration.c | 8 1 file changed, 8 insertions(+) diff --git a/migration/migration.c b/migration/migration.c index b1b0825..2398a9d 100644 --- a/migration/

Re: [Qemu-devel] [Qemu-block] [RFC] QMP design: Fixing query-block and friends

2017-06-28 Thread Markus Armbruster
John Snow writes: > On 06/27/2017 12:31 PM, Kevin Wolf wrote: >> Hi, >> >> I haven't really liked query-block for a long time, but now that >> blockdev-add and -blockdev have settled, it might finally be the time to >> actually do something about it. In fact, if used together with these >> moder

Re: [Qemu-devel] [RFC PATCH 00/14] Implement network booting directly into the s390-ccw BIOS

2017-06-28 Thread Viktor Mihajlovski
On 27.06.2017 23:40, Thomas Huth wrote: [...] >>> - Is it OK to require loading an .INS file first? Or does anybody >>> have a better idea how to load multiple files (kernel, initrd, >>> etc. ...)? >> It would be nice to support PXE-style boot, because the majority of boot >> servers is set up

Re: [Qemu-devel] [PATCH] exec: fix access to ram_list.dirty_memory when sync dirty bitmap

2017-06-28 Thread Juan Quintela
Haozhong Zhang wrote: > In cpu_physical_memory_sync_dirty_bitmap(rb, start, ...), the 2nd > argument 'start' is relative to the start of the ramblock 'rb'. When > it's used to access the dirty memory bitmap of ram_list (i.e. > ram_list.dirty_memory[DIRTY_MEMORY_MIGRATION]->blocks[]), an offset to

Re: [Qemu-devel] [RFC PATCH 00/14] Implement network booting directly into the s390-ccw BIOS

2017-06-28 Thread Thomas Huth
On 27.06.2017 18:50, Farhan Ali wrote: [...] >> The patches are still in a rough shape, but before I continue here, >> I though I'd get some feedback first. Specifically: >> >> - This adds a lot of additional code to the s390-ccw firmware (and >> the binary is afterwards three times as big as bef

Re: [Qemu-devel] [PATCH v5 3/3] migration: add bitmap for received page

2017-06-28 Thread Peter Xu
On Tue, Jun 27, 2017 at 01:40:58PM +0300, Alexey wrote: > On Tue, Jun 27, 2017 at 06:17:40PM +0800, Peter Xu wrote: > > On Tue, Jun 27, 2017 at 05:50:27AM -0400, Alexey Perevalov wrote: > > > > [...] > > > > > @@ -60,6 +62,14 @@ static inline void *ramblock_ptr(RAMBlock *block, > > > ram_addr_t

Re: [Qemu-devel] [PATCH] migration: add "return-path" capability

2017-06-28 Thread Juan Quintela
Peter Xu wrote: > When this capability is enabled, QEMU will use the return path even for > precopy migration. This is helpful at least in one case when destination > failed to load the image while source quited without confirmation. With > return path, source will wait for the last response from

Re: [Qemu-devel] [PATCH v6 11/10] migration: add comment for TYPE_MIGRATE

2017-06-28 Thread Juan Quintela
Peter Xu wrote: > It'll be strange that the migration object inherits TYPE_DEVICE. Add > some explanations to it. > > Signed-off-by: Peter Xu > --- > migration/migration.c | 8 > 1 file changed, 8 insertions(+) > > diff --git a/migration/migration.c b/migration/migration.c > index b1b08

Re: [Qemu-devel] [RFC PATCH 00/14] Implement network booting directly into the s390-ccw BIOS

2017-06-28 Thread Christian Borntraeger
Interesting work, thanks for giving it a ry. On 06/27/2017 01:48 PM, Thomas Huth wrote: > It's already possible to do a network boot of an s390x guest with an > external netboot image (based on a Linux installation), but it would > be much more convenient if the s390-ccw firmware supported network

Re: [Qemu-devel] [PATCH 1/1] vmstate: error hint for failed equal checks

2017-06-28 Thread Juan Quintela
Halil Pasic wrote: > In some cases a failing VMSTATE_*_EQUAL does not mean we detected a bug, > but it's actually the best we can do. Especially in these cases a verbose > error message is required. > > Let's introduce infrastructure for specifying a error hint to be used if > equal check fails. L

Re: [Qemu-devel] [RFC PATCH 00/14] Implement network booting directly into the s390-ccw BIOS

2017-06-28 Thread Thomas Huth
On 28.06.2017 09:28, Viktor Mihajlovski wrote: > On 27.06.2017 23:40, Thomas Huth wrote: > [...] - Is it OK to require loading an .INS file first? Or does anybody have a better idea how to load multiple files (kernel, initrd, etc. ...)? >>> It would be nice to support PXE-style b

Re: [Qemu-devel] [PATCH v5 3/4] net/net: Convert parse_host_port() to Error

2017-06-28 Thread Paolo Bonzini
On 28/06/2017 07:51, Markus Armbruster wrote: >> The gethostbyname() return a null pointer if an error occurs, and the h_errno >> variable holds an error number. herror() and hstrerror() can prints the error >> message associated with the current value of h_errno, but hstrerror() returns >> the s

Re: [Qemu-devel] [RFC PATCH 00/14] Implement network booting directly into the s390-ccw BIOS

2017-06-28 Thread Gerd Hoffmann
Hi, > > IMHO the only viable next step would be to support UEFI and build > > on top > > of that - either by porting edk2 or U-Boot to s390x. > > I can't speak of U-Boot, but you certainly don't want to port edk2 to > a big endian machine. Been there, seen that. > would really be a knowledge s

Re: [Qemu-devel] [PATCH v3 3/5] migration: Create load_setup()/cleanup() methods

2017-06-28 Thread Juan Quintela
"Dr. David Alan Gilbert" wrote: > * Juan Quintela (quint...@redhat.com) wrote: >> We need to do things at load time and at cleanup time. >> >> Signed-off-by: Juan Quintela >> >> >> +qemu_loadvm_state_cleanup(); > > Where does the equivalent happen for postcopy? > Do you need to add a cal

Re: [Qemu-devel] [PATCH] exec: fix access to ram_list.dirty_memory when sync dirty bitmap

2017-06-28 Thread Paolo Bonzini
On 28/06/2017 09:30, Juan Quintela wrote: > Haozhong Zhang wrote: >> In cpu_physical_memory_sync_dirty_bitmap(rb, start, ...), the 2nd >> argument 'start' is relative to the start of the ramblock 'rb'. When >> it's used to access the dirty memory bitmap of ram_list (i.e. >> ram_list.dirty_memory

[Qemu-devel] [PATCH v2] exec: fix access to ram_list.dirty_memory when sync dirty bitmap

2017-06-28 Thread Haozhong Zhang
In cpu_physical_memory_sync_dirty_bitmap(rb, start, ...), the 2nd argument 'start' is relative to the start of the ramblock 'rb'. When it's used to access the dirty memory bitmap of ram_list (i.e. ram_list.dirty_memory[DIRTY_MEMORY_MIGRATION]->blocks[]), an offset to the start of all RAM (i.e. rb->

Re: [Qemu-devel] [Qemu-ppc] [PATCH] target/ppc/cpu-models: set POWER9_v1.0 as POWER9 DD1

2017-06-28 Thread David Gibson
On Wed, Jun 28, 2017 at 09:09:24AM +0200, Thomas Huth wrote: > On 28.06.2017 03:42, jos...@linux.vnet.ibm.com wrote: > > On Fri, Jun 23, 2017 at 04:10:55PM +0200, Laurent Vivier wrote: > >> On 23/06/2017 11:21, David Gibson wrote: > >>> On Thu, Jun 22, 2017 at 01:31:24PM +0200, Thomas Huth wrote: >

Re: [Qemu-devel] [PATCH 06/16] tcg: Add temp_global bit to TCGTemp

2017-06-28 Thread Alex Bennée
Richard Henderson writes: > On 06/27/2017 01:39 AM, Alex Bennée wrote: >>> +/* If true, the temp is saved across both basic blocks and >>> + translation blocks. */ >>> +unsigned int temp_global:1; >>> +/* If true, the temp is saved across basic blocks but dead >>> + at t

Re: [Qemu-devel] [Qemu-block] [PATCH v3 19/20] block: Minimize raw use of bds->total_sectors

2017-06-28 Thread Manos Pitsidianakis
On Tue, Jun 27, 2017 at 02:24:57PM -0500, Eric Blake wrote: bdrv_is_allocated_above() was relying on intermediate->total_sectors, which is a field that can have stale contents depending on the value of intermediate->has_variable_length. An audit shows that we are safe (we were first calling thro

Re: [Qemu-devel] [RFC PATCH 00/14] Implement network booting directly into the s390-ccw BIOS

2017-06-28 Thread Thomas Huth
On 28.06.2017 09:43, Christian Borntraeger wrote: > Interesting work, thanks for giving it a ry. > > On 06/27/2017 01:48 PM, Thomas Huth wrote: >> It's already possible to do a network boot of an s390x guest with an >> external netboot image (based on a Linux installation), but it would >> be much

Re: [Qemu-devel] [RFC v1 2/3] util/qemu-error: Add a warning_report() function

2017-06-28 Thread Daniel P. Berrange
On Tue, Jun 27, 2017 at 01:45:45PM -0700, Alistair Francis wrote: > Add a functino which can be used similarly to error_report() execpt to > inform the users about warnings instead of errors. > > The warning print does not include the timestamp and instead will > preface the messages with a 'warni

Re: [Qemu-devel] [RFC 00/15] Error API: Flag errors in *errp even if errors are being ignored

2017-06-28 Thread Markus Armbruster
Eduardo Habkost writes: > Rationale > - > > I'm often bothered by the fact that we can't write the following: > > foo(arg, errp); > if (*errp) { > handle the error... > error_propagate(errp, err); > } > > because errp can be NULL. If foo() additionally returne

Re: [Qemu-devel] [RFC v1 0/3] Implement a warning_report function

2017-06-28 Thread Daniel P. Berrange
On Tue, Jun 27, 2017 at 01:45:41PM -0700, Alistair Francis wrote: > QEMU currently has a standard method to report errors with > error_repot(). This ensure a sane and standard format when printing > errors. This series is attempting to add the same functionality for > warnings. I'm not seeing the

Re: [Qemu-devel] [PATCH] exec: fix access to ram_list.dirty_memory when sync dirty bitmap

2017-06-28 Thread Juan Quintela
Haozhong Zhang wrote: > In cpu_physical_memory_sync_dirty_bitmap(rb, start, ...), the 2nd > argument 'start' is relative to the start of the ramblock 'rb'. When > it's used to access the dirty memory bitmap of ram_list (i.e. > ram_list.dirty_memory[DIRTY_MEMORY_MIGRATION]->blocks[]), an offset to

Re: [Qemu-devel] [Qemu-ppc] [PATCH] target/ppc/cpu-models: set POWER9_v1.0 as POWER9 DD1

2017-06-28 Thread Cédric Le Goater
On 06/28/2017 10:18 AM, David Gibson wrote: > On Wed, Jun 28, 2017 at 09:09:24AM +0200, Thomas Huth wrote: >> On 28.06.2017 03:42, jos...@linux.vnet.ibm.com wrote: >>> On Fri, Jun 23, 2017 at 04:10:55PM +0200, Laurent Vivier wrote: On 23/06/2017 11:21, David Gibson wrote: > On Thu, Jun 22,

Re: [Qemu-devel] [PATCH v3 18/20] block: Make bdrv_is_allocated() byte-based

2017-06-28 Thread Juan Quintela
Eric Blake wrote: > We are gradually moving away from sector-based interfaces, towards > byte-based. In the common case, allocation is unlikely to ever use > values that are not naturally sector-aligned, but it is possible > that byte-based values will let us be more precise about allocation > at

Re: [Qemu-devel] [Qemu-ppc] [PATCH] target/ppc/cpu-models: set POWER9_v1.0 as POWER9 DD1

2017-06-28 Thread Laurent Vivier
On 28/06/2017 11:11, Cédric Le Goater wrote: > On 06/28/2017 10:18 AM, David Gibson wrote: >> On Wed, Jun 28, 2017 at 09:09:24AM +0200, Thomas Huth wrote: >>> On 28.06.2017 03:42, jos...@linux.vnet.ibm.com wrote: On Fri, Jun 23, 2017 at 04:10:55PM +0200, Laurent Vivier wrote: > On 23/06/20

Re: [Qemu-devel] Getting rid of xen_init_display() (and its dubious call into main_loop_wait())

2017-06-28 Thread Peter Maydell
On 28 June 2017 at 01:06, Stefano Stabellini wrote: > On Tue, 27 Jun 2017, Peter Maydell wrote: >> So, there is exactly one caller of main_loop_wait() in the tree that >> passes it 'true' as an argument. That caller is in xen_init_display() >> in hw/dispaly/xenfb.c. The function was added in 2009

Re: [Qemu-devel] [PATCH] migration: add "return-path" capability

2017-06-28 Thread Dr. David Alan Gilbert
* Peter Xu (pet...@redhat.com) wrote: > When this capability is enabled, QEMU will use the return path even for > precopy migration. This is helpful at least in one case when destination > failed to load the image while source quited without confirmation. With > return path, source will wait for th

Re: [Qemu-devel] [PATCH 1/2] [TEST] aarch64: Use pmuserenr_el0 register for instrumentation

2017-06-28 Thread Peter Maydell
On 28 June 2017 at 06:00, Pranith Kumar wrote: > We need a way for the benchmark running in the guest to indicate us to > start/stop our instrumentation. On x86, we could use the 'cpuid' > instruction along with an appropriately populated 'eax' > register. However, no such dummy instruction exists

Re: [Qemu-devel] [PATCH] Separate function types from opaque types in include/qemu/typedefs.h

2017-06-28 Thread Juan Quintela
Markus Armbruster wrote: > Peter Maydell writes: > >> On 22 June 2017 at 19:08, Thomas Huth wrote: >>> On 22.06.2017 19:50, Dr. David Alan Gilbert wrote: Could do; I'm just not finding tiny header files with one or two entries each that useful. >> >> Well, it means that the bulk of cod

[Qemu-devel] [PATCH v4 2/5] migration: Rename cleanup() to save_cleanup()

2017-06-28 Thread 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 --- hw/ppc/spapr.c | 4 ++-- include/migration/register.h | 2 +- migration/block.c

[Qemu-devel] [PATCH v4 0/5] Create setup/cleanup methods for migration incoming side

2017-06-28 Thread Juan Quintela
Hi Changes from v4: - make sure that we call save_cleanup() in postocpy (dave). Please, review. [v3] - rename htab_cleanup htab_save_cleanup (dave) - loaded_data was needed because caller can need it (dave) - improve error message (dave) Please, review. [v2] - Kevin detected that I didn't cal

[Qemu-devel] [PATCH v4 1/5] migration: Rename save_live_setup() to save_setup()

2017-06-28 Thread 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 --- hw/ppc/spapr.c | 2 +- include/migration/register.h | 2 +- migration/block.

[Qemu-devel] [PATCH v4 4/5] migration: Convert ram to use new load_setup()/load_cleanup()

2017-06-28 Thread 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 Quintela Reviewed-by:

[Qemu-devel] [PATCH v4 5/5] migration: Make compression_threads use save/load_setup/cleanup()

2017-06-28 Thread 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 --- migration/migration.c | 5 - migration/ram.c | 12 migration/ram.h | 5 - 3 files changed, 8 insertions(+), 14 d

[Qemu-devel] [PATCH v4 3/5] migration: Create load_setup()/cleanup() methods

2017-06-28 Thread 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 --- include/migration/register.h | 2 ++ migration/savevm.c | 45

Re: [Qemu-devel] [PATCH v2] exec: fix access to ram_list.dirty_memory when sync dirty bitmap

2017-06-28 Thread Stefan Hajnoczi
On Wed, Jun 28, 2017 at 04:37:04PM +0800, Haozhong Zhang wrote: > In cpu_physical_memory_sync_dirty_bitmap(rb, start, ...), the 2nd > argument 'start' is relative to the start of the ramblock 'rb'. When > it's used to access the dirty memory bitmap of ram_list (i.e. > ram_list.dirty_memory[DIRTY_ME

Re: [Qemu-devel] NVDIMM live migration broken?

2017-06-28 Thread Stefan Hajnoczi
On Tue, Jun 27, 2017 at 10:30:01PM +0800, Haozhong Zhang wrote: > On 06/26/17 13:56 +0100, Stefan Hajnoczi wrote: > > On Mon, Jun 26, 2017 at 10:05:01AM +0800, Haozhong Zhang wrote: > > > On 06/23/17 10:55 +0100, Stefan Hajnoczi wrote: > > > > On Fri, Jun 23, 2017 at 08:13:13AM +0800, haozhong.zh..

Re: [Qemu-devel] [RFC] QMP design: Fixing query-block and friends

2017-06-28 Thread Kevin Wolf
Am 28.06.2017 um 09:10 hat Markus Armbruster geschrieben: > Eric Blake writes: > > On 06/27/2017 11:31 AM, Kevin Wolf wrote: > >> If that's what we're going to do, I think I can figure out something > >> nice for block nodes. That shouldn't be too hard. The only question > >> would be whether we w

Re: [Qemu-devel] [Qemu-block] [PULL 11/61] virtio-pci: use ioeventfd even when KVM is disabled

2017-06-28 Thread QingFeng Hao
在 2017/6/24 0:21, Kevin Wolf 写道: From: Stefan Hajnoczi Old kvm.ko versions only supported a tiny number of ioeventfds so virtio-pci avoids ioeventfds when kvm_has_many_ioeventfds() returns 0. Do not check kvm_has_many_ioeventfds() when KVM is disabled since it always returns 0. Since commit

Re: [Qemu-devel] [Qemu-block] [PULL 11/61] virtio-pci: use ioeventfd even when KVM is disabled

2017-06-28 Thread Kevin Wolf
Am 28.06.2017 um 12:11 hat QingFeng Hao geschrieben: > 在 2017/6/24 0:21, Kevin Wolf 写道: > >From: Stefan Hajnoczi > > > >Old kvm.ko versions only supported a tiny number of ioeventfds so > >virtio-pci avoids ioeventfds when kvm_has_many_ioeventfds() returns 0. > > > >Do not check kvm_has_many_ioeve

Re: [Qemu-devel] [Qemu-ppc] [PATCH] target/ppc/cpu-models: set POWER9_v1.0 as POWER9 DD1

2017-06-28 Thread Cédric Le Goater
On 06/28/2017 11:18 AM, Laurent Vivier wrote: > On 28/06/2017 11:11, Cédric Le Goater wrote: >> On 06/28/2017 10:18 AM, David Gibson wrote: >>> On Wed, Jun 28, 2017 at 09:09:24AM +0200, Thomas Huth wrote: On 28.06.2017 03:42, jos...@linux.vnet.ibm.com wrote: > On Fri, Jun 23, 2017 at 04:10

Re: [Qemu-devel] [RFC PATCH 00/14] Implement network booting directly into the s390-ccw BIOS

2017-06-28 Thread Thomas Huth
On 28.06.2017 10:02, Thomas Huth wrote: > On 28.06.2017 09:28, Viktor Mihajlovski wrote: >> On 27.06.2017 23:40, Thomas Huth wrote: >> [...] > - Is it OK to require loading an .INS file first? Or does anybody > have a better idea how to load multiple files (kernel, initrd, > etc. ..

Re: [Qemu-devel] [PATCH v5 3/4] net/net: Convert parse_host_port() to Error

2017-06-28 Thread Markus Armbruster
Paolo Bonzini writes: > On 28/06/2017 07:51, Markus Armbruster wrote: >>> The gethostbyname() return a null pointer if an error occurs, and the >>> h_errno >>> variable holds an error number. herror() and hstrerror() can prints the >>> error >>> message associated with the current value of h_er

Re: [Qemu-devel] [Qemu-ppc] [PATCH] target/ppc/cpu-models: set POWER9_v1.0 as POWER9 DD1

2017-06-28 Thread Laurent Vivier
On 28/06/2017 03:42, jos...@linux.vnet.ibm.com wrote: > On Fri, Jun 23, 2017 at 04:10:55PM +0200, Laurent Vivier wrote: >> On 23/06/2017 11:21, David Gibson wrote: >>> On Thu, Jun 22, 2017 at 01:31:24PM +0200, Thomas Huth wrote: On 22.06.2017 13:26, Laurent Vivier wrote: > CPU_POWERPC_POWE

Re: [Qemu-devel] [PATCH] exec: fix access to ram_list.dirty_memory when sync dirty bitmap

2017-06-28 Thread Haozhong Zhang
On 06/28/17 11:09 +0200, Juan Quintela wrote: > Haozhong Zhang wrote: > > In cpu_physical_memory_sync_dirty_bitmap(rb, start, ...), the 2nd > > argument 'start' is relative to the start of the ramblock 'rb'. When > > it's used to access the dirty memory bitmap of ram_list (i.e. > > ram_list.dirty_

Re: [Qemu-devel] [PATCH v2] exec: fix access to ram_list.dirty_memory when sync dirty bitmap

2017-06-28 Thread Paolo Bonzini
On 28/06/2017 10:37, Haozhong Zhang wrote: > In cpu_physical_memory_sync_dirty_bitmap(rb, start, ...), the 2nd > argument 'start' is relative to the start of the ramblock 'rb'. When > it's used to access the dirty memory bitmap of ram_list (i.e. > ram_list.dirty_memory[DIRTY_MEMORY_MIGRATION]->bl

Re: [Qemu-devel] [PATCH v4 3/5] migration: Create load_setup()/cleanup() methods

2017-06-28 Thread Dr. David Alan Gilbert
* Juan Quintela (quint...@redhat.com) wrote: > 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 > --- > include/migration/registe

Re: [Qemu-devel] [PATCH RFC v3 8/8] block: add throttle block filter driver interface tests

2017-06-28 Thread Kevin Wolf
Am 23.06.2017 um 14:47 hat Manos Pitsidianakis geschrieben: > Signed-off-by: Manos Pitsidianakis This one doesn't apply because the reference output contains a too long line and a newline was inserted. I think QMP pretty printing can help to avoid overly long lines. Kevin

Re: [Qemu-devel] [PATCH v9 0/7] trace: [tcg] Optimize per-vCPU tracing states with separate TB caches

2017-06-28 Thread Lluís Vilanova
Emilio G Cota writes: > On Tue, Jun 27, 2017 at 12:52:00 +0300, Lluís Vilanova wrote: >> Changes in v9 >> = >> >> * Rebase on 931892e8a6. >> * Undo renaming of tb->trace_vcpu_dstate to the shorter tb->trace_ds. >> * Add measurements to commit enabling all guest events. > I wanted to

Re: [Qemu-devel] [PATCH v4 3/4] virtio-9p: break device if buffers are misconfigured

2017-06-28 Thread Greg Kurz
On Tue, 27 Jun 2017 16:34:51 -0700 (PDT) Stefano Stabellini wrote: > On Tue, 27 Jun 2017, Greg Kurz wrote: > > On Mon, 26 Jun 2017 16:22:23 -0700 (PDT) > > Stefano Stabellini wrote: > > > > > On Fri, 23 Jun 2017, Greg Kurz wrote: > > > > The 9P protocol is transport agnostic: if the guest m

Re: [Qemu-devel] [PATCH v9 06/26] target: [tcg, i386] Port to DisasContextBase

2017-06-28 Thread Lluís Vilanova
Emilio G Cota writes: > On Sun, Jun 25, 2017 at 12:07:57 +0300, Lluís Vilanova wrote: >> Incrementally paves the way towards using the generic instruction translation >> loop. >> >> Signed-off-by: Lluís Vilanova > Just a minor nit: the commit titles are a little strange to me. > I'd rather do:

Re: [Qemu-devel] [PATCH RFC v3 2/8] block: Add aio_context field in ThrottleGroupMember

2017-06-28 Thread Kevin Wolf
Am 23.06.2017 um 14:46 hat Manos Pitsidianakis geschrieben: > timer_cb() needs to know about the current Aio context of the throttle > request that is woken up. In order to make ThrottleGroupMember backend > agnostic, this information is stored in an aio_context field instead of > accessing it from

[Qemu-devel] [PULL 03/14] vl: clean up global property registration

2017-06-28 Thread Juan Quintela
From: Peter Xu It's not that clear on how the global properties are registered to global_props (and also its priority relationship). Let's provide a single function to be called in main() for that, with comment to explain it a bit. Signed-off-by: Peter Xu Message-Id: <1498536619-14548-4-git-sen

[Qemu-devel] [PULL 01/14] machine: export register_compat_prop()

2017-06-28 Thread Juan Quintela
From: Peter Xu We have HW_COMPAT_*, however that's only bound to machines, not other things (like accelerators). Behind it, it was register_compat_prop() that played the trick. Let's export the function for further use outside HW_COMPAT_* magic. Meanwhile, move it to qdev-properties.c where se

[Qemu-devel] [PULL 00/14] Migration pull request for 20170628

2017-06-28 Thread Juan Quintela
it://github.com/juanquintela/qemu.git tags/migration/20170628 for you to fetch changes up to 084140bd4989095d39978269fd0f43e398a0015d: exec: fix access to ram_list.dirty_memory when sync dirty bitmap (2017-06-28 12:23:58 +0200) mig

[Qemu-devel] [PULL 07/14] migration: move skip_configuration out

2017-06-28 Thread Juan Quintela
From: Peter Xu It was in SaveState but now moved to MigrationState altogether, reverted its meaning, then renamed to "send_configuration". Again, using HW_COMPAT_2_3 for old PC/SPAPR machines, and accel_register_prop() for xen_init(). Removing savevm_skip_configuration(). Reviewed-by: Juan Quin

[Qemu-devel] [PULL 04/14] migration: let MigrationState be a qdev

2017-06-28 Thread Juan Quintela
From: Peter Xu Let the old man "MigrationState" join the object family. Direct benefit is that we can start to use all the property features derived from current QDev, like: HW_COMPAT_* bits, command line setup for migration parameters (so will never need to set them up each time using HMP/QMP, t

[Qemu-devel] [PULL 05/14] migration: move global_state.optional out

2017-06-28 Thread Juan Quintela
From: Peter Xu Put it into MigrationState then we can use the properties to specify whether to enable storing global state. Removing global_state_set_optional() since now we can use HW_COMPAT_2_3 for x86/power, and AccelClass.global_props for Xen. Reviewed-by: Juan Quintela Signed-off-by: Pete

[Qemu-devel] [PULL 02/14] accel: introduce AccelClass.global_props

2017-06-28 Thread Juan Quintela
From: Peter Xu Introduce this new field for the accelerator classes so that each specific accelerator in the future can register its own global properties to be used further by the system. It works just like how the old machine compatible properties do, but only tailored for accelerators. Introd

[Qemu-devel] [PULL 09/14] migration: merge enforce_config_section somewhat

2017-06-28 Thread Juan Quintela
From: Peter Xu These two parameters: - MachineState::enforce_config_section - MigrationState::send_configuration are playing similar role here. This patch merges the first one into second, then we'll have a single place to reference whether we need to send the configuration section. I didn't r

[Qemu-devel] [PULL 08/14] migration: move skip_section_footers

2017-06-28 Thread Juan Quintela
From: Peter Xu Move it into MigrationState, revert its meaning and renaming it to send_section_footer, with a property bound to it. Same trick is played like previous patches. Removing savevm_skip_section_footers(). Reviewed-by: Juan Quintela Signed-off-by: Peter Xu Message-Id: <1498536619-14

[Qemu-devel] [PULL 14/14] exec: fix access to ram_list.dirty_memory when sync dirty bitmap

2017-06-28 Thread Juan Quintela
From: Haozhong Zhang In cpu_physical_memory_sync_dirty_bitmap(rb, start, ...), the 2nd argument 'start' is relative to the start of the ramblock 'rb'. When it's used to access the dirty memory bitmap of ram_list (i.e. ram_list.dirty_memory[DIRTY_MEMORY_MIGRATION]->blocks[]), an offset to the star

[Qemu-devel] [PULL 11/14] migration: add comment for TYPE_MIGRATE

2017-06-28 Thread Juan Quintela
From: Peter Xu It'll be strange that the migration object inherits TYPE_DEVICE. Add some explanations to it. Signed-off-by: Peter Xu Message-Id: <1498634144-26508-1-git-send-email-pet...@redhat.com> Reviewed-by: Juan Quintela Signed-off-by: Juan Quintela --- migration/migration.c | 8 +++

Re: [Qemu-devel] [PATCH v2] exec: fix access to ram_list.dirty_memory when sync dirty bitmap

2017-06-28 Thread Juan Quintela
Paolo Bonzini wrote: > On 28/06/2017 10:37, Haozhong Zhang wrote: >> In cpu_physical_memory_sync_dirty_bitmap(rb, start, ...), the 2nd >> argument 'start' is relative to the start of the ramblock 'rb'. When >> it's used to access the dirty memory bitmap of ram_list (i.e. >> ram_list.dirty_memory[D

[Qemu-devel] [PULL 06/14] migration: move only_migratable to MigrationState

2017-06-28 Thread Juan Quintela
From: Peter Xu One less global variable, and it does only matter with migration. We keep the old "--only-migratable" option, but also now we support: -global migration.only-migratable=true Currently still keep the old interface. Hmm, now vl.c has no way to access migrate_get_current(). Expo

Re: [Qemu-devel] [PATCH] exec: fix access to ram_list.dirty_memory when sync dirty bitmap

2017-06-28 Thread Juan Quintela
Haozhong Zhang wrote: > On 06/28/17 11:09 +0200, Juan Quintela wrote: >> Haozhong Zhang wrote: >> > In cpu_physical_memory_sync_dirty_bitmap(rb, start, ...), the 2nd >> > argument 'start' is relative to the start of the ramblock 'rb'. When >> > it's used to access the dirty memory bitmap of ram_l

[Qemu-devel] [PULL 10/14] migration: hmp: dump globals

2017-06-28 Thread Juan Quintela
From: Peter Xu Now we have some globals that can be configured for migration. Dump them in HMP info migration for better debugging. (we can also use this to monitor whether COMPAT fields are applied correctly on compatible machines) Reviewed-by: Juan Quintela Signed-off-by: Peter Xu Message-I

[Qemu-devel] [PULL 13/14] migration: add "return-path" capability

2017-06-28 Thread Juan Quintela
From: Peter Xu When this capability is enabled, QEMU will use the return path even for precopy migration. This is helpful at least in one case when destination failed to load the image while source quited without confirmation. With return path, source will wait for the last response from destinat

Re: [Qemu-devel] [PATCH 1/1] vmstate: error hint for failed equal checks

2017-06-28 Thread Juan Quintela
Halil Pasic wrote: > In some cases a failing VMSTATE_*_EQUAL does not mean we detected a bug, > but it's actually the best we can do. Especially in these cases a verbose > error message is required. > > Let's introduce infrastructure for specifying a error hint to be used if > equal check fails. L

[Qemu-devel] [PULL 12/14] vmstate: error hint for failed equal checks

2017-06-28 Thread Juan Quintela
From: Halil Pasic In some cases a failing VMSTATE_*_EQUAL does not mean we detected a bug, but it's actually the best we can do. Especially in these cases a verbose error message is required. Let's introduce infrastructure for specifying a error hint to be used if equal check fails. Let's do thi

Re: [Qemu-devel] [PATCH v9 21/26] target: [tcg, arm] Port to insn_start

2017-06-28 Thread Lluís Vilanova
Richard Henderson writes: > On 06/25/2017 03:08 AM, Lluís Vilanova wrote: >> +static void arm_trblock_insn_start(DisasContextBase *db, CPUState *cpu) >> +{ >> +DisasContext *dc = container_of(db, DisasContext, base); >> + >> +dc->insn_start_idx = tcg_op_buf_count(); >> +tcg_gen_insn_st

Re: [Qemu-devel] [PATCH 1/1] vmstate: error hint for failed equal checks

2017-06-28 Thread Halil Pasic
On 06/28/2017 01:33 PM, Juan Quintela wrote: > Halil Pasic wrote: >> In some cases a failing VMSTATE_*_EQUAL does not mean we detected a bug, >> but it's actually the best we can do. Especially in these cases a verbose >> error message is required. >> >> Let's introduce infrastructure for specif

Re: [Qemu-devel] [PATCH v3] ARM: KVM: Enable in-kernel timers with user space gic

2017-06-28 Thread Andrew Jones
On Tue, Jun 27, 2017 at 05:35:37PM +0200, Alexander Graf wrote: > When running with KVM enabled, you can choose between emulating the > gic in kernel or user space. If the kernel supports in-kernel virtualization > of the interrupt controller, it will default to that. If not, if will > default to u

Re: [Qemu-devel] [PATCH] aspeed: Register all watchdogs

2017-06-28 Thread Cédric Le Goater
On 06/28/2017 01:47 PM, Joel Stanley wrote: > The ast2400 contains two and the ast2500 contains three watchdogs. > Add this information to the AspeedSoCInfo and realise the correct number > of watchdogs for that each SoC type. > > Signed-off-by: Joel Stanley Reviewed-and-tested-by: Cédric Le Goa

Re: [Qemu-devel] [Qemu-ppc] [PATCH] target/ppc/cpu-models: set POWER9_v1.0 as POWER9 DD1

2017-06-28 Thread Greg Kurz
On Wed, 28 Jun 2017 12:23:06 +0200 Cédric Le Goater wrote: > On 06/28/2017 11:18 AM, Laurent Vivier wrote: > > On 28/06/2017 11:11, Cédric Le Goater wrote: > >> On 06/28/2017 10:18 AM, David Gibson wrote: > >>> On Wed, Jun 28, 2017 at 09:09:24AM +0200, Thomas Huth wrote: > On 28.06.201

Re: [Qemu-devel] [RFC] QMP design: Fixing query-block and friends

2017-06-28 Thread Markus Armbruster
Kevin Wolf writes: > Am 28.06.2017 um 09:10 hat Markus Armbruster geschrieben: >> Eric Blake writes: >> > On 06/27/2017 11:31 AM, Kevin Wolf wrote: >> >> If that's what we're going to do, I think I can figure out something >> >> nice for block nodes. That shouldn't be too hard. The only question

Re: [Qemu-devel] [PATCH v4 3/5] migration: Create load_setup()/cleanup() methods

2017-06-28 Thread Juan Quintela
"Dr. David Alan Gilbert" wrote: > * Juan Quintela (quint...@redhat.com) wrote: >> 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 postc

[Qemu-devel] [PATCH v22 20/30] qcow2: store bitmaps on reopening image as read-only

2017-06-28 Thread Vladimir Sementsov-Ogievskiy
Store bitmaps and mark them read-only on reopening image as read-only. Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Max Reitz --- block/qcow2-bitmap.c | 22 ++ block/qcow2.c| 5 + block/qcow2.h| 1 + 3 files changed, 28 insertions(+) diff -

[Qemu-devel] [PATCH v22 22/30] qcow2: add .bdrv_can_store_new_dirty_bitmap

2017-06-28 Thread Vladimir Sementsov-Ogievskiy
Realize .bdrv_can_store_new_dirty_bitmap interface. Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: John Snow Reviewed-by: Max Reitz --- block/qcow2-bitmap.c | 51 +++ block/qcow2.c| 1 + block/qcow2.h| 4 3 files

[Qemu-devel] [PATCH v22 23/30] qmp: add persistent flag to block-dirty-bitmap-add

2017-06-28 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 Reviewed-by: John Snow --- blockdev.c | 18 +- qapi/block-core.json | 8 +++-

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

2017-06-28 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

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

2017-06-28 Thread Vladimir Sementsov-Ogievskiy
Optional. Default is false. Signed-off-by: Vladimir Sementsov-Ogievskiy Signed-off-by: Denis V. Lunev Reviewed-by: Max Reitz Reviewed-by: John Snow --- blockdev.c | 18 -- qapi/block-core.json | 6 +- 2 files changed, 21 insertions(+), 3 deletions(-) diff --git

[Qemu-devel] [PATCH v22 16/30] block: bdrv_close: release bitmaps after drv->bdrv_close

2017-06-28 Thread Vladimir Sementsov-Ogievskiy
Release bitmaps after 'if (bs->drv) { ... }' block. This will allow format driver to save persistent bitmaps, which will appear in following commits. Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Max Reitz --- block.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff

[Qemu-devel] [PATCH v22 13/30] block: new bdrv_reopen_bitmaps_rw interface

2017-06-28 Thread Vladimir Sementsov-Ogievskiy
Add format driver handler, which should mark loaded read-only bitmaps as 'IN_USE' in the image and unset read_only field in corresponding BdrvDirtyBitmap's. Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: John Snow --- block.c | 19 +++ include/block/b

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

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

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

2017-06-28 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 v22 27/30] block/dirty-bitmap: add bdrv_remove_persistent_dirty_bitmap

2017-06-28 Thread Vladimir Sementsov-Ogievskiy
Interface for removing persistent bitmap from its storage. Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Max Reitz Reviewed-by: John Snow --- block/dirty-bitmap.c | 18 ++ include/block/block_int.h| 3 +++ include/block/dirty-bitmap.h | 3 +++ 3 files c

[Qemu-devel] [PATCH v22 28/30] qcow2: add .bdrv_remove_persistent_dirty_bitmap

2017-06-28 Thread Vladimir Sementsov-Ogievskiy
Realize .bdrv_remove_persistent_dirty_bitmap interface. Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Max Reitz Reviewed-by: John Snow --- block/qcow2-bitmap.c | 41 + block/qcow2.c| 1 + block/qcow2.h| 3 +++ 3 files changed

[Qemu-devel] [PATCH v22 29/30] qmp: block-dirty-bitmap-remove: remove persistent

2017-06-28 Thread Vladimir Sementsov-Ogievskiy
Remove persistent bitmap from the storage on block-dirty-bitmap-remove. Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Max Reitz Reviewed-by: John Snow --- blockdev.c | 10 ++ qapi/block-core.json | 3 ++- 2 files changed, 12 insertions(+), 1 deletion(-) diff --gi

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

2017-06-28 Thread Vladimir Sementsov-Ogievskiy
Signed-off-by: Vladimir Sementsov-Ogievskiy --- block/dirty-bitmap.c | 5 + blockdev.c | 25 + include/block/dirty-bitmap.h | 1 + include/qemu/hbitmap.h | 8 qapi/block-core.json | 27 +++ tes

[Qemu-devel] [PATCH v22 11/30] qcow2: autoloading dirty bitmaps

2017-06-28 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 Reviewed-by: Max Reitz Reviewed-by: Jo

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

2017-06-28 Thread Vladimir Sementsov-Ogievskiy
Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: John Snow --- docs/interop/qcow2.txt | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/docs/interop/qcow2.txt b/docs/interop/qcow2.txt index 80cdfd0e91..dda53dd2a3 100644 --- a/docs/interop/qcow2.txt +++ b/docs/interop/

[Qemu-devel] [PATCH v22 30/30] block: release persistent bitmaps on inactivate

2017-06-28 Thread Vladimir Sementsov-Ogievskiy
We should release them here to reload on invalidate cache. Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Max Reitz --- block.c | 4 block/dirty-bitmap.c | 29 +++-- include/block/dirty-bitmap.h | 1 + 3 files changed, 28 ins

  1   2   3   4   >