[PATCH v2 0/6] add support for pvpanic-pci device

v1 here: https://listman.redhat.com/archives/libvir-list/2023-February/237622.html diff to v1: * reduced test files (thanks Andrea) * removed redundant check for address type (noticed by Peter) * plugging the device directly into pcie.0 if its address was not specified Kristina Hanicova (6): qemu: introduce QEMU_CAPS_DEVICE_PANIC_PCI conf: add panic model 'pvpanic' tests: add test cases for device pvpanic-pci qemu: assign PCI address to device pvpanic-pci tests: add case for pvpanic-pci without address docs: document panic device 'pvpanic-pci' docs/formatdomain.rst | 1 + src/conf/domain_conf.c | 1 + src/conf/domain_conf.h | 1 + src/conf/schemas/domaincommon.rng | 1 + src/qemu/qemu_capabilities.c | 2 ++ src/qemu/qemu_capabilities.h | 1 + src/qemu/qemu_command.c | 17 +++++++++ src/qemu/qemu_domain_address.c | 34 +++++++++++++++++- src/qemu/qemu_validate.c | 14 ++++++++ .../caps_6.0.0.aarch64.xml | 1 + .../caps_6.0.0.x86_64.xml | 1 + .../caps_6.1.0.x86_64.xml | 1 + .../caps_6.2.0.aarch64.xml | 1 + .../qemucapabilitiesdata/caps_6.2.0.ppc64.xml | 1 + .../caps_6.2.0.x86_64.xml | 1 + .../caps_7.0.0.aarch64.xml | 1 + .../qemucapabilitiesdata/caps_7.0.0.ppc64.xml | 1 + .../caps_7.0.0.x86_64.xml | 1 + .../qemucapabilitiesdata/caps_7.1.0.ppc64.xml | 1 + .../caps_7.1.0.x86_64.xml | 1 + .../caps_7.2.0.x86_64.xml | 1 + .../caps_8.0.0.riscv64.xml | 1 + .../caps_8.0.0.x86_64.xml | 1 + .../pvpanic-pci-aarch64.aarch64-latest.args | 36 +++++++++++++++++++ .../qemuxml2argvdata/pvpanic-pci-aarch64.xml | 20 +++++++++++ ...invalid-address-aarch64.aarch64-latest.err | 1 + .../pvpanic-pci-invalid-address-aarch64.xml | 20 +++++++++++ ...pci-no-address-aarch64.aarch64-latest.args | 36 +++++++++++++++++++ .../pvpanic-pci-no-address-aarch64.xml | 18 ++++++++++ .../pvpanic-pci-x86_64.x86_64-latest.args | 34 ++++++++++++++++++ tests/qemuxml2argvdata/pvpanic-pci-x86_64.xml | 24 +++++++++++++ tests/qemuxml2argvtest.c | 5 +++ .../pvpanic-pci-aarch64.aarch64-latest.xml | 32 +++++++++++++++++ ...-pci-no-address-aarch64.aarch64-latest.xml | 32 +++++++++++++++++ .../pvpanic-pci-x86_64.x86_64-latest.xml | 32 +++++++++++++++++ tests/qemuxml2xmltest.c | 4 +++ 36 files changed, 379 insertions(+), 1 deletion(-) create mode 100644 tests/qemuxml2argvdata/pvpanic-pci-aarch64.aarch64-latest.args create mode 100644 tests/qemuxml2argvdata/pvpanic-pci-aarch64.xml create mode 100644 tests/qemuxml2argvdata/pvpanic-pci-invalid-address-aarch64.aarch64-latest.err create mode 100644 tests/qemuxml2argvdata/pvpanic-pci-invalid-address-aarch64.xml create mode 100644 tests/qemuxml2argvdata/pvpanic-pci-no-address-aarch64.aarch64-latest.args create mode 100644 tests/qemuxml2argvdata/pvpanic-pci-no-address-aarch64.xml create mode 100644 tests/qemuxml2argvdata/pvpanic-pci-x86_64.x86_64-latest.args create mode 100644 tests/qemuxml2argvdata/pvpanic-pci-x86_64.xml create mode 100644 tests/qemuxml2xmloutdata/pvpanic-pci-aarch64.aarch64-latest.xml create mode 100644 tests/qemuxml2xmloutdata/pvpanic-pci-no-address-aarch64.aarch64-latest.xml create mode 100644 tests/qemuxml2xmloutdata/pvpanic-pci-x86_64.x86_64-latest.xml -- 2.39.1

