[Qemu-devel] [PULL 00/18] ppc-for-2.10 queue 20170714

David Gibson posted 18 patches 6 years, 8 months ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20170714061521.28300-1-david@gibson.dropbear.id.au
Test FreeBSD passed
Test checkpatch passed
Test docker passed
Test s390x passed
hw/ppc/spapr.c              | 235 ++++++++++++++++--------
hw/ppc/spapr_drc.c          | 401 ++++++++++++++++++++++------------------
hw/ppc/spapr_events.c       |  98 +++++-----
hw/ppc/spapr_hcall.c        | 439 ++++++++++++++++++++++++++++++++++++++++++++
hw/ppc/spapr_pci.c          |  17 +-
hw/ppc/trace-events         |   5 +-
include/hw/ppc/pnv_psi.h    |   2 -
include/hw/ppc/spapr.h      |  24 ++-
include/hw/ppc/spapr_drc.h  |  74 +++++---
include/hw/ppc/spapr_ovec.h |   1 +
target/ppc/kvm.c            |  76 ++++++++
target/ppc/kvm_ppc.h        |  26 +++
target/ppc/mmu-hash64.h     |   4 +
13 files changed, 1056 insertions(+), 346 deletions(-)
[Qemu-devel] [PULL 00/18] ppc-for-2.10 queue 20170714
Posted by David Gibson 6 years, 8 months ago
The following changes since commit 49bcce4b9c11759678fd223aefb48691c4959d4f:

  Merge remote-tracking branch 'remotes/armbru/tags/pull-qapi-2017-07-12' into staging (2017-07-13 16:56:06 +0100)

are available in the git repository at:

  git://github.com/dgibson/qemu.git tags/ppc-for-2.10-20170714

for you to fetch changes up to e11134d2ac7744569d7c387102368c507d340c30:

  pseries: Allow HPT resizing with KVM (2017-07-14 09:28:30 +1000)

----------------------------------------------------------------
ppc patch queue 2017-07-14

Two major batches in this set, rather than the usual collection of
assorted fixes.

    * More DRC cleanup.  This gets the state management into a state
      which should fix many of the hotplug+migration problems we've
      had.  Plus it gets the migration stream format into something
      well defined and pretty minimal which we can reasonably support
      into the future.

    * Hashed Page Table resizing.  It's been a while since this was
      posted, but it's been through several previous rounds of review.
      The kernel parts (both guest and host) are merged in 4.11, so
      this is the only remaining piece left to allow resizing of the
      HPT in a running guest.

There are also a handful of unrelated fixes.

----------------------------------------------------------------
Alexey Kardashevskiy (1):
      ppc/pnv: Remove unused XICSState reference

Daniel Henrique Barboza (1):
      spapr: migrate pending_events of spapr state

David Gibson (14):
      spapr: Minor cleanups to events handling
      spapr: Remove 'awaiting_allocation' DRC flag
      spapr: Simplify unplug path
      spapr: Abort on delete failure in spapr_drc_release()
      spapr: Refactor spapr_drc_detach()
      spapr: Cleanups relating to DRC awaiting_release field
      spapr: Consolidate DRC state variables
      spapr: Remove sPAPRConfigureConnectorState sub-structure
      spapr: Implement DR-indicator for physical DRCs only
      pseries: Stubs for HPT resizing
      pseries: Implement HPT resizing
      pseries: Enable HPT resizing for 2.10
      pseries: Use smaller default hash page tables when guest can resize
      pseries: Allow HPT resizing with KVM

Greg Kurz (1):
      spapr: fix potential memory leak in spapr_core_plug()

Laurent Vivier (1):
      spapr: Treat devices added before inbound migration as coldplugged

 hw/ppc/spapr.c              | 235 ++++++++++++++++--------
 hw/ppc/spapr_drc.c          | 401 ++++++++++++++++++++++------------------
 hw/ppc/spapr_events.c       |  98 +++++-----
 hw/ppc/spapr_hcall.c        | 439 ++++++++++++++++++++++++++++++++++++++++++++
 hw/ppc/spapr_pci.c          |  17 +-
 hw/ppc/trace-events         |   5 +-
 include/hw/ppc/pnv_psi.h    |   2 -
 include/hw/ppc/spapr.h      |  24 ++-
 include/hw/ppc/spapr_drc.h  |  74 +++++---
 include/hw/ppc/spapr_ovec.h |   1 +
 target/ppc/kvm.c            |  76 ++++++++
 target/ppc/kvm_ppc.h        |  26 +++
 target/ppc/mmu-hash64.h     |   4 +
 13 files changed, 1056 insertions(+), 346 deletions(-)

