[PATCH v2 22/29] domain_validate.c: allow targetIndex 0 out of idx 0 for PowerNV PHBs

2022-01-25 Thread Daniel Henrique Barboza
. Signed-off-by: Daniel Henrique Barboza --- src/conf/domain_validate.c| 5 ++- src/qemu/qemu_domain.c| 2 +- src/qemu/qemu_validate.c | 5 +++ .../powernv8-two-sockets.ppc64-latest.args| 35 + .../qemuxml2argvdata

[PATCH v2 23/29] domain_conf.c: reject duplicated pnv-phb3 devices

2022-01-25 Thread Daniel Henrique Barboza
These devices must have unique targetIndex/chip-id pairs. Signed-off-by: Daniel Henrique Barboza --- src/conf/domain_conf.c| 35 +++ tests/qemuxml2argvdata/powernv8-dupPHBs.err | 1 + .../powernv8-dupPHBs.ppc64-latest.err | 1 + tests

[PATCH v2 24/29] qemu: introduce QEMU_CAPS_DEVICE_PNV_PHB4

2022-01-25 Thread Daniel Henrique Barboza
is available since 5.0.0, meaning that we need to check QEMU version and arch manually before setting it. Signed-off-by: Daniel Henrique Barboza --- src/qemu/qemu_capabilities.c| 7 ++- src/qemu/qemu_capabilities.h| 1 + tests/qemucapabilitiesdata/caps_7.0.0

[PATCH v2 17/29] conf, qemu: add default 'targetIndex' value for pnv-phb3 devs

2022-01-25 Thread Daniel Henrique Barboza
As done with the 'chip-id' attribute, use zero as a default targetIndex value for pnv-phb3 devices in case it's absent from the controller definition. Signed-off-by: Daniel Henrique Barboza --- src/qemu/qemu_domain_address.c| 2 ++ src/qemu/qemu_validate.c

[PATCH v2 20/29] domain_conf: format pnv-phb3-root-port empty addr

2022-01-25 Thread Daniel Henrique Barboza
index = 0 this scenario will occur every time. This patch aims to alleaviate this behavior by adding a new virDomainDefFormatFlags that will allow an empty address to be formatted in the XML. This flag is then used only when formatting PowerNV root ports. Signed-off-by: Daniel Henrique Barboza

[PATCH v2 25/29] conf, qemu: add 'pnv-phb4-root-port' PCI controller model name

2022-01-25 Thread Daniel Henrique Barboza
This device is an implementation of pcie-root-port, similar to its sibling pnv-phb3-root-port. Since it's a new model name that Libvirt automatically sets, we refrain from documenting it to users. Signed-off-by: Daniel Henrique Barboza --- docs/schemas/domaincommon.rng | 1 + src/conf

[PATCH v2 16/29] conf, qemu: add default 'chip-id' value for pnv-phb3 controllers

2022-01-25 Thread Daniel Henrique Barboza
If ommited from the controller definition, chip-id defaults to zero. Signed-off-by: Daniel Henrique Barboza --- src/qemu/qemu_domain_address.c | 16 +++- src/qemu/qemu_validate.c | 5 + .../powernv8-basic.ppc64-latest.xml

[PATCH v2 14/29] formatdomain.rst: add 'index' semantics for PowerNV domains

2022-01-25 Thread Daniel Henrique Barboza
We're going to use the 'targetIndex' element for PowerNV PHBs. Clarify that the same attribute will have a different meaning in this context. Signed-off-by: Daniel Henrique Barboza --- docs/formatdomain.rst | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/docs

[PATCH v2 28/29] domain_conf.c: add pnv-phb4 to ControllerIsPowerNVPHB()

2022-01-25 Thread Daniel Henrique Barboza
Update the virDomainControllerIsPowerNVPHB() helper to make the pnv-phb4 device receive the same handling as the existing pnv-phb3. Signed-off-by: Daniel Henrique Barboza --- src/conf/domain_conf.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/conf/domain_conf.c b

[PATCH v2 13/29] conf: parse and format

2022-01-25 Thread Daniel Henrique Barboza
The 'chip-id' attribute indicates which chip/socket that owns the PowerNV pcie-root controller. Reviewed-by: Peter Krempa Signed-off-by: Daniel Henrique Barboza --- docs/formatdomain.rst | 6 ++ docs/schemas/domaincommon.rng | 5 + src/conf/domain_conf.c| 15

[PATCH v2 18/29] qemu_command.c: add command line for the pnv-phb3 device

2022-01-25 Thread Daniel Henrique Barboza
The command line for the pnv-phb3 device is similar to the spapr-pci-host-bridge command line but adding the extra 'chip-id' attribute. Signed-off-by: Daniel Henrique Barboza --- src/qemu/qemu_command.c | 21 +-- .../powernv8-basic.ppc64-latest.args

[PATCH v2 09/29] qemu: introduce QEMU_CAPS_DEVICE_PNV_PHB3

2022-01-25 Thread Daniel Henrique Barboza
. This means that probing it as default will be misleading for users. Instead, let's use virQEMUCapsInitQMPVersionCaps() to check for the adequate QEMU version and arch and set it manually. Suggested-by: Peter Krempa Signed-off-by: Daniel Henrique Barboza --- src/qemu/qemu_capabilities.c

[PATCH v2 10/29] conf, qemu: add 'pnv-phb3-root-port' PCI controller model name

2022-01-25 Thread Daniel Henrique Barboza
. Signed-off-by: Daniel Henrique Barboza --- docs/schemas/domaincommon.rng | 1 + src/conf/domain_conf.c | 1 + src/conf/domain_conf.h | 1 + src/qemu/qemu_domain_address.c | 5 + src/qemu/qemu_validate.c | 12 +++- 5 files changed, 19 insertions(+), 1

