From: "Jan Lübbe" <jlu@pengutronix.de>
To: "Philippe Mathieu-Daudé" <philmd@linaro.org>,
"Daniel P. Berrangé" <berrange@redhat.com>
Cc: "Jan Kiszka" <jan.kiszka@siemens.com>,
qemu-devel <qemu-devel@nongnu.org>,
"Bin Meng" <bmeng.cn@gmail.com>,
qemu-block@nongnu.org,
"Ilias Apalodimas" <ilias.apalodimas@linaro.org>,
"Alex Bennée" <alex.bennee@linaro.org>,
"Jerome Forissier" <jerome.forissier@linaro.org>,
"Ahmad Fatoum" <afa@pengutronix.de>
Subject: Re: [PATCH v5 2/6] hw/sd/sdcard: Allow user-instantiated eMMC
Date: Thu, 30 Oct 2025 15:17:42 +0100 [thread overview]
Message-ID: <c4482a93895563f2570c1632f9d4cdd0eade1255.camel@pengutronix.de> (raw)
In-Reply-To: <e37fa4ac-b1c9-4b95-8904-7435d351f5a6@linaro.org>
On Mon, 2025-10-27 at 13:44 +0100, Philippe Mathieu-Daudé wrote:
> On 27/10/25 13:35, Daniel P. Berrangé wrote:
> > On Mon, Oct 27, 2025 at 01:23:56PM +0100, Philippe Mathieu-Daudé wrote:
> > > On 27/10/25 12:55, Daniel P. Berrangé wrote:
> > > > On Fri, Oct 17, 2025 at 02:03:54PM +0200, Jan Kiszka wrote:
> > > > > From: Jan Kiszka <jan.kiszka@siemens.com>
> > > > >
> > > > > Enable user-instantiation so that PCI-attached eMMCs can be created for
> > > > > virt machines, for QA purposes for the eMMC model itself and for complex
> > > > > firmware/OS integrations using the upcoming RPMB partition support.
> > > >
> > > > IIUC, the 'emmc' device wants an 'sd-bus' but this commit talks about
> > > > it being PCI-attached ?
> > >
> > > Sigh, it should not, but it got introduced this way and we didn't
> > > have time / energy / good reason to rework the code, which currently
> > > just works.
> > >
> > > SD / MMC cards -> plugged over external SD bus
> > >
> > > embedded MMC cards -> no SD bus, directly mmio-mapped.
> > >
> > > >
> > > > Can you elaborate on / illustrate the usage example for an end user ?
> > >
> > > Saving time by testing virtual hardware, without having to implement a
> > > real model.
> >
> > Ok, more specifically, what are the suggested QEMU command line
> > args to make use of this with PCI ?
>
> See patch #6 documentation:
>
> + -drive file=emmc.img,if=none,format=raw,id=emmc-img
> + -device sdhci-pci
> + -device
> emmc,drive=emmc-img,boot-partition-size=1048576,rpmb-partition-size=2097152
For example, our current use for an earlier variant of this can be seen here:
https://github.com/rauc/rauc/blob/master/qemu-test#L79
if "$QEMU_BIN" -device help | grep -q 'name "emmc"'; then
echo "found emmc support, enabling"
truncate -s 64M qemu-test-emmc.img
QEMU_ARGS="$QEMU_ARGS -drive if=none,id=emmc-drive,file=qemu-test-emmc.img,format=raw"
QEMU_ARGS="$QEMU_ARGS -device sdhci-pci"
QEMU_ARGS="$QEMU_ARGS -device emmc,id=emmc0,drive=emmc-drive,boot-partition-size=1048576"
fi
We enable this only if our patched version of qemu [1] is found. For ARM
bootloader (OP-TEE and barebox) development and regression testing, we'd use
this as well (with the RPMB emulation). Avoiding the need for a custom QEMU
build would help a lot. :)
Best regards,
Jan
[1] https://github.com/qemu/qemu/compare/master...jluebbe:qemu:user-emmc#diff-e90f7f7336bf488567604b94aa0a3f5d272e392bca2e1e5c33c65f094c18466d
--
Pengutronix e.K. | |
Steuerwalder Str. 21 | http://www.pengutronix.de/ |
31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
next prev parent reply other threads:[~2025-10-30 14:20 UTC|newest]
Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-10-17 12:03 [PATCH v5 0/6] sd: Add RPMB emulation to eMMC model Jan Kiszka
2025-10-17 12:03 ` [PATCH v5 1/6] hw/sd/sdcard: Fix size check for backing block image Jan Kiszka
2025-10-20 7:29 ` Cédric Le Goater
2025-10-30 22:10 ` Philippe Mathieu-Daudé
2025-10-17 12:03 ` [PATCH v5 2/6] hw/sd/sdcard: Allow user-instantiated eMMC Jan Kiszka
2025-10-27 11:55 ` Daniel P. Berrangé
2025-10-27 12:23 ` Philippe Mathieu-Daudé
2025-10-27 12:35 ` Daniel P. Berrangé
2025-10-27 12:44 ` Philippe Mathieu-Daudé
2025-10-30 14:17 ` Jan Lübbe [this message]
2025-10-27 12:45 ` Jan Lübbe
2025-10-30 16:50 ` Jan Lübbe
2025-10-30 18:10 ` Jan Kiszka
2025-10-17 12:03 ` [PATCH v5 3/6] hw/sd/sdcard: Add basic support for RPMB partition Jan Kiszka
2025-11-03 15:08 ` Philippe Mathieu-Daudé
2025-11-04 6:34 ` Jan Kiszka
2025-10-17 12:03 ` [PATCH v5 4/6] hw/sd/sdcard: Handle RPMB MAC field Jan Kiszka
2025-11-03 15:18 ` Philippe Mathieu-Daudé
2025-11-04 6:43 ` Jan Kiszka
2025-10-17 12:03 ` [PATCH v5 5/6] scripts: Add helper script to generate eMMC block device images Jan Kiszka
2025-11-03 13:12 ` Philippe Mathieu-Daudé
2025-11-04 6:30 ` Jan Kiszka
2025-11-04 9:26 ` Jan Kiszka
2025-11-04 12:33 ` Philippe Mathieu-Daudé
2025-11-04 12:40 ` Jan Kiszka
2025-11-04 14:14 ` Jan Kiszka
2025-10-17 12:03 ` [PATCH v5 6/6] docs: Add eMMC device model description Jan Kiszka
2025-11-03 13:15 ` Philippe Mathieu-Daudé
2025-10-20 7:28 ` [PATCH v5 0/6] sd: Add RPMB emulation to eMMC model Cédric Le Goater
2025-10-27 11:15 ` Jan Kiszka
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=c4482a93895563f2570c1632f9d4cdd0eade1255.camel@pengutronix.de \
--to=jlu@pengutronix.de \
--cc=afa@pengutronix.de \
--cc=alex.bennee@linaro.org \
--cc=berrange@redhat.com \
--cc=bmeng.cn@gmail.com \
--cc=ilias.apalodimas@linaro.org \
--cc=jan.kiszka@siemens.com \
--cc=jerome.forissier@linaro.org \
--cc=philmd@linaro.org \
--cc=qemu-block@nongnu.org \
--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).