[libvirt] [RFC PATCH 00/12] Support multiple PHBs on pSeries guests

Andrea Bolognani posted 12 patches 7 years, 1 month ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/libvirt tags/patchew/1488298364-16896-1-git-send-email-abologna@redhat.com
docs/schemas/domaincommon.rng                      |   7 ++
src/bhyve/bhyve_domain.c                           |  15 +++
src/conf/domain_conf.c                             |  34 ++++--
src/conf/domain_conf.h                             |   2 +
src/libxl/libxl_domain.c                           |  14 +++
src/lxc/lxc_domain.c                               |  14 +++
src/openvz/openvz_driver.c                         |  14 +++
src/qemu/qemu_capabilities.c                       |   2 +
src/qemu/qemu_capabilities.h                       |   1 +
src/qemu/qemu_command.c                            | 126 +++++++++++++++++----
src/qemu/qemu_command.h                            |   9 +-
src/qemu/qemu_domain.c                             |  13 +++
src/qemu/qemu_domain_address.c                     |  47 +++++++-
src/qemu/qemu_hotplug.c                            |   5 +-
src/uml/uml_driver.c                               |  14 +++
src/vz/vz_driver.c                                 |  14 +++
src/xen/xen_driver.c                               |  14 +++
.../qemuargv2xmldata/qemuargv2xml-pseries-disk.xml |   5 +-
.../qemuargv2xml-pseries-nvram.xml                 |   5 +-
tests/qemucapabilitiesdata/caps_2.6.0.ppc64le.xml  |   1 +
.../qemuxml2argv-pseries-phb-simple.args           |  26 +++++
.../qemuxml2argv-pseries-phb-simple.xml            |  20 ++++
tests/qemuxml2argvtest.c                           |   5 +
.../qemuxml2xmlout-panic-pseries.xml               |   5 +-
.../qemuxml2xmlout-ppc64-usb-controller-legacy.xml |   5 +-
.../qemuxml2xmlout-ppc64-usb-controller.xml        |   5 +-
.../qemuxml2xmlout-pseries-nvram.xml               |   5 +-
.../qemuxml2xmlout-pseries-panic-missing.xml       |   5 +-
.../qemuxml2xmlout-pseries-panic-no-address.xml    |   5 +-
...g.xml => qemuxml2xmlout-pseries-phb-simple.xml} |  13 ++-
tests/qemuxml2xmltest.c                            |   4 +
31 files changed, 407 insertions(+), 47 deletions(-)
create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-pseries-phb-simple.args
create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-pseries-phb-simple.xml
copy tests/qemuxml2xmloutdata/{qemuxml2xmlout-pseries-panic-missing.xml => qemuxml2xmlout-pseries-phb-simple.xml} (69%)
[libvirt] [RFC PATCH 00/12] Support multiple PHBs on pSeries guests
Posted by Andrea Bolognani 7 years, 1 month ago
Note: if you want to try this out, you'll need to make sure
      your QEMU binary includes this commit[1]; moreover,
      that commit is missing a way for libvirt to detect
      whether the new naming scheme is in place, so this
      will have to remain an RFC until the QEMU side has
      been sorted out.

Patches 1-3 are just setting up the stage.

Patch 4 starts actually introducing the feature, by
relaxing some checks that can no longer be as strict.

Patches 5-10 puts all the boring bits (XML parsing and
formatting, QEMU capabilities) in place.

Patch 11 enables the feature at last.

Patch 12 introduces a single test, a bunch more will be
added before posting this for real (not as RFC).


[1] https://github.com/dgibson/qemu/commit/0a6a9ba2adc48a9a5ea7406d1a5fb3c36f0073e0

