All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Cédric Le Goater" <clg@redhat.com>
To: Emmanuel Blot <emmanuel.blot@free.fr>, qemu-devel@nongnu.org
Cc: "Philippe Mathieu-Daudé" <philmd@mailo.com>,
	"Peter Maydell" <peter.maydell@linaro.org>,
	"Steven Lee" <steven_lee@aspeedtech.com>,
	"Jamin Lin" <jamin_lin@aspeedtech.com>,
	"Kane Chen" <kane_chen@aspeedtech.com>,
	"Andrew Jeffery" <andrew@codeconstruct.com.au>,
	"Joel Stanley" <joel@jms.id.au>,
	qemu-arm@nongnu.org, "Fabiano Rosas" <farosas@suse.de>,
	"Laurent Vivier" <lvivier@redhat.com>,
	"Paolo Bonzini" <pbonzini@redhat.com>,
	"Thomas Huth" <th.huth+qemu@posteo.eu>,
	"Daniel P. Berrangé" <berrange@redhat.com>,
	"Emmanuel Blot" <eblot@meta.com>,
	"Markus Armbruster" <armbru@redhat.com>
Subject: Re: [PATCH v2 00/25] hw/arm: Facebook SanMiguel BMC and TMP75-family sensors
Date: Wed, 2 Sep 2026 08:19:36 +0200	[thread overview]
Message-ID: <a3b97fdb-562c-4db1-b754-0dacfea253b8@redhat.com> (raw)
In-Reply-To: <20260731-sanmiguel-bmc-locator-v2-0-1266926ba769@free.fr>

