qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Philippe Mathieu-Daudé" <philmd@linaro.org>
To: Paz Offer <poffer@nvidia.com>,
	"qemu-devel@nongnu.org" <qemu-devel@nongnu.org>
Subject: Re: How do I enumerate devices connected to i2c busses on running QEMU?
Date: Wed, 6 Mar 2024 17:27:05 +0100	[thread overview]
Message-ID: <fc7756ff-e810-47a6-af10-93e5edaab899@linaro.org> (raw)
In-Reply-To: <MW4PR12MB699791410D2714B76FE8E863A0212@MW4PR12MB6997.namprd12.prod.outlook.com>

Hi Paz,

On 6/3/24 12:44, Paz Offer wrote:
> Hi,
> 
> I want to enumerate all devices connected to i2c busses in running QEMU 
> hosting Linux.
> I understand I need to use 'qom-list' and 'qom-get' in monitor mode, but 
> I did not find documentation on how to use them for specific information.

Try "info qtree":

$ qemu-system-i386 -M q35 -S -monitor stdio
(qemu) help info qtree
info qtree  -- show device tree
(qemu) info qtree
bus: main-system-bus
   type System
   dev: q35-pcihost, id ""
     bus: pcie.0
       dev: ICH9-SMB, id ""
         bus: i2c
           type i2c-bus
           dev: smbus-eeprom, id ""
             address = 87 (0x57)
           dev: smbus-eeprom, id ""
             address = 86 (0x56)
           dev: smbus-eeprom, id ""
             address = 85 (0x55)
           dev: smbus-eeprom, id ""
             address = 84 (0x54)
           dev: smbus-eeprom, id ""
             address = 83 (0x53)
           dev: smbus-eeprom, id ""
             address = 82 (0x52)
           dev: smbus-eeprom, id ""
             address = 81 (0x51)
           dev: smbus-eeprom, id ""
             address = 80 (0x50)

> 
> Thanks for any tip,
> Paz



      reply	other threads:[~2024-03-06 16:27 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-03-06 11:44 How do I enumerate devices connected to i2c busses on running QEMU? Paz Offer
2024-03-06 16:27 ` Philippe Mathieu-Daudé [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=fc7756ff-e810-47a6-af10-93e5edaab899@linaro.org \
    --to=philmd@linaro.org \
    --cc=poffer@nvidia.com \
    --cc=qemu-devel@nongnu.org \
    /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 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).