qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Chen Miao" <chenmiao@openatom.club>
To: <zhao1.liu@intel.com>, <pbonzini@redhat.com>,
	 <manos.pitsidianakis@linaro.org>, <richard.henderson@linaro.org>,
	 <philmd@linaro.org>
Cc: <chao.liu@openatom.club>, <dzm91@openatom.club>,
	<qemu-rust@nongnu.org>,  <qemu-devel@nongnu.org>,
	<hust-os-kernel-patches@googlegroups.com>
Subject: [RFC PATCH V3 0/4] rust/hw: Add the I2C and the first GPIO device
Date: Sat, 29 Nov 2025 14:28:18 +0000	[thread overview]
Message-ID: <cover.1764426204.git.chenmiao@openatom.club> (raw)

We have implemented I2C and the first GPIO device in Rust for QEMU.
Additionally, in the respective patches, we have shared our insights and
experiences regarding the use of Rust for device modeling within QEMU.

1. The first patch implements the BusState for the I2CBus infrastructure.
2. The second patch implements the I2CBus and I2CSlave infrastructure, along
   with a discussion of the challenges encountered during the implementation.
3. The third patch provides a set of necessary helper functions for the PCF8574
   GPIO device.
4. The fourth patch implements the PCF8574 GPIO device, along with a discussion
   of the issues and considerations addressed during the implementation.

Signed-off-by: Chen Miao <chenmiao@openatom.club>
Signed-off-by: Chao Liu <chao.liu@openatom.club>

chenmiao (4):
  rust/hw/core: Add the BusState of rust version
  rust/hw/core: Add rust bindings/funcs for i2c bus
  rust/hw/core: Provide some interfaces for the GPIO device
  rust/hw/gpio: Add the the first gpio device pcf8574

 hw/gpio/Kconfig                  |   5 +
 hw/gpio/meson.build              |   2 +-
 rust/Cargo.lock                  |  18 +-
 rust/Cargo.toml                  |   1 +
 rust/hw/Kconfig                  |   1 +
 rust/hw/core/meson.build         |   2 +
 rust/hw/core/src/bus.rs          |  44 +++++
 rust/hw/core/src/i2c.rs          | 303 +++++++++++++++++++++++++++++++
 rust/hw/core/src/lib.rs          |   6 +
 rust/hw/core/src/qdev.rs         |  17 +-
 rust/hw/core/wrapper.h           |   1 +
 rust/hw/gpio/Kconfig             |   2 +
 rust/hw/gpio/meson.build         |   1 +
 rust/hw/gpio/pcf8574/Cargo.toml  |  28 +++
 rust/hw/gpio/pcf8574/meson.build |  37 ++++
 rust/hw/gpio/pcf8574/src/lib.rs  | 178 ++++++++++++++++++
 rust/hw/meson.build              |   1 +
 17 files changed, 642 insertions(+), 5 deletions(-)
 create mode 100644 rust/hw/core/src/bus.rs
 create mode 100644 rust/hw/core/src/i2c.rs
 create mode 100644 rust/hw/gpio/Kconfig
 create mode 100644 rust/hw/gpio/meson.build
 create mode 100644 rust/hw/gpio/pcf8574/Cargo.toml
 create mode 100644 rust/hw/gpio/pcf8574/meson.build
 create mode 100644 rust/hw/gpio/pcf8574/src/lib.rs

-- 
2.43.0


WARNING: multiple messages have this Message-ID (diff)
From: ChenMiao <chenmiao.ku@gmail.com>
To: zhao1.liu@intel.com, pbonzini@redhat.com,
	manos.pitsidianakis@linaro.org, richard.henderson@linaro.org,
	philmd@linaro.org
Cc: chao.liu@openatom.club , dzm91@openatom.club ,
	qemu-rust@nongnu.org, qemu-devel@nongnu.org,
	hust-os-kernel-patches@googlegroups.com,
	Chen Miao <chenmiao@openatom.club>
Subject: [RESEND RFC PATCH V3 0/4] rust/hw: Add the I2C and the first GPIO device
Date: Sat, 29 Nov 2025 15:43:17 +0000	[thread overview]
Message-ID: <cover.1764426204.git.chenmiao@openatom.club> (raw)
Message-ID: <20251129154317.Y3Ltw-zSfrhheY2s6yShR8I4H3a2sqbSg50IHDBsPOc@z> (raw)

