[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v2 1/4] hw/char: Implement nRF51 SoC UART
From: |
Paolo Bonzini |
Subject: |
Re: [Qemu-devel] [PATCH v2 1/4] hw/char: Implement nRF51 SoC UART |
Date: |
Tue, 14 Aug 2018 19:37:30 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 |
On 14/08/2018 12:02, Peter Maydell wrote:
> On 13 August 2018 at 10:47, Stefan Hajnoczi <address@hidden> wrote:
>> It's an assumption that on-board devices cannot be hot unplugged and
>> that the machine type stays alive until QEMU terminates.
>>
>> Making this assumption saves 1 call to qemu_chr_fe_set_handlers().
>> The cost is that we cannot safely stop the system-on-chip because its
>> devices don't clean up properly.
>>
>> Since cleanup is so trivial here I think it's worthwhile.
> I would be more in favour of adding an unrealize function to
> random always-present-never-unpluggable devices if we had
> better documentation of exactly what the QOM lifecycle is
> and what needs to be done in init/realize/unrealize/etc.
> As it is, I don't know myself and therefore can't review
> whether devices with unrealize methods get it right. And
> obviously the code is completely untestable because it can
> never run...
I agree. Don't bother with unrealize unless the device hot-unpluggable.
What matters is that init/finalize are done right but that is tested by
device-introspection-test.
Paolo
[Qemu-devel] [PATCH v2 2/4] hw/arm/nrf51_soc: Connect UART to nRF51 SoC, Julia Suvorova, 2018/08/08
[Qemu-devel] [PATCH v2 3/4] tests/boot-serial-test: Add microbit board testcase, Julia Suvorova, 2018/08/08
[Qemu-devel] [PATCH v2 4/4] tests/microbit-test: Check nRF51 UART functionality, Julia Suvorova, 2018/08/08