On 7/31/26 12:44, Emmanuel Blot wrote:
> This series adds the Facebook SanMiguel BMC, promotes the
> TMP75/TMP175/LM75B sensors from generic TMP105 stand-ins to improved,
> dedicated models, and introduces the test-side plumbing needed to
> exercise real I2C devices from functional tests without hardcoding QOM
> paths.
> 
> The work falls into four parts.
> 
> 1. TMP* sensor models
> 
> The TMP105 model was the only stand-in for a whole family of pin- and
> register-compatible parts, and several boards worked around the gap with
> private TYPE_TMP75 / TYPE_LM75 aliases that resolved back to a plain
> TMP105.
> 
> The model is first cleaned up for correctness and QEMU convention. One
> of those changes touches migrated state, which gains an optional
> subsection so existing streams stay compatible.
> 
> On that base, TMP75/TMP175/LM75B become variants selected by a small
> per-type class descriptor. The variant is class data, so the wire format
> is unchanged and all variants share the existing vmstate. qtest coverage
> is added for the per-variant behaviour. The existing BMC boards then
> drop their local aliases and instantiate the real models.
> 
> 2. SanMiguel BMC
> 
> A new AST2600-based machine for the Facebook SanMiguel BMC, derived from
> its device tree. It wires up three TMP75 sensors, IO expanders, FRU
> EEPROMs, an I2C mux and an RTC across its I2C buses, and provides its
> RAM, flash and networking; the FRU EEPROMs are populated with data read
> from physical hardware. A functional test boots the OpenBMC image and
> drives each sensor over QOM, checking the guest hwmon interface reports
> the injected value back.
> 
> 3. Python device locator
> 
> A QOM path names a device by its position under the object that owns it,
> in enumeration order — it says nothing about where the device sits in
> the bus topology. From a QOM path alone it is impossible to tell where a
> device is actually connected or what purpose it serves.
> 
> DeviceLocator is a pure-Python helper that resolves a device from a
> string descriptor of its position — bus, address, type, on-bus index —
> by walking the bus/device hierarchy. It uses only standard QOM queries
> over QMP: no new QEMU commands, no model changes. A self-check exercises
> the grammar and its error paths against a paused SanMiguel BMC; it needs
> no disk image and runs in about a second.
> 
> Note: the helper adopts the 3.10 type-hint syntax rather than the 3.9
> equivalents; 3.9 reached end of life on 2025-10-31. The import is
> guarded so the module still loads on 3.9 and dependent tests skip there.
> 
> Two small test-framework fixes ride along: the set_machine probe VM now
> gets the per-test workdir instead of the hardcoded /var/tmp default, and
> the Aspeed OpenBMC helper can optionally assert the booted device-tree
> model.
> 
> 4. Catalina follow-ups
> 
> The final three commits are the tail of the earlier "hw/arm: improve
> Aspeed Catalina BMC emulation" series: functional tests for the PCA9555
> and PCA9554 IO expanders, plus the PCA9554 change that drives its input
> pins externally. They were held back because reaching such devices from
> a test needs a stable way to reference them by bus position — the QOM
> re-parenting patch tried then was rejected, and the device locator now
> unblocks them.
> 
> Based on:
> 
>    repo:   https://github.com/legoater/qemu.git
>    branch: aspeed-11.1
>    commit: 04d27371e3 ("hw/arm: catalina: add NIC and FIO temperature sensors")
> 
> Signed-off-by: Emmanuel Blot <emmanuel.blot@free.fr>
> ---
> Changes in v2:
> - Simplify TMP105 multiple variant initialization
> - Improve reliability against malformed device locator strings
> - Remove an obsolete reference to INA23x devices from a commit log message
> - Rebase patch series on aspeed-next branch
> - Fix invalid JSON syntax in SanMiguel FRU descriptions
> - Link to v1: https://lore.kernel.org/qemu-devel/20260729-sanmiguel-bmc-locator-v1-0-c8f9a8d101f6@free.fr
> 
> To: qemu-devel@nongnu.org
> Cc: Philippe Mathieu-Daudé <philmd@mailo.com>
> Cc: Cédric Le Goater <clg@kaod.org>
> Cc: Peter Maydell <peter.maydell@linaro.org>
> Cc: Steven Lee <steven_lee@aspeedtech.com>
> Cc: Jamin Lin <jamin_lin@aspeedtech.com>
> Cc: Kane Chen <kane_chen@aspeedtech.com>
> Cc: Andrew Jeffery <andrew@codeconstruct.com.au>
> Cc: Joel Stanley <joel@jms.id.au>
> Cc: qemu-arm@nongnu.org
> Cc: Fabiano Rosas <farosas@suse.de>
> Cc: Laurent Vivier <lvivier@redhat.com>
> Cc: Paolo Bonzini <pbonzini@redhat.com>
> Cc: Thomas Huth <th.huth+qemu@posteo.eu>
> Cc: "Daniel P. Berrangé" <berrange@redhat.com>
> 
> ---
> Emmanuel Blot (25):
>        hw/sensor: tmp105: make device state private to the implementation
>        hw/sensor: tmp105: name the parent object field parent_obj
>        hw/sensor: tmp105: implement Resettable reset
>        hw/sensor: tmp105: enforce the configurable fault queue
>        hw/sensor: tmp105: describe the temperature property
>        hw/arm: aspeed: guard board-local temperature-sensor aliases
>        hw/sensor: tmp105: add TMP75, TMP175 and LM75B variants
>        tests/qtest: tmp105: cover the ALERT fault queue
>        tests/qtest: tmp105: cover the TMP75, TMP175 and LM75B variants
>        tests/qtest: tmp105: cover one-shot and fault-queue write immunity
>        tests/qtest: tmp105: cover shutdown clearing the ALERT across variants
>        hw/arm: sanmiguel: add Facebook SanMiguel BMC machine
>        hw/arm: sanmiguel: populate EEPROM data
>        hw/arm: catalina: use the real TMP75 model
>        hw/arm: fuji: use the real TMP75 and LM75B temperature sensors
>        tests/functional: aspeed: optionally check the device tree model on boot
>        tests/functional: give the set_machine probe VM the test workdir
>        tests/functional: add a pure-Python device-locator resolver
>        tests/functional: add a device-locator self-check
>        tests/functional: aspeed: add hwmon sensor read helpers
>        tests/functional/arm: sanmiguel: add BMC boot test
>        tests/functional/arm: catalina: test TMP75
>        tests/functional/arm: catalina: test PCA9555 IO expander via QOM
>        hw/arm: catalina: drive pca9554 io expander input pins externally
>        tests/functional/arm: catalina: test PCA9554 IO expander via QOM
> 
>   hw/arm/aspeed_ast2600_catalina.c              |  14 +-
>   hw/arm/aspeed_ast2600_fuji.c                  |  16 +-
>   hw/arm/aspeed_ast2600_sanmiguel.c             | 405 ++++++++++++++++++
>   hw/arm/meson.build                            |   1 +
>   hw/sensor/tmp105.c                            | 304 ++++++++++---
>   include/hw/sensor/tmp105.h                    |  46 +-
>   tests/functional/arm/meson.build              |   3 +
>   tests/functional/arm/test_aspeed_catalina.py  | 107 ++++-
>   tests/functional/arm/test_aspeed_sanmiguel.py |  72 ++++
>   tests/functional/arm/test_device_locator.py   | 120 ++++++
>   tests/functional/aspeed.py                    |  21 +-
>   tests/functional/qemu_test/locator.py         | 586 ++++++++++++++++++++++++++
>   tests/functional/qemu_test/testcase.py        |   2 +-
>   tests/qtest/tmp105-test.c                     | 359 ++++++++++++++++
>   14 files changed, 1934 insertions(+), 122 deletions(-)
> ---
> base-commit: e5d3f5ac8633de310066f14862b17e4cac8ef8a5
> change-id: 20260729-sanmiguel-bmc-locator-db13cceae66c
> 
> Best regards,
> --
> Emmanuel Blot <emmanuel.blot@free.fr>
> 