[PATCH v2 07/29] qemu_domain.c: disable default devices for PowerNV machines

2022-01-25 Thread Daniel Henrique Barboza
driver wasn't really tested with the PowerNV kernel. Reviewed-by: Peter Krempa Signed-off-by: Daniel Henrique Barboza --- src/qemu/qemu_domain.c | 9 + 1 file changed, 9 insertions(+) diff --git a/src/qemu/qemu_domain.c b/src/qemu/qemu_domain.c index 1b4b293388..89dbc20eee 100644 --- a/src

[PATCH v2 11/29] conf, qemu: add 'pnv-phb3' PCI controller model name

2022-01-25 Thread Daniel Henrique Barboza
Add support for the pcie-root implementation that PowerNV8 domains uses, pnv-phb3. It consists of a PCI model name that isn't supposed to be changed by users, so no doc changes in formatdomain.rst were made. Signed-off-by: Daniel Henrique Barboza --- docs/schemas/domaincommon.rng

[PATCH v2 04/29] qemu_validate.c: use qemuDomainIsPowerPC() in qemuValidateDomainChrDef()

2022-01-25 Thread Daniel Henrique Barboza
Both PowerNV and pSeries machines don't support parallel ports. Reviewed-by: Peter Krempa Signed-off-by: Daniel Henrique Barboza --- src/qemu/qemu_validate.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/qemu/qemu_validate.c b/src/qemu/qemu_validate.c index 0a879f0115

[PATCH v2 12/29] domain_conf.c: fix identation in virDomainControllerDefParseXML()

2022-01-25 Thread Daniel Henrique Barboza
off-by: Daniel Henrique Barboza --- src/conf/domain_conf.c | 56 +- 1 file changed, 28 insertions(+), 28 deletions(-) diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index 57ab5b19dd..72ee46026a 100644 --- a/src/conf/domain_conf.c +++ b/src/c

[PATCH v2 06/29] qemu_validate.c: enhance 'machine type not supported' message

2022-01-25 Thread Daniel Henrique Barboza
Add 'virt type' to allow for an easier time debugging. Reviewed-by: Peter Krempa Signed-off-by: Daniel Henrique Barboza --- src/qemu/qemu_validate.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/qemu/qemu_validate.c b/src/qemu/qemu_validate.c index 8453413b3c

[PATCH v2 02/29] qemu_capabilities.c: use 'MachineIsPowerPC' in DeviceDiskCaps

2022-01-25 Thread Daniel Henrique Barboza
Both pSeries and PowerNV machines don't have floppy device support. Reviewed-by: Peter Krempa Signed-off-by: Daniel Henrique Barboza --- src/qemu/qemu_capabilities.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/qemu/qemu_capabilities.c b/src/qemu

[PATCH v2 05/29] qemu_domain.c: define ISA as default PowerNV serial

2022-01-25 Thread Daniel Henrique Barboza
The PowerNV machines uses ISA as the default serial type. Reviewed-by: Peter Krempa Signed-off-by: Daniel Henrique Barboza --- src/qemu/qemu_domain.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/qemu/qemu_domain.c b/src/qemu/qemu_domain.c index 98a6a2657d..1b4b293388 100644

[PATCH v2 08/29] tests: add basic PowerNV8 test

2022-01-25 Thread Daniel Henrique Barboza
We're now able to boot a simple PowerNV8 domain in Libvirt. Signed-off-by: Daniel Henrique Barboza --- .../powernv8-basic.ppc64-latest.args | 33 +++ tests/qemuxml2argvdata/powernv8-basic.xml | 16 + tests/qemuxml2argvtest.c | 2

[PATCH v2 03/29] qemu_domain: turn qemuDomainMachineIsPSeries() static

2022-01-25 Thread Daniel Henrique Barboza
The function is now unused outside of qemu_domain.c. Reviewed-by: Peter Krempa Signed-off-by: Daniel Henrique Barboza --- src/qemu/qemu_domain.c | 2 +- src/qemu/qemu_domain.h | 2 -- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/src/qemu/qemu_domain.c b/src/qemu/qemu_domain.c

[PATCH v2 01/29] qemu_domain.c: add PowerNV machine helpers

2022-01-25 Thread Daniel Henrique Barboza
a 'qemuDomainIsPowerPC' helper that will be used in those instances. [1] https://open-power.github.io/skiboot/doc/overview.html Reviewed-by: Peter Krempa Signed-off-by: Daniel Henrique Barboza --- src/qemu/qemu_domain.c | 41 + src/qemu/qemu_domain.h | 4 2 files

[PATCH v2 00/29] ppc64 PowerNV machines support

2022-01-25 Thread Daniel Henrique Barboza
): * added documentation of the different semantics 'targetIndex' will have for PowerNV PHBs - several other minor changes suggested by Peter - v1 link: https://listman.redhat.com/archives/libvir-list/2022-January/msg00902.html Daniel Henrique Barboza (29): qemu_domain.c: add PowerNV machine helpers

Re: [PATCH 11/33] conf: add 'pnv-phb3-root-port' domain definition

2022-01-25 Thread Daniel Henrique Barboza
On 1/21/22 11:17, Peter Krempa wrote: On Thu, Jan 20, 2022 at 10:52:14 -0300, Daniel Henrique Barboza wrote: Apart from being usable only with pnv-phb3 PCIE host bridges (to be added soon), this device acts as a regular pcie-root-port but with a specific model name. Signed-off-by: Daniel

Re: [PATCH 13/33] qemu: introduce QEMU_CAPS_DEVICE_PNV_PHB3

2022-01-24 Thread Daniel Henrique Barboza
On 1/21/22 11:21, Peter Krempa wrote: On Thu, Jan 20, 2022 at 10:52:16 -0300, Daniel Henrique Barboza wrote: The pnv-phb3 device is the pcie-root controller for PowerNV8 domains. Add its QEMU capability so Libvirt can recognize it. Signed-off-by: Daniel Henrique Barboza --- src/qemu