From: Chen Miao <chenmiao@openatom.club>

We have implemented I2C and the first GPIO device in Rust for QEMU.
Additionally, in the respective patches, we have shared our insights and
experiences regarding the use of Rust for device modeling within QEMU.

1. The first patch implements the BusState for the I2CBus infrastructure.
2. The second patch implements the I2CBus and I2CSlave infrastructure, along
   with a discussion of the challenges encountered during the implementation.
3. The third patch provides a set of necessary helper functions for the PCF8574
   GPIO device.
4. The fourth patch implements the PCF8574 GPIO device, along with a discussion
   of the issues and considerations addressed during the implementation.

Signed-off-by: Chen Miao <chenmiao@openatom.club>
Signed-off-by: Chao Liu <chao.liu@openatom.club>

chenmiao (4):
  rust/hw/core: Add the BusState of rust version
  rust/hw/core: Add rust bindings/funcs for i2c bus
  rust/hw/core: Provide some interfaces for the GPIO device
  rust/hw/gpio: Add the the first gpio device pcf8574

 hw/gpio/Kconfig                  |   5 +
 hw/gpio/meson.build              |   2 +-
 rust/Cargo.lock                  |  18 +-
 rust/Cargo.toml                  |   1 +
 rust/hw/Kconfig                  |   1 +
 rust/hw/core/meson.build         |   2 +
 rust/hw/core/src/bus.rs          |  44 +++++
 rust/hw/core/src/i2c.rs          | 303 +++++++++++++++++++++++++++++++
 rust/hw/core/src/lib.rs          |   6 +
 rust/hw/core/src/qdev.rs         |  17 +-
 rust/hw/core/wrapper.h           |   1 +
 rust/hw/gpio/Kconfig             |   2 +
 rust/hw/gpio/meson.build         |   1 +
 rust/hw/gpio/pcf8574/Cargo.toml  |  28 +++
 rust/hw/gpio/pcf8574/meson.build |  37 ++++
 rust/hw/gpio/pcf8574/src/lib.rs  | 178 ++++++++++++++++++
 rust/hw/meson.build              |   1 +
 17 files changed, 642 insertions(+), 5 deletions(-)
 create mode 100644 rust/hw/core/src/bus.rs
 create mode 100644 rust/hw/core/src/i2c.rs
 create mode 100644 rust/hw/gpio/Kconfig
 create mode 100644 rust/hw/gpio/meson.build
 create mode 100644 rust/hw/gpio/pcf8574/Cargo.toml
 create mode 100644 rust/hw/gpio/pcf8574/meson.build
 create mode 100644 rust/hw/gpio/pcf8574/src/lib.rs

-- 
2.43.0



             reply	other threads:[~2025-11-29 14:30 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-11-29 14:28 Chen Miao [this message]
2025-11-29 14:28 ` [RFC PATCH V3 1/4] rust/hw/core: Add the BusState of rust version Chen Miao
2025-11-29 15:43   ` [RESEND RFC " ChenMiao
2025-11-29 14:28 ` [RFC PATCH V3 2/4] rust/hw/core: Add rust bindings/funcs for i2c bus Chen Miao
2025-11-29 15:43   ` [RESEND RFC " ChenMiao
2025-11-29 14:28 ` [RFC PATCH V3 3/4] rust/hw/core: Provide some interfaces for the GPIO device Chen Miao
2025-11-29 15:43   ` [RESEND RFC " ChenMiao
2025-11-29 14:28 ` [RFC PATCH V3 4/4] rust/hw/gpio: Add the the first gpio device pcf8574 Chen Miao
2025-11-29 15:43   ` [RESEND RFC " ChenMiao
2025-11-29 15:43 ` [RESEND RFC PATCH V3 0/4] rust/hw: Add the I2C and the first GPIO device ChenMiao

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=cover.1764426204.git.chenmiao@openatom.club \
    --to=chenmiao@openatom.club \
    --cc=chao.liu@openatom.club \
    --cc=dzm91@openatom.club \
    --cc=hust-os-kernel-patches@googlegroups.com \
    --cc=manos.pitsidianakis@linaro.org \
    --cc=pbonzini@redhat.com \
    --cc=philmd@linaro.org \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-rust@nongnu.org \
    --cc=richard.henderson@linaro.org \
    --cc=zhao1.liu@intel.com \
    /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).