Re: [Qemu-devel] [PULL 00/18] ppc-for-2.10 queue 20170714
Posted by Peter Maydell 6 years, 8 months ago
On 14 July 2017 at 07:15, David Gibson <david@gibson.dropbear.id.au> wrote:
> The following changes since commit 49bcce4b9c11759678fd223aefb48691c4959d4f:
>
>   Merge remote-tracking branch 'remotes/armbru/tags/pull-qapi-2017-07-12' into staging (2017-07-13 16:56:06 +0100)
>
> are available in the git repository at:
>
>   git://github.com/dgibson/qemu.git tags/ppc-for-2.10-20170714
>
> for you to fetch changes up to e11134d2ac7744569d7c387102368c507d340c30:
>
>   pseries: Allow HPT resizing with KVM (2017-07-14 09:28:30 +1000)
>
> ----------------------------------------------------------------
> ppc patch queue 2017-07-14
>
> Two major batches in this set, rather than the usual collection of
> assorted fixes.
>
>     * More DRC cleanup.  This gets the state management into a state
>       which should fix many of the hotplug+migration problems we've
>       had.  Plus it gets the migration stream format into something
>       well defined and pretty minimal which we can reasonably support
>       into the future.
>
>     * Hashed Page Table resizing.  It's been a while since this was
>       posted, but it's been through several previous rounds of review.
>       The kernel parts (both guest and host) are merged in 4.11, so
>       this is the only remaining piece left to allow resizing of the
>       HPT in a running guest.
>
> There are also a handful of unrelated fixes.

I see Alex Graf's update to the e500 u-boot image didn't make
it in to this -- are you planning to send that separately
or should I pick it up directly? (I definitely would like to
see that in the 2.10 release, because it fixes a problem where
our u-boot sources are (a) very old and (b) not even the version
corresponding to the binary blob we ship...)

thanks
-- PMM

Re: [Qemu-devel] [PULL 00/18] ppc-for-2.10 queue 20170714
Posted by David Gibson 6 years, 8 months ago
On Fri, Jul 14, 2017 at 11:25:01AM +0100, Peter Maydell wrote:
> On 14 July 2017 at 07:15, David Gibson <david@gibson.dropbear.id.au> wrote:
> > The following changes since commit 49bcce4b9c11759678fd223aefb48691c4959d4f:
> >
> >   Merge remote-tracking branch 'remotes/armbru/tags/pull-qapi-2017-07-12' into staging (2017-07-13 16:56:06 +0100)
> >
> > are available in the git repository at:
> >
> >   git://github.com/dgibson/qemu.git tags/ppc-for-2.10-20170714
> >
> > for you to fetch changes up to e11134d2ac7744569d7c387102368c507d340c30:
> >
> >   pseries: Allow HPT resizing with KVM (2017-07-14 09:28:30 +1000)
> >
> > ----------------------------------------------------------------
> > ppc patch queue 2017-07-14
> >
> > Two major batches in this set, rather than the usual collection of
> > assorted fixes.
> >
> >     * More DRC cleanup.  This gets the state management into a state
> >       which should fix many of the hotplug+migration problems we've
> >       had.  Plus it gets the migration stream format into something
> >       well defined and pretty minimal which we can reasonably support
> >       into the future.
> >
> >     * Hashed Page Table resizing.  It's been a while since this was
> >       posted, but it's been through several previous rounds of review.
> >       The kernel parts (both guest and host) are merged in 4.11, so
> >       this is the only remaining piece left to allow resizing of the
> >       HPT in a running guest.
> >
> > There are also a handful of unrelated fixes.
> 
> I see Alex Graf's update to the e500 u-boot image didn't make
> it in to this -- are you planning to send that separately
> or should I pick it up directly? (I definitely would like to
> see that in the 2.10 release, because it fixes a problem where
> our u-boot sources are (a) very old and (b) not even the version
> corresponding to the binary blob we ship...)

Oh, I didn't spot that one.  Can you take it directly?

-- 
David Gibson			| I'll have my music baroque, and my code
david AT gibson.dropbear.id.au	| minimalist, thank you.  NOT _the_ _other_
				| _way_ _around_!