Re: [PATCH 09/33] qemu_migration.c: forbid powernv domains migration

2022-01-24 Thread Daniel Henrique Barboza
On 1/21/22 11:33, Daniel P. Berrangé wrote: On Thu, Jan 20, 2022 at 10:52:12AM -0300, Daniel Henrique Barboza wrote: The PowerNV machine does not implement any form of migration. What do you mean by that ? Migration is a general feature in QEMU, not typically something that a machine

Re: [PATCH 08/33] tests: add basic PowerNV8 test

2022-01-24 Thread Daniel Henrique Barboza
On 1/24/22 09:04, Peter Krempa wrote: On Mon, Jan 24, 2022 at 08:57:02 -0300, Daniel Henrique Barboza wrote: On 1/21/22 11:08, Peter Krempa wrote: On Thu, Jan 20, 2022 at 10:52:11 -0300, Daniel Henrique Barboza wrote: We're now able to boot a simple PowerNV8 domain in Libvirt. Signed

Re: [PATCH 08/33] tests: add basic PowerNV8 test

2022-01-24 Thread Daniel Henrique Barboza
On 1/21/22 11:08, Peter Krempa wrote: On Thu, Jan 20, 2022 at 10:52:11 -0300, Daniel Henrique Barboza wrote: We're now able to boot a simple PowerNV8 domain in Libvirt. Signed-off-by: Daniel Henrique Barboza --- tests/qemuxml2argvdata/powernv8-basic.args | 31

Re: [PATCH 06/33] qemu_validate.c: enhance 'machine type not supported' message

2022-01-24 Thread Daniel Henrique Barboza
On 1/24/22 08:43, Peter Krempa wrote: On Mon, Jan 24, 2022 at 08:41:38 -0300, Daniel Henrique Barboza wrote: On 1/21/22 11:02, Peter Krempa wrote: On Thu, Jan 20, 2022 at 10:52:09 -0300, Daniel Henrique Barboza wrote: Add 'virt type' to allow for an easier time debugging. Signed-off

Re: [PATCH 06/33] qemu_validate.c: enhance 'machine type not supported' message

2022-01-24 Thread Daniel Henrique Barboza
On 1/21/22 11:02, Peter Krempa wrote: On Thu, Jan 20, 2022 at 10:52:09 -0300, Daniel Henrique Barboza wrote: Add 'virt type' to allow for an easier time debugging. Signed-off-by: Daniel Henrique Barboza --- src/qemu/qemu_validate.c | 6 -- 1 file changed, 4 insertions(+), 2

Re: [PATCH 03/33] qemu_capabilities.c: use 'MachineIsPowerPC' in DeviceDiskCaps

2022-01-24 Thread Daniel Henrique Barboza
On 1/21/22 10:44, Peter Krempa wrote: On Thu, Jan 20, 2022 at 10:52:06 -0300, Daniel Henrique Barboza wrote: Both pSeries and PowerNV machines don't have floppy device support. qemuDomainMachineIsPSeries() can be turned into static since it's now unused outside of qemu_domain.c

Re: [PATCH] tests: update QEMU and domain ppc64 capabilities for qemu 7.0

2022-01-20 Thread Daniel Henrique Barboza
On 1/20/22 13:30, Andrea Bolognani wrote: On Mon, Jan 17, 2022 at 02:45:28PM -0300, Daniel Henrique Barboza wrote: Changes in all 'ppc64-latest.ags' files were needed due to the JSONification of command line devices. Signed-off-by: Daniel Henrique Barboza --- tests/domaincapsdata

Re: [PATCH 05/33] qemu_domain.c: define ISA as default PowerNV serial

2022-01-20 Thread Daniel Henrique Barboza
On 1/20/22 10:58, Peter Krempa wrote: On Thu, Jan 20, 2022 at 10:52:08 -0300, Daniel Henrique Barboza wrote: The PowerNV machines uses ISA as the default serial type. ISA? Are you sure? ISA is very legacy x86 bus. Yes, these machines uses ISA buses. I believe that since it's also uses

[PATCH 27/33] qemu: introduce QEMU_CAPS_DEVICE_PNV_PHB4_ROOT_PORT

2022-01-20 Thread Daniel Henrique Barboza
-off-by: Daniel Henrique Barboza --- src/qemu/qemu_capabilities.c| 2 ++ src/qemu/qemu_capabilities.h| 1 + tests/qemucapabilitiesdata/caps_5.0.0.ppc64.xml | 1 + tests/qemucapabilitiesdata/caps_5.2.0.ppc64.xml | 1 + tests/qemucapabilitiesdata/caps_6.2.0.ppc64

[PATCH 25/33] domain_validate.c: allow targetIndex 0 out of idx 0 for PowerNV PHBs

2022-01-20 Thread Daniel Henrique Barboza
. Signed-off-by: Daniel Henrique Barboza --- src/conf/domain_validate.c| 5 ++- src/qemu/qemu_domain.c| 2 +- src/qemu/qemu_validate.c | 5 +++ .../qemuxml2argvdata/powernv8-two-sockets.xml | 26 + .../powernv8-two

[PATCH 20/33] conf, qemu: add default 'targetIndex' value for pnv-phb3 devs

2022-01-20 Thread Daniel Henrique Barboza
As done with the 'chip-id' attribute, use zero as a default targetIndex value for pnv-phb3 devices in case it's absent from the controller definition. Signed-off-by: Daniel Henrique Barboza --- src/qemu/qemu_domain_address.c | 2 ++ src/qemu/qemu_validate.c| 19

[PATCH 13/33] qemu: introduce QEMU_CAPS_DEVICE_PNV_PHB3

