Re-enable qom-cast-debug by default
cover Re-enable qom-cast-debug by default
This switch had been disabled by default by accident in commit c55cf6ab03f. But we should enable it by default instead to avoid regressions in the QOM device hierarchy.
Two bugs crept in while we had it disabled. One has been fixed by Peter in commit 6c50845a91 ("hw/i2c/allwinner-i2c: Fix subclassing of TYPE_AW_I2C_SUN6I") already, the other one can be found in the file hw/pci-bridge/pci_expander_bridge.c - this first needs some clarification how the device hierarchy should look like here. Revert the patch that introduce the bug for the time being until a proper replacement is available.
Thomas Huth (2):
Revert "hw/pxb-cxl: Support passthrough HDM Decoders unless
overridden"
meson_options.txt: Enable qom-cast-debug by default again
include/hw/cxl/cxl.h | 1 - include/hw/cxl/cxl_component.h | 1 - include/hw/pci/pci_bridge.h | 1 - hw/cxl/cxl-host.c | 31 ++++++++------------ hw/pci-bridge/pci_expander_bridge.c | 44 ++++------------------------- meson_options.txt | 2 +- scripts/meson-buildoptions.sh | 2 +- 7 files changed, 19 insertions(+), 63 deletions(-)
Signature · 1 line
2.31.1
PATCH 1/2 Revert "hw/pxb-cxl: Support passthrough HDM Decoders unless overridden"
This reverts commit 154070eaf6597c47f64c3ea917bcba62427ae61f.
The pxb_cxl_dev_reset() function tries to cast the device via PXB_DEV(), however the function belongs to TYPE_PXB_CXL_DEVICE which is not derived from TYPE_PXB_DEVICE. So this causes QEMU to abort in case the QOM checks have been enabled with the "--enable-qom-cast-debug" configure option. Thus revert this faulty patch so we can enable the qom cast debug switch by de- fault again - and the pxb-cxl code should be redone in a proper way later.
--- include/hw/cxl/cxl.h | 1 - include/hw/cxl/cxl_component.h | 1 - include/hw/pci/pci_bridge.h | 1 - hw/cxl/cxl-host.c | 31 ++++++++------------ hw/pci-bridge/pci_expander_bridge.c | 44 ++++------------------------- 5 files changed, 17 insertions(+), 61 deletions(-)
include/hw/cxl/cxl.h +0 -1
@@ -49,7 +49,6 @@ struct CXLHost {PCIHostState parent_obj;CXLComponentState cxl_cstate; -bool passthrough; };#define TYPE_PXB_CXL_HOST "pxb-cxl-host"
include/hw/cxl/cxl_component.h +0 -1
@@ -247,7 +247,6 @@ static inline hwaddr cxl_decode_ig(int ig) }CXLComponentState *cxl_get_hb_cstate (PCIHostState *hb); -bool cxl_get_hb_passthrough (PCIHostState *hb);void cxl_doe_cdat_init (CXLComponentState *cxl_cstate,Error **errp);void cxl_doe_cdat_release (CXLComponentState *cxl_cstate);
include/hw/pci/pci_bridge.h +0 -1
@@ -92,7 +92,6 @@ struct PXBDev {uint8_t bus_nr;uint16_t numa_node;bool bypass_iommu; -bool hdm_for_passthrough;struct cxl_dev {CXLHost *cxl_host_bridge;/* Pointer to a CXLHost */ } cxl;
hw/cxl/cxl-host.c +12 -19
@@ -146,28 +146,21 @@ static PCIDevice *cxl_cfmws_find_device(CXLFixedWindow *fw, hwaddr addr)return NULL ; } -if (cxl_get_hb_passthrough (hb)) { - rp =pcie_find_port_first (hb->bus); -if (!rp) { -return NULL ; - } - }else { - hb_cstate =cxl_get_hb_cstate (hb); -if (!hb_cstate) { -return NULL ; - } + hb_cstate =cxl_get_hb_cstate (hb); +if (!hb_cstate) { +return NULL ; + } - cache_mem = hb_cstate->crb.cache_mem_registers; + cache_mem = hb_cstate->crb.cache_mem_registers; - target_found =cxl_hdm_find_target (cache_mem, addr, &target); -if (!target_found) { -return NULL ; - } + target_found =cxl_hdm_find_target (cache_mem, addr, &target); +if (!target_found) { +return NULL ; + } - rp =pcie_find_port_by_pn (hb->bus, target); -if (!rp) { -return NULL ; - } + rp =pcie_find_port_by_pn (hb->bus, target); +if (!rp) { +return NULL ; } d =pci_bridge_get_sec_bus (PCI_BRIDGE (rp))->devices[0 ];
hw/pci-bridge/pci_expander_bridge.c +5 -39
87 lines not on this page · raw message
Signature · 1 line
2.31.1
PATCH 2/2 meson_options.txt: Enable qom-cast-debug by default again
In reply to Thomas HuthThis switch had been disabled by default by accident in commit c55cf6ab03f. But we should enable it by default instead to avoid regressions in the QOM device hierarchy.
--- meson_options.txt | 2 +- scripts/meson-buildoptions.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
meson_options.txt +1 -1
@@ -315,7 +315,7 @@ option('debug_mutex', type: 'boolean', value: false, description: 'mutex debugging support') option('debug_stack_usage', type: 'boolean', value: false, description: 'measure coroutine stack usage') -option('qom_cast_debug', type: 'boolean', value: false, +option('qom_cast_debug', type: 'boolean', value: true, description: 'cast debugging support') option('gprof', type: 'boolean', value: false, description: 'QEMU profiling with gprof',
scripts/meson-buildoptions.sh +1 -1
@@ -14,6 +14,7 @@ meson_options_help() { printf "%s\n" ' use idef-parser to automatically generate TCG' printf "%s\n" ' code for the Hexagon frontend' printf "%s\n" ' --disable-install-blobs install provided firmware blobs' + printf "%s\n" ' --disable-qom-cast-debug cast debugging support' printf "%s\n" ' --docdir=VALUE Base directory for documentation installation' printf "%s\n" ' (can be empty) [share/doc]' printf "%s\n" ' --enable-block-drv-whitelist-in-tools'
@@ -35,7 +36,6 @@ meson_options_help() { printf "%s\n" ' --enable-module-upgrades try to load modules from alternate paths for' printf "%s\n" ' upgrades' printf "%s\n" ' --enable-profiler profiler support' - printf "%s\n" ' --enable-qom-cast-debug cast debugging support' printf "%s\n" ' --enable-rng-none dummy RNG, avoid using /dev/(u)random and' printf "%s\n" ' getrandom()' printf "%s\n" ' --enable-strip Strip targets on install'
Signature · 1 line
2.31.1
Re: [PATCH 2/2] meson_options.txt: Enable qom-cast-debug by default again
Quoted 11 lines · Thomas Huth
This switch had been disabled by default by accident in commit
c55cf6ab03f. But we should enable it by default instead to avoid regressions in the QOM device hierarchy.Fixes c55cf6ab03 ("configure, meson: move some default-disabled options to meson_options.txt")Signed-off-by Thomas Huth <[email protected]>--- meson_options.txt | 2 +- scripts/meson-buildoptions.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
thanks
-- PMM
Re: [PATCH 2/2] meson_options.txt: Enable qom-cast-debug by default again
In reply to Thomas HuthQuoted 10 lines · Thomas Huth
This switch had been disabled by default by accident in commit
c55cf6ab03f. But we should enable it by default instead to avoid regressions in the QOM device hierarchy.Fixes c55cf6ab03 ("configure, meson: move some default-disabled options to meson_options.txt")Signed-off-by Thomas Huth <[email protected]>--- meson_options.txt | 2 +- scripts/meson-buildoptions.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)