Andrea Bolognani (12):
  qemu: Allow qemuBuildControllerDevStr() to return NULL
  qemu: Tweak index number checking
  conf: Move index number checking to drivers
  qemu: Relax pci-root index requirement for pSeries guests
  schema: Allow <target index='...'/>
  schema: Add 'spapr-pci-host-bridge' controller model
  conf: Parse and format <target index='...'/>
  conf: Add 'spapr-pci-host-bridge' controller model
  qemu: Automatically pick index and model for pci-root controllers
  qemu: Introduce QEMU_CAPS_DEVICE_SPAPR_PCI_HOST_BRIDGE
  qemu: Use multiple PHBs for pSeries guests
  tests: Add tests for pSeries guests with multiple PHBs

 docs/schemas/domaincommon.rng                      |   7 ++
 src/bhyve/bhyve_domain.c                           |  15 +++
 src/conf/domain_conf.c                             |  34 ++++--
 src/conf/domain_conf.h                             |   2 +
 src/libxl/libxl_domain.c                           |  14 +++
 src/lxc/lxc_domain.c                               |  14 +++
 src/openvz/openvz_driver.c                         |  14 +++
 src/qemu/qemu_capabilities.c                       |   2 +
 src/qemu/qemu_capabilities.h                       |   1 +
 src/qemu/qemu_command.c                            | 126 +++++++++++++++++----
 src/qemu/qemu_command.h                            |   9 +-
 src/qemu/qemu_domain.c                             |  13 +++
 src/qemu/qemu_domain_address.c                     |  47 +++++++-
 src/qemu/qemu_hotplug.c                            |   5 +-
 src/uml/uml_driver.c                               |  14 +++
 src/vz/vz_driver.c                                 |  14 +++
 src/xen/xen_driver.c                               |  14 +++
 .../qemuargv2xmldata/qemuargv2xml-pseries-disk.xml |   5 +-
 .../qemuargv2xml-pseries-nvram.xml                 |   5 +-
 tests/qemucapabilitiesdata/caps_2.6.0.ppc64le.xml  |   1 +
 .../qemuxml2argv-pseries-phb-simple.args           |  26 +++++
 .../qemuxml2argv-pseries-phb-simple.xml            |  20 ++++
 tests/qemuxml2argvtest.c                           |   5 +
 .../qemuxml2xmlout-panic-pseries.xml               |   5 +-
 .../qemuxml2xmlout-ppc64-usb-controller-legacy.xml |   5 +-
 .../qemuxml2xmlout-ppc64-usb-controller.xml        |   5 +-
 .../qemuxml2xmlout-pseries-nvram.xml               |   5 +-
 .../qemuxml2xmlout-pseries-panic-missing.xml       |   5 +-
 .../qemuxml2xmlout-pseries-panic-no-address.xml    |   5 +-
 ...g.xml => qemuxml2xmlout-pseries-phb-simple.xml} |  13 ++-
 tests/qemuxml2xmltest.c                            |   4 +
 31 files changed, 407 insertions(+), 47 deletions(-)
 create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-pseries-phb-simple.args
 create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-pseries-phb-simple.xml
 copy tests/qemuxml2xmloutdata/{qemuxml2xmlout-pseries-panic-missing.xml => qemuxml2xmlout-pseries-phb-simple.xml} (69%)

-- 
2.7.4

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list
Re: [libvirt] [RFC PATCH 00/12] Support multiple PHBs on pSeries guests
Posted by Daniel P. Berrange 7 years, 1 month ago
On Tue, Feb 28, 2017 at 05:12:32PM +0100, Andrea Bolognani wrote:
> Note: if you want to try this out, you'll need to make sure
>       your QEMU binary includes this commit[1]; moreover,
>       that commit is missing a way for libvirt to detect
>       whether the new naming scheme is in place, so this
>       will have to remain an RFC until the QEMU side has
>       been sorted out.

[snip]

> [1] https://github.com/dgibson/qemu/commit/0a6a9ba2adc48a9a5ea7406d1a5fb3c36f0073e0

IMHO changing QEMU naming just for sake of making PPC look slightly
more like non-PPC architecture is not enough justification for making
an incompatible change like this. As you show above, regardless of
whether libvirt currently uses this feature or not, it hurts libvirt
because when we do add support we need to be able to cope with new
and old QEMU.  I'd suggest that commit is simply dropped unless there
is a clear functional reason for why the naming must be changed, not
merely a style reason.

