qemu-arm
[Top][All Lists]
Advanced

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

Re: [PATCH v2 4/8] hw/boards: Remove all invalid uses of auto_create_sdc


From: Markus Armbruster
Subject: Re: [PATCH v2 4/8] hw/boards: Remove all invalid uses of auto_create_sdcard=true
Date: Mon, 10 Feb 2025 15:41:56 +0100
User-agent: Gnus/5.13 (Gnus v5.13)

Philippe Mathieu-Daudé <philmd@linaro.org> writes:

> On 7/2/25 13:49, Markus Armbruster wrote:
>> Philippe Mathieu-Daudé <philmd@linaro.org> writes:
>> 
>>> On 5/2/25 08:03, Markus Armbruster wrote:
>>>> Philippe Mathieu-Daudé <philmd@linaro.org> writes:
>>>>
>>>>> MachineClass::auto_create_sdcard is only useful to automatically
>>>>> create a SD card, attach a IF_SD block drive to it and plug the
>>>>> card onto a SD bus. Only the ARM and RISCV targets use such
>>>>> feature:
>>>>>
>>>>>    $ git grep -wl IF_SD hw | cut -d/ -f-2 | sort -u
>>>>>    hw/arm
>>>>>    hw/riscv
>>>>>    $
>>>>>
>>>>> Remove all other uses.
>>>>>
>>>>> Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
>>>>
>>>> Impact?
>>>>
>>>> As far as I can tell, this stops creation of the if=sd default drive
>>>> these machines don't actually use.  Correct?
>>>
>>> Yes, since these machines don't expose a SD-bus, the drive can
>>> not be attached and always triggers the same error:
>>>
>>> $ qemu-system-hppa -sd /bin/sh
>>> qemu-system-hppa: -sd /bin/sh: machine type does not support
>>> if=sd,bus=0,unit=0
>> 
>> To be precise...
>> 
>> Before the series, a bunch of machines create an if=sd,index=0 drive by
>> default even though they cannot use it.  HMP "info block" shows it:
>> 
>>      sd0: [not inserted]
>>          Removable device: not locked, tray closed
>> 
>> "By default" means -nodefaults suppresses it.
>> 
>> After the series, this default drive is gone.
>> 
>> That is all.
>> 
>> Correct?
>
> Correct.
>
>> The commit message could be clearer about this.  Perhaps:
>> 
>>      hw/boards: Do not create unusable default if=sd drives
>> 
>>      A number of machines create an if=sd drive by default even though
>>      they lack an SD bus, and therefore cannot use the drive.
>> 
>>      This drive is created when the machine sets flag
>>      @auto_create_sdcard.
>> 
>>      Delete that from machines that lack an SD bus.
>
> I reworded as:
>
>      hw/boards: Do not create unusable default if=sd drives
>
>      A number of machines create an if=sd drive by default even though
>      they lack an SD bus, and therefore cannot use the drive.
>
>      This drive is created when the machine sets flag
>      @auto_create_sdcard.
>
>      See for example running HMP "info block" on the HPPA C3700 machine:
>
>        $ qemu-system-hppa -M C3700 -monitor stdio -S
>        (qemu) info block
>
>        floppy0: [not inserted]
>            Removable device: not locked, tray closed
>
>        sd0: [not inserted]
>            Removable device: not locked, tray closed
>
>        $ qemu-system-hppa -M C3700 -sd /bin/sh
>        qemu-system-hppa: -sd /bin/sh: machine type does not support 
> if=sd,bus=0,unit=0
>
>      Delete that from machines that lack an SD bus.
>
>      Note, only the ARM and RISCV targets use such feature:
>
>       $ git grep -wl IF_SD hw | cut -d/ -f-2 | sort -u
>       hw/arm
>       hw/riscv
>       $

Lovely, thanks!

>> Listing the affected machines might be useful.
>
> I'll pass :)
>
>> Worth a mention in the release notes?  I don't know.
>
> I don't think so, since nothing working is lost.

Okay :)




reply via email to

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