qemu-devel
[Top][All Lists]
Advanced

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

Re: Should bus-less devices default to .user_creatable = false? (was: [P


From: Thomas Huth
Subject: Re: Should bus-less devices default to .user_creatable = false? (was: [PATCH 13/13] bcm2835_cprman: put some peripherals of bcm2835 cprman into the 'misc' category)
Date: Wed, 18 Nov 2020 10:08:12 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.12.0

On 18/11/2020 09.50, Markus Armbruster wrote:
> Markus Armbruster <armbru@redhat.com> writes:
> 
> [...]
>> qdev_device_add() looks like a bus-less device is usable if the machine
>> provides a hotplug handler for it.  Commit 03fcbd9dc5 "qdev: Check for
>> the availability of a hotplug controller before adding a device" seems
>> to be pertinent.
> 
> Nope.  A hotplug handler is only required for hot plug (d'oh!), not for
> cold plug.  
> 
> I wonder whether bus-less devices should default to .user_creatable =
> false like sysbus devices, and for the same reasons.
> 
> To actually *do* something, a physical device requires some connection
> to the rest of the world.  Same for a virtual device (at least the ones
> that model physical devices).

I know at least two virtual devices that are bus-less and cold-pluggable:
hw/ppc/spapr_rng.c and hw/watchdog/wdt_diag288.c ... but we could certainly
mark them with user_creatable = true manually if we decide that bus-less
devices should be handled differently by default.

 Thomas





reply via email to

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