Regards,
Daniel
-- 
|: http://berrange.com      -o-    http://www.flickr.com/photos/dberrange/ :|
|: http://libvirt.org              -o-             http://virt-manager.org :|
|: http://entangle-photo.org       -o-    http://search.cpan.org/~danberr/ :|

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list
Re: [libvirt] [RFC PATCH 00/12] Support multiple PHBs on pSeries guests
Posted by Andrea Bolognani 7 years, 1 month ago
On Wed, 2017-03-01 at 11:47 +0000, Daniel P. Berrange wrote:
> > Note: if you want to try this out, you'll need to make sure
> >       your QEMU binary includes this commit[1]; moreover,
> >       that commit is missing a way for libvirt to detect
> >       whether the new naming scheme is in place, so this
> >       will have to remain an RFC until the QEMU side has
> >       been sorted out.
> 
> [snip]
> 
> > 
> > [1] https://github.com/dgibson/qemu/commit/0a6a9ba2adc48a9a5ea7406d1a5fb3c36f0073e0
> 
> IMHO changing QEMU naming just for sake of making PPC look slightly
> more like non-PPC architecture is not enough justification for making
> an incompatible change like this. As you show above, regardless of
> whether libvirt currently uses this feature or not, it hurts libvirt
> because when we do add support we need to be able to cope with new
> and old QEMU.  I'd suggest that commit is simply dropped unless there
> is a clear functional reason for why the naming must be changed, not
> merely a style reason.

Hm, you have a point. I'll try to see how difficult it
would be to teach PCI devices about the quirkiness in
bus naming when it comes to PHBs.

-- 
Andrea Bolognani / Red Hat / Virtualization

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list
Re: [libvirt] [RFC PATCH 00/12] Support multiple PHBs on pSeries guests
Posted by David Gibson 7 years, 1 month ago
On Wed, 01 Mar 2017 13:41:10 +0100
Andrea Bolognani <abologna@redhat.com> wrote:

> On Wed, 2017-03-01 at 11:47 +0000, Daniel P. Berrange wrote:
>  [...]  
>  [...]  
>  [...]  
>  [...]  
> 
> Hm, you have a point. I'll try to see how difficult it
> would be to teach PCI devices about the quirkiness in
> bus naming when it comes to PHBs.

An update: I'm intending to squeeze the device tree fix to advertise
extended config space into qemu-2.9.  I'm not going to include the
naming change - I'll see how your investigation here turns out before
proceeding with that.

-- 
David Gibson <dgibson@redhat.com>
Senior Software Engineer, Virtualization, Red Hat
--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list
Re: [libvirt] [RFC PATCH 00/12] Support multiple PHBs on pSeries guests
Posted by Andrea Bolognani 7 years, 1 month ago
On Fri, 2017-03-03 at 12:37 +1100, David Gibson wrote:
> > Hm, you have a point. I'll try to see how difficult it
> > would be to teach PCI devices about the quirkiness in
> > bus naming when it comes to PHBs.
> 
> An update: I'm intending to squeeze the device tree fix to advertise
> extended config space into qemu-2.9.  I'm not going to include the
> naming change - I'll see how your investigation here turns out before
> proceeding with that.

Sorry for not keeping you up to date, here's the situation:
I got the code working with the current naming scheme and
it's not even too big a kludge, so dropping that patch is
definitely the right thing to do.

Unfortunately I've uncovered a few other issues while
writing more test cases, that's why I haven't yet posted
a respin.

-- 
Andrea Bolognani / Red Hat / Virtualization

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list
Re: [libvirt] [RFC PATCH 00/12] Support multiple PHBs on pSeries guests
Posted by David Gibson 7 years, 1 month ago
On Fri, 03 Mar 2017 09:07:53 +0100
Andrea Bolognani <abologna@redhat.com> wrote:

> On Fri, 2017-03-03 at 12:37 +1100, David Gibson wrote:
>  [...]  
>  [...]  
> 
> Sorry for not keeping you up to date, here's the situation:
> I got the code working with the current naming scheme and
> it's not even too big a kludge, so dropping that patch is
> definitely the right thing to do.

Good to hear.

> Unfortunately I've uncovered a few other issues while
> writing more test cases, that's why I haven't yet posted
> a respin.

Let me know if you need anything from my side.

As I said on today's call, the qemu change to allow access to extended
config space has made it in for qemu-2.9.

-- 
David Gibson <dgibson@redhat.com>
Senior Software Engineer, Virtualization, Red Hat
--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list