Re: qemu aarch64 virt sdcard

2022-01-18 Thread Peter Maydell
On Tue, 18 Jan 2022 at 18:13, Schultschik, Sven
 wrote:
> I try to add an eMMC to a qemu aarch64 virt machine. This for I try to use 
> the type if=sd but it fails and I don’t find any hint, how to do it properly.

This is because the virt board doesn't have an SD controller.

> So I search now a while how I could add a sd-card, mmc, emmc drive to a virt 
> machine type.#
>
>
>
> Or is there another way to add such a drive? I need it for the secure boot 
> optee RPMB setup.

You could try plugging in the PCI SD controller with '-device pc-sdhci'
and then plugging the emulated SD card into that. But if you can
I would really recommend not trying to use SD card. Use some other
kind of block device -- surely OPTEE has support for other kinds
of disk ?

thanks
-- PMM



Re: qemu aarch64 virt sdcard

2022-01-20 Thread Peter Maydell
On Wed, 19 Jan 2022 at 18:50, Schultschik, Sven
 wrote:
>
> Actually I try to emulate a real eMMC. I thought an sdcard would be 
> sufficient, but I'm not sure.
>
> eMMC (Embedded Multi Media Card) has a feature called RPMB (Replay Protected 
> Memory Block).
>
> Now if I think more about it I should rephrase the question.
>
> How to configure qemu to emulate an eMMC drive?

We don't support RPMB for our SD/MMC card model. We only have an
"SD or MMC-like" card model, which as I say you can try putting into
a virt board with the PCI SD controller; but if the RPMB support
is a requirement for you you would need to also implement that
handling in QEMU's SD/MMC card model.

thanks
-- PMM