This capability detects the availability of the pvpanic-pci device that is required in order to use pvpanic on Arm (original pvpanic is an emulated ISA device, for which Arm does not have support). --- src/qemu/qemu_capabilities.c | 2 ++ src/qemu/qemu_capabilities.h | 1 + tests/qemucapabilitiesdata/caps_6.0.0.aarch64.xml | 1 + tests/qemucapabilitiesdata/caps_6.0.0.x86_64.xml | 1 + tests/qemucapabilitiesdata/caps_6.1.0.x86_64.xml | 1 + tests/qemucapabilitiesdata/caps_6.2.0.aarch64.xml | 1 + tests/qemucapabilitiesdata/caps_6.2.0.ppc64.xml | 1 + tests/qemucapabilitiesdata/caps_6.2.0.x86_64.xml | 1 + tests/qemucapabilitiesdata/caps_7.0.0.aarch64.xml | 1 + tests/qemucapabilitiesdata/caps_7.0.0.ppc64.xml | 1 + tests/qemucapabilitiesdata/caps_7.0.0.x86_64.xml | 1 + tests/qemucapabilitiesdata/caps_7.1.0.ppc64.xml | 1 + tests/qemucapabilitiesdata/caps_7.1.0.x86_64.xml | 1 + tests/qemucapabilitiesdata/caps_7.2.0.x86_64.xml | 1 + tests/qemucapabilitiesdata/caps_8.0.0.riscv64.xml | 1 + tests/qemucapabilitiesdata/caps_8.0.0.x86_64.xml | 1 + 16 files changed, 17 insertions(+) diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c index 9c3650e022..d92d5a62dd 100644 --- a/src/qemu/qemu_capabilities.c +++ b/src/qemu/qemu_capabilities.c @@ -686,6 +686,7 @@ VIR_ENUM_IMPL(virQEMUCaps, "netdev.stream", /* QEMU_CAPS_NETDEV_STREAM */ "virtio-crypto", /* QEMU_CAPS_DEVICE_VIRTIO_CRYPTO */ "cryptodev-backend-lkcf", /* QEMU_CAPS_OBJECT_CRYPTO_LKCF */ + "pvpanic-pci", /* QEMU_CAPS_DEVICE_PANIC_PCI */ ); @@ -1398,6 +1399,7 @@ struct virQEMUCapsStringFlags virQEMUCapsObjectTypes[] = { { "virtio-crypto-pci", QEMU_CAPS_DEVICE_VIRTIO_CRYPTO }, { "virtio-crypto-device", QEMU_CAPS_DEVICE_VIRTIO_CRYPTO }, { "cryptodev-backend-lkcf", QEMU_CAPS_OBJECT_CRYPTO_LKCF }, + { "pvpanic-pci", QEMU_CAPS_DEVICE_PANIC_PCI }, }; diff --git a/src/qemu/qemu_capabilities.h b/src/qemu/qemu_capabilities.h index 5bf87c2f8d..b72348cf88 100644 --- a/src/qemu/qemu_capabilities.h +++ b/src/qemu/qemu_capabilities.h @@ -665,6 +665,7 @@ typedef enum { /* virQEMUCapsFlags grouping marker for syntax-check */ QEMU_CAPS_NETDEV_STREAM, /* -netdev stream */ QEMU_CAPS_DEVICE_VIRTIO_CRYPTO, /* virtio-crypto device */ QEMU_CAPS_OBJECT_CRYPTO_LKCF, /* -object cryptodev-backend-lkcf */ + QEMU_CAPS_DEVICE_PANIC_PCI, /* -device pvpanic-pci */ QEMU_CAPS_LAST /* this must always be the last item */ } virQEMUCapsFlags; diff --git a/tests/qemucapabilitiesdata/caps_6.0.0.aarch64.xml b/tests/qemucapabilitiesdata/caps_6.0.0.aarch64.xml index f09c286054..8238fb5d16 100644 --- a/tests/qemucapabilitiesdata/caps_6.0.0.aarch64.xml +++ b/tests/qemucapabilitiesdata/caps_6.0.0.aarch64.xml @@ -144,6 +144,7 @@ <flag name='usb-host.guest-resets-all'/> <flag name='migration.blocked-reasons'/> <flag name='virtio-crypto'/> + <flag name='pvpanic-pci'/> <version>6000000</version> <kvmVersion>0</kvmVersion> <microcodeVersion>61700242</microcodeVersion> diff --git a/tests/qemucapabilitiesdata/caps_6.0.0.x86_64.xml b/tests/qemucapabilitiesdata/caps_6.0.0.x86_64.xml index 4a6b88aa10..7a592ff6aa 100644 --- a/tests/qemucapabilitiesdata/caps_6.0.0.x86_64.xml +++ b/tests/qemucapabilitiesdata/caps_6.0.0.x86_64.xml @@ -184,6 +184,7 @@ <flag name='usb-host.guest-resets-all'/> <flag name='migration.blocked-reasons'/> <flag name='virtio-crypto'/> + <flag name='pvpanic-pci'/> <version>6000000</version> <kvmVersion>0</kvmVersion> <microcodeVersion>43100242</microcodeVersion> diff --git a/tests/qemucapabilitiesdata/caps_6.1.0.x86_64.xml b/tests/qemucapabilitiesdata/caps_6.1.0.x86_64.xml index f303f439d6..4da1d42276 100644 --- a/tests/qemucapabilitiesdata/caps_6.1.0.x86_64.xml +++ b/tests/qemucapabilitiesdata/caps_6.1.0.x86_64.xml @@ -189,6 +189,7 @@ <flag name='usb-host.guest-resets-all'/> <flag name='migration.blocked-reasons'/> <flag name='virtio-crypto'/> + <flag name='pvpanic-pci'/> <version>6001000</version> <kvmVersion>0</kvmVersion> <microcodeVersion>43100243</microcodeVersion> diff --git a/tests/qemucapabilitiesdata/caps_6.2.0.aarch64.xml b/tests/qemucapabilitiesdata/caps_6.2.0.aarch64.xml index a573d465fb..33c9982bd1 100644 --- a/tests/qemucapabilitiesdata/caps_6.2.0.aarch64.xml +++ b/tests/qemucapabilitiesdata/caps_6.2.0.aarch64.xml @@ -156,6 +156,7 @@ <flag name='usb-host.guest-resets-all'/> <flag name='migration.blocked-reasons'/> <flag name='virtio-crypto'/> + <flag name='pvpanic-pci'/> <version>6001050</version> <kvmVersion>0</kvmVersion> <microcodeVersion>61700244</microcodeVersion> diff --git a/tests/qemucapabilitiesdata/caps_6.2.0.ppc64.xml b/tests/qemucapabilitiesdata/caps_6.2.0.ppc64.xml index 56269483c0..c485733d83 100644 --- a/tests/qemucapabilitiesdata/caps_6.2.0.ppc64.xml +++ b/tests/qemucapabilitiesdata/caps_6.2.0.ppc64.xml @@ -150,6 +150,7 @@ <flag name='virtio-net.rss'/> <flag name='migration.blocked-reasons'/> <flag name='virtio-crypto'/> + <flag name='pvpanic-pci'/> <version>6002000</version> <kvmVersion>0</kvmVersion> <microcodeVersion>42900244</microcodeVersion> diff --git a/tests/qemucapabilitiesdata/caps_6.2.0.x86_64.xml b/tests/qemucapabilitiesdata/caps_6.2.0.x86_64.xml index e9f65434ee..1f6f16bd4f 100644 --- a/tests/qemucapabilitiesdata/caps_6.2.0.x86_64.xml +++ b/tests/qemucapabilitiesdata/caps_6.2.0.x86_64.xml @@ -191,6 +191,7 @@ <flag name='usb-host.guest-resets-all'/> <flag name='migration.blocked-reasons'/> <flag name='virtio-crypto'/> + <flag name='pvpanic-pci'/> <version>6002000</version> <kvmVersion>0</kvmVersion> <microcodeVersion>43100244</microcodeVersion> diff --git a/tests/qemucapabilitiesdata/caps_7.0.0.aarch64.xml b/tests/qemucapabilitiesdata/caps_7.0.0.aarch64.xml index 16c4df09c2..6517cd71f6 100644 --- a/tests/qemucapabilitiesdata/caps_7.0.0.aarch64.xml +++ b/tests/qemucapabilitiesdata/caps_7.0.0.aarch64.xml @@ -164,6 +164,7 @@ <flag name='usb-host.guest-resets-all'/> <flag name='migration.blocked-reasons'/> <flag name='virtio-crypto'/> + <flag name='pvpanic-pci'/> <version>6002092</version> <kvmVersion>0</kvmVersion> <microcodeVersion>61700243</microcodeVersion> diff --git a/tests/qemucapabilitiesdata/caps_7.0.0.ppc64.xml b/tests/qemucapabilitiesdata/caps_7.0.0.ppc64.xml index 302ab8dacb..8dae2495e4 100644 --- a/tests/qemucapabilitiesdata/caps_7.0.0.ppc64.xml +++ b/tests/qemucapabilitiesdata/caps_7.0.0.ppc64.xml @@ -168,6 +168,7 @@ <flag name='usb-host.guest-resets-all'/> <flag name='migration.blocked-reasons'/> <flag name='virtio-crypto'/> + <flag name='pvpanic-pci'/> <version>7000000</version> <kvmVersion>0</kvmVersion> <microcodeVersion>42900243</microcodeVersion> diff --git a/tests/qemucapabilitiesdata/caps_7.0.0.x86_64.xml b/tests/qemucapabilitiesdata/caps_7.0.0.x86_64.xml index 893b5670e5..90b83f2995 100644 --- a/tests/qemucapabilitiesdata/caps_7.0.0.x86_64.xml +++ b/tests/qemucapabilitiesdata/caps_7.0.0.x86_64.xml @@ -197,6 +197,7 @@ <flag name='migration.blocked-reasons'/> <flag name='sgx-epc'/> <flag name='virtio-crypto'/> + <flag name='pvpanic-pci'/> <version>7000000</version> <kvmVersion>0</kvmVersion> <microcodeVersion>43100243</microcodeVersion> diff --git a/tests/qemucapabilitiesdata/caps_7.1.0.ppc64.xml b/tests/qemucapabilitiesdata/caps_7.1.0.ppc64.xml index 5ffc2213c1..e0e9a4693f 100644 --- a/tests/qemucapabilitiesdata/caps_7.1.0.ppc64.xml +++ b/tests/qemucapabilitiesdata/caps_7.1.0.ppc64.xml @@ -168,6 +168,7 @@ <flag name='query-stats-schemas'/> <flag name='screenshot-format-png'/> <flag name='virtio-crypto'/> + <flag name='pvpanic-pci'/> <version>7001000</version> <kvmVersion>0</kvmVersion> <microcodeVersion>42900244</microcodeVersion> diff --git a/tests/qemucapabilitiesdata/caps_7.1.0.x86_64.xml b/tests/qemucapabilitiesdata/caps_7.1.0.x86_64.xml index 5d7d98bb56..1f05dd4ae3 100644 --- a/tests/qemucapabilitiesdata/caps_7.1.0.x86_64.xml +++ b/tests/qemucapabilitiesdata/caps_7.1.0.x86_64.xml @@ -200,6 +200,7 @@ <flag name='query-stats-schemas'/> <flag name='screenshot-format-png'/> <flag name='virtio-crypto'/> + <flag name='pvpanic-pci'/> <version>7001000</version> <kvmVersion>0</kvmVersion> <microcodeVersion>43100244</microcodeVersion> diff --git a/tests/qemucapabilitiesdata/caps_7.2.0.x86_64.xml b/tests/qemucapabilitiesdata/caps_7.2.0.x86_64.xml index fccf9b7923..13f7b66b69 100644 --- a/tests/qemucapabilitiesdata/caps_7.2.0.x86_64.xml +++ b/tests/qemucapabilitiesdata/caps_7.2.0.x86_64.xml @@ -204,6 +204,7 @@ <flag name='netdev.stream'/> <flag name='virtio-crypto'/> <flag name='cryptodev-backend-lkcf'/> + <flag name='pvpanic-pci'/> <version>7002000</version> <kvmVersion>0</kvmVersion> <microcodeVersion>43100245</microcodeVersion> diff --git a/tests/qemucapabilitiesdata/caps_8.0.0.riscv64.xml b/tests/qemucapabilitiesdata/caps_8.0.0.riscv64.xml index 0e273f168a..751320433a 100644 --- a/tests/qemucapabilitiesdata/caps_8.0.0.riscv64.xml +++ b/tests/qemucapabilitiesdata/caps_8.0.0.riscv64.xml @@ -143,6 +143,7 @@ <flag name='screenshot-format-png'/> <flag name='netdev.stream'/> <flag name='virtio-crypto'/> + <flag name='pvpanic-pci'/> <version>7002050</version> <kvmVersion>0</kvmVersion> <microcodeVersion>0</microcodeVersion> diff --git a/tests/qemucapabilitiesdata/caps_8.0.0.x86_64.xml b/tests/qemucapabilitiesdata/caps_8.0.0.x86_64.xml index c8b7f95c4a..56be34799c 100644 --- a/tests/qemucapabilitiesdata/caps_8.0.0.x86_64.xml +++ b/tests/qemucapabilitiesdata/caps_8.0.0.x86_64.xml @@ -204,6 +204,7 @@ <flag name='netdev.stream'/> <flag name='virtio-crypto'/> <flag name='cryptodev-backend-lkcf'/> + <flag name='pvpanic-pci'/> <version>7002050</version> <kvmVersion>0</kvmVersion> <microcodeVersion>43100244</microcodeVersion> -- 2.39.1

