qemu-arm
[Top][All Lists]
Advanced

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

Re: [PATCH for-6.0 0/4] Don't treat all sysbus devices as hotpluggable


From: Richard Henderson
Subject: Re: [PATCH for-6.0 0/4] Don't treat all sysbus devices as hotpluggable
Date: Thu, 25 Mar 2021 11:23:55 -0600
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.7.1

On 3/25/21 9:33 AM, Peter Maydell wrote:
On the two machines which have the "platform bus" (ppc e500 and arm
virt) we currently treat all TYPE_SYS_BUS_DEVICE devices as being
hotpluggable in the device callbacks, and try to plug those devices
into the platform bus.  This is far too broad, because only a handful
of devices are actually valid to plug into the platform bus.
Moreover, if a device which is pluggable for some other reason (like
a PCI device) happens to use a sysbus device internally as part of
its implementation, the hotplug callback will incorrectly grab that
sysbus device, probably resulting in an assertion failure.

Mostly PCI devices don't use sysbus devices internally, so the only
case we've encountered so far is the not-valid-anyway
  qemu-system-ppc64 -M ppce500 -device macio-oldworld
but we might create more in future.

This series restricts hotpluggability of sysbus devices on these
platforms to those devices which are on the dynamic sysbus whitelist

s/whitelist/allowlist/g ?

   include/hw/boards.h: Document machine_class_allow_dynamic_sysbus_dev()
   machine: Provide a function to check the dynamic sysbus whitelist
   hw/arm/virt: Only try to add valid dynamic sysbus devices to platform
     bus
   hw/ppc/e500plat: Only try to add valid dynamic sysbus devices to
     platform bus

Otherwise,
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>

r~



reply via email to

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