On 24.03.2017 18:59, Markus Armbruster wrote: > Peter Maydell <peter.mayd...@linaro.org> writes: > >> On 24 March 2017 at 16:58, Markus Armbruster <arm...@redhat.com> wrote: >>> "Sysbus" isn't a bus. In qdev's original design, every device had to >>> plug into a bus, period. The ones that really didn't were made to plug >>> into "sysbus". >>> >>> Pretty much the only thing "sysbus" devices had in common was that they >>> couldn't be used with device_add and device_del. >> >> This isn't really true. Sysbus devices support having MMIO regions >> and IRQ lines and GPIO lines. If you need those you're a >> sysbus device; otherwise you can probably just be a plain old Device. > > Well, "device has MMIO regions, IRQ lines and GPIO lines" is about as > "device contains virtual silicon". What would a device without any of > these *do*?
On ppc64, we've got for a example pseudo-devices that takes care of certain hypercalls, e.g. the spapr-rng or the spapr-rtc devices (well, the latter is still a TYPE_SYS_BUS_DEVICE ... we should convert it to TYPE_DEVICE instead one day...). These devices do not have any MMIO, IRQ or GPIO lines at all, so I think the differentiation between a very generic TYPE_DEVICE class and a "SYS_BUS_DEVICE" (with MMIO/IRQ/GPIO) class still makes sense. Thomas