This patch introduces optional device pvpanic-pci, validates its address and generates command line. Signed-off-by: Kristina Hanicova <khanicov@redhat.com> --- src/conf/domain_conf.c | 1 + src/conf/domain_conf.h | 1 + src/conf/schemas/domaincommon.rng | 1 + src/qemu/qemu_command.c | 17 +++++++++++++++++ src/qemu/qemu_validate.c | 14 ++++++++++++++ 5 files changed, 34 insertions(+) diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index a5578324b9..33ab67db51 100644 --- a/src/conf/domain_conf.c +++ b/src/conf/domain_conf.c @@ -859,6 +859,7 @@ VIR_ENUM_IMPL(virDomainPanicModel, "pseries", "hyperv", "s390", + "pvpanic", ); VIR_ENUM_IMPL(virDomainVideoBackend, diff --git a/src/conf/domain_conf.h b/src/conf/domain_conf.h index 62f80d653d..e32c229c1a 100644 --- a/src/conf/domain_conf.h +++ b/src/conf/domain_conf.h @@ -2677,6 +2677,7 @@ typedef enum { VIR_DOMAIN_PANIC_MODEL_PSERIES, VIR_DOMAIN_PANIC_MODEL_HYPERV, VIR_DOMAIN_PANIC_MODEL_S390, + VIR_DOMAIN_PANIC_MODEL_PVPANIC, VIR_DOMAIN_PANIC_MODEL_LAST } virDomainPanicModel; diff --git a/src/conf/schemas/domaincommon.rng b/src/conf/schemas/domaincommon.rng index a57dd212ab..ab4886b783 100644 --- a/src/conf/schemas/domaincommon.rng +++ b/src/conf/schemas/domaincommon.rng @@ -8289,6 +8289,7 @@ <value>pseries</value> <value>hyperv</value> <value>s390</value> + <value>pvpanic</value> </choice> </attribute> </optional> diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c index 90dc6b5434..4839d45a34 100644 --- a/src/qemu/qemu_command.c +++ b/src/qemu/qemu_command.c @@ -9557,6 +9557,23 @@ qemuBuildPanicCommandLine(virCommand *cmd, break; } + case VIR_DOMAIN_PANIC_MODEL_PVPANIC: { + g_autoptr(virJSONValue) props = NULL; + + if (virJSONValueObjectAdd(&props, + "s:driver", "pvpanic-pci", + NULL) < 0) + return -1; + + if (qemuBuildDeviceAddressProps(props, def, &def->panics[i]->info) < 0) + return -1; + + if (qemuBuildDeviceCommandlineFromJSON(cmd, props, def, qemuCaps) < 0) + return -1; + + break; + } + case VIR_DOMAIN_PANIC_MODEL_S390: case VIR_DOMAIN_PANIC_MODEL_HYPERV: case VIR_DOMAIN_PANIC_MODEL_PSERIES: diff --git a/src/qemu/qemu_validate.c b/src/qemu/qemu_validate.c index c8c289ebb4..12055d5402 100644 --- a/src/qemu/qemu_validate.c +++ b/src/qemu/qemu_validate.c @@ -1146,6 +1146,20 @@ qemuValidateDomainDefPanic(const virDomainDef *def, } break; + case VIR_DOMAIN_PANIC_MODEL_PVPANIC: + if (!virQEMUCapsGet(qemuCaps, QEMU_CAPS_DEVICE_PANIC_PCI)) { + virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s", + _("the QEMU binary does not support the PCI pvpanic device")); + return -1; + } + + if (def->panics[i]->info.type != VIR_DOMAIN_DEVICE_ADDRESS_TYPE_PCI) { + virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s", + _("pvpanic is supported only with PCI address type")); + return -1; + } + break; + /* default model value was changed before in post parse */ case VIR_DOMAIN_PANIC_MODEL_DEFAULT: case VIR_DOMAIN_PANIC_MODEL_LAST: -- 2.39.1

Signed-off-by: Kristina Hanicova <khanicov@redhat.com> --- .../pvpanic-pci-aarch64.aarch64-latest.args | 36 +++++++++++++++++++ .../qemuxml2argvdata/pvpanic-pci-aarch64.xml | 20 +++++++++++ ...invalid-address-aarch64.aarch64-latest.err | 1 + .../pvpanic-pci-invalid-address-aarch64.xml | 20 +++++++++++ .../pvpanic-pci-x86_64.x86_64-latest.args | 34 ++++++++++++++++++ tests/qemuxml2argvdata/pvpanic-pci-x86_64.xml | 24 +++++++++++++ tests/qemuxml2argvtest.c | 4 +++ .../pvpanic-pci-aarch64.aarch64-latest.xml | 32 +++++++++++++++++ .../pvpanic-pci-x86_64.x86_64-latest.xml | 32 +++++++++++++++++ tests/qemuxml2xmltest.c | 3 ++ 10 files changed, 206 insertions(+) create mode 100644 tests/qemuxml2argvdata/pvpanic-pci-aarch64.aarch64-latest.args create mode 100644 tests/qemuxml2argvdata/pvpanic-pci-aarch64.xml create mode 100644 tests/qemuxml2argvdata/pvpanic-pci-invalid-address-aarch64.aarch64-latest.err create mode 100644 tests/qemuxml2argvdata/pvpanic-pci-invalid-address-aarch64.xml create mode 100644 tests/qemuxml2argvdata/pvpanic-pci-x86_64.x86_64-latest.args create mode 100644 tests/qemuxml2argvdata/pvpanic-pci-x86_64.xml create mode 100644 tests/qemuxml2xmloutdata/pvpanic-pci-aarch64.aarch64-latest.xml create mode 100644 tests/qemuxml2xmloutdata/pvpanic-pci-x86_64.x86_64-latest.xml diff --git a/tests/qemuxml2argvdata/pvpanic-pci-aarch64.aarch64-latest.args b/tests/qemuxml2argvdata/pvpanic-pci-aarch64.aarch64-latest.args new file mode 100644 index 0000000000..db0b704195 --- /dev/null +++ b/tests/qemuxml2argvdata/pvpanic-pci-aarch64.aarch64-latest.args @@ -0,0 +1,36 @@ +LC_ALL=C \ +PATH=/bin \ +HOME=/tmp/lib/domain--1-guest \ +USER=test \ +LOGNAME=test \ +XDG_DATA_HOME=/tmp/lib/domain--1-guest/.local/share \ +XDG_CACHE_HOME=/tmp/lib/domain--1-guest/.cache \ +XDG_CONFIG_HOME=/tmp/lib/domain--1-guest/.config \ +/usr/bin/qemu-system-aarch64 \ +-name guest=guest,debug-threads=on \ +-S \ +-object '{"qom-type":"secret","id":"masterKey0","format":"raw","file":"/tmp/lib/domain--1-guest/master-key.aes"}' \ +-blockdev '{"driver":"file","filename":"/usr/share/AAVMF/AAVMF_CODE.fd","node-name":"libvirt-pflash0-storage","auto-read-only":true,"discard":"unmap"}' \ +-blockdev '{"node-name":"libvirt-pflash0-format","read-only":true,"driver":"raw","file":"libvirt-pflash0-storage"}' \ +-blockdev '{"driver":"file","filename":"/var/lib/libvirt/qemu/nvram/guest_VARS.fd","node-name":"libvirt-pflash1-storage","auto-read-only":true,"discard":"unmap"}' \ +-blockdev '{"node-name":"libvirt-pflash1-format","read-only":false,"driver":"raw","file":"libvirt-pflash1-storage"}' \ +-machine virt-6.0,usb=off,gic-version=2,dump-guest-core=off,memory-backend=mach-virt.ram,pflash0=libvirt-pflash0-format,pflash1=libvirt-pflash1-format \ +-accel tcg \ +-cpu cortex-a15 \ +-m 1024 \ +-object '{"qom-type":"memory-backend-ram","id":"mach-virt.ram","size":1073741824}' \ +-overcommit mem-lock=off \ +-smp 1,sockets=1,cores=1,threads=1 \ +-uuid 1ccfd97d-5eb4-478a-bbe6-88d254c16db7 \ +-display none \ +-no-user-config \ +-nodefaults \ +-chardev socket,id=charmonitor,fd=1729,server=on,wait=off \ +-mon chardev=charmonitor,id=monitor,mode=control \ +-rtc base=utc \ +-no-shutdown \ +-boot strict=on \ +-audiodev '{"id":"audio1","driver":"none"}' \ +-sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,resourcecontrol=deny \ +-device '{"driver":"pvpanic-pci","bus":"pcie.0","addr":"0x4"}' \ +-msg timestamp=on diff --git a/tests/qemuxml2argvdata/pvpanic-pci-aarch64.xml b/tests/qemuxml2argvdata/pvpanic-pci-aarch64.xml new file mode 100644 index 0000000000..3aa4580104 --- /dev/null +++ b/tests/qemuxml2argvdata/pvpanic-pci-aarch64.xml @@ -0,0 +1,20 @@ +<domain type='qemu'> + <name>guest</name> + <uuid>1ccfd97d-5eb4-478a-bbe6-88d254c16db7</uuid> + <memory unit='KiB'>1048576</memory> + <vcpu placement='static'>1</vcpu> + <os firmware='efi'> + <type arch='aarch64' machine='virt-6.0'>hvm</type> + </os> + <features> + <acpi/> + </features> + <devices> + <emulator>/usr/bin/qemu-system-aarch64</emulator> + <controller type='usb' model='none'/> + <memballoon model='none'/> + <panic model='pvpanic'> + <address type='pci' domain='0x0000' bus='0x00' slot='0x04' function='0x0'/> + </panic> + </devices> +</domain> diff --git a/tests/qemuxml2argvdata/pvpanic-pci-invalid-address-aarch64.aarch64-latest.err b/tests/qemuxml2argvdata/pvpanic-pci-invalid-address-aarch64.aarch64-latest.err new file mode 100644 index 0000000000..4e74ba5cc9 --- /dev/null +++ b/tests/qemuxml2argvdata/pvpanic-pci-invalid-address-aarch64.aarch64-latest.err @@ -0,0 +1 @@ +unsupported configuration: pvpanic is supported only with PCI address type diff --git a/tests/qemuxml2argvdata/pvpanic-pci-invalid-address-aarch64.xml b/tests/qemuxml2argvdata/pvpanic-pci-invalid-address-aarch64.xml new file mode 100644 index 0000000000..baececb2db --- /dev/null +++ b/tests/qemuxml2argvdata/pvpanic-pci-invalid-address-aarch64.xml @@ -0,0 +1,20 @@ +<domain type='qemu'> + <name>guest</name> + <uuid>1ccfd97d-5eb4-478a-bbe6-88d254c16db7</uuid> + <memory unit='KiB'>1048576</memory> + <vcpu placement='static'>1</vcpu> + <os firmware='efi'> + <type arch='aarch64' machine='virt-6.0'>hvm</type> + </os> + <features> + <acpi/> + </features> + <devices> + <emulator>/usr/bin/qemu-system-aarch64</emulator> + <controller type='usb' model='none'/> + <memballoon model='virtio'/> + <panic model='pvpanic'> + <address type='isa' iobase='0x505'/> + </panic> + </devices> +</domain> diff --git a/tests/qemuxml2argvdata/pvpanic-pci-x86_64.x86_64-latest.args b/tests/qemuxml2argvdata/pvpanic-pci-x86_64.x86_64-latest.args new file mode 100644 index 0000000000..7d6398cd97 --- /dev/null +++ b/tests/qemuxml2argvdata/pvpanic-pci-x86_64.x86_64-latest.args @@ -0,0 +1,34 @@ +LC_ALL=C \ +PATH=/bin \ +HOME=/tmp/lib/domain--1-QEMUGuest1 \ +USER=test \ +LOGNAME=test \ +XDG_DATA_HOME=/tmp/lib/domain--1-QEMUGuest1/.local/share \ +XDG_CACHE_HOME=/tmp/lib/domain--1-QEMUGuest1/.cache \ +XDG_CONFIG_HOME=/tmp/lib/domain--1-QEMUGuest1/.config \ +/usr/bin/qemu-system-x86_64 \ +-name guest=QEMUGuest1,debug-threads=on \ +-S \ +-object '{"qom-type":"secret","id":"masterKey0","format":"raw","file":"/tmp/lib/domain--1-QEMUGuest1/master-key.aes"}' \ +-machine pc,usb=off,dump-guest-core=off,memory-backend=pc.ram \ +-accel tcg \ +-cpu qemu64 \ +-m 214 \ +-object '{"qom-type":"memory-backend-ram","id":"pc.ram","size":224395264}' \ +-overcommit mem-lock=off \ +-smp 1,sockets=1,cores=1,threads=1 \ +-uuid c7a5fdbd-edaf-9455-926a-d65c16db1809 \ +-display none \ +-no-user-config \ +-nodefaults \ +-chardev socket,id=charmonitor,fd=1729,server=on,wait=off \ +-mon chardev=charmonitor,id=monitor,mode=control \ +-rtc base=utc \ +-no-shutdown \ +-no-acpi \ +-boot strict=on \ +-device '{"driver":"piix3-usb-uhci","id":"usb","bus":"pci.0","addr":"0x1.0x2"}' \ +-audiodev '{"id":"audio1","driver":"none"}' \ +-sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,resourcecontrol=deny \ +-device '{"driver":"pvpanic-pci","bus":"pci.0","addr":"0x4"}' \ +-msg timestamp=on diff --git a/tests/qemuxml2argvdata/pvpanic-pci-x86_64.xml b/tests/qemuxml2argvdata/pvpanic-pci-x86_64.xml new file mode 100644 index 0000000000..19f6ec96ef --- /dev/null +++ b/tests/qemuxml2argvdata/pvpanic-pci-x86_64.xml @@ -0,0 +1,24 @@ +<domain type='qemu'> + <name>QEMUGuest1</name> + <uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid> + <memory unit='KiB'>219136</memory> + <currentMemory unit='KiB'>219136</currentMemory> + <vcpu placement='static'>1</vcpu> + <os> + <type arch='x86_64' machine='pc'>hvm</type> + <boot dev='hd'/> + </os> + <clock offset='utc'/> + <on_poweroff>destroy</on_poweroff> + <on_reboot>restart</on_reboot> + <on_crash>destroy</on_crash> + <devices> + <emulator>/usr/bin/qemu-system-x86_64</emulator> + <controller type='usb' index='0'/> + <controller type='pci' index='0' model='pci-root'/> + <memballoon model='none'/> + <panic model='pvpanic'> + <address type='pci' domain='0x0000' bus='0x00' slot='0x04' function='0x0'/> + </panic> + </devices> +</domain> diff --git a/tests/qemuxml2argvtest.c b/tests/qemuxml2argvtest.c index ae0afb6f1c..4e3815559c 100644 --- a/tests/qemuxml2argvtest.c +++ b/tests/qemuxml2argvtest.c @@ -2615,6 +2615,10 @@ mymain(void) DO_TEST_CAPS_LATEST("panic-double"); DO_TEST_CAPS_LATEST("panic-no-address"); + DO_TEST_CAPS_LATEST("pvpanic-pci-x86_64"); + DO_TEST_CAPS_ARCH_LATEST("pvpanic-pci-aarch64", "aarch64"); + DO_TEST_CAPS_ARCH_LATEST_PARSE_ERROR("pvpanic-pci-invalid-address-aarch64", "aarch64"); + DO_TEST_CAPS_ARCH_VER_FULL("fips-enabled", "x86_64", "5.1.0", ARG_FLAGS, FLAG_FIPS_HOST); DO_TEST_CAPS_ARCH_LATEST_FULL("fips-enabled", "x86_64", ARG_FLAGS, FLAG_FIPS_HOST); diff --git a/tests/qemuxml2xmloutdata/pvpanic-pci-aarch64.aarch64-latest.xml b/tests/qemuxml2xmloutdata/pvpanic-pci-aarch64.aarch64-latest.xml new file mode 100644 index 0000000000..eb0809af7c --- /dev/null +++ b/tests/qemuxml2xmloutdata/pvpanic-pci-aarch64.aarch64-latest.xml @@ -0,0 +1,32 @@ +<domain type='qemu'> + <name>guest</name> + <uuid>1ccfd97d-5eb4-478a-bbe6-88d254c16db7</uuid> + <memory unit='KiB'>1048576</memory> + <currentMemory unit='KiB'>1048576</currentMemory> + <vcpu placement='static'>1</vcpu> + <os firmware='efi'> + <type arch='aarch64' machine='virt-6.0'>hvm</type> + <boot dev='hd'/> + </os> + <features> + <acpi/> + <gic version='2'/> + </features> + <cpu mode='custom' match='exact' check='none'> + <model fallback='forbid'>cortex-a15</model> + </cpu> + <clock offset='utc'/> + <on_poweroff>destroy</on_poweroff> + <on_reboot>restart</on_reboot> + <on_crash>destroy</on_crash> + <devices> + <emulator>/usr/bin/qemu-system-aarch64</emulator> + <controller type='usb' index='0' model='none'/> + <controller type='pci' index='0' model='pcie-root'/> + <audio id='1' type='none'/> + <memballoon model='none'/> + <panic model='pvpanic'> + <address type='pci' domain='0x0000' bus='0x00' slot='0x04' function='0x0'/> + </panic> + </devices> +</domain> diff --git a/tests/qemuxml2xmloutdata/pvpanic-pci-x86_64.x86_64-latest.xml b/tests/qemuxml2xmloutdata/pvpanic-pci-x86_64.x86_64-latest.xml new file mode 100644 index 0000000000..6e2421c08b --- /dev/null +++ b/tests/qemuxml2xmloutdata/pvpanic-pci-x86_64.x86_64-latest.xml @@ -0,0 +1,32 @@ +<domain type='qemu'> + <name>QEMUGuest1</name> + <uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid> + <memory unit='KiB'>219136</memory> + <currentMemory unit='KiB'>219136</currentMemory> + <vcpu placement='static'>1</vcpu> + <os> + <type arch='x86_64' machine='pc'>hvm</type> + <boot dev='hd'/> + </os> + <cpu mode='custom' match='exact' check='none'> + <model fallback='forbid'>qemu64</model> + </cpu> + <clock offset='utc'/> + <on_poweroff>destroy</on_poweroff> + <on_reboot>restart</on_reboot> + <on_crash>destroy</on_crash> + <devices> + <emulator>/usr/bin/qemu-system-x86_64</emulator> + <controller type='usb' index='0' model='piix3-uhci'> + <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x2'/> + </controller> + <controller type='pci' index='0' model='pci-root'/> + <input type='mouse' bus='ps2'/> + <input type='keyboard' bus='ps2'/> + <audio id='1' type='none'/> + <memballoon model='none'/> + <panic model='pvpanic'> + <address type='pci' domain='0x0000' bus='0x00' slot='0x04' function='0x0'/> + </panic> + </devices> +</domain> diff --git a/tests/qemuxml2xmltest.c b/tests/qemuxml2xmltest.c index ae9716062d..269b2d8016 100644 --- a/tests/qemuxml2xmltest.c +++ b/tests/qemuxml2xmltest.c @@ -908,6 +908,9 @@ mymain(void) DO_TEST("panic-no-address", QEMU_CAPS_DEVICE_PANIC); DO_TEST_CAPS_ARCH_LATEST("panic-pseries", "ppc64"); + DO_TEST_CAPS_LATEST("pvpanic-pci-x86_64"); + DO_TEST_CAPS_ARCH_LATEST("pvpanic-pci-aarch64", "aarch64"); + DO_TEST_NOCAPS("disk-backing-chains-index"); DO_TEST_NOCAPS("disk-backing-chains-noindex"); -- 2.39.1

It makes sense to accept pvpanic-pci also without specified PCI address and assign one if possible. Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1961326 Signed-off-by: Kristina Hanicova <khanicov@redhat.com> --- src/qemu/qemu_domain_address.c | 34 +++++++++++++++++++++++++++++++++- 1 file changed, 33 insertions(+), 1 deletion(-) diff --git a/src/qemu/qemu_domain_address.c b/src/qemu/qemu_domain_address.c index 20b648354b..2023f283d6 100644 --- a/src/qemu/qemu_domain_address.c +++ b/src/qemu/qemu_domain_address.c @@ -1062,10 +1062,24 @@ qemuDomainDeviceCalculatePCIConnectFlags(virDomainDeviceDef *dev, } break; + case VIR_DOMAIN_DEVICE_PANIC: + switch ((virDomainPanicModel) dev->data.panic->model) { + case VIR_DOMAIN_PANIC_MODEL_PVPANIC: + return pciFlags | VIR_PCI_CONNECT_INTEGRATED; + + case VIR_DOMAIN_PANIC_MODEL_DEFAULT: + case VIR_DOMAIN_PANIC_MODEL_ISA: + case VIR_DOMAIN_PANIC_MODEL_PSERIES: + case VIR_DOMAIN_PANIC_MODEL_HYPERV: + case VIR_DOMAIN_PANIC_MODEL_S390: + case VIR_DOMAIN_PANIC_MODEL_LAST: + return 0; + } + break; + /* These devices don't ever connect with PCI */ case VIR_DOMAIN_DEVICE_NVRAM: case VIR_DOMAIN_DEVICE_TPM: - case VIR_DOMAIN_DEVICE_PANIC: case VIR_DOMAIN_DEVICE_HUB: case VIR_DOMAIN_DEVICE_REDIRDEV: case VIR_DOMAIN_DEVICE_SMARTCARD: @@ -2454,6 +2468,24 @@ qemuDomainAssignDevicePCISlots(virDomainDef *def, return -1; } + for (i = 0; i < def->npanics; i++) { + virDomainPanicDef *panic = def->panics[i]; + + switch (panic->model) { + case VIR_DOMAIN_PANIC_MODEL_PVPANIC: + if (virDeviceInfoPCIAddressIsWanted(&panic->info) && + qemuDomainPCIAddressReserveNextAddr(addrs, &panic->info) < 0) + return -1; + break; + case VIR_DOMAIN_PANIC_MODEL_DEFAULT: + case VIR_DOMAIN_PANIC_MODEL_ISA: + case VIR_DOMAIN_PANIC_MODEL_PSERIES: + case VIR_DOMAIN_PANIC_MODEL_HYPERV: + case VIR_DOMAIN_PANIC_MODEL_S390: + case VIR_DOMAIN_PANIC_MODEL_LAST: + break; + } + } return 0; } -- 2.39.1

Signed-off-by: Kristina Hanicova <khanicov@redhat.com> --- ...pci-no-address-aarch64.aarch64-latest.args | 36 +++++++++++++++++++ .../pvpanic-pci-no-address-aarch64.xml | 18 ++++++++++ tests/qemuxml2argvtest.c | 1 + ...-pci-no-address-aarch64.aarch64-latest.xml | 32 +++++++++++++++++ tests/qemuxml2xmltest.c | 1 + 5 files changed, 88 insertions(+) create mode 100644 tests/qemuxml2argvdata/pvpanic-pci-no-address-aarch64.aarch64-latest.args create mode 100644 tests/qemuxml2argvdata/pvpanic-pci-no-address-aarch64.xml create mode 100644 tests/qemuxml2xmloutdata/pvpanic-pci-no-address-aarch64.aarch64-latest.xml diff --git a/tests/qemuxml2argvdata/pvpanic-pci-no-address-aarch64.aarch64-latest.args b/tests/qemuxml2argvdata/pvpanic-pci-no-address-aarch64.aarch64-latest.args new file mode 100644 index 0000000000..966ecd7dff --- /dev/null +++ b/tests/qemuxml2argvdata/pvpanic-pci-no-address-aarch64.aarch64-latest.args @@ -0,0 +1,36 @@ +LC_ALL=C \ +PATH=/bin \ +HOME=/tmp/lib/domain--1-guest \ +USER=test \ +LOGNAME=test \ +XDG_DATA_HOME=/tmp/lib/domain--1-guest/.local/share \ +XDG_CACHE_HOME=/tmp/lib/domain--1-guest/.cache \ +XDG_CONFIG_HOME=/tmp/lib/domain--1-guest/.config \ +/usr/bin/qemu-system-aarch64 \ +-name guest=guest,debug-threads=on \ +-S \ +-object '{"qom-type":"secret","id":"masterKey0","format":"raw","file":"/tmp/lib/domain--1-guest/master-key.aes"}' \ +-blockdev '{"driver":"file","filename":"/usr/share/AAVMF/AAVMF_CODE.fd","node-name":"libvirt-pflash0-storage","auto-read-only":true,"discard":"unmap"}' \ +-blockdev '{"node-name":"libvirt-pflash0-format","read-only":true,"driver":"raw","file":"libvirt-pflash0-storage"}' \ +-blockdev '{"driver":"file","filename":"/var/lib/libvirt/qemu/nvram/guest_VARS.fd","node-name":"libvirt-pflash1-storage","auto-read-only":true,"discard":"unmap"}' \ +-blockdev '{"node-name":"libvirt-pflash1-format","read-only":false,"driver":"raw","file":"libvirt-pflash1-storage"}' \ +-machine virt-6.0,usb=off,gic-version=2,dump-guest-core=off,memory-backend=mach-virt.ram,pflash0=libvirt-pflash0-format,pflash1=libvirt-pflash1-format \ +-accel tcg \ +-cpu cortex-a15 \ +-m 1024 \ +-object '{"qom-type":"memory-backend-ram","id":"mach-virt.ram","size":1073741824}' \ +-overcommit mem-lock=off \ +-smp 1,sockets=1,cores=1,threads=1 \ +-uuid 1ccfd97d-5eb4-478a-bbe6-88d254c16db7 \ +-display none \ +-no-user-config \ +-nodefaults \ +-chardev socket,id=charmonitor,fd=1729,server=on,wait=off \ +-mon chardev=charmonitor,id=monitor,mode=control \ +-rtc base=utc \ +-no-shutdown \ +-boot strict=on \ +-audiodev '{"id":"audio1","driver":"none"}' \ +-sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,resourcecontrol=deny \ +-device '{"driver":"pvpanic-pci","bus":"pcie.0","addr":"0x1"}' \ +-msg timestamp=on diff --git a/tests/qemuxml2argvdata/pvpanic-pci-no-address-aarch64.xml b/tests/qemuxml2argvdata/pvpanic-pci-no-address-aarch64.xml new file mode 100644 index 0000000000..e992405087 --- /dev/null +++ b/tests/qemuxml2argvdata/pvpanic-pci-no-address-aarch64.xml @@ -0,0 +1,18 @@ +<domain type='qemu'> + <name>guest</name> + <uuid>1ccfd97d-5eb4-478a-bbe6-88d254c16db7</uuid> + <memory unit='KiB'>1048576</memory> + <vcpu placement='static'>1</vcpu> + <os firmware='efi'> + <type arch='aarch64' machine='virt-6.0'>hvm</type> + </os> + <features> + <acpi/> + </features> + <devices> + <emulator>/usr/bin/qemu-system-aarch64</emulator> + <controller type='usb' model='none'/> + <memballoon model='none'/> + <panic model='pvpanic'/> + </devices> +</domain> diff --git a/tests/qemuxml2argvtest.c b/tests/qemuxml2argvtest.c index 4e3815559c..b897814a5d 100644 --- a/tests/qemuxml2argvtest.c +++ b/tests/qemuxml2argvtest.c @@ -2618,6 +2618,7 @@ mymain(void) DO_TEST_CAPS_LATEST("pvpanic-pci-x86_64"); DO_TEST_CAPS_ARCH_LATEST("pvpanic-pci-aarch64", "aarch64"); DO_TEST_CAPS_ARCH_LATEST_PARSE_ERROR("pvpanic-pci-invalid-address-aarch64", "aarch64"); + DO_TEST_CAPS_ARCH_LATEST("pvpanic-pci-no-address-aarch64", "aarch64"); DO_TEST_CAPS_ARCH_VER_FULL("fips-enabled", "x86_64", "5.1.0", ARG_FLAGS, FLAG_FIPS_HOST); DO_TEST_CAPS_ARCH_LATEST_FULL("fips-enabled", "x86_64", ARG_FLAGS, FLAG_FIPS_HOST); diff --git a/tests/qemuxml2xmloutdata/pvpanic-pci-no-address-aarch64.aarch64-latest.xml b/tests/qemuxml2xmloutdata/pvpanic-pci-no-address-aarch64.aarch64-latest.xml new file mode 100644 index 0000000000..2812242023 --- /dev/null +++ b/tests/qemuxml2xmloutdata/pvpanic-pci-no-address-aarch64.aarch64-latest.xml @@ -0,0 +1,32 @@ +<domain type='qemu'> + <name>guest</name> + <uuid>1ccfd97d-5eb4-478a-bbe6-88d254c16db7</uuid> + <memory unit='KiB'>1048576</memory> + <currentMemory unit='KiB'>1048576</currentMemory> + <vcpu placement='static'>1</vcpu> + <os firmware='efi'> + <type arch='aarch64' machine='virt-6.0'>hvm</type> + <boot dev='hd'/> + </os> + <features> + <acpi/> + <gic version='2'/> + </features> + <cpu mode='custom' match='exact' check='none'> + <model fallback='forbid'>cortex-a15</model> + </cpu> + <clock offset='utc'/> + <on_poweroff>destroy</on_poweroff> + <on_reboot>restart</on_reboot> + <on_crash>destroy</on_crash> + <devices> + <emulator>/usr/bin/qemu-system-aarch64</emulator> + <controller type='usb' index='0' model='none'/> + <controller type='pci' index='0' model='pcie-root'/> + <audio id='1' type='none'/> + <memballoon model='none'/> + <panic model='pvpanic'> + <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x0'/> + </panic> + </devices> +</domain> diff --git a/tests/qemuxml2xmltest.c b/tests/qemuxml2xmltest.c index 269b2d8016..3a652dde61 100644 --- a/tests/qemuxml2xmltest.c +++ b/tests/qemuxml2xmltest.c @@ -910,6 +910,7 @@ mymain(void) DO_TEST_CAPS_LATEST("pvpanic-pci-x86_64"); DO_TEST_CAPS_ARCH_LATEST("pvpanic-pci-aarch64", "aarch64"); + DO_TEST_CAPS_ARCH_LATEST("pvpanic-pci-no-address-aarch64", "aarch64"); DO_TEST_NOCAPS("disk-backing-chains-index"); DO_TEST_NOCAPS("disk-backing-chains-noindex"); -- 2.39.1

Signed-off-by: Kristina Hanicova <khanicov@redhat.com> --- docs/formatdomain.rst | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/formatdomain.rst b/docs/formatdomain.rst index 36c6d87907..638768c18d 100644 --- a/docs/formatdomain.rst +++ b/docs/formatdomain.rst @@ -7940,6 +7940,7 @@ Example: usage of panic configuration - 'hyperv' - for Hyper-V crash CPU feature. :since:`Since 1.3.0, QEMU and KVM only` - 's390' - default for S390 guests. :since:`Since 1.3.5` + - 'pvpanic' - for PCI pvpanic device :since:`Since 9.1.0, QEMU only` ``address`` address of panic. The default ioport is 0x505. Most users don't need to -- 2.39.1

On Mon, Feb 20, 2023 at 05:12:53PM +0100, Kristina Hanicova wrote:
v1 here: https://listman.redhat.com/archives/libvir-list/2023-February/237622.html
diff to v1: * reduced test files (thanks Andrea) * removed redundant check for address type (noticed by Peter) * plugging the device directly into pcie.0 if its address was not specified
Just for completeness' sake, note that the use of VIR_PCI_CONNECT_INTEGRATED results in libvirt outright rejecting attempts to put the device anywhere but on pcie.0, even when the address comes directly from the user. This is technically a limitation compared to what QEMU allows, but in practice the other configurations are untested and overall it feels like a fair trade-off. We can also decide to lift this limitation in the future, if it ever comes to that.
Kristina Hanicova (6): qemu: introduce QEMU_CAPS_DEVICE_PANIC_PCI conf: add panic model 'pvpanic' tests: add test cases for device pvpanic-pci qemu: assign PCI address to device pvpanic-pci tests: add case for pvpanic-pci without address docs: document panic device 'pvpanic-pci'
Everything looks great, so Reviewed-by: Andrea Bolognani <abologna@redhat.com> The first patch is missing the Signed-off-by tag. Can you please confirm that you're okay with me adding it before pushing? I'm also not seeing any updates to the NEWS file. Please post that as a follow-up patch before release :) -- Andrea Bolognani / Red Hat / Virtualization

On Mon, Feb 20, 2023 at 7:17 PM Andrea Bolognani <abologna@redhat.com> wrote:
On Mon, Feb 20, 2023 at 05:12:53PM +0100, Kristina Hanicova wrote:
v1 here:
https://listman.redhat.com/archives/libvir-list/2023-February/237622.html
diff to v1: * reduced test files (thanks Andrea) * removed redundant check for address type (noticed by Peter) * plugging the device directly into pcie.0 if its address was not specified
Just for completeness' sake, note that the use of VIR_PCI_CONNECT_INTEGRATED results in libvirt outright rejecting attempts to put the device anywhere but on pcie.0, even when the address comes directly from the user. This is technically a limitation compared to what QEMU allows, but in practice the other configurations are untested and overall it feels like a fair trade-off. We can also decide to lift this limitation in the future, if it ever comes to that.
Kristina Hanicova (6): qemu: introduce QEMU_CAPS_DEVICE_PANIC_PCI conf: add panic model 'pvpanic' tests: add test cases for device pvpanic-pci qemu: assign PCI address to device pvpanic-pci tests: add case for pvpanic-pci without address docs: document panic device 'pvpanic-pci'
Everything looks great, so
Reviewed-by: Andrea Bolognani <abologna@redhat.com>
The first patch is missing the Signed-off-by tag. Can you please confirm that you're okay with me adding it before pushing?
Yes, thank you.
I'm also not seeing any updates to the NEWS file. Please post that as a follow-up patch before release :)
Thanks for the reminder, the patch updating NEWS is on the list now. Kristina
participants (2)
-
Andrea Bolognani
-
Kristina Hanicova