Applied 1-16 to

     https://github.com/legoater/qemu aspeed-next


Functional tests need to identify devices in the bus topology and
we lack support for that. Several recent threads have touched this
topic:

   - "[PATCH v5 0/8] hw/sensor: Add new device emulation for TI ADC128D818" [1]
   - "Call to clean up QOM onboard devices lacking a parent" [2]
   - "[PATCH RFC 001/134] qom: Introduce object_new_child()" [3]
   - "[PATCH RFC v2 0/137] qom: Make composition-tree parenting mandatory" [4]
   - "[PATCH v2 0/25] hw/arm: Facebook SanMiguel BMC and TMP75-family sensors" [5]

Not addressed yet. It's still maturing, like all the good stuff.

Thanks,

C.

[1] https://lore.kernel.org/qemu-devel/20260701-i2c-adc128d818-anacapa-v5-6-fe8292d86b38@free.fr
[2] https://lore.kernel.org/qemu-devel/87se5scipx.fsf@pond.sub.org
[3] https://lore.kernel.org/qemu-devel/20260711223707.42139-1-graf@amazon.com
[4] https://lore.kernel.org/qemu-devel/20260718213652.37673-1-graf@amazon.com
[5] https://lore.kernel.org/qemu-devel/20260731-sanmiguel-bmc-locator-v2-0-1266926ba769@free.fr



      parent reply	other threads:[~2026-09-02  6:20 UTC|newest]

