qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/2] fix broken pxb-cxl realization
@ 2023-04-21 12:41 Daniel P. Berrangé
  2023-04-21 12:41 ` [PATCH 1/2] hw/pci-bridge: fix cast for pxb-cxl dev realization Daniel P. Berrangé
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Daniel P. Berrangé @ 2023-04-21 12:41 UTC (permalink / raw)
  To: qemu-devel
  Cc: Marcel Apfelbaum, Thomas Huth, Beraldo Leal, Eduardo Lima,
	Wainer dos Santos Moschetta, Michael S. Tsirkin,
	Philippe Mathieu-Daudé, Alex Bennée,
	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

 .gitlab-ci.d/buildtest-template.yml | 1 +
 hw/pci-bridge/pci_expander_bridge.c | 2 +-
 2 files changed, 2 insertions(+), 1 deletion(-)

-- 
2.39.1



^ permalink raw reply	[flat|nested] 6+ messages in thread

* [PATCH 1/2] hw/pci-bridge: fix cast for pxb-cxl dev realization
  2023-04-21 12:41 [PATCH 0/2] fix broken pxb-cxl realization Daniel P. Berrangé
@ 2023-04-21 12:41 ` Daniel P. Berrangé
  2023-04-21 12:47   ` Thomas Huth
  2023-04-21 12:41 ` [PATCH 2/2] gitlab: run all jobs with QOM debugging enabled Daniel P. Berrangé
  2023-04-21 13:03 ` [PATCH 0/2] fix broken pxb-cxl realization Peter Maydell
  2 siblings, 1 reply; 6+ messages in thread
From: Daniel P. Berrangé @ 2023-04-21 12:41 UTC (permalink / raw)
  To: qemu-devel
  Cc: Marcel Apfelbaum, Thomas Huth, Beraldo Leal, Eduardo Lima,
	Wainer dos Santos Moschetta, Michael S. Tsirkin,
	Philippe Mathieu-Daudé, Alex Bennée,
	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 pxb

This is seen when running 'tests/qtest/cxl-test'

Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
---
 hw/pci-bridge/pci_expander_bridge.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/hw/pci-bridge/pci_expander_bridge.c b/hw/pci-bridge/pci_expander_bridge.c
index ead33f0c05..a78327b5f2 100644
--- a/hw/pci-bridge/pci_expander_bridge.c
+++ b/hw/pci-bridge/pci_expander_bridge.c
@@ -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 */
-- 
2.39.1



^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [PATCH 2/2] gitlab: run all jobs with QOM debugging enabled
  2023-04-21 12:41 [PATCH 0/2] fix broken pxb-cxl realization Daniel P. Berrangé
  2023-04-21 12:41 ` [PATCH 1/2] hw/pci-bridge: fix cast for pxb-cxl dev realization Daniel P. Berrangé
@ 2023-04-21 12:41 ` Daniel P. Berrangé
  2023-04-21 12:54   ` Thomas Huth
  2023-04-21 13:03 ` [PATCH 0/2] fix broken pxb-cxl realization Peter Maydell
  2 siblings, 1 reply; 6+ messages in thread
From: Daniel P. Berrangé @ 2023-04-21 12:41 UTC (permalink / raw)
  To: qemu-devel
  Cc: Marcel Apfelbaum, Thomas Huth, Beraldo Leal, Eduardo Lima,
	Wainer dos Santos Moschetta, Michael S. Tsirkin,
	Philippe Mathieu-Daudé, Alex Bennée,
	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é <berrange@redhat.com>
---
 .gitlab-ci.d/buildtest-template.yml | 1 +
 1 file changed, 1 insertion(+)

diff --git a/.gitlab-ci.d/buildtest-template.yml b/.gitlab-ci.d/buildtest-template.yml
index a6cfe9be97..9151dece6f 100644
--- a/.gitlab-ci.d/buildtest-template.yml
+++ b/.gitlab-ci.d/buildtest-template.yml
@@ -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; }
-- 
2.39.1



^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [PATCH 1/2] hw/pci-bridge: fix cast for pxb-cxl dev realization
  2023-04-21 12:41 ` [PATCH 1/2] hw/pci-bridge: fix cast for pxb-cxl dev realization Daniel P. Berrangé