2022-01-20 Thread Daniel Henrique Barboza
The pnv-phb3 device is the pcie-root controller for PowerNV8 domains. Add its QEMU capability so Libvirt can recognize it. Signed-off-by: Daniel Henrique Barboza --- src/qemu/qemu_capabilities.c| 2 ++ src/qemu/qemu_capabilities.h| 1 + tests

[PATCH 12/33] qemu: add 'modelName' value for pnv-phb3-root-port device

2022-01-20 Thread Daniel Henrique Barboza
Use the 'modelName' attribute for the pnv-phb3-root-port device. Signed-off-by: Daniel Henrique Barboza --- src/qemu/qemu_domain_address.c | 5 + src/qemu/qemu_validate.c | 10 +- 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/src/qemu/qemu_domain_address.c b

[PATCH 08/33] tests: add basic PowerNV8 test

2022-01-20 Thread Daniel Henrique Barboza
We're now able to boot a simple PowerNV8 domain in Libvirt. Signed-off-by: Daniel Henrique Barboza --- tests/qemuxml2argvdata/powernv8-basic.args | 31 + tests/qemuxml2argvdata/powernv8-basic.xml | 16 +++ tests/qemuxml2argvtest.c| 3 ++ tests

[PATCH 00/33] ppc64 PowerNV machines support

2022-01-20 Thread Daniel Henrique Barboza
s 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 Devi

[PATCH 29/33] qemu: add 'modelName' value for pnv-phb4-root-port device

2022-01-20 Thread Daniel Henrique Barboza
-root-port also applies for the pnv-phb4-root-port device. Signed-off-by: Daniel Henrique Barboza --- src/conf/domain_conf.c | 3 ++- src/qemu/qemu_domain_address.c | 14 +- src/qemu/qemu_validate.c | 6 -- 3 files changed, 19 insertions(+), 4 deletions(-) diff --git

[PATCH 31/33] conf: add 'pnv-phb4' controller model

2022-01-20 Thread Daniel Henrique Barboza
Similar to the existing pnv-phb3 device, pnv-phb4 is also an implementation of pcie-root. Signed-off-by: Daniel Henrique Barboza --- docs/schemas/domaincommon.rng | 1 + src/conf/domain_conf.c| 1 + src/conf/domain_conf.h| 1 + src/qemu/qemu_validate.c | 2 ++ 4 files

[PATCH 33/33] tests: add PowerNV9 tests

2022-01-20 Thread Daniel Henrique Barboza
Since the nuances of PowerNV PHBs and root ports were already handled when adding support for pnv-phb3* devices, we're already set to support PowerNV9 PHBs and root ports as well. Signed-off-by: Daniel Henrique Barboza --- tests/qemuxml2argvdata/powernv9-dupPHBs.err | 1 + tests

[PATCH 32/33] qemu: add 'modelName' value for pnv-phb4 device

2022-01-20 Thread Daniel Henrique Barboza
Use the 'modelName' attribute for the pnv-phb4 pcie-root device. Update the virDomainControllerIsPowerNVPHB() helper as well so this device receives the same handling the existing pnv-phb3 has. Signed-off-by: Daniel Henrique Barboza --- src/conf/domain_conf.c | 4 ++-- src/qemu

[PATCH 30/33] qemu: introduce QEMU_CAPS_DEVICE_PNV_PHB4

2022-01-20 Thread Daniel Henrique Barboza
The pnv-phb4 device is the pcie-root controller for PowerNV9 domains. Signed-off-by: Daniel Henrique Barboza --- src/qemu/qemu_capabilities.c| 2 ++ src/qemu/qemu_capabilities.h| 1 + tests/qemucapabilitiesdata/caps_5.0.0.ppc64.xml | 1 + tests

[PATCH 28/33] conf: add 'pnv-phb4-root-port' domain definition

2022-01-20 Thread Daniel Henrique Barboza
This device is an implementation of pcie-root-port, similar to its sibling pnv-phb3-root-port. Signed-off-by: Daniel Henrique Barboza --- docs/schemas/domaincommon.rng | 1 + src/conf/domain_conf.c| 1 + src/conf/domain_conf.h| 1 + src/qemu/qemu_validate.c | 2 ++ 4 files

[PATCH 22/33] qemu_domain_address.c: change pnv-phb3 minimal downstream slot

2022-01-20 Thread Daniel Henrique Barboza
ate(). This is enough to allow for a root port to be added in slot 0 of a pnv-phb3 bus while not being intrusive with existing devices. Signed-off-by: Daniel Henrique Barboza --- src/qemu/qemu_domain_address.c | 14 ++ 1 file changed, 14 insertions(+) diff --git a/src/q

[PATCH 26/33] domain_conf.c: reject duplicated pnv-phb3 devices

2022-01-20 Thread Daniel Henrique Barboza
These devices must have unique targetIndex/chip-id pairs. Signed-off-by: Daniel Henrique Barboza --- src/conf/domain_conf.c | 35 + tests/qemuxml2argvdata/powernv8-dupPHBs.err | 1 + tests/qemuxml2argvdata/powernv8-dupPHBs.xml | 27

[PATCH 23/33] domain_conf: format pnv-phb3-root-port empty addr

2022-01-20 Thread Daniel Henrique Barboza
index = 0 this scenario will occur every time. This patch aims to alleaviate this behavior by adding a new virDomainDefFormatFlags that will allow an empty address to be formatted in the XML. This flag is then used only when formatting PowerNV root ports. Signed-off-by: Daniel Henrique Barboza

[PATCH 24/33] tests: add pnv-phb3-root-port test

2022-01-20 Thread Daniel Henrique Barboza
Signed-off-by: Daniel Henrique Barboza --- .../qemuxml2argvdata/powernv8-root-port.args | 33 + tests/qemuxml2argvdata/powernv8-root-port.xml | 17 + tests/qemuxml2argvtest.c | 4 +++ .../qemuxml2xmloutdata/powernv8-root-port.xml | 36

