Re: [Qemu-devel] [RFC v2 32/33] migration: allow migrate_incoming for paused VM

2017-09-22 Thread Dr. David Alan Gilbert
* Peter Xu (pet...@redhat.com) wrote: > migrate_incoming command is previously only used when we were providing > "-incoming defer" in the command line, to defer the incoming migration > channel creation. > > However there is similar requirement when we are paused during postcopy > migration. The

Re: [Qemu-devel] [PATCH] MAINTAINERS: Fix subsystem name for "Build and test automation"

2017-09-22 Thread Eric Blake
On 09/21/2017 10:30 PM, Fam Zheng wrote: >>> Build and test automation >>> - >>> +Build and test automation >> >> Would it make sense to use something more specific here? Like "Travis >> and Docker" or so? ... in case we add other subsections in the future? > > Unless

Re: [Qemu-devel] [RFC v2 30/33] migration: return incoming task tag for fd

2017-09-22 Thread Dr. David Alan Gilbert
* Peter Xu (pet...@redhat.com) wrote: > Allow to return the task tag in fd_start_incoming_migration(). > > Signed-off-by: Peter Xu Reviewed-by: Dr. David Alan Gilbert > --- > migration/fd.c | 18 +++--- > migration/fd.h | 2 +- > 2 files

Re: [Qemu-devel] [RFC v2 31/33] migration: store listen task tag

2017-09-22 Thread Dr. David Alan Gilbert
* Peter Xu (pet...@redhat.com) wrote: > Store the task tag for migration types: tcp/unix/fd/exec in current > MigrationIncomingState struct. > > For defered migration, no need to store task tag since there is no task > running in the main loop at all. For RDMA, let's mark it as todo. > >

Re: [Qemu-devel] nbd structured reply

2017-09-22 Thread Eric Blake
On 09/22/2017 09:57 AM, Vladimir Sementsov-Ogievskiy wrote: >> If you have suggestions for improving the NBD spec wording, feel free to >> propose a doc patch. >> > > Thanks, now I understand.. However I don't have good idea of wording.. > > > Another thing: server can send several error and

Re: [Qemu-devel] [PATCH] block/qcow2-bitmap: fix use of uninitialized pointer

2017-09-22 Thread Eric Blake
On 09/22/2017 09:43 AM, Vladimir Sementsov-Ogievskiy wrote: > Without initialization to zero dirty_bitmap field may be not zero > for a bitmap which should not be stored and > qcow2_store_persistent_dirty_bitmaps will erroneously call > store_bitmap for it which leads to SYGSEGV on

Re: [Qemu-devel] [PATCH 26/34] hw/net/ne2000: extract ne2k-isa code from i386/pc to ne2000-isa.c

2017-09-22 Thread Hervé Poussineau
Le 22/09/2017 à 18:01, Philippe Mathieu-Daudé a écrit : - add "hw/net/ne2000-isa.h" (and new entry in MAINTAINERS) - remove the old i386 dependency Signed-off-by: Philippe Mathieu-Daudé --- hw/net/ne2000.h | 3 +++ include/hw/i386/pc.h| 20

Re: [Qemu-devel] [PATCH 25/34] hw/timer/m48t59: use TYPE_M48T59_ISA, add entries to MAINTAINERS

2017-09-22 Thread Hervé Poussineau
Le 22/09/2017 à 18:01, Philippe Mathieu-Daudé a écrit : Signed-off-by: Philippe Mathieu-Daudé --- include/hw/timer/m48t59.h | 2 ++ hw/ppc/prep.c | 2 +- hw/timer/m48t59-isa.c | 2 +- MAINTAINERS | 2 ++ 4 files changed, 6 insertions(+), 2

Re: [Qemu-devel] [RFC v2 29/33] migration: return incoming task tag for exec

2017-09-22 Thread Dr. David Alan Gilbert
* Peter Xu (pet...@redhat.com) wrote: > Return the async task tag for exec typed incoming migration in > exec_start_incoming_migration(). > > Signed-off-by: Peter Xu Reviewed-by: Dr. David Alan Gilbert > --- > migration/exec.c | 18 +++--- >

Re: [Qemu-devel] [PATCH v2 3/4] fw_cfg: write vmcoreinfo details

2017-09-22 Thread kbuild test robot
Hi Marc-André, [auto build test ERROR on linus/master] [also build test ERROR on v4.14-rc1 next-20170922] [if your patch is applied to the wrong git tree, please drop us a note to help improve the system] url: https://github.com/0day-ci/linux/commits/marcandre-lureau-redhat-com/fw_cfg-add

[Qemu-devel] [PULL v3 00/32] Misc patches for 2017-09-22

2017-09-22 Thread Paolo Bonzini
The following changes since commit b62b7ed0fc9c58e373b8946c9bd2e193be98dae6: Merge remote-tracking branch 'remotes/gkurz/tags/for-upstream' into staging (2017-09-20 20:33:48 +0100) are available in the git repository at: git://github.com/bonzini/qemu.git tags/for-upstream for you to fetch

Re: [Qemu-devel] [RFC PATCH] qdev: Mark devices as non-hotpluggable by default

2017-09-22 Thread Cédric Le Goater
On 09/22/2017 09:47 AM, Thomas Huth wrote: > On 21.09.2017 20:50, Eduardo Habkost wrote: >> On Tue, Sep 19, 2017 at 10:55:53AM +0200, Thomas Huth wrote: >>> Historically we've marked all devices as hotpluggable by default. However, >>> most devices are not hotpluggable, and you also need a

Re: [Qemu-devel] [PATCH 22/34] hw/input/i8042: extract API from hw/i386/pc.h

2017-09-22 Thread Hervé Poussineau
Le 22/09/2017 à 17:40, Philippe Mathieu-Daudé a écrit : - include vmmouse - add entries in MAINTAINERS (pckbd.c, i8042.h) Signed-off-by: Philippe Mathieu-Daudé --- include/hw/i386/pc.h | 11 --- include/hw/input/i8042.h | 30 ++

Re: [Qemu-devel] [RFC v2 28/33] migration: return incoming task tag for sockets

2017-09-22 Thread Dr. David Alan Gilbert
* Peter Xu (pet...@redhat.com) wrote: > For socket based incoming migration, we attached a background task onto > main loop to handle the acception of connections. We never had a way to > destroy it before, only if we finished the migration. > > Let's allow socket_start_incoming_migration() to

Re: [Qemu-devel] [PATCH 20/34] hw/timer/i8254: rename pit_init() -> i8254_pit_init()

2017-09-22 Thread Hervé Poussineau
Le 22/09/2017 à 17:40, Philippe Mathieu-Daudé a écrit : - add entry for i82378 in MAINTAINERS - remove the old i386/pc dependency Signed-off-by: Philippe Mathieu-Daudé --- include/hw/timer/i8254.h | 5 +++-- include/hw/timer/i8254_internal.h | 2 +-

Re: [Qemu-devel] [PATCH 30/34] hw/net/pcnet: use TYPE_PCI_PCNET

2017-09-22 Thread Hervé Poussineau
Le 22/09/2017 à 18:01, Philippe Mathieu-Daudé a écrit : Signed-off-by: Philippe Mathieu-Daudé --- include/hw/net/pci.h | 1 + hw/mips/mips_malta.c | 2 +- hw/net/pcnet-pci.c | 3 +-- hw/ppc/prep.c| 3 ++- 4 files changed, 5 insertions(+), 4 deletions(-)

Re: [Qemu-devel] [PATCH] qga-win: don't hang if vss hold writes timeout

2017-09-22 Thread Tomoki Sekiyama
Thanks for your patch. Which version of Windows have you found the hang? Regards, Tomoki 2017-09-22 11:46 GMT+09:00 Chen Hanxiao : > From: Chen Hanxiao > > When VM is in a heavy IO, if the command "guest-fsfreeze-freeze" > is executed, VSS may

Re: [Qemu-devel] [PATCH 21/34] hw/display/vga: remove the old i386/pc dependency

2017-09-22 Thread Hervé Poussineau
Le 22/09/2017 à 17:40, Philippe Mathieu-Daudé a écrit : move public API to "hw/display/vga.h" and private registers to "hw/display/vga_int_regs.h" Signed-off-by: Philippe Mathieu-Daudé --- ./scripts/get_maintainer.pl -f hw/display/vga* get_maintainer.pl: No maintainers

Re: [Qemu-devel] [PULL 28/36] tests: Add ubuntu.i386 image

2017-09-22 Thread Programmingkid
> On Sep 22, 2017, at 9:18 AM, Daniel P. Berrange wrote: > > On Fri, Sep 22, 2017 at 08:44:05PM +0800, Fam Zheng wrote: >> On Fri, 09/22 08:10, Programmingkid wrote: >>> Could a Darwin test be added? Both x86 and PowerPC versions would be great. >> >> It's nice to cover

Re: [Qemu-devel] [PATCH] scripts/orderfile: keep MAINTAINERS at bottom

2017-09-22 Thread Eric Blake
On 09/22/2017 11:13 AM, Philippe Mathieu-Daudé wrote: > Signed-off-by: Philippe Mathieu-Daudé > --- > scripts/git.orderfile | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/scripts/git.orderfile b/scripts/git.orderfile > index ac699700b1..34619769c2 100644 > ---

Re: [Qemu-devel] [PATCH] pci: allow 32-bit PCI IO accesses to pass through the PCI bridge

2017-09-22 Thread Richard Henderson
On 09/22/2017 07:18 AM, Mark Cave-Ayland wrote: > Whilst the underlying PCI bridge implementation supports 32-bit PCI IO > accesses, unfortunately they are truncated at the legacy 64K limit. > > Signed-off-by: Mark Cave-Ayland > --- > hw/pci/pci_bridge.c |3

Re: [Qemu-devel] [PULL 00/32] Misc patches for 2017-09-22 (v2)

2017-09-22 Thread Paolo Bonzini
On 22/09/2017 20:09, Peter Maydell wrote: > On 22 September 2017 at 16:04, Paolo Bonzini wrote: >> The following changes since commit b62b7ed0fc9c58e373b8946c9bd2e193be98dae6: >> >> Merge remote-tracking branch 'remotes/gkurz/tags/for-upstream' into >> staging (2017-09-20

Re: [Qemu-devel] [RFC v2 27/33] migration: free SocketAddress where allocated

2017-09-22 Thread Dr. David Alan Gilbert
* Peter Xu (pet...@redhat.com) wrote: > Freeing the SocketAddress struct in socket_start_incoming_migration is > slightly confusing. Let's free the address in the same context where we > allocated it. > > Signed-off-by: Peter Xu Reviewed-by: Dr. David Alan Gilbert

Re: [Qemu-devel] [PATCH 32/34] hw/net/ne2000: use TYPE_PCI_NE2000

2017-09-22 Thread Hervé Poussineau
Le 22/09/2017 à 18:01, Philippe Mathieu-Daudé a écrit : Signed-off-by: Philippe Mathieu-Daudé --- include/hw/net/pci.h | 1 + hw/net/ne2000.c | 3 ++- hw/ppc/mac_newworld.c | 3 ++- hw/ppc/mac_oldworld.c | 3 ++- hw/ppc/prep.c | 2 +- hw/sparc64/sun4u.c

Re: [Qemu-devel] [PATCH 24/34] hw/timer/mc146818: rename rtc_init() -> mc146818_init()

2017-09-22 Thread Hervé Poussineau
Le 22/09/2017 à 18:01, Philippe Mathieu-Daudé a écrit : and remove the old i386/pc dependency Signed-off-by: Philippe Mathieu-Daudé --- include/hw/timer/mc146818rtc.h | 3 ++- hw/alpha/dp264.c | 2 +- hw/i386/pc.c | 2 +- hw/isa/i82378.c

Re: [Qemu-devel] [PULL 28/36] tests: Add ubuntu.i386 image

2017-09-22 Thread Programmingkid
> On Sep 22, 2017, at 8:44 AM, Fam Zheng wrote: > > On Fri, 09/22 08:10, Programmingkid wrote: >> Could a Darwin test be added? Both x86 and PowerPC versions would be great. > > It's nice to cover macOS in our test, but to be honest I don't know how to do > it. If there isn't

Re: [Qemu-devel] [RFC v2 33/33] migration: init dst in migration_object_init too

2017-09-22 Thread Dr. David Alan Gilbert
* Peter Xu (pet...@redhat.com) wrote: > Though we may not need it, now we init both the src/dst migration > objects in migration_object_init() so that even incoming migration > object would be thread safe (it was not). > > Signed-off-by: Peter Xu Reviewed-by: Dr. David Alan

Re: [Qemu-devel] [PATCH] pci: allow 32-bit PCI IO accesses to pass through the PCI bridge

2017-09-22 Thread Laszlo Ersek
On 09/22/17 14:18, Mark Cave-Ayland wrote: > Whilst the underlying PCI bridge implementation supports 32-bit PCI IO > accesses, unfortunately they are truncated at the legacy 64K limit. > > Signed-off-by: Mark Cave-Ayland > --- > hw/pci/pci_bridge.c |3 ++- >

[Qemu-devel] [PATCH] chardev/baum: fix baum that releases brlapi twice

2017-09-22 Thread Liang Yan
Error process of baum_chr_open needs to set brlapi null, so it won't get released twice in char_braille_finalize, which will cause "/usr/bin/qemu-system-x86_64: double free or corruption (!prev)" Signed-off-by: Liang Yan --- chardev/baum.c | 1 + 1 file changed, 1 insertion(+)

Re: [Qemu-devel] [PATCH v2 3/4] chardev: use per-dev context for io_add_watch_poll

2017-09-22 Thread Peter Xu
On Thu, Sep 21, 2017 at 04:11:33PM +0200, Paolo Bonzini wrote: > On 21/09/2017 08:35, Peter Xu wrote: > > It was only passed in by chr_update_read_handlers(). However when > > reconnect, we'll lose that context information. So if a chardev was > > running on another context (rather than the

Re: [Qemu-devel] [PATCH 1/3] iothread: provide helpers for internal use

2017-09-22 Thread Paolo Bonzini
On 22/09/2017 11:43, Daniel P. Berrange wrote: > On Fri, Sep 22, 2017 at 11:38:31AM +0200, Paolo Bonzini wrote: >> On 22/09/2017 11:36, Daniel P. Berrange wrote: >>> On Fri, Sep 22, 2017 at 05:14:30PM +0800, Peter Xu wrote: On Fri, Sep 22, 2017 at 10:04:33AM +0100, Daniel P. Berrange wrote:

Re: [Qemu-devel] [PATCH 1/3] iothread: provide helpers for internal use

2017-09-22 Thread Daniel P. Berrange
On Fri, Sep 22, 2017 at 12:14:04PM +0200, Paolo Bonzini wrote: > On 22/09/2017 11:43, Daniel P. Berrange wrote: > > On Fri, Sep 22, 2017 at 11:38:31AM +0200, Paolo Bonzini wrote: > >> On 22/09/2017 11:36, Daniel P. Berrange wrote: > >>> On Fri, Sep 22, 2017 at 05:14:30PM +0800, Peter Xu wrote: >

Re: [Qemu-devel] [PATCH 1/3] iothread: provide helpers for internal use

2017-09-22 Thread Daniel P. Berrange
On Fri, Sep 22, 2017 at 12:26:16PM +0200, Paolo Bonzini wrote: > On 22/09/2017 12:20, Daniel P. Berrange wrote: > > On Fri, Sep 22, 2017 at 12:18:44PM +0200, Paolo Bonzini wrote: > >> On 22/09/2017 12:16, Stefan Hajnoczi wrote: > >>> I suggest adding internal IOThreads alongside user-created

Re: [Qemu-devel] [PATCH] ppc/pnv: fix cores per chip for multiple cpus

2017-09-22 Thread Cédric Le Goater
On 09/22/2017 12:12 PM, David Gibson wrote: > On Fri, Sep 22, 2017 at 08:07:06AM +0200, Cédric Le Goater wrote: >> On 09/22/2017 08:00 AM, Nikunj A Dadhania wrote: >>> David Gibson writes: >>> >>> >>> As smp_thread defaults to 1 in vl.c, similarly smp_cores

Re: [Qemu-devel] Support for ARM CP15 registers via GDB interface of qemu

2017-09-22 Thread Peter Maydell
On 22 September 2017 at 11:39, Abhijit Ray Chaudhury wrote: > I want to view ARM CP15 register sets via gdb when I am emulating arm. > However I only see ARM Core Register Sets and NEON registers through > gdb interface. > > Can you please let me know how to add

Re: [Qemu-devel] [PATCH v2 1/3] block: add bdrv_co_drain_end callback

2017-09-22 Thread Kevin Wolf
Am 22.09.2017 um 04:30 hat Fam Zheng geschrieben: > On Thu, 09/21 18:39, Manos Pitsidianakis wrote: > > On Thu, Sep 21, 2017 at 09:29:43PM +0800, Fam Zheng wrote: > > > On Thu, 09/21 16:17, Manos Pitsidianakis wrote: > > It might imply to someone that there's an assert(drv->bdrv_co_drain_begin &&

Re: [Qemu-devel] [RFC v2 23/33] migration: introduce SaveVMHandlers.resume_prepare

2017-09-22 Thread Dr. David Alan Gilbert
* Peter Xu (pet...@redhat.com) wrote: > This is hook function to be called when a postcopy migration wants to > resume from a failure. For each module, it should provide its own > recovery logic before we switch to the postcopy-active state. > > Signed-off-by: Peter Xu

Re: [Qemu-devel] [RFC v2 15/33] migration: pass MigrationState to migrate_init()

2017-09-22 Thread Dr. David Alan Gilbert
* Peter Xu (pet...@redhat.com) wrote: > Let the callers take the object, then pass it to migrate_init(). > > Signed-off-by: Peter Xu Reviewed-by: Dr. David Alan Gilbert > --- > migration/migration.c | 7 ++- > migration/migration.h | 2 +- >

[Qemu-devel] [PATCH v2] qdev: Mark devices as non-hotpluggable by default

2017-09-22 Thread Thomas Huth
Historically we've marked all devices as hotpluggable by default. However, most devices are not hotpluggable, and you also need a HotplugHandler to support these devices. So if the user tries to "device_add" or "device_del" such a non-hotpluggable device during runtime, either nothing really

[Qemu-devel] [PATCH v2 1/2] qcow2: fix return error code in qcow2_truncate()

2017-09-22 Thread Pavel Butsykin
Signed-off-by: Pavel Butsykin Reviewed-by: Eric Blake Reviewed-by: John Snow Reviewed-by: Max Reitz --- block/qcow2.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/block/qcow2.c

Re: [Qemu-devel] [PATCH 1/3] iothread: provide helpers for internal use

2017-09-22 Thread Paolo Bonzini
On 22/09/2017 11:36, Daniel P. Berrange wrote: > On Fri, Sep 22, 2017 at 05:14:30PM +0800, Peter Xu wrote: >> On Fri, Sep 22, 2017 at 10:04:33AM +0100, Daniel P. Berrange wrote: >>> On Fri, Sep 22, 2017 at 04:56:10PM +0800, Peter Xu wrote: IOThread is a general framework that contains IO loop

Re: [Qemu-devel] [PATCH 1/3] iothread: provide helpers for internal use

2017-09-22 Thread Daniel P. Berrange
On Fri, Sep 22, 2017 at 11:38:31AM +0200, Paolo Bonzini wrote: > On 22/09/2017 11:36, Daniel P. Berrange wrote: > > On Fri, Sep 22, 2017 at 05:14:30PM +0800, Peter Xu wrote: > >> On Fri, Sep 22, 2017 at 10:04:33AM +0100, Daniel P. Berrange wrote: > >>> On Fri, Sep 22, 2017 at 04:56:10PM +0800,

Re: [Qemu-devel] [RFC v2 16/33] migration: rebuild channel on source

2017-09-22 Thread Dr. David Alan Gilbert
* Peter Xu (pet...@redhat.com) wrote: > This patch detects the "resume" flag of migration command, rebuild the > channels only if the flag is set. > > Signed-off-by: Peter Xu Reviewed-by: Dr. David Alan Gilbert > --- > migration/migration.c | 92 >

Re: [Qemu-devel] [PATCH] ppc/pnv: fix cores per chip for multiple cpus

2017-09-22 Thread David Gibson
On Thu, Sep 21, 2017 at 09:42:26AM +0200, Igor Mammedov wrote: > On Thu, 21 Sep 2017 08:04:55 +0200 > Cédric Le Goater wrote: > > > On 09/21/2017 05:54 AM, Nikunj A Dadhania wrote: > > > David Gibson writes: > > > > > >> On Wed, Sep 20, 2017 at

Re: [Qemu-devel] [PATCH] ppc/pnv: fix cores per chip for multiple cpus

2017-09-22 Thread David Gibson
On Thu, Sep 21, 2017 at 08:04:55AM +0200, Cédric Le Goater wrote: > On 09/21/2017 05:54 AM, Nikunj A Dadhania wrote: > > David Gibson writes: > > > >> On Wed, Sep 20, 2017 at 12:48:55PM +0530, Nikunj A Dadhania wrote: > >>> David Gibson

Re: [Qemu-devel] [PATCH v2] qdev: Mark devices as non-hotpluggable by default

2017-09-22 Thread David Gibson
On Fri, Sep 22, 2017 at 11:16:34AM +0200, Thomas Huth wrote: > Historically we've marked all devices as hotpluggable by default. However, > most devices are not hotpluggable, and you also need a HotplugHandler to > support these devices. So if the user tries to "device_add" or "device_del" > such

Re: [Qemu-devel] [PATCH 1/3] iothread: provide helpers for internal use

2017-09-22 Thread Daniel P. Berrange
On Fri, Sep 22, 2017 at 12:18:44PM +0200, Paolo Bonzini wrote: > On 22/09/2017 12:16, Stefan Hajnoczi wrote: > > I suggest adding internal IOThreads alongside user-created IOThreads > > instead of hiding them. IOThread also needs a bool user_created field > > and a

Re: [Qemu-devel] [PATCH 1/3] iothread: provide helpers for internal use

2017-09-22 Thread Paolo Bonzini
On 22/09/2017 12:16, Stefan Hajnoczi wrote: > I suggest adding internal IOThreads alongside user-created IOThreads > instead of hiding them. IOThread also needs a bool user_created field > and a UserCreatableClass->can_be_deleted() function: > > static bool

Re: [Qemu-devel] [PATCH 1/3] iothread: provide helpers for internal use

2017-09-22 Thread Paolo Bonzini
On 22/09/2017 12:20, Daniel P. Berrange wrote: > On Fri, Sep 22, 2017 at 12:18:44PM +0200, Paolo Bonzini wrote: >> On 22/09/2017 12:16, Stefan Hajnoczi wrote: >>> I suggest adding internal IOThreads alongside user-created IOThreads >>> instead of hiding them. IOThread also needs a bool

[Qemu-devel] [PATCH 1/3] iothread: provide helpers for internal use

2017-09-22 Thread Peter Xu
IOThread is a general framework that contains IO loop environment and a real thread behind. It's also good to be used internally inside qemu. Provide some helpers for it to create iothreads to be used internally. Signed-off-by: Peter Xu --- include/sysemu/iothread.h | 8

[Qemu-devel] [PATCH 3/3] iothread: delay the context release to finalize

2017-09-22 Thread Peter Xu
When gcontext is used with iothread, the context will be destroyed during iothread_stop(). That's not good since sometimes we would like to keep the resources until iothread is destroyed, but we may want to stop the thread before that point. Delay the destruction of gcontext to iothread

[Qemu-devel] [PATCH 0/3] iothread: allow to create internal iothreads

2017-09-22 Thread Peter Xu
When trying to support monitor OOB (out-of-band) commands, I found that the monitor IO thread I did looks just like iothread. It would be best if I can use iothread directly. However it seems that it was mostly used by "-object iothread" before but not friendly to internal usages. This series

[Qemu-devel] [PATCH 2/3] iothread: export iothread_stop()

2017-09-22 Thread Peter Xu
So that internal iothread users can explicitly stop one iothread without destroying it. Since at it, fix iothread_stop() to allow re-entrance. Before this patch we may call iothread_stop() twice on single iothread, while that may not be correct since qemu_thread_join() is not allowed to run

Re: [Qemu-devel] [PATCH 1/3] iothread: provide helpers for internal use

2017-09-22 Thread Daniel P. Berrange
On Fri, Sep 22, 2017 at 04:56:10PM +0800, Peter Xu wrote: > IOThread is a general framework that contains IO loop environment and a > real thread behind. It's also good to be used internally inside qemu. > Provide some helpers for it to create iothreads to be used internally. > > Signed-off-by:

[Qemu-devel] [PATCH v2 0/2] Truncate the tail of the image file in qcow2 shrinking

2017-09-22 Thread Pavel Butsykin
Now after shrinking the qcow2 image, at the end of the image file, there might be a tail that probably will never be used. Although it will not bring any tangible benefit, we can cut the tail if it is. Yes, it will not free up disk space, but if the blocks were be allocated sequentially and the

Re: [Qemu-devel] [PATCH 1/3] iothread: provide helpers for internal use

2017-09-22 Thread Stefan Hajnoczi
On Fri, Sep 22, 2017 at 04:56:10PM +0800, Peter Xu wrote: > IOThread is a general framework that contains IO loop environment and a > real thread behind. It's also good to be used internally inside qemu. > Provide some helpers for it to create iothreads to be used internally. > > Signed-off-by:

[Qemu-devel] Support for ARM CP15 registers via GDB interface of qemu

2017-09-22 Thread Abhijit Ray Chaudhury
Hi, I want to view ARM CP15 register sets via gdb when I am emulating arm. However I only see ARM Core Register Sets and NEON registers through gdb interface. Can you please let me know how to add cp15 register set support using gdb interface in qemu. Thanks in advance, -Abhijit

Re: [Qemu-devel] [Qemu-block] [PATCH 1/6] qemu-io: Reset qemuio_blk permissions before each command

2017-09-22 Thread Kevin Wolf
Am 21.09.2017 um 15:53 hat Kevin Wolf geschrieben: > Am 15.09.2017 um 12:10 hat Kevin Wolf geschrieben: > > qemu-io provides a 'reopen' command that allows switching from writable > > to read-only access. We need to make sure that we don't try to keep > > write permissions to a BlockBackend that

Re: [Qemu-devel] [RFC v2 20/33] migration: new message MIG_RP_MSG_RECV_BITMAP

2017-09-22 Thread Dr. David Alan Gilbert
* Peter Xu (pet...@redhat.com) wrote: > Introducing new return path message MIG_RP_MSG_RECV_BITMAP to send > received bitmap of ramblock back to source. > > This is the reply message of MIG_CMD_RECV_BITMAP, it contains not only > the header (including the ramblock name), and it was appended with

Re: [Qemu-devel] [PATCH] ppc/pnv: fix cores per chip for multiple cpus

2017-09-22 Thread Nikunj A Dadhania
Cédric Le Goater writes: > On 09/22/2017 08:00 AM, Nikunj A Dadhania wrote: >> David Gibson writes: >> >> >> As smp_thread defaults to 1 in vl.c, similarly smp_cores also has the >> default value of 1 in vl.c. In powernv, we were setting

Re: [Qemu-devel] [PATCH 1/3] iothread: provide helpers for internal use

2017-09-22 Thread Peter Xu
On Fri, Sep 22, 2017 at 10:04:33AM +0100, Daniel P. Berrange wrote: > On Fri, Sep 22, 2017 at 04:56:10PM +0800, Peter Xu wrote: > > IOThread is a general framework that contains IO loop environment and a > > real thread behind. It's also good to be used internally inside qemu. > > Provide some

Re: [Qemu-devel] [PATCH] qemu.py: Call logging.basicConfig() automatically

2017-09-22 Thread Kevin Wolf
Am 22.09.2017 um 10:37 hat Lukáš Doktor geschrieben: > But we should focus on fixing all the entry points (either initialize > from all of them, or force-create the root logger based on the > entry-point requirements). Kevin, could you please share the exact > reproducer? I used a custom file

[Qemu-devel] [PATCH v2 2/2] qcow2: truncate the tail of the image file after shrinking the image

2017-09-22 Thread Pavel Butsykin
Now after shrinking the image, at the end of the image file, there might be a tail that probably will never be used. So we can find the last used cluster and cut the tail. Signed-off-by: Pavel Butsykin --- block/qcow2-refcount.c | 22 ++

Re: [Qemu-devel] [PATCH v2 0/2] Truncate the tail of the image file in qcow2 shrinking

2017-09-22 Thread Daniel P. Berrange
On Fri, Sep 22, 2017 at 12:39:24PM +0300, Pavel Butsykin wrote: > Now after shrinking the qcow2 image, at the end of the image file, there might > be a tail that probably will never be used. Although it will not bring any > tangible benefit, we can cut the tail if it is. Yes, it will not free up

Re: [Qemu-devel] [PATCH] ppc/pnv: fix cores per chip for multiple cpus

2017-09-22 Thread David Gibson
On Fri, Sep 22, 2017 at 08:07:06AM +0200, Cédric Le Goater wrote: > On 09/22/2017 08:00 AM, Nikunj A Dadhania wrote: > > David Gibson writes: > > > > > > As smp_thread defaults to 1 in vl.c, similarly smp_cores also has the > > default value of 1 in vl.c.

Re: [Qemu-devel] [PATCH v2 3/3] block/throttle.c: add bdrv_co_drain_begin/end callbacks

2017-09-22 Thread Stefan Hajnoczi
On Thu, Sep 21, 2017 at 04:17:07PM +0300, Manos Pitsidianakis wrote: > Reviewed-by: Stefan Hajnoczi > Signed-off-by: Manos Pitsidianakis > --- > block/throttle.c | 18 ++ > 1 file changed, 18 insertions(+) Reviewed-by: Stefan Hajnoczi

Re: [Qemu-devel] [PATCH v2 1/4] fw_cfg: add DMA register

2017-09-22 Thread kbuild test robot
Hi Marc-André, [auto build test ERROR on linus/master] [also build test ERROR on v4.14-rc1 next-20170922] [if your patch is applied to the wrong git tree, please drop us a note to help improve the system] url: https://github.com/0day-ci/linux/commits/marcandre-lureau-redhat-com/fw_cfg-add

Re: [Qemu-devel] [RFC v2 21/33] migration: new cmd MIG_CMD_POSTCOPY_RESUME

2017-09-22 Thread Dr. David Alan Gilbert
* Peter Xu (pet...@redhat.com) wrote: > Introducing this new command to be sent when the source VM is ready to > resume the paused migration. What the destination does here is > basically release the fault thread to continue service page faults. > > Signed-off-by: Peter Xu >

Re: [Qemu-devel] [PULL 0/1] s390x bugfix (needed for stable)

2017-09-22 Thread Peter Maydell
> 17:42:27 +0100) > > are available in the git repository at: > > git://github.com/cohuck/qemu tags/s390x-20170922 > > for you to fetch changes up to 3f2d07b3b01ea61126b382633ab4006320923048: > > s390x/ais: for 2.10 stable: di

Re: [Qemu-devel] [RFC v2 22/33] migration: new message MIG_RP_MSG_RESUME_ACK

2017-09-22 Thread Dr. David Alan Gilbert
* Peter Xu (pet...@redhat.com) wrote: > Creating new message to reply for MIG_CMD_POSTCOPY_RESUME. One uint32_t > is used as payload to let the source know whether destination is ready > to continue the migration. > > Signed-off-by: Peter Xu Acked-by: Dr. David Alan Gilbert

Re: [Qemu-devel] [RFC PATCH v2 01/21] ppc/xive: introduce a skeleton for the sPAPR XIVE interrupt controller

2017-09-22 Thread David Gibson
On Tue, Sep 19, 2017 at 03:15:44PM +0200, Cédric Le Goater wrote: > On 09/19/2017 04:27 AM, David Gibson wrote: > > On Mon, Sep 11, 2017 at 07:12:15PM +0200, Cédric Le Goater wrote: > >> Start with a couple of attributes for the XIVE sPAPR controller > >> model. The number of provisionned IRQ is

Re: [Qemu-devel] [RFC PATCH v2 09/21] ppc/xive: extend the interrupt presenter model for XIVE

2017-09-22 Thread David Gibson
On Tue, Sep 19, 2017 at 09:28:45PM +0200, Cédric Le Goater wrote: > On 09/19/2017 09:36 AM, David Gibson wrote: > > On Mon, Sep 11, 2017 at 07:12:23PM +0200, Cédric Le Goater wrote: > >> The XIVE interrupt presenter exposes a set of Thread Interrupt > >> Management Areas, also called rings, one

Re: [Qemu-devel] [RFC PATCH v2 07/21] ppc/xive: add MMIO handlers for the XIVE interrupt sources

2017-09-22 Thread David Gibson
On Wed, Sep 20, 2017 at 02:54:31PM +0200, Cédric Le Goater wrote: > On 09/19/2017 04:57 AM, David Gibson wrote: > > On Mon, Sep 11, 2017 at 07:12:21PM +0200, Cédric Le Goater wrote: > >> Each interrupt source is associated with a two bit state machine > >> called an Event State Buffer (ESB) which

Re: [Qemu-devel] [PATCH] seccomp: Don't include libseccomp from QEMU header

2017-09-22 Thread Peter Maydell
On 22 September 2017 at 08:54, Eduardo Otubo wrote: > On Fri, Sep 22, 2017 at 09:09:27AM +0200, Jan Kiszka wrote: >> On 2017-09-20 10:36, Fam Zheng wrote: >> > The only prototype doesn't need anything from the lib header, and not >> > including it here allows files that include

Re: [Qemu-devel] [PATCH 1/3] iothread: provide helpers for internal use

2017-09-22 Thread Daniel P. Berrange
On Fri, Sep 22, 2017 at 05:14:30PM +0800, Peter Xu wrote: > On Fri, Sep 22, 2017 at 10:04:33AM +0100, Daniel P. Berrange wrote: > > On Fri, Sep 22, 2017 at 04:56:10PM +0800, Peter Xu wrote: > > > IOThread is a general framework that contains IO loop environment and a > > > real thread behind.

Re: [Qemu-devel] [PATCH] atomic: update documentation

2017-09-22 Thread Alex Bennée
Paolo Bonzini writes: > Signed-off-by: Paolo Bonzini Reviewed-by: Alex Bennée > --- > docs/devel/atomics.txt | 13 - > 1 file changed, 12 insertions(+), 1 deletion(-) > > diff --git a/docs/devel/atomics.txt

Re: [Qemu-devel] [RFC v2 17/33] migration: new state "postcopy-recover"

2017-09-22 Thread Dr. David Alan Gilbert
* Peter Xu (pet...@redhat.com) wrote: > Introducing new migration state "postcopy-recover". If a migration > procedure is paused and the connection is rebuilt afterward > successfully, we'll switch the source VM state from "postcopy-paused" to > the new state "postcopy-recover", then we'll do the

Re: [Qemu-devel] [PATCH] migration: disable auto-converge during bulk block migration

2017-09-22 Thread Stefan Hajnoczi
On Thu, Sep 21, 2017 at 02:32:32PM +0200, Peter Lieven wrote: > auto-converge and block migration currently do not play well together. > During block migration the auto-converge logic detects that ram > migration makes no progress and thus throttles down the vm until > it nearly stalls completely.

Re: [Qemu-devel] [PATCH v2 1/2] kvm: check KVM_CAP_SYNC_MMU with kvm_vm_check_extension()

2017-09-22 Thread David Gibson
On Thu, Sep 21, 2017 at 06:00:53PM +0200, Greg Kurz wrote: > On a server-class ppc host, this capability depends on the KVM type, > ie, HV or PR. If both KVM are present in the kernel, we will always > get the HV specific value, even if we explicitely requested PR on > the command line. > > This

Re: [Qemu-devel] [PATCH v2] spapr: fix the value of SDR1 in kvmppc_put_books_sregs()

2017-09-22 Thread David Gibson
On Thu, Sep 21, 2017 at 02:56:40PM +0200, Greg Kurz wrote: > When running with KVM PR, if a new HPT is allocated we need to inform > KVM about the HPT address and size. This is currently done by hacking > the value of SDR1 and pushing it to KVM in several places. > > Also, migration breaks the

Re: [Qemu-devel] [RFC PATCH v2 00/21] Guest exploitation of the XIVE interrupt controller (POWER9)

2017-09-22 Thread David Gibson
On Thu, Sep 21, 2017 at 04:18:33PM +0200, Cédric Le Goater wrote: > On 09/21/2017 03:25 AM, David Gibson wrote: > > On Wed, Sep 20, 2017 at 02:33:37PM +0200, Cédric Le Goater wrote: > >> On 09/19/2017 10:46 AM, David Gibson wrote: > >>> On Tue, Sep 19, 2017 at 06:20:20PM +1000, David Gibson wrote:

Re: [Qemu-devel] [PATCH] ppc/pnv: fix cores per chip for multiple cpus

2017-09-22 Thread Cédric Le Goater
On 09/22/2017 12:08 PM, David Gibson wrote: > On Thu, Sep 21, 2017 at 08:04:55AM +0200, Cédric Le Goater wrote: >> On 09/21/2017 05:54 AM, Nikunj A Dadhania wrote: >>> David Gibson writes: >>> On Wed, Sep 20, 2017 at 12:48:55PM +0530, Nikunj A Dadhania wrote:

Re: [Qemu-devel] [PATCH] ppc/pnv: fix cores per chip for multiple cpus

2017-09-22 Thread Cédric Le Goater
On 09/22/2017 08:00 AM, Nikunj A Dadhania wrote: > David Gibson writes: > > > As smp_thread defaults to 1 in vl.c, similarly smp_cores also has the > default value of 1 in vl.c. In powernv, we were setting nr-cores like > this: > >

Re: [Qemu-devel] [PATCH 1/3] iothread: provide helpers for internal use

2017-09-22 Thread Peter Xu
On Fri, Sep 22, 2017 at 12:14:04PM +0200, Paolo Bonzini wrote: > On 22/09/2017 11:43, Daniel P. Berrange wrote: > > On Fri, Sep 22, 2017 at 11:38:31AM +0200, Paolo Bonzini wrote: > >> On 22/09/2017 11:36, Daniel P. Berrange wrote: > >>> On Fri, Sep 22, 2017 at 05:14:30PM +0800, Peter Xu wrote: >

Re: [Qemu-devel] [RFC PATCH v2 18/21] ppc/xive: add device tree support

2017-09-22 Thread David Gibson
On Thu, Sep 21, 2017 at 01:21:10PM +0200, Cédric Le Goater wrote: > On 09/21/2017 03:35 AM, David Gibson wrote: > > On Wed, Sep 20, 2017 at 02:26:32PM +0200, Cédric Le Goater wrote: > >> On 09/19/2017 10:44 AM, David Gibson wrote: > >>> On Mon, Sep 11, 2017 at 07:12:32PM +0200, Cédric Le Goater

Re: [Qemu-devel] [PATCH v11 07/13] tests: Add FreeBSD image

2017-09-22 Thread Fam Zheng
On Fri, 09/22 03:09, Philippe Mathieu-Daudé wrote: > On 09/21/2017 12:07 PM, Fam Zheng wrote: > > The image is prepared following instructions as in: > > > > https://wiki.qemu.org/Hosts/BSD > > > > Signed-off-by: Fam Zheng > > $ QEMU=`pwd`/x86_64-softmmu/qemu-system-x86_64

[Qemu-devel] [PATCH v2] arm: Fix SMC reporting to EL2 when QEMU provides PSCI

2017-09-22 Thread Jan Kiszka
From: Jan Kiszka This properly forwards SMC events to EL2 when PSCI is provided by QEMU itself and, thus, ARM_FEATURE_EL3 is off. Found and tested with the Jailhouse hypervisor. Solution based on suggestions by Peter Maydell. Signed-off-by: Jan Kiszka

Re: [Qemu-devel] [PATCH] seccomp: Don't include libseccomp from QEMU header

2017-09-22 Thread Jan Kiszka
On 2017-09-20 10:36, Fam Zheng wrote: > The only prototype doesn't need anything from the lib header, and not > including it here allows files that include this header, for example > vl.c, to compile without the libseccomp cflags. > > The breakage is since c3883e1f93 for environments where

Re: [Qemu-devel] [PATCH 2/3] memory: seek FlatView sharing candidates among children subregions

2017-09-22 Thread Paolo Bonzini
On 22/09/2017 06:45, Alexey Kardashevskiy wrote: > On 21/09/17 23:57, Paolo Bonzini wrote: >> On 21/09/2017 15:39, Alexey Kardashevskiy wrote: >>> On 21/09/17 22:07, Paolo Bonzini wrote: A container can be used instead of an alias to allow switching between multiple subregions. In this

Re: [Qemu-devel] [RFC v4 06/16] virtio-iommu: Register attached devices

2017-09-22 Thread Bharat Bhushan
> -Original Message- > From: Eric Auger [mailto:eric.au...@redhat.com] > Sent: Tuesday, September 19, 2017 1:17 PM > To: eric.auger@gmail.com; eric.au...@redhat.com; > peter.mayd...@linaro.org; alex.william...@redhat.com; m...@redhat.com; > qemu-...@nongnu.org; qemu-devel@nongnu.org;

[Qemu-devel] [PULL 0/1] s390x bugfix (needed for stable)

2017-09-22 Thread Cornelia Huck
The following changes since commit 0a8066f0c068f1e318a1aacd7864fc00e455a37b: Merge remote-tracking branch 'remotes/pmaydell/tags/pull-target-arm-20170921' into staging (2017-09-21 17:42:27 +0100) are available in the git repository at: git://github.com/cohuck/qemu tags/s390x-20170922

[Qemu-devel] [PULL 1/1] s390x/ais: for 2.10 stable: disable ais facility

2017-09-22 Thread Cornelia Huck
From: Christian Borntraeger The migration interface for ais was introduced with kernel 4.13 but the capability itself had been active since 4.12. As migration support is considered necessary lets disable ais in the 2.10 stable version. A proper fix and re-enablement will

Re: [Qemu-devel] [RFC PATCH] qdev: Mark devices as non-hotpluggable by default

2017-09-22 Thread Cornelia Huck
On Thu, 21 Sep 2017 15:50:28 -0300 Eduardo Habkost wrote: > On Tue, Sep 19, 2017 at 10:55:53AM +0200, Thomas Huth wrote: > > Historically we've marked all devices as hotpluggable by default. However, > > most devices are not hotpluggable, and you also need a HotplugHandler

[Qemu-devel] [PATCH] usb: Fix usb-host build

2017-09-22 Thread Jan Kiszka
From: Jan Kiszka This reverts the incorrect commit 2041649f0b04 (these are machine-independent objects) and fixes the name of the config var. Signed-off-by: Jan Kiszka --- hw/usb/Makefile.objs | 2 +- 1 file changed, 1 insertion(+), 1

[Qemu-devel] [PULL 09/36] docker: Add test_fail and prep_fail

2017-09-22 Thread Fam Zheng
They both print a message and exit, but with different status code so distinguish real test errors from env preparation failures. Signed-off-by: Fam Zheng Message-Id: <20170905025614.579-3-f...@redhat.com> Reviewed-by: Stefan Hajnoczi Based-on:

Re: [Qemu-devel] [RFC PATCH] qdev: Mark devices as non-hotpluggable by default

2017-09-22 Thread Thomas Huth
On 22.09.2017 09:38, Cornelia Huck wrote: > On Thu, 21 Sep 2017 15:50:28 -0300 > Eduardo Habkost wrote: > >> On Tue, Sep 19, 2017 at 10:55:53AM +0200, Thomas Huth wrote: >>> Historically we've marked all devices as hotpluggable by default. However, >>> most devices are not

[Qemu-devel] [PULL 22/36] MAINTAINERS: Fix subsystem name for "Build and test automation"

2017-09-22 Thread Fam Zheng
From: Eduardo Habkost The subsystem name for the "Build test automation" section is "-", because an actual subsystem name line is missing: $ ./scripts/get_maintainer.pl -f tests/docker/docker.py "Alex Bennée"

[Qemu-devel] [PATCH] net: fix check for number of parameters to -netdev socket

2017-09-22 Thread Jens Freimann
Since commit 0f8c289ad "net: fix -netdev socket,fd= for UDP sockets" we allow more than one parameter for -netdev socket. But now we run into an assert when no parameter at all is specified > qemu-system-x86_64 -netdev socket socket.c:729: net_init_socket: Assertion `sock->has_udp' failed.

[Qemu-devel] [PULL 32/36] Makefile: Add rules to run vm tests

2017-09-22 Thread Fam Zheng
Reviewed-by: Alex Bennée Tested-by: Alex Bennée Signed-off-by: Fam Zheng --- Makefile | 2 ++ configure | 2 +- tests/vm/Makefile.include | 42 ++ 3 files

Re: [Qemu-devel] [PULL 00/18] Migration PULL request

2017-09-22 Thread Thomas Huth
On 22.09.2017 10:25, Juan Quintela wrote: > Peter Xu wrote: >> On Thu, Sep 21, 2017 at 04:29:04PM -0700, no-re...@patchew.org wrote: >> >> [...] >> >>> /var/tmp/patchew-tester-tmp-b0y2ycie/src/util/bitmap.c: In function >>> ‘bitmap_to_from_le’: >>>

  1   2   3   4   5   >