http://www.ozlabs.org/~dgibson
Re: [Qemu-devel] [PULL 00/18] ppc-for-2.10 queue 20170714
Posted by Peter Maydell 6 years, 8 months ago
On 14 July 2017 at 07:15, David Gibson <david@gibson.dropbear.id.au> wrote:
> The following changes since commit 49bcce4b9c11759678fd223aefb48691c4959d4f:
>
>   Merge remote-tracking branch 'remotes/armbru/tags/pull-qapi-2017-07-12' into staging (2017-07-13 16:56:06 +0100)
>
> are available in the git repository at:
>
>   git://github.com/dgibson/qemu.git tags/ppc-for-2.10-20170714
>
> for you to fetch changes up to e11134d2ac7744569d7c387102368c507d340c30:
>
>   pseries: Allow HPT resizing with KVM (2017-07-14 09:28:30 +1000)
>
> ----------------------------------------------------------------
> ppc patch queue 2017-07-14
>
> Two major batches in this set, rather than the usual collection of
> assorted fixes.
>
>     * More DRC cleanup.  This gets the state management into a state
>       which should fix many of the hotplug+migration problems we've
>       had.  Plus it gets the migration stream format into something
>       well defined and pretty minimal which we can reasonably support
>       into the future.
>
>     * Hashed Page Table resizing.  It's been a while since this was
>       posted, but it's been through several previous rounds of review.
>       The kernel parts (both guest and host) are merged in 4.11, so
>       this is the only remaining piece left to allow resizing of the
>       HPT in a running guest.
>
> There are also a handful of unrelated fixes.

Hi. I'm afraid this fails to build on the w32 compiler:
  CC      ppc64-softmmu/hw/ppc/spapr.o
/home/petmay01/linaro/qemu-for-merges/hw/ppc/spapr.c: In function
‘spapr_get_resize_hpt’:
/home/petmay01/linaro/qemu-for-merges/hw/ppc/spapr.c:2642:1: error:
control reaches end of non-void functio
n [-Werror=return-type]
 }
 ^

The compiler is confused (it doesn't realise that "assert(0)"
cannot return), but you can make it happier like this:

diff --git a/hw/ppc/spapr.c b/hw/ppc/spapr.c
index 09b6ff0..68f936c 100644
--- a/hw/ppc/spapr.c
+++ b/hw/ppc/spapr.c
@@ -2638,7 +2638,7 @@ static char *spapr_get_resize_hpt(Object *obj,
Error **errp)
     case SPAPR_RESIZE_HPT_REQUIRED:
         return g_strdup("required");
     }
-    assert(0);
+    g_assert_not_reached();
 }

 static void spapr_set_resize_hpt(Object *obj, const char *value, Error **errp)


I think g_assert_not_reached() is easier to read anyway; I
always have to think for a moment about whether assert(0)
or assert(1) is the "always assert" condition...

thanks
-- PMM

Re: [Qemu-devel] [PULL 00/18] ppc-for-2.10 queue 20170714
Posted by David Gibson 6 years, 8 months ago
On Fri, Jul 14, 2017 at 04:13:05PM +0100, Peter Maydell wrote:
> On 14 July 2017 at 07:15, David Gibson <david@gibson.dropbear.id.au> wrote:
> > The following changes since commit 49bcce4b9c11759678fd223aefb48691c4959d4f:
> >
> >   Merge remote-tracking branch 'remotes/armbru/tags/pull-qapi-2017-07-12' into staging (2017-07-13 16:56:06 +0100)
> >
> > are available in the git repository at:
> >
> >   git://github.com/dgibson/qemu.git tags/ppc-for-2.10-20170714
> >
> > for you to fetch changes up to e11134d2ac7744569d7c387102368c507d340c30:
> >
> >   pseries: Allow HPT resizing with KVM (2017-07-14 09:28:30 +1000)
> >
> > ----------------------------------------------------------------
> > ppc patch queue 2017-07-14
> >
> > Two major batches in this set, rather than the usual collection of
> > assorted fixes.
> >
> >     * More DRC cleanup.  This gets the state management into a state
> >       which should fix many of the hotplug+migration problems we've
> >       had.  Plus it gets the migration stream format into something
> >       well defined and pretty minimal which we can reasonably support
> >       into the future.
> >
> >     * Hashed Page Table resizing.  It's been a while since this was
> >       posted, but it's been through several previous rounds of review.
> >       The kernel parts (both guest and host) are merged in 4.11, so
> >       this is the only remaining piece left to allow resizing of the
> >       HPT in a running guest.
> >
> > There are also a handful of unrelated fixes.
> 
> Hi. I'm afraid this fails to build on the w32 compiler:
>   CC      ppc64-softmmu/hw/ppc/spapr.o
> /home/petmay01/linaro/qemu-for-merges/hw/ppc/spapr.c: In function
> ‘spapr_get_resize_hpt’:
> /home/petmay01/linaro/qemu-for-merges/hw/ppc/spapr.c:2642:1: error:
> control reaches end of non-void functio
> n [-Werror=return-type]
>  }

