[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL 29/40] hw/nvram/spapr_nvram: Device can not be create
From: |
David Gibson |
Subject: |
[Qemu-devel] [PULL 29/40] hw/nvram/spapr_nvram: Device can not be created by the users |
Date: |
Fri, 8 Sep 2017 20:35:47 +1000 |
From: Thomas Huth <address@hidden>
Trying to add a spapr-nvram device currently aborts QEMU like this:
$ ppc64-softmmu/qemu-system-ppc64 -device spapr-nvram
qemu-system-ppc64: hw/ppc/spapr_rtas.c:407: spapr_rtas_register:
Assertion `!rtas_table[token].name' failed.
Aborted (core dumped)
This NVRAM device registers RTAS calls during its realize function
and thus can only be used once - and that's internally from spapr.c.
So let's mark the device with user_creatable = false to avoid that
the users can crash their QEMU this way.
Signed-off-by: Thomas Huth <address@hidden>
Signed-off-by: David Gibson <address@hidden>
---
hw/nvram/spapr_nvram.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/hw/nvram/spapr_nvram.c b/hw/nvram/spapr_nvram.c
index bc355a4348..4a0aec8e1d 100644
--- a/hw/nvram/spapr_nvram.c
+++ b/hw/nvram/spapr_nvram.c
@@ -264,6 +264,8 @@ static void spapr_nvram_class_init(ObjectClass *klass, void
*data)
set_bit(DEVICE_CATEGORY_MISC, dc->categories);
dc->props = spapr_nvram_properties;
dc->vmsd = &vmstate_spapr_nvram;
+ /* Reason: Internal device only, uses spapr_rtas_register() in realize() */
+ dc->user_creatable = false;
}
static const TypeInfo spapr_nvram_type_info = {
--
2.13.5
- [Qemu-devel] [PULL 16/40] ppc: spapr: Make VCPU ID handling private to SPAPR, (continued)
- [Qemu-devel] [PULL 16/40] ppc: spapr: Make VCPU ID handling private to SPAPR, David Gibson, 2017/09/08
- [Qemu-devel] [PULL 06/40] spapr_drc: use g_strdup_printf() instead of snprintf(), David Gibson, 2017/09/08
- [Qemu-devel] [PULL 18/40] booke206: fix tlbnps for fixed size TLB, David Gibson, 2017/09/08
- [Qemu-devel] [PULL 19/40] booke206: allow to specify an mmucfg value at the init, David Gibson, 2017/09/08
- [Qemu-devel] [PULL 20/40] ppc64: introduce e6500, David Gibson, 2017/09/08
- [Qemu-devel] [PULL 15/40] ppc: spapr: Rename cpu_dt_id to vcpu_id, David Gibson, 2017/09/08
- [Qemu-devel] [PULL 28/40] hw/ppc/spapr_cpu_core: Add a proper check for spapr machine, David Gibson, 2017/09/08
- [Qemu-devel] [PULL 23/40] ppc4xx: Make MAL emulation more generic, David Gibson, 2017/09/08
- [Qemu-devel] [PULL 13/40] spapr: add pseries-2.11 machine type, David Gibson, 2017/09/08
- [Qemu-devel] [PULL 27/40] ppc4xx: Export ECB and PLB emulation, David Gibson, 2017/09/08
- [Qemu-devel] [PULL 29/40] hw/nvram/spapr_nvram: Device can not be created by the users,
David Gibson <=
- [Qemu-devel] [PULL 36/40] ppc: replace inter-function cyclic dependency/recurssion with 2 simple lookups, David Gibson, 2017/09/08
- [Qemu-devel] [PULL 24/40] ppc4xx: Split off 4xx I2C emulation from ppc405_uc to its own file, David Gibson, 2017/09/08
- [Qemu-devel] [PULL 26/40] ppc4xx_i2c: Move to hw/i2c, David Gibson, 2017/09/08
- [Qemu-devel] [PULL 37/40] ppc: simplify cpu model lookup by PVR, David Gibson, 2017/09/08
- [Qemu-devel] [PULL 25/40] ppc4xx_i2c: QOMify, David Gibson, 2017/09/08
- [Qemu-devel] [PULL 33/40] ppc: use macros to make cpu type name from string literal, David Gibson, 2017/09/08
- [Qemu-devel] [PULL 30/40] spapr: fallback to raw mode if best compat mode cannot be set during CAS, David Gibson, 2017/09/08
- [Qemu-devel] [PULL 40/40] ppc: spapr: Move VCPU ID calculation into sPAPR, David Gibson, 2017/09/08
- [Qemu-devel] [PULL 22/40] ppc4xx: Move MAL from ppc405_uc to ppc4xx_devs, David Gibson, 2017/09/08
- [Qemu-devel] [PULL 31/40] PPC: KVM: Support machine option to set VSMT mode, David Gibson, 2017/09/08