@ 2023-04-21 12:47   ` Thomas Huth
  0 siblings, 0 replies; 6+ messages in thread
From: Thomas Huth @ 2023-04-21 12:47 UTC (permalink / raw)
  To: Daniel P. Berrangé, qemu-devel
  Cc: Marcel Apfelbaum, Beraldo Leal, Eduardo Lima,
	Wainer dos Santos Moschetta, Michael S. Tsirkin,
	Philippe Mathieu-Daudé, Alex Bennée, Jonathan Cameron,
	Peter Maydell

On 21/04/2023 14.41, Daniel P. Berrangé wrote:
> 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'
> 
> Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
> ---
>   hw/pci-bridge/pci_expander_bridge.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/hw/pci-bridge/pci_expander_bridge.c b/hw/pci-bridge/pci_expander_bridge.c
> index ead33f0c05..a78327b5f2 100644
> --- a/hw/pci-bridge/pci_expander_bridge.c
> +++ b/hw/pci-bridge/pci_expander_bridge.c
> @@ -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/20230420142750.6950-2-Jonathan.Cameron@huawei.com/

  Thomas



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH 2/2] gitlab: run all jobs with QOM debugging enabled
  2023-04-21 12:41 ` [PATCH 2/2] gitlab: run all jobs with QOM debugging enabled Daniel P. Berrangé
@ 2023-04-21 12:54   ` Thomas Huth
  0 siblings, 0 replies; 6+ messages in thread
From: Thomas Huth @ 2023-04-21 12:54 UTC (permalink / raw)
  To: Daniel P. Berrangé, qemu-devel
  Cc: Marcel Apfelbaum, Beraldo Leal, Eduardo Lima,
	Wainer dos Santos Moschetta, Michael S. Tsirkin,
	Philippe Mathieu-Daudé, Alex Bennée

On 21/04/2023 14.41, Daniel P. Berrangé wrote:
> 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é <berrange@redhat.com>
> ---
>   .gitlab-ci.d/buildtest-template.yml | 1 +
>   1 file changed, 1 insertion(+)
> 
> diff --git a/.gitlab-ci.d/buildtest-template.yml b/.gitlab-ci.d/buildtest-template.yml
> index a6cfe9be97..9151dece6f 100644
> --- a/.gitlab-ci.d/buildtest-template.yml
> +++ b/.gitlab-ci.d/buildtest-template.yml
> @@ -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/20230417130037.236747-3-thuth@redhat.com/

  Thomas



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH 0/2] fix broken pxb-cxl realization
  2023-04-21 12:41 [PATCH 0/2] fix broken pxb-cxl realization Daniel P. Berrangé
  2023-04-21 12:41 ` [PATCH 1/2] hw/pci-bridge: fix cast for pxb-cxl dev realization Daniel P. Berrangé
  2023-04-21 12:41 ` [PATCH 2/2] gitlab: run all jobs with QOM debugging enabled Daniel P. Berrangé
@ 2023-04-21 13:03 ` Peter Maydell
  2 siblings, 0 replies; 6+ messages in thread
From: Peter Maydell @ 2023-04-21 13:03 UTC (permalink / raw)
  To: Daniel P. Berrangé
  Cc: qemu-devel, Marcel Apfelbaum, Thomas Huth, Beraldo Leal,
	Eduardo Lima, Wainer dos Santos Moschetta, Michael S. Tsirkin,
	Philippe Mathieu-Daudé, Alex Bennée

On Fri, 21 Apr 2023 at 13:42, Daniel P. Berrangé <berrange@redhat.com> wrote:
>
> 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


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2023-04-21 13:04 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-04-21 12:41 [PATCH 0/2] fix broken pxb-cxl realization Daniel P. Berrangé
2023-04-21 12:41 ` [PATCH 1/2] hw/pci-bridge: fix cast for pxb-cxl dev realization Daniel P. Berrangé
2023-04-21 12:47   ` Thomas Huth
2023-04-21 12:41 ` [PATCH 2/2] gitlab: run all jobs with QOM debugging enabled Daniel P. Berrangé
2023-04-21 12:54   ` Thomas Huth
2023-04-21 13:03 ` [PATCH 0/2] fix broken pxb-cxl realization Peter Maydell

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).