[PATCH 00/33] ppc64 PowerNV machines support

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

The ppc64 PowerNV (Power Non-Virtualized) machine types is the
bare-metal emulation of the IBM Power server. They follow a different
specification than the virtualized guest emulation, a.k.a the pSeries
guest that Libvirt supports for awhile. 

There is an interest in running these PowerNV machines using Libvirt, in
particular due to the growing popularity of the OpenCI project. This is
the motivation of this work.

Although these machines are present in QEMU for a few years now, they
only became "Libvirt compliant" recently in upstream QEMU. The reason is
that running with '-nodefaults' wouldn't allow users to add PHBs
manually in the command line.  Since the correspondent capabilities are
already present since QEMU 5.0 I didn't find a good way to block the
creation of powerNV domains for older QEMU versions (suggestions
welcome). 

Support for these machines consists of adding a specific root-port and
pcie-root implemementation for each one of them. powernv8 uses
pnv-phb3-root-port/pnv-phb3 and powernv9 uses pnv-phb4-root-port/pnv-phb4.
PowerNV PHBs have a similar handling as the already existing
spapr-pci-host-bridge bus.

These domains needs BMC devices to turn off from the OS. These devices
aren't implemented in Libvirt yet (to my surprise, given that it's an
Intel interface), so the domains needs to be turned off using 'virsh
destroy'. I have patches that implements the required BMC devices, but
decided to post them as a follow up to not make this patch set too
large.

The series is organized as follows:

- patch 1: same patch sent a few days ago in [1], reposted here because the
capabilities was added on top of it;
- patches 2-9: cleanups and simplifications to allow a simple powernv8
domain to boot;
- patches 10-26: add root-port and phb of the powernv8 machine;
- patches 27-33: add root-port and phb of the powernv9 machine.


No change in existing pcie-root and pcie-root-port models were made.


This work can also be fetched from here:

https://gitlab.com/danielhb/libvirt/-/tree/pnv_v1

Frederic, fell free to give this a ride and let us know how it goes.



[1] https://listman.redhat.com/archives/libvir-list/2022-January/msg00766.html