Drat.  Is there an easy way to test compile for w32?

>  ^
> 
> The compiler is confused (it doesn't realise that "assert(0)"
> cannot return), but you can make it happier like this:
> 
> diff --git a/hw/ppc/spapr.c b/hw/ppc/spapr.c
> index 09b6ff0..68f936c 100644
> --- a/hw/ppc/spapr.c
> +++ b/hw/ppc/spapr.c
> @@ -2638,7 +2638,7 @@ static char *spapr_get_resize_hpt(Object *obj,
> Error **errp)
>      case SPAPR_RESIZE_HPT_REQUIRED:
>          return g_strdup("required");
>      }
> -    assert(0);
> +    g_assert_not_reached();
>  }
> 
>  static void spapr_set_resize_hpt(Object *obj, const char *value, Error **errp)
> 
> 
> I think g_assert_not_reached() is easier to read anyway; I
> always have to think for a moment about whether assert(0)
> or assert(1) is the "always assert" condition...

Yes, seems good.  Should I resend, or will you adjust in place?

-- 
David Gibson			| I'll have my music baroque, and my code
david AT gibson.dropbear.id.au	| minimalist, thank you.  NOT _the_ _other_
				| _way_ _around_!
http://www.ozlabs.org/~dgibson
Re: [Qemu-devel] [PULL 00/18] ppc-for-2.10 queue 20170714
Posted by Peter Maydell 6 years, 8 months ago
On 15 July 2017 at 03:42, David Gibson <david@gibson.dropbear.id.au> wrote:
> On Fri, Jul 14, 2017 at 04:13:05PM +0100, Peter Maydell wrote:
>> Hi. I'm afraid this fails to build on the w32 compiler:
>>   CC      ppc64-softmmu/hw/ppc/spapr.o
>> /home/petmay01/linaro/qemu-for-merges/hw/ppc/spapr.c: In function
>> ‘spapr_get_resize_hpt’:
>> /home/petmay01/linaro/qemu-for-merges/hw/ppc/spapr.c:2642:1: error:
>> control reaches end of non-void functio
>> n [-Werror=return-type]
>>  }
>
> Drat.  Is there an easy way to test compile for w32?

I have a cross-compiler set up on an Ubuntu host; you
can do it on Redhat hosts too; instructions on the wiki
somewhere I think.

In this case I think you're either getting caught by the
age of the compiler or because this set of w32 headers
have a bug where assert() doesn't get marked as fatal
somehow, so it might or might not manifest on other
w32 cross build setups.

> Yes, seems good.  Should I resend, or will you adjust in place?

You'll need to resend -- I can't modify signed pull reqs.

thanks
-- PMM

Re: [Qemu-devel] [PULL 00/18] ppc-for-2.10 queue 20170714
Posted by David Gibson 6 years, 8 months ago
On Sat, Jul 15, 2017 at 08:45:13AM +0100, Peter Maydell wrote:
> On 15 July 2017 at 03:42, David Gibson <david@gibson.dropbear.id.au> wrote:
> > On Fri, Jul 14, 2017 at 04:13:05PM +0100, Peter Maydell wrote:
> >> Hi. I'm afraid this fails to build on the w32 compiler:
> >>   CC      ppc64-softmmu/hw/ppc/spapr.o
> >> /home/petmay01/linaro/qemu-for-merges/hw/ppc/spapr.c: In function
> >> ‘spapr_get_resize_hpt’:
> >> /home/petmay01/linaro/qemu-for-merges/hw/ppc/spapr.c:2642:1: error:
> >> control reaches end of non-void functio
> >> n [-Werror=return-type]
> >>  }
> >
> > Drat.  Is there an easy way to test compile for w32?
> 
> I have a cross-compiler set up on an Ubuntu host; you
> can do it on Redhat hosts too; instructions on the wiki
> somewhere I think.

Ah, thanks, found them.

> In this case I think you're either getting caught by the
> age of the compiler or because this set of w32 headers
> have a bug where assert() doesn't get marked as fatal
> somehow, so it might or might not manifest on other
> w32 cross build setups.

Ah, right.

> > Yes, seems good.  Should I resend, or will you adjust in place?
> 
> You'll need to resend -- I can't modify signed pull reqs.

Ah, yes of course.

I've also realised one of the patches breaks make check on Travis OSX
builds for reasons I haven't quite fathomed yet.  Investigating.

-- 
David Gibson			| I'll have my music baroque, and my code
david AT gibson.dropbear.id.au	| minimalist, thank you.  NOT _the_ _other_
				| _way_ _around_!
http://www.ozlabs.org/~dgibson