[SLOF] [PATCH 2/3] virtio-serial: Rework shutdown sequence
Alexey Kardashevskiy
aik at ozlabs.ru
Fri Mar 13 11:31:46 AEDT 2020
On 13/03/2020 03:49, Segher Boessenkool wrote:
> Hi!
>
> On Tue, Mar 10, 2020 at 02:38:22PM +1100, Alexey Kardashevskiy wrote:
>> On 10/03/2020 11:35, Segher Boessenkool wrote:
>>> On Mon, Mar 09, 2020 at 11:43:12PM +0100, Greg Kurz wrote:
>>>> --- a/board-qemu/slof/virtio-serial.fs
>>>> +++ b/board-qemu/slof/virtio-serial.fs
>>>> @@ -19,13 +19,8 @@ virtio-setup-vd VALUE virtiodev
>>>> \ Quiescence the virtqueue of this device so that no more background
>>>> \ transactions can be pending.
>>>> : shutdown ( -- )
>>>> - initialized? IF
>>>> - my-phandle node>path open-dev ?dup IF
>>>> - virtiodev virtio-serial-shutdown
>>>> - close-dev
>>>> - THEN
>>>> - FALSE to initialized?
>>>> - THEN
>>>> + virtiodev virtio-serial-shutdown
>>>> + FALSE to initialized?
>>>> ;
>>>
>>> It now also calls virtio-serial-shutdown if it never was initialised?
>>
>>
>> No. This also removes "['] shutdown add-quiesce-xt" so the only way to
>> end up in "shutdown" is having open-count incremented == open virtio-serial.
>
> Anything can call shutdown, the nice simple name encourages that even.
> It's not a good idea to make this word more fragile, imho.
In practice, one would need to run a guest with virtio-serial but not
make it default stdout to avoid having it initialized, then select
virtio-serial device in the SLOF prompt and call its "shutdown" method.
This nice simple name is not that easily accessible ;) I mean I'll merge
Greg's fix when he posts one but there is no rush or did I miss
anything? Thanks,
--
Alexey
More information about the SLOF
mailing list