mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-02 07:13:54 -06:00
target-arm queue:
* ppc/e500 and arm/virt: only add valid dynamic sysbus devices to the platform bus * update i.mx31 maintainer list * Revert "target/arm: Make number of counters in PMCR follow the CPU" -----BEGIN PGP SIGNATURE----- iQJNBAABCAA3FiEE4aXFk81BneKOgxXPPCUl7RQ2DN4FAmBsU1IZHHBldGVyLm1h eWRlbGxAbGluYXJvLm9yZwAKCRA8JSXtFDYM3gsJD/48W/dgiW9NkVo0zZclQq7a kXBREK3JH+weW0Ws9g89hxjOmij6kPQeDC0fxCLfc7OX9bshYps21Q0r/Kl5X30h 1T6eDTHhFPcv2cLty2IYUC4E2FWDjVuLtRtcx1dYULMrIG7xXEqDFl+d+ZgGK5mL NfwAA3fYqLN6cGxf94h/MosU0C9NJq1g/VDcq2gaR8+bdmGk0Gg7HHloFOzoOlaa KS+Qt9dcVYa6q9GZBtYi0/w1YlORSaf7sTvqjkZ4H5jTY9NfjVRP87OSaLkgJYt+ OTTZjh9OQv1rL51Egl9sYUJX2dk4mFBE1pPampnwtBEcaQ9r8idR2+3noiTF8lRi tdyRPDoZU6EdkH0aLJeSRbkhT3z1y+m0qLTCRh5lnyhZKIAmDHXW2FBnFfPnL7EL C4RqkUZ1PxdixEQ6GOauBTJQbVsjKUTsgFuxZ2S3euKCl2oHnLafcqY9uC711YHb 5R9cvACLHkA/kSgkw5HmJPyX4qNn+9LftRr3YpZ95soo/c8dEa17niu/2I2jMTnt 1EPYap/R1lI3OHaB4Q51FlRPufnwQ9Vh/pOtXyn1cvc2x+ABHB++139LUuYe+5e2 N/0vH5rSQcf9PnTPddOZYaCQx7KE44ZaAXHtqFMB+rWtG/Ss2MJCwCa9sMd6ciEE M9vZ4ZmccPBEwRv2Dgp84g== =f0Ad -----END PGP SIGNATURE----- Merge remote-tracking branch 'remotes/pmaydell/tags/pull-target-arm-20210406' into staging target-arm queue: * ppc/e500 and arm/virt: only add valid dynamic sysbus devices to the platform bus * update i.mx31 maintainer list * Revert "target/arm: Make number of counters in PMCR follow the CPU" # gpg: Signature made Tue 06 Apr 2021 13:25:54 BST # gpg: using RSA key E1A5C593CD419DE28E8315CF3C2525ED14360CDE # gpg: issuer "peter.maydell@linaro.org" # gpg: Good signature from "Peter Maydell <peter.maydell@linaro.org>" [ultimate] # gpg: aka "Peter Maydell <pmaydell@gmail.com>" [ultimate] # gpg: aka "Peter Maydell <pmaydell@chiark.greenend.org.uk>" [ultimate] # Primary key fingerprint: E1A5 C593 CD41 9DE2 8E83 15CF 3C25 25ED 1436 0CDE * remotes/pmaydell/tags/pull-target-arm-20210406: Remove myself as i.mx31 maintainer Revert "target/arm: Make number of counters in PMCR follow the CPU" hw/ppc/e500plat: Only try to add valid dynamic sysbus devices to platform bus hw/arm/virt: Only try to add valid dynamic sysbus devices to platform bus machine: Provide a function to check the dynamic sysbus allowlist include/hw/boards.h: Document machine_class_allow_dynamic_sysbus_dev() Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
This commit is contained in:
commit
4216ba1b22
10 changed files with 79 additions and 38 deletions
|
@ -36,7 +36,46 @@ void machine_set_cpu_numa_node(MachineState *machine,
|
|||
const CpuInstanceProperties *props,
|
||||
Error **errp);
|
||||
|
||||
/**
|
||||
* machine_class_allow_dynamic_sysbus_dev: Add type to list of valid devices
|
||||
* @mc: Machine class
|
||||
* @type: type to allow (should be a subtype of TYPE_SYS_BUS_DEVICE)
|
||||
*
|
||||
* Add the QOM type @type to the list of devices of which are subtypes
|
||||
* of TYPE_SYS_BUS_DEVICE but which are still permitted to be dynamically
|
||||
* created (eg by the user on the command line with -device).
|
||||
* By default if the user tries to create any devices on the command line
|
||||
* that are subtypes of TYPE_SYS_BUS_DEVICE they will get an error message;
|
||||
* for the special cases which are permitted for this machine model, the
|
||||
* machine model class init code must call this function to add them
|
||||
* to the list of specifically permitted devices.
|
||||
*/
|
||||
void machine_class_allow_dynamic_sysbus_dev(MachineClass *mc, const char *type);
|
||||
|
||||
/**
|
||||
* device_is_dynamic_sysbus: test whether device is a dynamic sysbus device
|
||||
* @mc: Machine class
|
||||
* @dev: device to check
|
||||
*
|
||||
* Returns: true if @dev is a sysbus device on the machine's list
|
||||
* of dynamically pluggable sysbus devices; otherwise false.
|
||||
*
|
||||
* This function checks whether @dev is a valid dynamic sysbus device,
|
||||
* by first confirming that it is a sysbus device and then checking it
|
||||
* against the list of permitted dynamic sysbus devices which has been
|
||||
* set up by the machine using machine_class_allow_dynamic_sysbus_dev().
|
||||
*
|
||||
* It is valid to call this with something that is not a subclass of
|
||||
* TYPE_SYS_BUS_DEVICE; the function will return false in this case.
|
||||
* This allows hotplug callback functions to be written as:
|
||||
* if (device_is_dynamic_sysbus(mc, dev)) {
|
||||
* handle dynamic sysbus case;
|
||||
* } else if (some other kind of hotplug) {
|
||||
* handle that;
|
||||
* }
|
||||
*/
|
||||
bool device_is_dynamic_sysbus(MachineClass *mc, DeviceState *dev);
|
||||
|
||||
/*
|
||||
* Checks that backend isn't used, preps it for exclusive usage and
|
||||
* returns migratable MemoryRegion provided by backend.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue