Re: [Qemu-devel] [PATCH] monitor: postpone monitor_qmp_cleanup_queues

2018-06-08 Thread Markus Armbruster
Peter Xu writes: > On Thu, Jun 07, 2018 at 01:53:01PM +0200, Markus Armbruster wrote: >> Peter Xu writes: >> >> > Previously we cleanup the queues when we got CLOSED event. It was used >> >> we clean up >> >> > to make sure we won't leftover replies/events of a old client to a new >> >> we

Re: [Qemu-devel] [PATCH v10 5/7] monitor: remove event_clock_type

2018-06-08 Thread Markus Armbruster
Peter Xu writes: > On Fri, Jun 08, 2018 at 07:38:11AM +0200, Markus Armbruster wrote: > > [...] > >> > +/* >> > + * This should never be called before configure_accelerator() since >> > + * only until then could we know whether qtest was enabled or not. >> >> Uh, we know it after then, not until

Re: [Qemu-devel] [PATCH v7 4/5] virtio-balloon: VIRTIO_BALLOON_F_FREE_PAGE_HINT

2018-06-08 Thread Wei Wang
On 06/08/2018 10:17 AM, Peter Xu wrote: On Thu, Jun 07, 2018 at 07:59:22PM +0800, Wei Wang wrote: Not necessarily _need_ to share it, I meant it can be shared using qemu command line. Live migration doesn't happen all the time, and that optimization doesn't run that long, if users want to have o

Re: [Qemu-devel] [PATCH v1 8/8] s390x: local error handling in hotplug handler functions

2018-06-08 Thread Cornelia Huck
On Thu, 7 Jun 2018 18:52:18 +0200 David Hildenbrand wrote: > Let's introduce and use local error variables in the hotplug handler > functions. > > Signed-off-by: David Hildenbrand > --- > hw/s390x/s390-virtio-ccw.c | 11 --- > 1 file changed, 8 insertions(+), 3 deletions(-) > > diff

Re: [Qemu-devel] [PATCH v1 8/8] s390x: local error handling in hotplug handler functions

2018-06-08 Thread Christian Borntraeger
On 06/08/2018 09:25 AM, Cornelia Huck wrote: > On Thu, 7 Jun 2018 18:52:18 +0200 > David Hildenbrand wrote: > >> Let's introduce and use local error variables in the hotplug handler >> functions. >> >> Signed-off-by: David Hildenbrand >> --- >> hw/s390x/s390-virtio-ccw.c | 11 --- >>

Re: [Qemu-devel] [PATCH v7 4/5] virtio-balloon: VIRTIO_BALLOON_F_FREE_PAGE_HINT

2018-06-08 Thread Wei Wang
On 06/07/2018 02:32 PM, Peter Xu wrote: Btw, the migration_state_notifiers is already there, but seems not really used (I only tracked spice-core.c called add_migration_state_change_notifier). I thought adding new migration states can reuse all that we have. What's your real concern about that? (

Re: [Qemu-devel] [PATCH v1 2/8] spapr: no need to verify the node

2018-06-08 Thread Greg Kurz
On Thu, 7 Jun 2018 18:52:12 +0200 David Hildenbrand wrote: > The node property can always be queried and the value has already been > verified in pc_dimm_realize(). > > Signed-off-by: David Hildenbrand > --- > hw/ppc/spapr.c | 9 + > 1 file changed, 1 insertion(+), 8 deletions(-) > >

Re: [Qemu-devel] [PATCH v1 8/8] s390x: local error handling in hotplug handler functions

2018-06-08 Thread David Hildenbrand
On 08.06.2018 09:27, Christian Borntraeger wrote: > > > On 06/08/2018 09:25 AM, Cornelia Huck wrote: >> On Thu, 7 Jun 2018 18:52:18 +0200 >> David Hildenbrand wrote: >> >>> Let's introduce and use local error variables in the hotplug handler >>> functions. >>> >>> Signed-off-by: David Hildenbra

Re: [Qemu-devel] [PATCH v1 2/8] spapr: no need to verify the node

2018-06-08 Thread David Hildenbrand
On 08.06.2018 09:34, Greg Kurz wrote: > On Thu, 7 Jun 2018 18:52:12 +0200 > David Hildenbrand wrote: > >> The node property can always be queried and the value has already been >> verified in pc_dimm_realize(). >> >> Signed-off-by: David Hildenbrand >> --- >> hw/ppc/spapr.c | 9 + >> 1

Re: [Qemu-devel] [qemu-s390x] [PATCH v2 2/4] pc-bios/s390-ccw/net: Update code for the latest changes in SLOF

2018-06-08 Thread Christian Borntraeger
On 06/07/2018 02:22 PM, Thomas Huth wrote: > The ip_version information now has to be stored in the filename_ip_t > structure, and there is now a common function called tftp_get_error_info() > which can be used to get the error string for a TFTP error code. > We can also get rid of some superflu

Re: [Qemu-devel] [PATCH v1 2/8] spapr: no need to verify the node

2018-06-08 Thread Greg Kurz
On Fri, 8 Jun 2018 09:42:48 +0200 David Hildenbrand wrote: > On 08.06.2018 09:34, Greg Kurz wrote: > > On Thu, 7 Jun 2018 18:52:12 +0200 > > David Hildenbrand wrote: > > > >> The node property can always be queried and the value has already been > >> verified in pc_dimm_realize(). > >> > >>

Re: [Qemu-devel] [PATCH v1 2/8] spapr: no need to verify the node

2018-06-08 Thread David Hildenbrand
On 08.06.2018 09:46, Greg Kurz wrote: > On Fri, 8 Jun 2018 09:42:48 +0200 > David Hildenbrand wrote: > >> On 08.06.2018 09:34, Greg Kurz wrote: >>> On Thu, 7 Jun 2018 18:52:12 +0200 >>> David Hildenbrand wrote: >>> The node property can always be queried and the value has already been >

Re: [Qemu-devel] [PATCH v1 8/8] s390x: local error handling in hotplug handler functions

2018-06-08 Thread Christian Borntraeger
On 06/08/2018 09:40 AM, David Hildenbrand wrote: > On 08.06.2018 09:27, Christian Borntraeger wrote: >> >> >> On 06/08/2018 09:25 AM, Cornelia Huck wrote: >>> On Thu, 7 Jun 2018 18:52:18 +0200 >>> David Hildenbrand wrote: >>> Let's introduce and use local error variables in the hotplug ha

Re: [Qemu-devel] [Qemu-block] [RFC PATCH V4] qemu-img: make convert async

2018-06-08 Thread Stefan Hajnoczi
On Thu, Jun 07, 2018 at 01:19:29PM +0300, Vladimir Sementsov-Ogievskiy wrote: > 07.06.2018 13:10, Stefan Hajnoczi wrote: > > On Fri, Jun 01, 2018 at 07:16:14PM +0300, Vladimir Sementsov-Ogievskiy > > wrote: > > > 20.02.2017 17:59, Peter Lieven wrote: > > > > Am 20.02.2017 um 15:50 schrieb Stefan H

Re: [Qemu-devel] Cortex M0 emulation tasks

2018-06-08 Thread Stefan Hajnoczi
On Thu, Jun 07, 2018 at 06:46:26AM -0400, Liviu Ionescu wrote: > On 7 June 2018 at 13:36:30, Stefan Hajnoczi (stefa...@gmail.com) wrote: > > > If you do want to upstream the code you linked, please let us know > > the > > details of how you want to do it and how long it might take. Maybe > > there

Re: [Qemu-devel] [PATCH v1 0/8] pc/spapr/s390x: machine hotplug handler cleanups

2018-06-08 Thread David Hildenbrand
On 07.06.2018 18:52, David Hildenbrand wrote: > I'll be messing with machine hotplug handlers of pc/spapr/s390x in the > context of > [PATCH v4 00/14] MemoryDevice: use multi stage hotplug handlers > > So this is a spin-off of the cleanup patches produced so far. > > David Hildenbrand (8): >

Re: [Qemu-devel] [RFC v3] qapi: command category to stimulate high-level machine devices

2018-06-08 Thread Stefan Hajnoczi
On Thu, Jun 07, 2018 at 11:33:07AM +0100, Daniel P. Berrangé wrote: > On Thu, Jun 07, 2018 at 11:24:55AM +0100, Stefan Hajnoczi wrote: > > On Mon, Jun 04, 2018 at 12:12:21PM +0200, Gerd Hoffmann wrote: > > > On Mon, Jun 04, 2018 at 10:29:40AM +0100, Peter Maydell wrote: > > > > On 4 June 2018 at 10

Re: [Qemu-devel] [Qemu-block] Some question about savem/qcow2 incremental snapshot

2018-06-08 Thread Pankaj Gupta
Hi Junyan, AFAICU you are trying to utilize qcow2 capabilities to do incremental snapshot. As I understand NVDIMM device (being it real or emulated), its contents are always be backed up in backing device. Now, the question comes to take a snapshot at some point in time. You are trying to ac

Re: [Qemu-devel] [RFC v3] qapi: command category to stimulate high-level machine devices

2018-06-08 Thread Stefan Hajnoczi
On Thu, Jun 07, 2018 at 02:58:53PM +0200, Gerd Hoffmann wrote: > > Gerd: What is your preference? Do you want board-specific fake displays > > inside the QEMU process as the long-term direction for UIs? > > Well, it isn't the one or the other, we could actually do both. For the > deployments you

Re: [Qemu-devel] [qemu-s390x] [PATCH v1 1/8] pc: local error handling in hotplug handler functions

2018-06-08 Thread Thomas Huth
On 07.06.2018 18:52, David Hildenbrand wrote: > Let's introduce and use local error variables in the hotplug handler > functions. Why? You don't check local_err in the functions, so I fail to see why this is needed? If you need this in a later patch, I think this should simply be part of that late

Re: [Qemu-devel] [PATCH v1 3/8] spapr: move all DIMM checks into spapr_memory_plug

2018-06-08 Thread Greg Kurz
On Thu, 7 Jun 2018 18:52:13 +0200 David Hildenbrand wrote: > Let's clean the hotplug handler up by moving everything into > spapr_memory_plug(). > > Signed-off-by: David Hildenbrand > --- > hw/ppc/spapr.c | 23 ++- > 1 file changed, 10 insertions(+), 13 deletions(-) > > d

Re: [Qemu-devel] [PATCH] monitor: postpone monitor_qmp_cleanup_queues

2018-06-08 Thread Stefan Hajnoczi
On Fri, Jun 08, 2018 at 12:42:35PM +0800, Peter Xu wrote: > On Thu, Jun 07, 2018 at 01:53:01PM +0200, Markus Armbruster wrote: > > Peter Xu writes: > > > > > Previously we cleanup the queues when we got CLOSED event. It was used > > > > we clean up > > > > > to make sure we won't leftover repl

Re: [Qemu-devel] [PATCH v1 3/8] spapr: move all DIMM checks into spapr_memory_plug

2018-06-08 Thread David Hildenbrand
On 08.06.2018 10:05, Greg Kurz wrote: > On Thu, 7 Jun 2018 18:52:13 +0200 > David Hildenbrand wrote: > >> Let's clean the hotplug handler up by moving everything into >> spapr_memory_plug(). >> >> Signed-off-by: David Hildenbrand >> --- >> hw/ppc/spapr.c | 23 ++- >> 1 file

Re: [Qemu-devel] [qemu-s390x] [PATCH v1 1/8] pc: local error handling in hotplug handler functions

2018-06-08 Thread David Hildenbrand
On 08.06.2018 10:04, Thomas Huth wrote: > On 07.06.2018 18:52, David Hildenbrand wrote: >> Let's introduce and use local error variables in the hotplug handler >> functions. > > Why? You don't check local_err in the functions, so I fail to see why > this is needed? If you need this in a later patc

Re: [Qemu-devel] [qemu-s390x] [PATCH v1 2/8] spapr: no need to verify the node

2018-06-08 Thread Thomas Huth
On 08.06.2018 09:48, David Hildenbrand wrote: > On 08.06.2018 09:46, Greg Kurz wrote: >> On Fri, 8 Jun 2018 09:42:48 +0200 >> David Hildenbrand wrote: >> >>> On 08.06.2018 09:34, Greg Kurz wrote: On Thu, 7 Jun 2018 18:52:12 +0200 David Hildenbrand wrote: > The node property

Re: [Qemu-devel] [PATCH] monitor: postpone monitor_qmp_cleanup_queues

2018-06-08 Thread Markus Armbruster
Stefan Hajnoczi writes: > On Fri, Jun 08, 2018 at 12:42:35PM +0800, Peter Xu wrote: >> On Thu, Jun 07, 2018 at 01:53:01PM +0200, Markus Armbruster wrote: >> > Peter Xu writes: >> > >> > > Previously we cleanup the queues when we got CLOSED event. It was used >> > >> > we clean up >> > >> > >

Re: [Qemu-devel] [PATCH 4/6] hmp: Add info commands for preconfig

2018-06-08 Thread Dr. David Alan Gilbert
* Markus Armbruster (arm...@redhat.com) wrote: > "Dr. David Alan Gilbert" writes: > > > * Markus Armbruster (arm...@redhat.com) wrote: > >> "Dr. David Alan Gilbert" writes: > >> > >> > * Markus Armbruster (arm...@redhat.com) wrote: > >> >> Peter Xu writes: > >> >> > >> >> > On Tue, Jun 05, 20

Re: [Qemu-devel] storing machine data in qcow images?

2018-06-08 Thread Dr. David Alan Gilbert
* Laszlo Ersek (ler...@redhat.com) wrote: > On 06/07/18 12:54, Andrea Bolognani wrote: > > On Thu, 2018-06-07 at 11:36 +0100, Daniel P. Berrangé wrote: > >> On Thu, Jun 07, 2018 at 11:32:18AM +0100, Richard W.M. Jones wrote: > >>> Another problem which Laszlo mentioned is the varstore isn't portabl

Re: [Qemu-devel] [PATCH v1 2/8] spapr: no need to verify the node

2018-06-08 Thread David Gibson
On Fri, Jun 08, 2018 at 09:46:57AM +0200, Greg Kurz wrote: > On Fri, 8 Jun 2018 09:42:48 +0200 > David Hildenbrand wrote: > > > On 08.06.2018 09:34, Greg Kurz wrote: > > > On Thu, 7 Jun 2018 18:52:12 +0200 > > > David Hildenbrand wrote: > > > > > >> The node property can always be queried an

Re: [Qemu-devel] [PATCH v1 2/8] spapr: no need to verify the node

2018-06-08 Thread David Hildenbrand
On 08.06.2018 10:20, David Gibson wrote: > On Fri, Jun 08, 2018 at 09:46:57AM +0200, Greg Kurz wrote: >> On Fri, 8 Jun 2018 09:42:48 +0200 >> David Hildenbrand wrote: >> >>> On 08.06.2018 09:34, Greg Kurz wrote: On Thu, 7 Jun 2018 18:52:12 +0200 David Hildenbrand wrote: > T

Re: [Qemu-devel] [PATCH v1 1/2] memory-device: turn alignment assert into check

2018-06-08 Thread Igor Mammedov
On Thu, 7 Jun 2018 17:47:04 +0200 David Hildenbrand wrote: > The start of the address space indicates which maximum alignment is > supported by our machine (e.g. ppc, x86 1GB). This is helpful to > catch fragmenting guest physical memory in strange fashions. > > Right now we can crash QEMU by e

Re: [Qemu-devel] [PATCH v1 2/2] exec: check that alignment is a power of two

2018-06-08 Thread Igor Mammedov
On Thu, 7 Jun 2018 17:47:05 +0200 David Hildenbrand wrote: > Right now we can crash QEMU using e.g. > > qemu-system-x86_64 -m 256M,maxmem=20G,slots=2 \ > -object > memory-backend-file,id=mem0,size=12288,mem-path=/dev/zero,align=12288 \ > -device pc-dimm,id=dimm1,memdev=mem0 > > qemu-system-

[Qemu-devel] [PATCH v8 3/6] migration: API to clear bits of guest free pages from the dirty bitmap

2018-06-08 Thread Wei Wang
This patch adds an API to clear bits corresponding to guest free pages from the dirty bitmap. Spilt the free page block if it crosses the QEMU RAMBlock boundary. Signed-off-by: Wei Wang CC: Dr. David Alan Gilbert CC: Juan Quintela CC: Michael S. Tsirkin CC: Peter Xu --- include/migration/mis

[Qemu-devel] [PATCH v8 0/6] virtio-balloon: free page hint reporting support

2018-06-08 Thread Wei Wang
This is the deivce part implementation to add a new feature, VIRTIO_BALLOON_F_FREE_PAGE_HINT to the virtio-balloon device. The device receives the guest free page hints from the driver and clears the corresponding bits in the dirty bitmap, so that those free pages are not transferred by the migrati

[Qemu-devel] [PATCH v8 1/6] bitmap: bitmap_count_one_with_offset

2018-06-08 Thread Wei Wang
Count the number of 1s in a bitmap starting from an offset. Signed-off-by: Wei Wang CC: Dr. David Alan Gilbert CC: Juan Quintela CC: Michael S. Tsirkin Reviewed-by: Dr. David Alan Gilbert --- include/qemu/bitmap.h | 13 + 1 file changed, 13 insertions(+) diff --git a/include/qem

[Qemu-devel] [PATCH v8 5/6] migration: move migrate_postcopy() to include/migration/misc.h

2018-06-08 Thread Wei Wang
The ram save state notifier callback, for example the free page optimization offerred by virtio-balloon, may need to check if postcopy is in use, so move migrate_postcopy() to the outside header. Signed-off-by: Wei Wang CC: Dr. David Alan Gilbert CC: Juan Quintela CC: Michael S. Tsirkin CC: Pe

[Qemu-devel] [PATCH v8 2/6] migration: use bitmap_mutex in migration_bitmap_clear_dirty

2018-06-08 Thread Wei Wang
The bitmap mutex is used to synchronize threads to update the dirty bitmap and the migration_dirty_pages counter. For example, the free page optimization clears bits of free pages from the bitmap in an iothread context. This patch makes migration_bitmap_clear_dirty update the bitmap and counter und

Re: [Qemu-devel] [qemu-s390x] [PATCH v1 2/8] spapr: no need to verify the node

2018-06-08 Thread Igor Mammedov
On Fri, 8 Jun 2018 10:07:31 +0200 Thomas Huth wrote: > On 08.06.2018 09:48, David Hildenbrand wrote: > > On 08.06.2018 09:46, Greg Kurz wrote: > >> On Fri, 8 Jun 2018 09:42:48 +0200 > >> David Hildenbrand wrote: > >> > >>> On 08.06.2018 09:34, Greg Kurz wrote: > On Thu, 7 Jun 2018 18

[Qemu-devel] [PATCH v8 4/6] migration/ram.c: add ram save state notifiers

2018-06-08 Thread Wei Wang
This patch adds a ram save state notifier list, and expose RAMState for the notifer callbacks to use. Signed-off-by: Wei Wang CC: Dr. David Alan Gilbert CC: Juan Quintela CC: Michael S. Tsirkin CC: Peter Xu --- include/migration/misc.h | 52 +++ migration/

Re: [Qemu-devel] [PATCH v1 4/8] spapr: local error handling in hotplug handler functions

2018-06-08 Thread Greg Kurz
On Thu, 7 Jun 2018 18:52:14 +0200 David Hildenbrand wrote: > Let's introduce and use local error variables in the hotplug handler > functions. > > Signed-off-by: David Hildenbrand > --- Reviewed-by: Greg Kurz > hw/ppc/spapr.c | 29 - > 1 file changed, 20 inserti

[Qemu-devel] [PATCH v8 6/6] virtio-balloon: VIRTIO_BALLOON_F_FREE_PAGE_HINT

2018-06-08 Thread Wei Wang
The new feature enables the virtio-balloon device to receive hints of guest free pages from the free page vq. A notifier is registered to the migration ram save state notifier list. The notifier calls free_page_start after the migration thread syncs the dirty bitmap, so that the free page hinting

Re: [Qemu-devel] storing machine data in qcow images?

2018-06-08 Thread Daniel P . Berrangé
On Fri, Jun 08, 2018 at 09:21:30AM +0100, Dr. David Alan Gilbert wrote: > * Laszlo Ersek (ler...@redhat.com) wrote: > > On 06/07/18 12:54, Andrea Bolognani wrote: > > > On Thu, 2018-06-07 at 11:36 +0100, Daniel P. Berrangé wrote: > > >> On Thu, Jun 07, 2018 at 11:32:18AM +0100, Richard W.M. Jones w

[Qemu-devel] [PATCH] typedefs: add QJSON

2018-06-08 Thread Greg Kurz
Since commit 83ee768d6247b, we now have two places that define the QJSON type: $ git grep 'typedef struct QJSON QJSON' include/migration/vmstate.h:typedef struct QJSON QJSON; migration/qjson.h:typedef struct QJSON QJSON; This breaks docker-test-build@centos6: In file included from /tmp/qemu-test

Re: [Qemu-devel] [qemu-s390x] [PATCH v1 2/8] spapr: no need to verify the node

2018-06-08 Thread David Hildenbrand
On 08.06.2018 10:39, Igor Mammedov wrote: > On Fri, 8 Jun 2018 10:07:31 +0200 > Thomas Huth wrote: > >> On 08.06.2018 09:48, David Hildenbrand wrote: >>> On 08.06.2018 09:46, Greg Kurz wrote: On Fri, 8 Jun 2018 09:42:48 +0200 David Hildenbrand wrote: > On 08.06.2018 09:34,

Re: [Qemu-devel] [PATCH v1 3/8] spapr: move all DIMM checks into spapr_memory_plug

2018-06-08 Thread Igor Mammedov
On Fri, 8 Jun 2018 10:07:59 +0200 David Hildenbrand wrote: > On 08.06.2018 10:05, Greg Kurz wrote: > > On Thu, 7 Jun 2018 18:52:13 +0200 > > David Hildenbrand wrote: > > > >> Let's clean the hotplug handler up by moving everything into > >> spapr_memory_plug(). > >> > >> Signed-off-by: David

Re: [Qemu-devel] [RFC v2 04/12] Add vhost-user-backend

2018-06-08 Thread Daniel P . Berrangé
On Fri, Jun 08, 2018 at 12:34:15AM +0200, Marc-André Lureau wrote: > Hi > > On Mon, Jun 4, 2018 at 11:36 AM, Daniel P. Berrangé > wrote: > > On Fri, Jun 01, 2018 at 06:27:41PM +0200, Marc-André Lureau wrote: > >> Create a vhost-user-backend object that holds a connection to a > >> vhost-user bac

Re: [Qemu-devel] [PATCH v1 5/8] spapr: introduce machine unplug handler

2018-06-08 Thread Igor Mammedov
On Thu, 7 Jun 2018 18:52:15 +0200 David Hildenbrand wrote: > We'll be handling unplug of e.g. CPUs and PCDIMMs via the general > hotplug handler soon, so let's add that handler function. > > Signed-off-by: David Hildenbrand Reviewed-by: Igor Mammedov > --- > hw/ppc/spapr.c | 6 ++ > 1

Re: [Qemu-devel] storing machine data in qcow images?

2018-06-08 Thread Dr. David Alan Gilbert
* Daniel P. Berrangé (berra...@redhat.com) wrote: > On Fri, Jun 08, 2018 at 09:21:30AM +0100, Dr. David Alan Gilbert wrote: > > * Laszlo Ersek (ler...@redhat.com) wrote: > > > On 06/07/18 12:54, Andrea Bolognani wrote: > > > > On Thu, 2018-06-07 at 11:36 +0100, Daniel P. Berrangé wrote: > > > >> On

Re: [Qemu-devel] [PATCH v1 5/8] spapr: introduce machine unplug handler

2018-06-08 Thread Greg Kurz
On Thu, 7 Jun 2018 18:52:15 +0200 David Hildenbrand wrote: > We'll be handling unplug of e.g. CPUs and PCDIMMs via the general > hotplug handler soon, so let's add that handler function. > > Signed-off-by: David Hildenbrand > --- Reviewed-by: Greg Kurz > hw/ppc/spapr.c | 6 ++ > 1 fil

Re: [Qemu-devel] [PATCH v2 2/8] ppc4xx_i2c: Move register state to private struct and remove unimplemented sdata and intr registers

2018-06-08 Thread David Gibson
On Wed, Jun 06, 2018 at 03:31:48PM +0200, BALATON Zoltan wrote: > Signed-off-by: BALATON Zoltan It's not clear to me why this is preferable to having the registers embedded in the state structure. The latter is pretty standard practice for qemu. > --- > hw/i2c/ppc4xx_i2c.c | 75 >

Re: [Qemu-devel] [PATCH v1 6/8] spapr: handle pc-dimm unplug via hotplug handler chain

2018-06-08 Thread Igor Mammedov
On Thu, 7 Jun 2018 18:52:16 +0200 David Hildenbrand wrote: > Let's handle it via hotplug_handler_unplug(). E.g. necessary to hotplug/ > unplug memory devices (which a pc-dimm is) later. Perhaps something like following would be better: Factor out memory unplug into separate function from spapr_

Re: [Qemu-devel] [PATCH v2 1/8] ppc4xx_i2c: Clean up and improve error logging

2018-06-08 Thread David Gibson
On Wed, Jun 06, 2018 at 12:56:32PM -0300, Philippe Mathieu-Daudé wrote: > On 06/06/2018 10:31 AM, BALATON Zoltan wrote: > > Make it more readable by converting register indexes to decimal > > (avoids lot of superfluous 0x0) and distinguish errors caused by > > accessing non-existent vs. unimplement

Re: [Qemu-devel] [PATCH v1 7/8] spapr: handle cpu core unplug via hotplug handler chain

2018-06-08 Thread Igor Mammedov
On Thu, 7 Jun 2018 18:52:17 +0200 David Hildenbrand wrote: > Let's handle it via hotplug_handler_unplug() to make plug/unplug code > look symmetrical. ditto wrt commit message as 6/8 > > Acked-by: Igor Mammedov > Signed-off-by: David Hildenbrand > --- > hw/ppc/spapr.c | 12 +++- > 1

Re: [Qemu-devel] [PATCH v1 7/8] spapr: handle cpu core unplug via hotplug handler chain

2018-06-08 Thread Greg Kurz
On Thu, 7 Jun 2018 18:52:17 +0200 David Hildenbrand wrote: > Let's handle it via hotplug_handler_unplug() to make plug/unplug code > look symmetrical. > > Acked-by: Igor Mammedov > Signed-off-by: David Hildenbrand > --- Reviewed-by: Greg Kurz > hw/ppc/spapr.c | 12 +++- > 1 file c

Re: [Qemu-devel] [PATCH v1 6/8] spapr: handle pc-dimm unplug via hotplug handler chain

2018-06-08 Thread David Hildenbrand
On 08.06.2018 10:56, Igor Mammedov wrote: > On Thu, 7 Jun 2018 18:52:16 +0200 > David Hildenbrand wrote: > >> Let's handle it via hotplug_handler_unplug(). E.g. necessary to hotplug/ >> unplug memory devices (which a pc-dimm is) later. > Perhaps something like following would be better: > > Fac

Re: [Qemu-devel] [PATCH v1 8/8] s390x: local error handling in hotplug handler functions

2018-06-08 Thread Igor Mammedov
On Fri, 8 Jun 2018 09:40:04 +0200 David Hildenbrand wrote: > On 08.06.2018 09:27, Christian Borntraeger wrote: > > > > > > On 06/08/2018 09:25 AM, Cornelia Huck wrote: > >> On Thu, 7 Jun 2018 18:52:18 +0200 > >> David Hildenbrand wrote: > >> > >>> Let's introduce and use local error varia

Re: [Qemu-devel] [PATCH v1 6/8] spapr: handle pc-dimm unplug via hotplug handler chain

2018-06-08 Thread Greg Kurz
On Thu, 7 Jun 2018 18:52:16 +0200 David Hildenbrand wrote: > Let's handle it via hotplug_handler_unplug(). E.g. necessary to hotplug/ > unplug memory devices (which a pc-dimm is) later. > > Signed-off-by: David Hildenbrand > --- Reviewed-by: Greg Kurz > hw/ppc/spapr.c | 18 +++-

Re: [Qemu-devel] [PATCH] typedefs: add QJSON

2018-06-08 Thread Dr. David Alan Gilbert
* Greg Kurz (gr...@kaod.org) wrote: > Since commit 83ee768d6247b, we now have two places that define the > QJSON type: > > $ git grep 'typedef struct QJSON QJSON' > include/migration/vmstate.h:typedef struct QJSON QJSON; > migration/qjson.h:typedef struct QJSON QJSON; > > This breaks docker-test-

Re: [Qemu-devel] [qemu-s390x] [PATCH v1 2/8] spapr: no need to verify the node

2018-06-08 Thread Igor Mammedov
On Fri, 8 Jun 2018 10:41:36 +0200 David Hildenbrand wrote: > On 08.06.2018 10:39, Igor Mammedov wrote: > > On Fri, 8 Jun 2018 10:07:31 +0200 > > Thomas Huth wrote: > > > >> On 08.06.2018 09:48, David Hildenbrand wrote: > >>> On 08.06.2018 09:46, Greg Kurz wrote: > On Fri, 8 Jun 201

Re: [Qemu-devel] [PATCH v2 1/8] ppc4xx_i2c: Clean up and improve error logging

2018-06-08 Thread BALATON Zoltan
On Fri, 8 Jun 2018, David Gibson wrote: On Wed, Jun 06, 2018 at 12:56:32PM -0300, Philippe Mathieu-Daudé wrote: On 06/06/2018 10:31 AM, BALATON Zoltan wrote: Make it more readable by converting register indexes to decimal (avoids lot of superfluous 0x0) and distinguish errors caused by accessin

Re: [Qemu-devel] [PATCH] monitor: postpone monitor_qmp_cleanup_queues

2018-06-08 Thread Peter Xu
On Fri, Jun 08, 2018 at 10:18:25AM +0200, Markus Armbruster wrote: > Stefan Hajnoczi writes: > > > On Fri, Jun 08, 2018 at 12:42:35PM +0800, Peter Xu wrote: > >> On Thu, Jun 07, 2018 at 01:53:01PM +0200, Markus Armbruster wrote: > >> > Peter Xu writes: > >> > > >> > > Previously we cleanup the

Re: [Qemu-devel] [PATCH] typedefs: add QJSON

2018-06-08 Thread Greg Kurz
On Fri, 8 Jun 2018 10:04:39 +0100 "Dr. David Alan Gilbert" wrote: > * Greg Kurz (gr...@kaod.org) wrote: > > Since commit 83ee768d6247b, we now have two places that define the > > QJSON type: > > > > $ git grep 'typedef struct QJSON QJSON' > > include/migration/vmstate.h:typedef struct QJSON QJSO

Re: [Qemu-devel] [PATCH v2 2/8] ppc4xx_i2c: Move register state to private struct and remove unimplemented sdata and intr registers

2018-06-08 Thread BALATON Zoltan
On Fri, 8 Jun 2018, David Gibson wrote: On Wed, Jun 06, 2018 at 03:31:48PM +0200, BALATON Zoltan wrote: Signed-off-by: BALATON Zoltan It's not clear to me why this is preferable to having the registers embedded in the state structure. The latter is pretty standard practice for qemu. Maybe

Re: [Qemu-devel] [PATCH v1 8/8] s390x: local error handling in hotplug handler functions

2018-06-08 Thread David Hildenbrand
On 08.06.2018 11:03, Igor Mammedov wrote: > On Fri, 8 Jun 2018 09:40:04 +0200 > David Hildenbrand wrote: > >> On 08.06.2018 09:27, Christian Borntraeger wrote: >>> >>> >>> On 06/08/2018 09:25 AM, Cornelia Huck wrote: On Thu, 7 Jun 2018 18:52:18 +0200 David Hildenbrand wrote:

Re: [Qemu-devel] [PATCH] typedefs: add QJSON

2018-06-08 Thread Dr. David Alan Gilbert
* Greg Kurz (gr...@kaod.org) wrote: > On Fri, 8 Jun 2018 10:04:39 +0100 > "Dr. David Alan Gilbert" wrote: > > > * Greg Kurz (gr...@kaod.org) wrote: > > > Since commit 83ee768d6247b, we now have two places that define the > > > QJSON type: > > > > > > $ git grep 'typedef struct QJSON QJSON' > > >

Re: [Qemu-devel] [Qemu-ppc] [PATCH v3] target/ppc: Allow PIR read in privileged mode

2018-06-08 Thread David Gibson
On Wed, Jun 06, 2018 at 11:19:22AM +0200, Greg Kurz wrote: > On Wed, 6 Jun 2018 10:53:17 +1000 > David Gibson wrote: > > > On Tue, Jun 05, 2018 at 06:46:12PM +0200, Greg Kurz wrote: > > > On Mon, 4 Jun 2018 10:53:22 +1000 > > > David Gibson wrote: > > > > > > > On Mon, May 07, 2018 at 01:52:4

Re: [Qemu-devel] [qemu-s390x] [PATCH v1 2/8] spapr: no need to verify the node

2018-06-08 Thread David Hildenbrand
+1 for error_abort, even if it takes another line. >>> +1 for error_abort >>> call shouldn't fail, but if does it won't be silently ignored >>> and introduce undefined behavior. >> >> Maybe we should fix the others that pass in NULL. >> >> (no, not me :D - I'm already busy with your requ

Re: [Qemu-devel] [PATCH] monitor: postpone monitor_qmp_cleanup_queues

2018-06-08 Thread Peter Xu
On Fri, Jun 08, 2018 at 05:11:54PM +0800, Peter Xu wrote: [...] > Frankly speaking I think this might be an ideal fix as well. For > example what if we are executing the dispatcher of a command when we > received the CLOSED event? If so, the dispatcher will put the > response onto the response

Re: [Qemu-devel] [PULL 0/7] 9p patches 2018-06-07

2018-06-08 Thread Peter Maydell
On 7 June 2018 at 16:21, Greg Kurz wrote: > The following changes since commit 5d328d7d2f1fd4fb160bcfb6e4eb838720274438: > > Merge remote-tracking branch 'remotes/awilliam/tags/vfio-update-20180605.0' > into staging (2018-06-07 08:59:28 +0100) > > are available in the Git repository at: > > h

Re: [Qemu-devel] [PATCH 4/6] hmp: Add info commands for preconfig

2018-06-08 Thread Igor Mammedov
On Fri, 8 Jun 2018 09:18:46 +0100 "Dr. David Alan Gilbert" wrote: > * Markus Armbruster (arm...@redhat.com) wrote: > > "Dr. David Alan Gilbert" writes: > > > > > * Markus Armbruster (arm...@redhat.com) wrote: > > >> "Dr. David Alan Gilbert" writes: > > >> > > >> > * Markus Armbruster (a

Re: [Qemu-devel] [PATCH v1 6/8] spapr: handle pc-dimm unplug via hotplug handler chain

2018-06-08 Thread Igor Mammedov
On Fri, 8 Jun 2018 11:02:23 +0200 David Hildenbrand wrote: > On 08.06.2018 10:56, Igor Mammedov wrote: > > On Thu, 7 Jun 2018 18:52:16 +0200 > > David Hildenbrand wrote: > > > >> Let's handle it via hotplug_handler_unplug(). E.g. necessary to hotplug/ > >> unplug memory devices (which a pc-d

Re: [Qemu-devel] [PATCH v1 6/8] spapr: handle pc-dimm unplug via hotplug handler chain

2018-06-08 Thread David Hildenbrand
On 08.06.2018 11:35, Igor Mammedov wrote: > On Fri, 8 Jun 2018 11:02:23 +0200 > David Hildenbrand wrote: > >> On 08.06.2018 10:56, Igor Mammedov wrote: >>> On Thu, 7 Jun 2018 18:52:16 +0200 >>> David Hildenbrand wrote: >>> Let's handle it via hotplug_handler_unplug(). E.g. necessary to

Re: [Qemu-devel] [PATCH v2] Show values and description when using "qom-list"

2018-06-08 Thread Dr. David Alan Gilbert
* Andreas Färber (afaer...@suse.de) wrote: > Am 01.06.2018 um 17:39 schrieb Ricardo Perez Blanco: > > For debugging purposes it is very useful to: > > - See the description of the field. This information is already filled > >in but not shown in "qom-list" command. > > No objection on this par

[Qemu-devel] [PATCH v2] cpu hot-del: leak fix by free the relevant members

2018-06-08 Thread liujunjie
THese leaks are found by ASAN with CPU hot-add and hot-del actions, such as: ==14127==ERROR: LeakSanitizer: detected memory leaks Direct leak of 4096 byte(s) in 1 object(s) allocated from: #0 0x7fc321cb6ec0 in posix_memalign (/usr/local/gcc-6-4/lib64/libasan.so.3+0xc7ec0) #1 0xf756b9 in q

[Qemu-devel] [PATCH v4] target/ppc: Allow PIR read in privileged mode

2018-06-08 Thread Greg Kurz
From: luporl According to PowerISA, the PIR register should be readable in privileged mode also, not only in hypervisor privileged mode. PowerISA 3.0 - 4.3.3 Processor Identification Register "Read access to the PIR is privileged; write access is not provided." Figure 18 in section 4.4.4 expli

Re: [Qemu-devel] [qemu-s390x] [PATCH v4 00/14] MemoryDevice: use multi stage hotplug handlers

2018-06-08 Thread David Hildenbrand
On 01.06.2018 14:13, Igor Mammedov wrote: > On Fri, 25 May 2018 14:43:39 +0200 > David Hildenbrand wrote: > >> On 17.05.2018 10:15, David Hildenbrand wrote: >>> We can have devices that need certain other resources that are e.g. >>> system resources managed by the machine. We need a clean way to

[Qemu-devel] [PATCH] block/qcow2-bitmap: fix free_bitmap_clusters

2018-06-08 Thread Vladimir Sementsov-Ogievskiy
This assert may fail, because bitmap_table is not initialized. Just drop it, as it's obvious, that bitmap_table_load sets bitmap_table parameter only when returning zero. Reported-by: Pavel Butsykin Signed-off-by: Vladimir Sementsov-Ogievskiy --- block/qcow2-bitmap.c | 1 - 1 file changed, 1 de

Re: [Qemu-devel] [PULL 0/5] slirp updates

2018-06-08 Thread Peter Maydell
On 8 June 2018 at 07:13, Samuel Thibault wrote: > The following changes since commit 9be4af13305f24d2dabf94bb53e6b65c76d08bb2: > > Merge remote-tracking branch 'remotes/thibault/tags/samuel-thibault' into > staging (2018-06-01 14:58:53 +0100) > > are available in the Git repository at: > > ht

Re: [Qemu-devel] [qemu-s390x] [PATCH v1 2/8] spapr: no need to verify the node

2018-06-08 Thread Greg Kurz
On Fri, 8 Jun 2018 11:24:51 +0200 David Hildenbrand wrote: > +1 for error_abort, even if it takes another line. > >>> +1 for error_abort > >>> call shouldn't fail, but if does it won't be silently ignored > >>> and introduce undefined behavior. > >> > >> Maybe we should fix the other

Re: [Qemu-devel] [PATCH 00/11] misc: Add trailing '\n' to qemu_log() calls

2018-06-08 Thread Peter Maydell
On 6 June 2018 at 20:43, John Snow wrote: > so error_setg must be used WITHOUT \n and logging must happen with \n? > > If we're sure that's the way we want to have things laid out, we really > ought to augment checkpatch to catch this -- because there's 0% chance > that we'll keep it straight on o

[Qemu-devel] [PATCH v3 6/6] bochs-display: enable vgabios

2018-06-08 Thread Gerd Hoffmann
--- hw/display/bochs-display.c | 1 + 1 file changed, 1 insertion(+) diff --git a/hw/display/bochs-display.c b/hw/display/bochs-display.c index 1187d77576..12d8a66c6c 100644 --- a/hw/display/bochs-display.c +++ b/hw/display/bochs-display.c @@ -337,6 +337,7 @@ static void bochs_display_class_init(

[Qemu-devel] [PATCH v3 2/6] hw/display: add standalone ramfb device

2018-06-08 Thread Gerd Hoffmann
Signed-off-by: Gerd Hoffmann --- include/hw/display/ramfb.h| 3 +++ hw/arm/sysbus-fdt.c | 7 + hw/arm/virt.c | 2 ++ hw/display/ramfb-standalone.c | 62 +++ hw/i386/pc_piix.c | 2 ++ hw/i386/pc_q35.c

[Qemu-devel] [PATCH v3 4/6] hw/vfio/display: add ramfb support

2018-06-08 Thread Gerd Hoffmann
So we have a boot display when using a vgpu as primary display. Use vfio-pci-ramfb instead of vfio-pci to enable it. Signed-off-by: Gerd Hoffmann --- include/hw/vfio/vfio-common.h | 2 ++ hw/vfio/display.c | 10 ++ hw/vfio/pci.c | 15 +++ 3 files

[Qemu-devel] [PATCH v3 5/6] ramfb: enable vgabios

2018-06-08 Thread Gerd Hoffmann
--- hw/display/ramfb.c | 1 + 1 file changed, 1 insertion(+) diff --git a/hw/display/ramfb.c b/hw/display/ramfb.c index 258783fe3b..477316a14d 100644 --- a/hw/display/ramfb.c +++ b/hw/display/ramfb.c @@ -88,6 +88,7 @@ RAMFBState *ramfb_setup(Error **errp) s = g_new0(RAMFBState, 1); +

[Qemu-devel] [PATCH v3 3/6] hw/display: add virtio-ramfb device

2018-06-08 Thread Gerd Hoffmann
Like virtio-vga, but using ramfb instead of legacy vga. Note: Not clear yet whenever this will be ever merged upstream. No clear benefit, given that edk2 has a virtio-gpu driver which doesn't depend on the vga compatibility mode. Will keeping it in the devel branch for now, for

[Qemu-devel] [PATCH v3 1/6] hw/display: add ramfb, a simple boot framebuffer living in guest ram

2018-06-08 Thread Gerd Hoffmann
The boot framebuffer is expected to be configured by the firmware, so it uses fw_cfg as interface. Initialization goes as follows: (1) Check whenever etc/ramfb is present. (2) Allocate framebuffer from RAM. (3) Fill struct RAMFBCfg, write it to etc/ramfb. Done. You can write stuff to the

[Qemu-devel] [PATCH v3 0/6] ramfb: simple boot framebuffer, no legacy vga

2018-06-08 Thread Gerd Hoffmann
Hi, Ok folks, here is a experimental patch series for a legacy free boot framebuffer. If you want play with it I recommend getting the bits from https://www.kraxel.org/cgit/qemu/log/?h=sirius/ramfb because they come with an updated seabios and a new vgabios rom and an experimental OVM

Re: [Qemu-devel] [qemu-s390x] [PATCH v1 2/8] spapr: no need to verify the node

2018-06-08 Thread David Hildenbrand
On 08.06.2018 12:52, Greg Kurz wrote: > On Fri, 8 Jun 2018 11:24:51 +0200 > David Hildenbrand wrote: > >> +1 for error_abort, even if it takes another line. > +1 for error_abort > call shouldn't fail, but if does it won't be silently ignored > and introduce undefined behavior.

Re: [Qemu-devel] [qemu-s390x] [PATCH v1 2/8] spapr: no need to verify the node

2018-06-08 Thread Cornelia Huck
On Fri, 8 Jun 2018 13:28:01 +0200 David Hildenbrand wrote: > On 08.06.2018 12:52, Greg Kurz wrote: > > On Fri, 8 Jun 2018 11:24:51 +0200 > > David Hildenbrand wrote: > > > >> +1 for error_abort, even if it takes another line. > > +1 for error_abort > > call shouldn't fail, b

Re: [Qemu-devel] [PATCH v4] target/ppc: Allow PIR read in privileged mode

2018-06-08 Thread David Gibson
On Fri, Jun 08, 2018 at 11:46:55AM +0200, Greg Kurz wrote: > From: luporl > > According to PowerISA, the PIR register should be readable in privileged > mode also, not only in hypervisor privileged mode. > > PowerISA 3.0 - 4.3.3 Processor Identification Register > > "Read access to the PIR is p

[Qemu-devel] [Bug 1467240] Re: Regression - bridged networking broken for Mac OS X guest

2018-06-08 Thread Thomas Huth
Patch had been included here: https://git.qemu.org/?p=qemu.git;a=commitdiff;h=5df6a1855b62dc6535 ** Changed in: qemu Status: New => Fix Released -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1

Re: [Qemu-devel] [PATCH v3 0/6] ramfb: simple boot framebuffer, no legacy vga

2018-06-08 Thread no-reply
Hi, This series seems to have some coding style problems. See output below for more information: Type: series Message-id: 20180608112001.14729-1-kra...@redhat.com Subject: [Qemu-devel] [PATCH v3 0/6] ramfb: simple boot framebuffer, no legacy vga === TEST SCRIPT BEGIN === #!/bin/bash BASE=base

Re: [Qemu-devel] [qemu-s390x] [PATCH v1 2/8] spapr: no need to verify the node

2018-06-08 Thread Greg Kurz
On Fri, 8 Jun 2018 13:28:01 +0200 David Hildenbrand wrote: > On 08.06.2018 12:52, Greg Kurz wrote: > > On Fri, 8 Jun 2018 11:24:51 +0200 > > David Hildenbrand wrote: > > > >> +1 for error_abort, even if it takes another line. > > +1 for error_abort > > call shouldn't fail, b

Re: [Qemu-devel] [PATCH 00/11] misc: Add trailing '\n' to qemu_log() calls

2018-06-08 Thread Peter Maydell
On 6 June 2018 at 16:21, Philippe Mathieu-Daudé wrote: > Nothing very exciting here. > I sometimes miss to notice some trace events, running with -d unimp,trace... > then using 'grep ^...'. This is only due to a missing '\n' :) > > Philippe Mathieu-Daudé (11): > hw/sd/milkymist-memcard: Add trai

Re: [Qemu-devel] [PATCH v2 0/3] glib: update the min required version

2018-06-08 Thread Peter Maydell
On 6 June 2018 at 18:32, Daniel P. Berrangé wrote: > The previous patch to bump glib to 2.42 hit problems with Peter's build > environment for testing merge: > > https://lists.gnu.org/archive/html/qemu-devel/2018-05/msg02557.html > > This posting drops back to 2.40, which allows Ubuntu 14.04 fro

Re: [Qemu-devel] [RFC PATCH v2 7/7] hw/sd/ssi-sd: Force cards connected in SPI mode to use Spec v1.10

2018-06-08 Thread Peter Maydell
On 7 June 2018 at 19:06, Philippe Mathieu-Daudé wrote: > Due to physical restriction in SPI mode the maximum transfer > speed is limited. All the extensions added after Spec v3 are > simply not supported in SPI mode: You say here that SPI mode doesn't support extensions added "after spec v3"...

Re: [Qemu-devel] [PATCH v2 0/7] sdcard: cleanup the SD_SPEC version

2018-06-08 Thread Peter Maydell
On 7 June 2018 at 19:06, Philippe Mathieu-Daudé wrote: > Since v2: > - heavy documentation improvements > - squashed previous 3+4 "add spec_version property default to v2" for > atomicity > - SSI/SD patch downgraded to RFC > - added Alistair R-b tags > Philippe Mathieu-Daudé (7): > sdcard: Upd

Re: [Qemu-devel] [PATCH RFC 2/2] vfio-ccw: support for halt/clear subchannel

2018-06-08 Thread Cornelia Huck
On Thu, 7 Jun 2018 18:37:16 +0200 Pierre Morel wrote: > On 07/06/2018 11:54, Cornelia Huck wrote: > > -- > > | scsw(g) | ssch > > -- | > > | guest > > ---

Re: [Qemu-devel] [PATCH v4 04/14] pc: prepare for multi stage hotplug handlers

2018-06-08 Thread Igor Mammedov
On Thu, 7 Jun 2018 16:00:54 +0200 David Hildenbrand wrote: > On 07.06.2018 15:44, Igor Mammedov wrote: > > On Mon, 4 Jun 2018 13:27:01 +0200 > > David Hildenbrand wrote: > > > >> On 31.05.2018 16:13, Igor Mammedov wrote: > >>> On Wed, 30 May 2018 16:13:32 +0200 > >>> David Hildenbrand wrot

[Qemu-devel] [PATCH v2 00/10] python: futurize --stage1 (Python 3 compatibility)

2018-06-08 Thread Eduardo Habkost
v2 note (v1 was RFC): Except for a trivial change in patch 02/10, this series is the same as the RFC I sent previously. I plan to merge it and include it in a pull request soon. >From the futurize[1] documentation: > This applies fixes that modernize Python 2 code without > changing the e

  1   2   3   4   5   >