qemu-block
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How to check when "raw" format driver uses a "regular" file?


From: Peter Maydell
Subject: Re: How to check when "raw" format driver uses a "regular" file?
Date: Mon, 25 Jan 2021 16:06:39 +0000

On Mon, 25 Jan 2021 at 16:03, Philippe Mathieu-Daudé <philmd@redhat.com> wrote:
> The problem is when emulating devices such NOR Flash (parallel mapping
> or SD cards) we expect the block driver being a plain file (either "raw"
> format or another) but a "regular" file. When an user passes something
> else like a block device, odd things happen.
>
> Well, I guess I self-restricted my question to device emulation. So
> in the cases mentioned I would like to add a check in sd_realize()/
> pflash_cfi0?_realize() for regular file when a block drive is provided.
>
> Description of problematic user case:
>
> * -pflash /dev/sda
> * -sd /dev/mmcblk0
>
> User runs emulation on top of hardware (maybe like passthru?), and
> expect underlying block to be in correct state out of QEMU.

It would certainly be nice if these cases worked (AIUI they do for
IDE/SCSI disk emulation, right?). So what goes wrong in the SD card
emulation case?

thanks
-- PMM



reply via email to

[Prev in Thread] Current Thread [Next in Thread]