[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-ppc] [PULL 4/8] hw/misc/macio: Mark the macio devices with user_cr
From: |
David Gibson |
Subject: |
[Qemu-ppc] [PULL 4/8] hw/misc/macio: Mark the macio devices with user_creatable = false |
Date: |
Mon, 19 Mar 2018 11:35:20 +1100 |
From: Thomas Huth <address@hidden>
The macio devices currently cause a crash when the user tries to
instantiate them on a different machine:
$ ppc64-softmmu/qemu-system-ppc64 -device macio-newworld
Unexpected error in qemu_chr_fe_init() at chardev/char-fe.c:222:
qemu-system-ppc64: -device macio-newworld: Device 'serial0' is in use
Aborted (core dumped)
These devices are clearly not intended to be creatable by the user
since they are using serial_hds[] directly in their instance_init
function. So let's mark them with user_creatable = false.
Signed-off-by: Thomas Huth <address@hidden>
Reviewed-by: Mark Cave-Ayland <address@hidden>
Signed-off-by: David Gibson <address@hidden>
---
hw/misc/macio/macio.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/hw/misc/macio/macio.c b/hw/misc/macio/macio.c
index af1bd46b4b..454244f59e 100644
--- a/hw/misc/macio/macio.c
+++ b/hw/misc/macio/macio.c
@@ -406,6 +406,8 @@ static void macio_class_init(ObjectClass *klass, void *data)
k->class_id = PCI_CLASS_OTHERS << 8;
dc->props = macio_properties;
set_bit(DEVICE_CATEGORY_BRIDGE, dc->categories);
+ /* Reason: Uses serial_hds in macio_instance_init */
+ dc->user_creatable = false;
}
static const TypeInfo macio_oldworld_type_info = {
--
2.14.3
- [Qemu-ppc] [PULL 0/8] ppc-for-2.12 queue 20180319, David Gibson, 2018/03/18
- [Qemu-ppc] [PULL 6/8] hw/ppc/spapr: Allow "spapr-vlan" as NIC model name beside "ibmveth", David Gibson, 2018/03/18
- [Qemu-ppc] [PULL 3/8] hw/ppc/prep: Fix implicit creation of "-drive if=scsi" devices, David Gibson, 2018/03/18
- [Qemu-ppc] [PULL 4/8] hw/misc/macio: Mark the macio devices with user_creatable = false,
David Gibson <=
- [Qemu-ppc] [PULL 2/8] tests/boot-serial: Check the 40p machine, too, David Gibson, 2018/03/18
- [Qemu-ppc] [PULL 7/8] ppc440_pcix: Change some error_report to qemu_log_mask(LOG_UNIMP, ...), David Gibson, 2018/03/18
- [Qemu-ppc] [PULL 8/8] target/ppc: fix tlbsync to check privilege level depending on GTSE, David Gibson, 2018/03/18
- [Qemu-ppc] [PULL 5/8] PPC e500: Fix gap between u-boot and kernel, David Gibson, 2018/03/18
- [Qemu-ppc] [PULL 1/8] sii3112: Remove unneeded exit function, David Gibson, 2018/03/18
- Re: [Qemu-ppc] [PULL 0/8] ppc-for-2.12 queue 20180319, Peter Maydell, 2018/03/19