Daniel Henrique Barboza (33):
  tests: update QEMU and domain ppc64 capabilities for qemu 7.0
  qemu_domain.c: add PowerNV machine helpers
  qemu_capabilities.c: use 'MachineIsPowerPC' in DeviceDiskCaps
  qemu_validate.c: use qemuDomainIsPowerPC() in
    qemuValidateDomainChrDef()
  qemu_domain.c: define ISA as default PowerNV serial
  qemu_validate.c: enhance 'machine type not supported' message
  qemu_domain.c: disable default devices for PowerNV machines
  tests: add basic PowerNV8 test
  qemu_migration.c: forbid powernv domains migration
  qemu: introduce QEMU_CAPS_DEVICE_PNV_PHB3_ROOT_PORT
  conf: add 'pnv-phb3-root-port' domain definition
  qemu: add 'modelName' value for pnv-phb3-root-port device
  qemu: introduce QEMU_CAPS_DEVICE_PNV_PHB3
  conf: add 'pnv-phb3' controller model
  qemu: add 'modelName' value for pnv-phb3 device
  domain_conf.c: fix identation in virDomainControllerDefParseXML()
  conf: parse and format <target chip-id='...'/>
  introduce virDomainControllerIsPowerNVPHB
  conf, qemu: add default 'chip-id' value for pnv-phb3 controllers
  conf, qemu: add default 'targetIndex' value for pnv-phb3 devs
  qemu_command.c: add command line for the pnv-phb3 device
  qemu_domain_address.c: change pnv-phb3 minimal downstream slot
  domain_conf: format pnv-phb3-root-port empty addr
  tests: add pnv-phb3-root-port test
  domain_validate.c: allow targetIndex 0 out of idx 0 for PowerNV PHBs
  domain_conf.c: reject duplicated pnv-phb3 devices
  qemu: introduce QEMU_CAPS_DEVICE_PNV_PHB4_ROOT_PORT
  conf: add 'pnv-phb4-root-port' domain definition
  qemu: add 'modelName' value for pnv-phb4-root-port device
  qemu: introduce QEMU_CAPS_DEVICE_PNV_PHB4
  conf: add 'pnv-phb4' controller model
  qemu: add 'modelName' value for pnv-phb4 device
  tests: add PowerNV9 tests

 docs/formatdomain.rst                         |     4 +
 docs/schemas/domaincommon.rng                 |    10 +
 src/conf/domain_conf.c                        |   157 +-
 src/conf/domain_conf.h                        |     8 +
 src/conf/domain_validate.c                    |     5 +-
 src/libvirt_private.syms                      |     1 +
 src/qemu/qemu_capabilities.c                  |    12 +-
 src/qemu/qemu_capabilities.h                  |     4 +
 src/qemu/qemu_command.c                       |    21 +-
 src/qemu/qemu_domain.c                        |    56 +-
 src/qemu/qemu_domain.h                        |     4 +-
 src/qemu/qemu_domain_address.c                |    64 +-
 src/qemu/qemu_migration.c                     |     6 +
 src/qemu/qemu_validate.c                      |    63 +-
 tests/domaincapsdata/qemu_7.0.0.ppc64.xml     |   148 +
 .../qemucapabilitiesdata/caps_5.0.0.ppc64.xml |     4 +
 .../qemucapabilitiesdata/caps_5.2.0.ppc64.xml |     4 +
 .../qemucapabilitiesdata/caps_6.2.0.ppc64.xml |     4 +
 .../caps_7.0.0.ppc64.replies                  | 33825 ++++++++++++++++
 .../qemucapabilitiesdata/caps_7.0.0.ppc64.xml |  1143 +
 ...default-video-type-ppc64.ppc64-latest.args |     8 +-
 tests/qemuxml2argvdata/powernv8-basic.args    |    32 +
 tests/qemuxml2argvdata/powernv8-basic.xml     |    16 +
 tests/qemuxml2argvdata/powernv8-dupPHBs.err   |     1 +
 tests/qemuxml2argvdata/powernv8-dupPHBs.xml   |    27 +
 .../qemuxml2argvdata/powernv8-root-port.args  |    33 +
 tests/qemuxml2argvdata/powernv8-root-port.xml |    17 +
 .../qemuxml2argvdata/powernv8-two-sockets.xml |    26 +
 tests/qemuxml2argvdata/powernv9-dupPHBs.err   |     1 +
 tests/qemuxml2argvdata/powernv9-dupPHBs.xml   |    27 +
 .../qemuxml2argvdata/powernv9-root-port.args  |    33 +
 tests/qemuxml2argvdata/powernv9-root-port.xml |    17 +
 ...ault-cpu-kvm-pseries-2.7.ppc64-latest.args |     8 +-
 ...ault-cpu-kvm-pseries-3.1.ppc64-latest.args |     8 +-
 ...ault-cpu-kvm-pseries-4.2.ppc64-latest.args |     8 +-
 ...ault-cpu-tcg-pseries-2.7.ppc64-latest.args |     8 +-
 ...ault-cpu-tcg-pseries-3.1.ppc64-latest.args |     8 +-
 ...ault-cpu-tcg-pseries-4.2.ppc64-latest.args |     8 +-
 .../ppc64-pseries-graphics.ppc64-latest.args  |    22 +-
 .../ppc64-pseries-headless.ppc64-latest.args  |    16 +-
 .../ppc64-tpmproxy-single.ppc64-latest.args   |     6 +-
 .../ppc64-tpmproxy-with-tpm.ppc64-latest.args |     8 +-
 .../tpm-emulator-spapr.ppc64-latest.args      |    14 +-
 tests/qemuxml2argvtest.c                      |    18 +
 tests/qemuxml2xmloutdata/powernv8-basic.xml   |    31 +
 .../qemuxml2xmloutdata/powernv8-root-port.xml |    36 +
 .../powernv8-two-sockets.xml                  |    38 +
 .../qemuxml2xmloutdata/powernv9-root-port.xml |    36 +
 tests/qemuxml2xmltest.c                       |    15 +
 tests/testutilsqemu.c                         |     2 +-
 50 files changed, 35963 insertions(+), 108 deletions(-)
 create mode 100644 tests/domaincapsdata/qemu_7.0.0.ppc64.xml
 create mode 100644 tests/qemucapabilitiesdata/caps_7.0.0.ppc64.replies
 create mode 100644 tests/qemucapabilitiesdata/caps_7.0.0.ppc64.xml
 create mode 100644 tests/qemuxml2argvdata/powernv8-basic.args
 create mode 100644 tests/qemuxml2argvdata/powernv8-basic.xml
 create mode 100644 tests/qemuxml2argvdata/powernv8-dupPHBs.err
 create mode 100644 tests/qemuxml2argvdata/powernv8-dupPHBs.xml
 create mode 100644 tests/qemuxml2argvdata/powernv8-root-port.args
 create mode 100644 tests/qemuxml2argvdata/powernv8-root-port.xml
 create mode 100644 tests/qemuxml2argvdata/powernv8-two-sockets.xml
 create mode 100644 tests/qemuxml2argvdata/powernv9-dupPHBs.err
 create mode 100644 tests/qemuxml2argvdata/powernv9-dupPHBs.xml
 create mode 100644 tests/qemuxml2argvdata/powernv9-root-port.args
 create mode 100644 tests/qemuxml2argvdata/powernv9-root-port.xml
 create mode 100644 tests/qemuxml2xmloutdata/powernv8-basic.xml
 create mode 100644 tests/qemuxml2xmloutdata/powernv8-root-port.xml
 create mode 100644 tests/qemuxml2xmloutdata/powernv8-two-sockets.xml
 create mode 100644 tests/qemuxml2xmloutdata/powernv9-root-port.xml

-- 
2.34.1




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux