fix broken pxb-cxl realization
cover fix broken pxb-cxl realization
This flaw was discovered in Fedora builds which have --enable-qom-cast-debug enabled
Daniel P. Berrangé (2):
hw/pci-bridge: fix cast for pxb-cxl dev realization
gitlab: run all jobs with QOM debugging enabled
.gitlab-ci.d/buildtest-template.yml | 1 + hw/pci-bridge/pci_expander_bridge.c | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-)
Signature · 1 line
2.39.1
PATCH 1/2 hw/pci-bridge: fix cast for pxb-cxl dev realization
Build QEMU --enable-qom-cast-debug and run a VM creating a pxb-cxl device:
$ qemu-system-x86_64 -machine q35,cxl=on -device pxb-cxl,bus=pcie.0 hw/pci-bridge/pci_expander_bridge.c:54:PXB_DEV: Object 0x555558313760 is not an instance of type pxb
This is seen when running 'tests/qtest/cxl-test'
--- hw/pci-bridge/pci_expander_bridge.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
hw/pci-bridge/pci_expander_bridge.c +1 -1
@@ -311,7 +311,7 @@ static void pxb_cxl_dev_reset(DeviceState *dev)* The CXL specification allows for host bridges with no HDM decoders * if they only have a single root port. */ -if (!PXB_DEV (dev)->hdm_for_passthrough) { +if (!PXB_CXL_DEV (dev)->hdm_for_passthrough) { dsp_count =pcie_count_ds_ports (hb->bus); }/* Initial reset will have 0 dsp so wait until > 0 */
Signature · 1 line
2.39.1
Re: [PATCH 1/2] hw/pci-bridge: fix cast for pxb-cxl dev realization
Quoted 18 lines · Daniel P. Berrangé
Build QEMU --enable-qom-cast-debug and run a VM creating a pxb-cxl device:
$ qemu-system-x86_64 -machine q35,cxl=on -device pxb-cxl,bus=pcie.0 hw/pci-bridge/pci_expander_bridge.c:54:PXB_DEV: Object 0x555558313760 is not an instance of type pxbThis is seen when running 'tests/qtest/cxl-test'
Signed-off-by Daniel P. Berrangé <[email protected]>--- hw/pci-bridge/pci_expander_bridge.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)hw/pci-bridge/pci_expander_bridge.c +0
-0
hw/pci-bridge/pci_expander_bridge.c static void pxb_cxl_dev_reset(DeviceState *dev) · line 317
Quoted 8 lines
hw/pci-bridge/pci_expander_bridge.c +1
-1@@ -311,7 +311,7 @@ static void pxb_cxl_dev_reset(DeviceState *dev)* The CXL specification allows for host bridges with no HDM decoders * if they only have a single root port. */ -if (!PXB_DEV (dev)->hdm_for_passthrough) { +if (!PXB_CXL_DEV (dev)->hdm_for_passthrough) { dsp_count =pcie_count_ds_ports (hb->bus); }/* Initial reset will have 0 dsp so wait until > 0 */
The patch is already available here:
https://lore.kernel.org/qemu-devel/[email protected]/
Thomas
PATCH 2/2 gitlab: run all jobs with QOM debugging enabled
In reply to Daniel P. BerrangéThe QMO cast debugging is designed to catch developer mistakes and as such should always be enabled during CI runs.
--- .gitlab-ci.d/buildtest-template.yml | 1 + 1 file changed, 1 insertion(+)
.gitlab-ci.d/buildtest-template.yml +1 -0
@@ -12,6 +12,7 @@ - mkdir build - cd build - ../configure --enable-werror --disable-docs --enable-fdt=system + --enable-qom-cast-debug ${LD_JOBS:+--meson=git} ${TARGETS:+--target-list="$TARGETS"} $CONFIGURE_ARGS || { cat config.log meson-logs/meson-log.txt && exit 1; }
Signature · 1 line
2.39.1
Re: [PATCH 2/2] gitlab: run all jobs with QOM debugging enabled
Quoted 13 lines · Daniel P. Berrangé
The QMO cast debugging is designed to catch developer mistakes and as such should always be enabled during CI runs.
Signed-off-by Daniel P. Berrangé <[email protected]>--- .gitlab-ci.d/buildtest-template.yml | 1 + 1 file changed, 1 insertion(+).gitlab-ci.d/buildtest-template.yml +0
-0
.gitlab-ci.d/buildtest-template.yml line 18
Quoted 7 lines
.gitlab-ci.d/buildtest-template.yml +1
-0@@ -12,6 +12,7 @@ - mkdir build - cd build - ../configure --enable-werror --disable-docs --enable-fdt=system + --enable-qom-cast-debug ${LD_JOBS:+--meson=git} ${TARGETS:+--target-list="$TARGETS"} $CONFIGURE_ARGS || { cat config.log meson-logs/meson-log.txt && exit 1; }
No, it's better to always enable it again, since it was just switched off by accident in the past:
https://lore.kernel.org/qemu-devel/[email protected]/
Thomas
Quoted 7 lines · Daniel P. Berrangé
This flaw was discovered in Fedora builds which have --enable-qom-cast-debug enabled
Daniel P. Berrangé (2):
hw/pci-bridge: fix cast for pxb-cxl dev realization
gitlab: run all jobs with QOM debugging enabled
How does this compare with
hw/pci-bridge: pci_expander_bridge: Fix wrong type and rework inheritance
posted yesterday to fix the same issue?
thanks
-- PMM