qemu-trivial
[Top][All Lists]
Advanced

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

Re: [Qemu-trivial] [Qemu-devel] [PATCH] hw/core/generic-loader: Set a ca


From: Peter Maydell
Subject: Re: [Qemu-trivial] [Qemu-devel] [PATCH] hw/core/generic-loader: Set a category for the generic-loader device
Date: Mon, 8 Oct 2018 10:08:23 +0100

On 8 October 2018 at 07:14, Thomas Huth <address@hidden> wrote:
> On 2018-10-05 18:32, Peter Maydell wrote:
>> On 5 October 2018 at 10:42, Thomas Huth <address@hidden> wrote:
>>> Each device that is instantiatable by the users should be marked with
>>> a category.
>>
>> Presumably we could assert() this somewhere (at which
>> point we'd find that we have dozens of devices that
>> fail to set a category bit, I imagine) ?
>
> You bet ... alone in qemu-system-aarch64, "-device help" shows more than
> 120 devices without a category...
>
> So if we'd want to enforce this, there is a lot of clean-up work needed
> first. Once we're in a good shape, I think a "make check" test would be
> the right thing to enforce that future devices are always provided with
> a category.

Asserting in something like the device base class realize seems
to me like a good approach -- that way it gets automatically
covered by the existing test that tries to create every
user creatable device (we do have one of those, right?), and
developers of new devices will spot their error immediately
even if they don't happen to run 'make check'.

thanks
-- PMM



reply via email to

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