From: armbru@redhat.com
To: qemu-devel@nongnu.org
Cc: kwolf@redhat.com, borntraeger@de.ibm.com, afaerber@suse.de,
anthony@codemonkey.ws, peter.maydell@linaro.org
Subject: [Qemu-devel] [PATCH 00/10] Clean up and fix no_user
Date: Thu, 17 Oct 2013 15:54:51 +0200 [thread overview]
Message-ID: <1382018101-6102-1-git-send-email-armbru@redhat.com> (raw)
From: Markus Armbruster <armbru@redhat.com>
In an ideal world, machines can be built by wiring devices together
with configuration, not code. Unfortunately, that's not the world we
live in right now. We still have quite a few devices that need to be
wired up by code. If you try to device_add such a device, it'll fail
in sometimes mysterious ways. If you're lucky, you get an
unmysterious immediate crash.
We used to protect users from such badness by marking devices where
device_add cannot possibly work "no-user", and refusing to device_add
them. Anthony silently broke the protection in v1.1. He has rejected
attempts to unbreak it with the argument that the protection makes it
impossible to wire devices together with configuration, not code, and
that the protection is being misused[*].
On the former, I disagree. The problem isn't protecting users from
devices that cannot be wired up that way, it's devices that cannot be
wired up that way.
On the latter, Anthony has a point: the purpose of the no-user flag
isn't obvious, and some of its uses are suspect.
So, instead of just fixing the regression, this series first addresses
that point. PATCH 1 clarifies the purpose of no-user. PATCH 2-9
clean up and document its use. PATCH 10 fixes the regression.
Markus Armbruster (10):
qdev: Replace no_user by cannot_instantiate_with_device_add_yet
sysbus: Set cannot_instantiate_with_device_add_yet
cpu: Document why cannot_instantiate_with_device_add_yet
apic: Document why cannot_instantiate_with_device_add_yet
pci-host: Consistently set cannot_instantiate_with_device_add_yet
ich9: Document why cannot_instantiate_with_device_add_yet
piix3 piix4: Clean up use of cannot_instantiate_with_device_add_yet
vt82c686: Clean up use of cannot_instantiate_with_device_add_yet
isa: Clean up use of cannot_instantiate_with_device_add_yet
qdev: Do not let the user try to device_add when it cannot work
hw/acpi/piix4.c | 7 ++++++-
hw/alpha/typhoon.c | 2 --
hw/arm/versatilepb.c | 1 -
hw/audio/pcspk.c | 3 ++-
hw/audio/pl041.c | 1 -
hw/block/fdc.c | 1 -
hw/core/sysbus.c | 7 +++++++
hw/display/pl110.c | 1 -
hw/dma/pl080.c | 1 -
hw/i2c/smbus_ich9.c | 6 +++++-
hw/i386/kvm/clock.c | 1 -
hw/i386/kvmvapic.c | 1 -
hw/i386/pc.c | 1 -
hw/ide/piix.c | 3 ---
hw/ide/via.c | 1 -
hw/input/pckbd.c | 1 -
hw/input/vmmouse.c | 3 ++-
hw/intc/apic_common.c | 6 +++++-
hw/intc/arm_gic.c | 1 -
hw/intc/arm_gic_common.c | 1 -
hw/intc/arm_gic_kvm.c | 1 -
hw/intc/i8259_common.c | 8 +++++++-
hw/intc/ioapic_common.c | 1 -
hw/intc/pl190.c | 1 -
hw/isa/isa-bus.c | 1 -
hw/isa/lpc_ich9.c | 7 +++++--
hw/isa/piix4.c | 6 +++++-
hw/isa/vt82c686.c | 6 +++++-
hw/mips/gt64xxx_pci.c | 5 +++++
hw/misc/arm_l2x0.c | 1 -
hw/misc/vmport.c | 3 ++-
hw/nvram/fw_cfg.c | 1 -
hw/pci-bridge/dec.c | 5 +++++
hw/pci-host/apb.c | 5 +++++
hw/pci-host/bonito.c | 8 +++++---
hw/pci-host/grackle.c | 8 +++++---
hw/pci-host/piix.c | 19 +++++++++++++++----
hw/pci-host/ppce500.c | 5 +++++
hw/pci-host/prep.c | 7 +++++--
hw/pci-host/q35.c | 5 +++++
hw/pci-host/uninorth.c | 20 ++++++++++++++++++++
hw/pci-host/versatile.c | 5 +++++
hw/ppc/ppc4xx_pci.c | 5 +++++
hw/ppc/spapr_vio.c | 2 --
hw/s390x/ipl.c | 1 -
hw/s390x/s390-virtio-bus.c | 2 --
hw/s390x/virtio-ccw.c | 2 --
hw/sd/pl181.c | 1 -
hw/sh4/sh_pci.c | 5 +++++
hw/timer/arm_mptimer.c | 1 -
hw/timer/hpet.c | 1 -
hw/timer/i8254_common.c | 1 -
hw/timer/m48t59.c | 1 -
hw/timer/mc146818rtc.c | 1 -
hw/timer/pl031.c | 1 -
include/hw/qdev-core.h | 13 ++++++++++++-
qdev-monitor.c | 7 ++++---
qom/cpu.c | 6 +++++-
58 files changed, 162 insertions(+), 65 deletions(-)
--
1.8.1.4
next reply other threads:[~2013-10-17 13:55 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-10-17 13:54 armbru [this message]
2013-10-17 13:54 ` [Qemu-devel] [PATCH 01/10] qdev: Replace no_user by cannot_instantiate_with_device_add_yet armbru
2013-10-23 10:11 ` Peter Maydell
2013-10-24 8:59 ` Markus Armbruster
2013-10-17 13:54 ` [Qemu-devel] [PATCH 02/10] sysbus: Set cannot_instantiate_with_device_add_yet armbru
2013-10-23 10:13 ` Peter Maydell
2013-10-24 9:01 ` Markus Armbruster
2013-10-17 13:54 ` [Qemu-devel] [PATCH 03/10] cpu: Document why cannot_instantiate_with_device_add_yet armbru
2013-10-23 9:54 ` Peter Maydell
2013-10-17 13:54 ` [Qemu-devel] [PATCH 04/10] apic: " armbru
2013-10-23 9:54 ` Peter Maydell
2013-10-17 13:54 ` [Qemu-devel] [PATCH 05/10] pci-host: Consistently set cannot_instantiate_with_device_add_yet armbru
2013-10-23 9:51 ` Peter Maydell
2013-10-24 9:16 ` Markus Armbruster
2013-10-17 13:54 ` [Qemu-devel] [PATCH 06/10] ich9: Document why cannot_instantiate_with_device_add_yet armbru
2013-10-23 9:56 ` Peter Maydell
2013-10-17 13:54 ` [Qemu-devel] [PATCH 07/10] piix3 piix4: Clean up use of cannot_instantiate_with_device_add_yet armbru
2013-10-17 13:54 ` [Qemu-devel] [PATCH 08/10] vt82c686: " armbru
2013-10-23 9:59 ` Peter Maydell
2013-10-17 13:55 ` [Qemu-devel] [PATCH 09/10] isa: " armbru
2013-10-23 10:05 ` Peter Maydell
2013-10-24 9:02 ` Markus Armbruster
2013-10-17 13:55 ` [Qemu-devel] [PATCH 10/10] qdev: Do not let the user try to device_add when it cannot work armbru
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1382018101-6102-1-git-send-email-armbru@redhat.com \
--to=armbru@redhat.com \
--cc=afaerber@suse.de \
--cc=anthony@codemonkey.ws \
--cc=borntraeger@de.ibm.com \
--cc=kwolf@redhat.com \
--cc=peter.maydell@linaro.org \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).