Thread overview: 74+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-07-31 10:44 [PATCH v2 00/25] hw/arm: Facebook SanMiguel BMC and TMP75-family sensors Emmanuel Blot via
2026-07-31 10:44 ` Emmanuel Blot via qemu development
2026-07-31 10:45 ` [PATCH v2 01/25] hw/sensor: tmp105: make device state private to the implementation Emmanuel Blot via
2026-07-31 10:45   ` Emmanuel Blot via qemu development
2026-09-01  6:58   ` Cédric Le Goater
2026-07-31 10:45 ` [PATCH v2 02/25] hw/sensor: tmp105: name the parent object field parent_obj Emmanuel Blot via
2026-07-31 10:45   ` Emmanuel Blot via qemu development
2026-09-01  6:58   ` Cédric Le Goater
2026-07-31 10:45 ` [PATCH v2 03/25] hw/sensor: tmp105: implement Resettable reset Emmanuel Blot via
2026-07-31 10:45   ` Emmanuel Blot via qemu development
2026-09-01  6:58   ` Cédric Le Goater
2026-07-31 10:45 ` [PATCH v2 04/25] hw/sensor: tmp105: enforce the configurable fault queue Emmanuel Blot via qemu development
2026-07-31 10:45   ` Emmanuel Blot via
2026-09-01  6:59   ` Cédric Le Goater
2026-07-31 10:45 ` [PATCH v2 05/25] hw/sensor: tmp105: describe the temperature property Emmanuel Blot via
2026-07-31 10:45   ` Emmanuel Blot via qemu development
2026-09-01  6:59   ` Cédric Le Goater
2026-07-31 10:45 ` [PATCH v2 06/25] hw/arm: aspeed: guard board-local temperature-sensor aliases Emmanuel Blot via qemu development
2026-07-31 10:45   ` Emmanuel Blot via
2026-09-01  6:59   ` Cédric Le Goater
2026-07-31 10:45 ` [PATCH v2 07/25] hw/sensor: tmp105: add TMP75, TMP175 and LM75B variants Emmanuel Blot via qemu development
2026-07-31 10:45   ` Emmanuel Blot via
2026-09-01  6:59   ` Cédric Le Goater
2026-07-31 10:45 ` [PATCH v2 08/25] tests/qtest: tmp105: cover the ALERT fault queue Emmanuel Blot via
2026-07-31 10:45   ` Emmanuel Blot via qemu development
2026-09-01  6:59   ` Cédric Le Goater
2026-07-31 10:45 ` [PATCH v2 09/25] tests/qtest: tmp105: cover the TMP75, TMP175 and LM75B variants Emmanuel Blot via
2026-07-31 10:45   ` Emmanuel Blot via qemu development
2026-09-01  6:59   ` Cédric Le Goater
2026-07-31 10:45 ` [PATCH v2 10/25] tests/qtest: tmp105: cover one-shot and fault-queue write immunity Emmanuel Blot via
2026-07-31 10:45   ` Emmanuel Blot via qemu development
2026-09-01  6:59   ` Cédric Le Goater
2026-07-31 10:45 ` [PATCH v2 11/25] tests/qtest: tmp105: cover shutdown clearing the ALERT across variants Emmanuel Blot via qemu development
2026-07-31 10:45   ` Emmanuel Blot via
2026-09-01  7:00   ` Cédric Le Goater
2026-07-31 10:45 ` [PATCH v2 12/25] hw/arm: sanmiguel: add Facebook SanMiguel BMC machine Emmanuel Blot via
2026-07-31 10:45   ` Emmanuel Blot via qemu development
2026-07-31 10:45 ` [PATCH v2 13/25] hw/arm: sanmiguel: populate EEPROM data Emmanuel Blot via qemu development
2026-07-31 10:45   ` Emmanuel Blot via
2026-09-02  5:50   ` Cédric Le Goater
2026-07-31 10:45 ` [PATCH v2 14/25] hw/arm: catalina: use the real TMP75 model Emmanuel Blot via qemu development
2026-07-31 10:45   ` Emmanuel Blot via
2026-09-02  5:50   ` Cédric Le Goater
2026-07-31 10:45 ` [PATCH v2 15/25] hw/arm: fuji: use the real TMP75 and LM75B temperature sensors Emmanuel Blot via qemu development
2026-07-31 10:45   ` Emmanuel Blot via
2026-09-02  5:50   ` Cédric Le Goater
2026-07-31 10:45 ` [PATCH v2 16/25] tests/functional: aspeed: optionally check the device tree model on boot Emmanuel Blot via
2026-07-31 10:45   ` Emmanuel Blot via qemu development
2026-09-02  5:50   ` Cédric Le Goater
2026-07-31 10:45 ` [PATCH v2 17/25] tests/functional: give the set_machine probe VM the test workdir Emmanuel Blot via
2026-07-31 10:45   ` Emmanuel Blot via qemu development
2026-09-02  5:51   ` Cédric Le Goater
2026-07-31 10:45 ` [PATCH v2 18/25] tests/functional: add a pure-Python device-locator resolver Emmanuel Blot via
2026-07-31 10:45   ` Emmanuel Blot via qemu development
2026-09-03 14:21   ` Adding /machines/labels (was Re: [PATCH v2 18/25] tests/functional: add a pure-Python device-locator resolver) Cédric Le Goater
2026-09-04  8:22     ` Markus Armbruster
2026-09-05 12:45     ` Mark Cave-Ayland
2026-09-05 15:20       ` Cédric Le Goater
2026-07-31 10:45 ` [PATCH v2 19/25] tests/functional: add a device-locator self-check Emmanuel Blot via qemu development
2026-07-31 10:45   ` Emmanuel Blot via
2026-07-31 10:45 ` [PATCH v2 20/25] tests/functional: aspeed: add hwmon sensor read helpers Emmanuel Blot via qemu development
2026-07-31 10:45   ` Emmanuel Blot via
2026-07-31 10:45 ` [PATCH v2 21/25] tests/functional/arm: sanmiguel: add BMC boot test Emmanuel Blot via
2026-07-31 10:45   ` Emmanuel Blot via qemu development
2026-07-31 10:45 ` [PATCH v2 22/25] tests/functional/arm: catalina: test TMP75 Emmanuel Blot via
2026-07-31 10:45   ` Emmanuel Blot via qemu development
2026-07-31 10:45 ` [PATCH v2 23/25] tests/functional/arm: catalina: test PCA9555 IO expander via QOM Emmanuel Blot via qemu development
2026-07-31 10:45   ` Emmanuel Blot via
2026-07-31 10:45 ` [PATCH v2 24/25] hw/arm: catalina: drive pca9554 io expander input pins externally Emmanuel Blot via qemu development
2026-07-31 10:45   ` Emmanuel Blot via
2026-07-31 10:45 ` [PATCH v2 25/25] tests/functional/arm: catalina: test PCA9554 IO expander via QOM Emmanuel Blot via qemu development
2026-07-31 10:45   ` Emmanuel Blot via
2026-08-31 14:42 ` [PING] Re: [PATCH v2 00/25] hw/arm: Facebook SanMiguel BMC and TMP75-family sensors Emmanuel Blot
2026-09-02  6:19 ` Cédric Le Goater [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=a3b97fdb-562c-4db1-b754-0dacfea253b8@redhat.com \
    --to=clg@redhat.com \
    --cc=andrew@codeconstruct.com.au \
    --cc=armbru@redhat.com \
    --cc=berrange@redhat.com \
    --cc=eblot@meta.com \
    --cc=emmanuel.blot@free.fr \
    --cc=farosas@suse.de \
    --cc=jamin_lin@aspeedtech.com \
    --cc=joel@jms.id.au \
    --cc=kane_chen@aspeedtech.com \
    --cc=lvivier@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=peter.maydell@linaro.org \
    --cc=philmd@mailo.com \
    --cc=qemu-arm@nongnu.org \
    --cc=qemu-devel@nongnu.org \
    --cc=steven_lee@aspeedtech.com \
    --cc=th.huth+qemu@posteo.eu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.