[PATCH 21/33] qemu_command.c: add command line for the pnv-phb3 device

2022-01-20 Thread Daniel Henrique Barboza
The command line for the pnv-phb3 device is similar to the spapr-pci-host-bridge command line but adding the extra 'chip-id' attribute. Signed-off-by: Daniel Henrique Barboza --- src/qemu/qemu_command.c| 21 +++-- tests/qemuxml2argvdata/powernv8-basic.args

[PATCH 17/33] conf: parse and format

2022-01-20 Thread Daniel Henrique Barboza
The 'chip-id' attribute indicates which chip/socket that owns the PowerNV pcie-root controller. Signed-off-by: Daniel Henrique Barboza --- docs/formatdomain.rst | 4 docs/schemas/domaincommon.rng | 5 + src/conf/domain_conf.c| 15 +++ src/conf

[PATCH 19/33] conf, qemu: add default 'chip-id' value for pnv-phb3 controllers

2022-01-20 Thread Daniel Henrique Barboza
If ommited from the controller definition, chip-id defaults to zero. Signed-off-by: Daniel Henrique Barboza --- src/qemu/qemu_domain_address.c | 16 +++- src/qemu/qemu_validate.c| 5 + tests/qemuxml2xmloutdata/powernv8-basic.xml | 1 + 3 files

[PATCH 18/33] introduce virDomainControllerIsPowerNVPHB

2022-01-20 Thread Daniel Henrique Barboza
Signed-off-by: Daniel Henrique Barboza --- src/conf/domain_conf.c | 21 + src/conf/domain_conf.h | 1 + src/libvirt_private.syms | 1 + 3 files changed, 23 insertions(+) diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index d1cda8c3f5..1815308a8c 100644

[PATCH 15/33] qemu: add 'modelName' value for pnv-phb3 device

2022-01-20 Thread Daniel Henrique Barboza
Use the 'modelName' attribute for the pnv-phb3 pcie-root device. Signed-off-by: Daniel Henrique Barboza --- src/qemu/qemu_domain_address.c | 3 +++ src/qemu/qemu_validate.c| 6 -- tests/qemuxml2argvtest.c| 3 ++- tests/qemuxml2xmloutdata

[PATCH 16/33] domain_conf.c: fix identation in virDomainControllerDefParseXML()

2022-01-20 Thread Daniel Henrique Barboza
The identation of VIR_DOMAIN_CONTROLLER_TYPE_PCI elements are in the same level as the parent 'if (def->type == ...TYPE_PCI)' clause, and the closing bracket of this 'if' looks like a misplaced bracket of the 'targetIndex' clause that comes right before it. Signed-off-by: Daniel Henrique Barb

[PATCH 14/33] conf: add 'pnv-phb3' controller model

2022-01-20 Thread Daniel Henrique Barboza
Signed-off-by: Daniel Henrique Barboza --- docs/schemas/domaincommon.rng | 2 ++ src/conf/domain_conf.c| 1 + src/conf/domain_conf.h| 1 + src/qemu/qemu_validate.c | 2 ++ 4 files changed, 6 insertions(+) diff --git a/docs/schemas/domaincommon.rng b/docs/schemas

[PATCH 09/33] qemu_migration.c: forbid powernv domains migration

2022-01-20 Thread Daniel Henrique Barboza
The PowerNV machine does not implement any form of migration. Signed-off-by: Daniel Henrique Barboza --- src/qemu/qemu_migration.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/src/qemu/qemu_migration.c b/src/qemu/qemu_migration.c index 2635ef1162..dc2fe92e9b 100644 --- a/src/qemu

[PATCH 10/33] qemu: introduce QEMU_CAPS_DEVICE_PNV_PHB3_ROOT_PORT

2022-01-20 Thread Daniel Henrique Barboza
The pnv-phb3-root-port device is the pcie-root-port device for PowerNV8 domains. Add its QEMU capability so Libvirt can recognize it. Signed-off-by: Daniel Henrique Barboza --- src/qemu/qemu_capabilities.c| 2 ++ src/qemu/qemu_capabilities.h| 1 + tests

[PATCH 05/33] qemu_domain.c: define ISA as default PowerNV serial

2022-01-20 Thread Daniel Henrique Barboza
The PowerNV machines uses ISA as the default serial type. Signed-off-by: Daniel Henrique Barboza --- src/qemu/qemu_domain.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/qemu/qemu_domain.c b/src/qemu/qemu_domain.c index bf418c8e80..88487c6293 100644 --- a/src/qemu/qemu_domain.c

[PATCH 11/33] conf: add 'pnv-phb3-root-port' domain definition

2022-01-20 Thread Daniel Henrique Barboza
Apart from being usable only with pnv-phb3 PCIE host bridges (to be added soon), this device acts as a regular pcie-root-port but with a specific model name. Signed-off-by: Daniel Henrique Barboza --- docs/schemas/domaincommon.rng | 1 + src/conf/domain_conf.c| 1 + src/conf

[PATCH 06/33] qemu_validate.c: enhance 'machine type not supported' message

2022-01-20 Thread Daniel Henrique Barboza
Add 'virt type' to allow for an easier time debugging. Signed-off-by: Daniel Henrique Barboza --- src/qemu/qemu_validate.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/qemu/qemu_validate.c b/src/qemu/qemu_validate.c index da41848761..95af0ecf3b 100644 --- a/src

[PATCH 03/33] qemu_capabilities.c: use 'MachineIsPowerPC' in DeviceDiskCaps

2022-01-20 Thread Daniel Henrique Barboza
Both pSeries and PowerNV machines don't have floppy device support. qemuDomainMachineIsPSeries() can be turned into static since it's now unused outside of qemu_domain.c. Signed-off-by: Daniel Henrique Barboza --- src/qemu/qemu_capabilities.c | 4 ++-- src/qemu/qemu_domain.c | 2 +- src

[PATCH 07/33] qemu_domain.c: disable default devices for PowerNV machines

2022-01-20 Thread Daniel Henrique Barboza
driver wasn't really tested with the PowerNV kernel. Signed-off-by: Daniel Henrique Barboza --- src/qemu/qemu_domain.c | 9 + 1 file changed, 9 insertions(+) diff --git a/src/qemu/qemu_domain.c b/src/qemu/qemu_domain.c index 88487c6293..d0bb4938ec 100644 --- a/src/qemu/qemu_domain.c +++ b

[PATCH 02/33] qemu_domain.c: add PowerNV machine helpers

2022-01-20 Thread Daniel Henrique Barboza
a 'qemuDomainIsPowerPC' helper that will be used in those instances. [1] https://open-power.github.io/skiboot/doc/overview.html Signed-off-by: Daniel Henrique Barboza --- src/qemu/qemu_domain.c | 41 + src/qemu/qemu_domain.h | 4 2 files changed, 45 insertions

[PATCH 04/33] qemu_validate.c: use qemuDomainIsPowerPC() in qemuValidateDomainChrDef()

2022-01-20 Thread Daniel Henrique Barboza
Both PowerNV and pSeries machines don't support parallel ports. Signed-off-by: Daniel Henrique Barboza --- src/qemu/qemu_validate.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/qemu/qemu_validate.c b/src/qemu/qemu_validate.c index ae0ee4e744..da41848761 100644

[PATCH v2 8/8] qemu_capabilities.c: del 'cleanup' label in virQEMUCapsLoadHostCPUModelInfo()

2021-11-19 Thread Daniel Henrique Barboza
Create extra g_autofree strings and use them in an adequate scope to eliminate the need for VIR_FREE() calls and the 'cleanup' label. Signed-off-by: Daniel Henrique Barboza --- src/qemu/qemu_capabilities.c | 43 +++- 1 file changed, 18 insertions(+), 25 deletions

[PATCH v2 4/8] qemu_capabilities.c: add virQEMUCapsValidateEmulator()

2021-11-19 Thread Daniel Henrique Barboza
Create a new helper to remove the emulator validation logic from the body of virQEMUCapsLoadCache(). Signed-off-by: Daniel Henrique Barboza --- src/qemu/qemu_capabilities.c | 35 --- 1 file changed, 24 insertions(+), 11 deletions(-) diff --git a/src/qemu

[PATCH v2 1/8] qemu_capabilities.c: add virQEMUCapsParseFlags()

2021-11-19 Thread Daniel Henrique Barboza
Create a new helper to remove the parse capabilities flag logic from the body of virQEMUCapsLoadCache(). Signed-off-by: Daniel Henrique Barboza --- src/qemu/qemu_capabilities.c | 61 +++- 1 file changed, 39 insertions(+), 22 deletions(-) diff --git a/src/qemu

[PATCH v2 5/8] qemu_capabilities.c: add virQEMUCapsValidateArch()

2021-11-19 Thread Daniel Henrique Barboza
Create a new helper to remove the arch validation logic from the body of virQEMUCapsLoadCache(). Signed-off-by: Daniel Henrique Barboza --- src/qemu/qemu_capabilities.c | 31 +-- 1 file changed, 21 insertions(+), 10 deletions(-) diff --git a/src/qemu

[PATCH v2 6/8] qemu_capabilities.c: remove cleanup label from virQEMUCapsLoadCache()

2021-11-19 Thread Daniel Henrique Barboza
'str' is no longer being used and the 'cleanup' label can be removed together with the 'ret' variable. Signed-off-by: Daniel Henrique Barboza --- src/qemu/qemu_capabilities.c | 42 1 file changed, 18 insertions(+), 24 deletions(-) diff --git a/src/qemu

[PATCH v2 7/8] cpu_ppc64.c: remove 'guest' param from ppc64Compute()

2021-11-19 Thread Daniel Henrique Barboza
the ppc64MakeCPUData() entirely. Signed-off-by: Daniel Henrique Barboza --- src/cpu/cpu_ppc64.c | 26 +- 1 file changed, 1 insertion(+), 25 deletions(-) diff --git a/src/cpu/cpu_ppc64.c b/src/cpu/cpu_ppc64.c index c7caaa9608..314d2f7c86 100644 --- a/src/cpu/cpu_ppc64.c +++ b

[PATCH v2 3/8] qemu_capabilities.c: del 'nodes' var from virQEMUCapsLoadCache()

2021-11-19 Thread Daniel Henrique Barboza
The 'nodes' var is not being used. Signed-off-by: Daniel Henrique Barboza --- src/qemu/qemu_capabilities.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c index 38558a9ee0..2523a369d4 100644 --- a/src/qemu/qemu_capabilities.c

[PATCH v2 0/8] some cleanups around CPU related code

2021-11-19 Thread Daniel Henrique Barboza
- v1 link: https://listman.redhat.com/archives/libvir-list/2021-November/msg00497.html Daniel Henrique Barboza (8): qemu_capabilities.c: add virQEMUCapsParseFlags() qemu_capabilities.c: add virQEMUCapsParseGIC() qemu_capabilities.c: del 'nodes' var from virQEMUCapsLoadCache

[PATCH v2 2/8] qemu_capabilities.c: add virQEMUCapsParseGIC()

2021-11-19 Thread Daniel Henrique Barboza
Create a new helper to remove the GIC parse logic from the body of virQEMUCapsLoadCache(). Signed-off-by: Daniel Henrique Barboza --- src/qemu/qemu_capabilities.c | 142 +++ 1 file changed, 77 insertions(+), 65 deletions(-) diff --git a/src/qemu

Re: [PATCH 0/7] some cleanups around CPU related code

2021-11-18 Thread Daniel Henrique Barboza
On 11/18/21 11:21, Peter Krempa wrote: On Thu, Nov 18, 2021 at 11:20:11 -0300, Daniel Henrique Barboza wrote: I'll resend this series because I somehow messed with my own email in the CC. Sorry for the span. Is that really necessary? You'll still get the replies from the mailing list. I

[PATCH 0/7] some cleanups around CPU related code

2021-11-18 Thread Daniel Henrique Barboza
Hi, Here are some cleanups I ended up making while investigating a test issue with ppc64 hosts recently. Daniel Henrique Barboza (7): qemu_capabilities.c: use g_autofree in virQEMUCapsLoadCache() cpu_x86.c: remove 'guest' param from x86Compute() cpu_ppc64.c: remove 'guest' param from

[PATCH 7/7] qemu_capabilities.c: use g_autoptr() in virQEMUCapsInitHostCPUModel()

2021-11-18 Thread Daniel Henrique Barboza
All 'virCPUDef' pointers can be auto-freed and the 'cleanup' label removed. Signed-off-by: Daniel Henrique Barboza --- src/qemu/qemu_capabilities.c | 21 - 1 file changed, 8 insertions(+), 13 deletions(-) diff --git a/src/qemu/qemu_capabilities.c b/src/qemu

[PATCH 4/7] qemu_capabilities.c: use g_autofree in virQEMUCapsLoadHostCPUModelInfo

2021-11-18 Thread Daniel Henrique Barboza
Use 'g_autofree' in the 'str' parameter and remove the 'cleanup' label. Signed-off-by: Daniel Henrique Barboza --- src/qemu/qemu_capabilities.c | 29 +++-- 1 file changed, 11 insertions(+), 18 deletions(-) diff --git a/src/qemu/qemu_capabilities.c b/src/qemu

[PATCH 6/7] qemu_process.c: use g_autoptr() in qemuProcessQMPInitMonitor

2021-11-18 Thread Daniel Henrique Barboza
The 'xmlopt' parameter can be auto-unref by using g_autoptr(). Signed-off-by: Daniel Henrique Barboza --- src/qemu/qemu_process.c | 15 +-- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/src/qemu/qemu_process.c b/src/qemu/qemu_process.c index b6c81dd23a..c355a39e15

[PATCH 5/7] domain_conf.h: add autoptr cleanup func to virDomainXMLOptionPtr

2021-11-18 Thread Daniel Henrique Barboza
This will enable code cleanups on code that still relies on virObjectUnref() this pointer manually. Signed-off-by: Daniel Henrique Barboza --- src/conf/domain_conf.h | 1 + 1 file changed, 1 insertion(+) diff --git a/src/conf/domain_conf.h b/src/conf/domain_conf.h index ab9a7d66f8..0ecd3803db

[PATCH 2/7] cpu_x86.c: remove 'guest' param from x86Compute()

2021-11-18 Thread Daniel Henrique Barboza
then all callers of x86Compute() uses it with 'guest' = NULL. Removing the 'guest' parameter allow us to remove a good chunk of logic that isn't being used for awhile. Signed-off-by: Daniel Henrique Barboza --- src/cpu/cpu_x86.c | 38 +- 1 file changed, 1

[PATCH 3/7] cpu_ppc64.c: remove 'guest' param from ppc64Compute()

2021-11-18 Thread Daniel Henrique Barboza
' parameter will not only remove unused code from ppc64Compute() but also remove the ppc64MakeCPUData() entirely. Signed-off-by: Daniel Henrique Barboza --- src/cpu/cpu_ppc64.c | 26 +- 1 file changed, 1 insertion(+), 25 deletions(-) diff --git a/src/cpu/cpu_ppc64.c b/src/cpu

[PATCH 1/7] qemu_capabilities.c: use g_autofree in virQEMUCapsLoadCache()

2021-11-18 Thread Daniel Henrique Barboza
Use autofree with 'str' and 'nodes' to get rid of the 'cleanup' label. Signed-off-by: Daniel Henrique Barboza --- src/qemu/qemu_capabilities.c | 66 1 file changed, 30 insertions(+), 36 deletions(-) diff --git a/src/qemu/qemu_capabilities.c b/src/qemu

Re: [PATCH 0/7] some cleanups around CPU related code

2021-11-18 Thread Daniel Henrique Barboza
I'll resend this series because I somehow messed with my own email in the CC. Sorry for the span. Daniel On 11/18/21 10:59, Daniel Henrique Barboza wrote: Hi, Here are some cleanups I ended up making while investigating a test issue with ppc64 hosts recently. Daniel Henrique Barboza (7

[PATCH 7/7] qemu_capabilities.c: use g_autoptr() in virQEMUCapsInitHostCPUModel()

2021-11-18 Thread Daniel Henrique Barboza
All 'virCPUDef' pointers can be auto-freed and the 'cleanup' label removed. Signed-off-by: Daniel Henrique Barboza --- src/qemu/qemu_capabilities.c | 21 - 1 file changed, 8 insertions(+), 13 deletions(-) diff --git a/src/qemu/qemu_capabilities.c b/src/qemu

[PATCH 1/7] qemu_capabilities.c: use g_autofree in virQEMUCapsLoadCache()

2021-11-18 Thread Daniel Henrique Barboza
Use autofree with 'str' and 'nodes' to get rid of the 'cleanup' label. Signed-off-by: Daniel Henrique Barboza --- src/qemu/qemu_capabilities.c | 66 1 file changed, 30 insertions(+), 36 deletions(-) diff --git a/src/qemu/qemu_capabilities.c b/src/qemu

[PATCH 6/7] qemu_process.c: use g_autoptr() in qemuProcessQMPInitMonitor

2021-11-18 Thread Daniel Henrique Barboza
The 'xmlopt' parameter can be auto-unref by using g_autoptr(). Signed-off-by: Daniel Henrique Barboza --- src/qemu/qemu_process.c | 15 +-- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/src/qemu/qemu_process.c b/src/qemu/qemu_process.c index b6c81dd23a..c355a39e15

[PATCH 5/7] domain_conf.h: add autoptr cleanup func to virDomainXMLOptionPtr

2021-11-18 Thread Daniel Henrique Barboza
This will enable code cleanups on code that still relies on virObjectUnref() this pointer manually. Signed-off-by: Daniel Henrique Barboza --- src/conf/domain_conf.h | 1 + 1 file changed, 1 insertion(+) diff --git a/src/conf/domain_conf.h b/src/conf/domain_conf.h index ab9a7d66f8..0ecd3803db

[PATCH 4/7] qemu_capabilities.c: use g_autofree in virQEMUCapsLoadHostCPUModelInfo

2021-11-18 Thread Daniel Henrique Barboza
Use 'g_autofree' in the 'str' parameter and remove the 'cleanup' label. Signed-off-by: Daniel Henrique Barboza --- src/qemu/qemu_capabilities.c | 29 +++-- 1 file changed, 11 insertions(+), 18 deletions(-) diff --git a/src/qemu/qemu_capabilities.c b/src/qemu

[PATCH 0/7] some cleanups around CPU related code

2021-11-18 Thread Daniel Henrique Barboza
Hi, Here are some cleanups I ended up making while investigating a test issue with ppc64 hosts recently. Daniel Henrique Barboza (7): qemu_capabilities.c: use g_autofree in virQEMUCapsLoadCache() cpu_x86.c: remove 'guest' param from x86Compute() cpu_ppc64.c: remove 'guest' param from

[PATCH 2/7] cpu_x86.c: remove 'guest' param from x86Compute()

2021-11-18 Thread Daniel Henrique Barboza
then all callers of x86Compute() uses it with 'guest' = NULL. Removing the 'guest' parameter allow us to remove a good chunk of logic that isn't being used for awhile. Signed-off-by: Daniel Henrique Barboza --- src/cpu/cpu_x86.c | 38 +- 1 file changed, 1

[PATCH 3/7] cpu_ppc64.c: remove 'guest' param from ppc64Compute()

2021-11-18 Thread Daniel Henrique Barboza
' parameter will not only remove unused code from ppc64Compute() but also remove the ppc64MakeCPUData() entirely. Signed-off-by: Daniel Henrique Barboza --- src/cpu/cpu_ppc64.c | 26 +- 1 file changed, 1 insertion(+), 25 deletions(-) diff --git a/src/cpu/cpu_ppc64.c b/src/cpu

[PATCH v2 1/1] tests/qemuxml2*/graphics-spice-timeout: skip CPU model check

2021-11-17 Thread Daniel Henrique Barboza
auses the problem for ppc64 and s390x hosts. Note that this is a build fix: a proper investigation of why we're defaulting to an incompatible x86_64 CPU in the circunstances mentioned above is still warranted. Reported-by: Boris Fiuczynski Reviewed-by: Boris Fiuczynski Signed-off-by: Daniel He

[PATCH v2 0/1] fix graphics-spice-timeout for ppc64le and s390x

2021-11-17 Thread Daniel Henrique Barboza
Hi, Re-sending the patch with the commit msg change proposed by Peter (i.e. mentioning that this is a build fix, root cause is still under investigation) and with Boris r-b. v1 link: https://listman.redhat.com/archives/libvir-list/2021-November/msg00457.html Daniel Henrique Barboza (1

Re: [RFC PATCH] tests/qemuxml2*/graphics-spice-timeout: skip CPU model check

2021-11-17 Thread Daniel Henrique Barboza
On 11/17/21 08:26, Peter Krempa wrote: On Wed, Nov 17, 2021 at 08:16:05 -0300, Daniel Henrique Barboza wrote: On 11/17/21 08:02, Boris Fiuczynski wrote: On 11/17/21 1:11 AM, Daniel Henrique Barboza wrote: [...] fix works for you? The proposed patch works on s390x as well. Reviewed

Re: [RFC PATCH] tests/qemuxml2*/graphics-spice-timeout: skip CPU model check

2021-11-17 Thread Daniel Henrique Barboza
On 11/17/21 08:02, Boris Fiuczynski wrote: On 11/17/21 1:11 AM, Daniel Henrique Barboza wrote: Commit 65b0b746b516 changed spice tests to use latest caps. Before this change, "FLAG_REAL_CAPS" wasn't being set in testQemuInfoInitArgs(). The absence of this flag triggered the code p

Re: [RFC PATCH] tests/qemuxml2*/graphics-spice-timeout: skip CPU model check

2021-11-17 Thread Daniel Henrique Barboza
On 11/17/21 07:51, Peter Krempa wrote: On Tue, Nov 16, 2021 at 21:11:50 -0300, Daniel Henrique Barboza wrote: Commit 65b0b746b516 changed spice tests to use latest caps. Before this change, "FLAG_REAL_CAPS" wasn't being set in testQemuInfoInitArgs(). The absence of this flag

[RFC PATCH] tests/qemuxml2*/graphics-spice-timeout: skip CPU model check

2021-11-16 Thread Daniel Henrique Barboza
auses the problem for ppc64 and s390x hosts. Reported-by: Boris Fiuczynski Signed-off-by: Daniel Henrique Barboza --- Sending as a RFC because I'm not sure if this patch fixes the problem for s390x. Boris, can you please test and see if this fix works for you? tests/qemuxml2argvdata/g

<    1   2   3   4   5   6   7   8   9   10   >