From: Juergen Gross <jgross@suse.com>
To: Eduardo Habkost <ehabkost@redhat.com>, qemu-devel@nongnu.org
Cc: Laszlo Ersek <lersek@redhat.com>, Thomas Huth <thuth@redhat.com>,
Alexander Graf <agraf@suse.de>,
Peter Maydell <peter.maydell@linaro.org>,
Marcel Apfelbaum <marcel@redhat.com>,
Markus Armbruster <armbru@redhat.com>,
Alex Williamson <alex.williamson@redhat.com>,
Alistair Francis <alistair.francis@xilinx.com>,
Beniamino Galvani <b.galvani@gmail.com>,
Christian Borntraeger <borntraeger@de.ibm.com>,
Cornelia Huck <cornelia.huck@de.ibm.com>,
David Gibson <david@gibson.dropbear.id.au>,
"Edgar E. Iglesias" <edgar.iglesias@gmail.com>,
Frank Blaschka <frank.blaschka@de.ibm.com>,
"Gabriel L . Somlo" <somlo@cmu.edu>,
Gerd Hoffmann <kraxel@redhat.com>,
Igor Mammedov <imammedo@redhat.com>,
Jason Wang <jasowang@redhat.com>, John Snow <jsnow@redhat.com>,
Kevin Wolf <kwolf@redhat.com>, Max Reitz <mreitz@redhat.com>,
"Michael S. Tsirkin" <mst@redhat.com>,
Paolo Bonzini <pbonzini@redhat.com>,
Pierre Morel <pmorel@linux.vnet.ibm.com>,
Prasad J Pandit <pjp@fedoraproject.org>,
qemu-arm@nongnu.org, qemu-block@nongnu.org, qemu-ppc@nongnu.org,
Richard Henderson <rth@twiddle.net>,
Rob Herring <robh@kernel.org>,
Shannon Zhao <zhaoshenglong@huawei.com>,
sstabellini@kernel.org, Yi Min Zhao <zyimin@linux.vnet.ibm.com>
Subject: Re: [Qemu-devel] [PATCH v2 02/21] sysbus: Set user_creatable=false by default on TYPE_SYS_BUS_DEVICE
Date: Thu, 6 Apr 2017 08:32:13 +0200 [thread overview]
Message-ID: <735c80a5-c8e6-e78d-d2c4-a9daee0e9d96@suse.com> (raw)
In-Reply-To: <20170404202429.14643-3-ehabkost@redhat.com>
On 04/04/17 22:24, Eduardo Habkost wrote:
> commit 33cd52b5d7b9adfd009e95f07e6c64dd88ae2a31 unset
> cannot_instantiate_with_device_add_yet in TYPE_SYSBUS, making all
> sysbus devices appear on "-device help" and lack the "no-user"
> flag in "info qdm".
>
> To fix this, we can set user_creatable=false by default on
> TYPE_SYS_BUS_DEVICE, but this requires setting
> user_creatable=true explicitly on the sysbus devices that
> actually work with -device.
>
> Fortunately today we have just a few has_dynamic_sysbus=1
> machines: virt, pc-q35-*, ppce500, and spapr.
>
> virt, ppce500, and spapr have extra checks to ensure just a few
> device types can be instantiated:
>
> * virt supports only TYPE_VFIO_CALXEDA_XGMAC, TYPE_VFIO_AMD_XGBE.
> * ppce500 supports only TYPE_ETSEC_COMMON.
> * spapr supports only TYPE_SPAPR_PCI_HOST_BRIDGE.
>
> This patch sets user_creatable=true explicitly on those 4 device
> classes.
>
> Now, the more complex cases:
>
> pc-q35-*: q35 has no sysbus device whitelist yet (which is a
> separate bug). We are in the process of fixing it and building a
> sysbus whitelist on q35, but in the meantime we can fix the
> "-device help" and "info qdm" bugs mentioned above. Also, despite
> not being strictly necessary for fixing the q35 bug, reducing the
> list of user_creatable=true devices will help us be more
> confident when building the q35 whitelist.
>
> xen: We also have a hack at xen_set_dynamic_sysbus(), that sets
> has_dynamic_sysbus=true at runtime when using the Xen
> accelerator. This hack is only used to allow xen-backend devices
> to be dynamically plugged/unplugged.
>
> This means today we can use -device with the following 22 device
> types, that are the ones compiled into the qemu-system-x86_64 and
> qemu-system-i386 binaries:
>
> * allwinner-ahci
> * amd-iommu
> * cfi.pflash01
> * esp
> * fw_cfg_io
> * fw_cfg_mem
> * generic-sdhci
> * hpet
> * intel-iommu
> * ioapic
> * isabus-bridge
> * kvmclock
> * kvm-ioapic
> * kvmvapic
> * SUNW,fdtwo
> * sysbus-ahci
> * sysbus-fdc
> * sysbus-ohci
> * unimplemented-device
> * virtio-mmio
> * xen-backend
> * xen-sysdev
>
> This patch adds user_creatable=true explicitly to those devices,
> temporarily, just to keep 100% compatibility with existing
> behavior of q35. Subsequent patches will remove
> user_creatable=true from the devices that are really not meant to
> user-creatable on any machine, and remove the FIXME comment from
> the ones that are really supposed to be user-creatable. This is
> being done in separate patches because we still don't have an
> obvious list of devices that will be whitelisted by q35, and I
> would like to get each device reviewed individually.
>
> Cc: Alexander Graf <agraf@suse.de>
> Cc: Alex Williamson <alex.williamson@redhat.com>
> Cc: Alistair Francis <alistair.francis@xilinx.com>
> Cc: Beniamino Galvani <b.galvani@gmail.com>
> Cc: Christian Borntraeger <borntraeger@de.ibm.com>
> Cc: Cornelia Huck <cornelia.huck@de.ibm.com>
> Cc: David Gibson <david@gibson.dropbear.id.au>
> Cc: "Edgar E. Iglesias" <edgar.iglesias@gmail.com>
> Cc: Eduardo Habkost <ehabkost@redhat.com>
> Cc: Frank Blaschka <frank.blaschka@de.ibm.com>
> Cc: Gabriel L. Somlo <somlo@cmu.edu>
> Cc: Gerd Hoffmann <kraxel@redhat.com>
> Cc: Igor Mammedov <imammedo@redhat.com>
> Cc: Jason Wang <jasowang@redhat.com>
> Cc: John Snow <jsnow@redhat.com>
> Cc: Juergen Gross <jgross@suse.com>
> Cc: Kevin Wolf <kwolf@redhat.com>
> Cc: Laszlo Ersek <lersek@redhat.com>
> Cc: Marcel Apfelbaum <marcel@redhat.com>
> Cc: Markus Armbruster <armbru@redhat.com>
> Cc: Max Reitz <mreitz@redhat.com>
> Cc: "Michael S. Tsirkin" <mst@redhat.com>
> Cc: Paolo Bonzini <pbonzini@redhat.com>
> Cc: Peter Maydell <peter.maydell@linaro.org>
> Cc: Pierre Morel <pmorel@linux.vnet.ibm.com>
> Cc: Prasad J Pandit <pjp@fedoraproject.org>
> Cc: qemu-arm@nongnu.org
> Cc: qemu-block@nongnu.org
> Cc: qemu-ppc@nongnu.org
> Cc: Richard Henderson <rth@twiddle.net>
> Cc: Rob Herring <robh@kernel.org>
> Cc: Shannon Zhao <zhaoshenglong@huawei.com>
> Cc: sstabellini@kernel.org
> Cc: Thomas Huth <thuth@redhat.com>
> Cc: Yi Min Zhao <zyimin@linux.vnet.ibm.com>
> Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
> ---
> Changes v1 -> v2:
> * Rewrite commit message: don't pretend we are actually fixing
> the q35 issue. We're just fixing "info qdm" and "-device help".
> Making it easier to fix q35 is just a nice side-effect.
> * Rewrite FIXME comments to make it clear that we just have
> user_creatable=true because we don't know yet if the device
> should be in the q35 whitelist
> ---
> hw/block/fdc.c | 10 ++++++++++
> hw/block/pflash_cfi01.c | 5 +++++
> hw/core/sysbus.c | 11 +++++++++++
> hw/i386/amd_iommu.c | 5 +++++
> hw/i386/intel_iommu.c | 5 +++++
> hw/i386/kvm/clock.c | 5 +++++
> hw/i386/kvm/ioapic.c | 5 +++++
> hw/i386/kvmvapic.c | 5 +++++
> hw/ide/ahci.c | 10 ++++++++++
> hw/intc/ioapic.c | 5 +++++
> hw/isa/isa-bus.c | 5 +++++
> hw/misc/unimp.c | 5 +++++
> hw/net/fsl_etsec/etsec.c | 2 ++
> hw/nvram/fw_cfg.c | 10 ++++++++++
> hw/ppc/spapr_pci.c | 2 ++
> hw/scsi/esp.c | 5 +++++
> hw/sd/sdhci.c | 5 +++++
> hw/timer/hpet.c | 5 +++++
> hw/usb/hcd-ohci.c | 5 +++++
> hw/vfio/amd-xgbe.c | 2 ++
> hw/vfio/calxeda-xgmac.c | 2 ++
> hw/virtio/virtio-mmio.c | 5 +++++
> hw/xen/xen_backend.c | 10 ++++++++++
> 23 files changed, 129 insertions(+)
Patches 2 (Xen related stuff), 3 and 20:
Acked-by: Juergen Gross <jgross@suse.com>
Juergen
next prev parent reply other threads:[~2017-04-06 6:32 UTC|newest]
Thread overview: 35+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-04-04 20:24 [Qemu-devel] [PATCH v2 00/21] qdev/sysbus: Set user_creatable=false by default on sysbus Eduardo Habkost
2017-04-04 20:24 ` [Qemu-devel] [PATCH v2 01/21] qdev: Replace cannot_instantiate_with_device_add_yet with !user_creatable Eduardo Habkost
2017-04-05 19:01 ` Marcel Apfelbaum
2017-04-05 19:42 ` Eduardo Habkost
2017-04-06 9:31 ` Marcel Apfelbaum
2017-04-05 21:25 ` Eduardo Habkost
2017-04-05 21:30 ` Peter Maydell
2017-04-06 9:25 ` Thomas Huth
2017-04-04 20:24 ` [Qemu-devel] [PATCH v2 02/21] sysbus: Set user_creatable=false by default on TYPE_SYS_BUS_DEVICE Eduardo Habkost
2017-04-05 21:11 ` John Snow
2017-04-06 6:32 ` Juergen Gross [this message]
2017-04-04 20:24 ` [Qemu-devel] [PATCH v2 03/21] xen-backend: Remove FIXME comment about user_creatable flag Eduardo Habkost
2017-04-04 20:24 ` [Qemu-devel] [PATCH v2 04/21] iommu: Remove FIXME comment about user_creatable=true Eduardo Habkost
2017-04-06 9:34 ` Marcel Apfelbaum
2017-04-04 20:24 ` [Qemu-devel] [PATCH v2 05/21] fdc: Remove user_creatable flag from sysbus-fdc & SUNW, fdtwo Eduardo Habkost
2017-04-06 9:35 ` Thomas Huth
2017-04-04 20:24 ` [Qemu-devel] [PATCH v2 06/21] pflash_cfi01: Remove user_creatable flag Eduardo Habkost
2017-04-04 20:24 ` [Qemu-devel] [PATCH v2 07/21] kvmclock: " Eduardo Habkost
2017-04-06 9:42 ` Thomas Huth
2017-04-04 20:24 ` [Qemu-devel] [PATCH v2 08/21] ioapic: " Eduardo Habkost
2017-04-04 20:24 ` [Qemu-devel] [PATCH v2 09/21] kvmvapic: " Eduardo Habkost
2017-04-04 20:24 ` [Qemu-devel] [PATCH v2 10/21] sysbus-ahci: " Eduardo Habkost
2017-04-04 20:24 ` [Qemu-devel] [PATCH v2 11/21] allwinner-ahci: " Eduardo Habkost
2017-04-04 20:24 ` [Qemu-devel] [PATCH v2 12/21] isabus-bridge: " Eduardo Habkost
2017-04-04 20:24 ` [Qemu-devel] [PATCH v2 13/21] unimplemented-device: " Eduardo Habkost
2017-04-04 20:24 ` [Qemu-devel] [PATCH v2 14/21] fw_cfg: " Eduardo Habkost
2017-04-04 20:24 ` [Qemu-devel] [PATCH v2 15/21] esp: " Eduardo Habkost
2017-04-04 20:24 ` [Qemu-devel] [PATCH v2 16/21] generic-sdhci: " Eduardo Habkost
2017-04-04 20:24 ` [Qemu-devel] [PATCH v2 17/21] hpet: " Eduardo Habkost
2017-04-04 20:24 ` [Qemu-devel] [PATCH v2 18/21] sysbus-ohci: " Eduardo Habkost
2017-04-04 20:24 ` [Qemu-devel] [PATCH v2 19/21] virtio-mmio: " Eduardo Habkost
2017-04-04 20:24 ` [Qemu-devel] [PATCH v2 20/21] xen-sysdev: " Eduardo Habkost
2017-04-04 20:24 ` [Qemu-devel] [PATCH v2 21/21] s390-pcibus: No need to set user_creatable=false explicitly Eduardo Habkost
2017-04-05 8:55 ` Cornelia Huck
2017-04-06 9:36 ` [Qemu-devel] [PATCH v2 00/21] qdev/sysbus: Set user_creatable=false by default on sysbus Marcel Apfelbaum
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=735c80a5-c8e6-e78d-d2c4-a9daee0e9d96@suse.com \
--to=jgross@suse.com \
--cc=agraf@suse.de \
--cc=alex.williamson@redhat.com \
--cc=alistair.francis@xilinx.com \
--cc=armbru@redhat.com \
--cc=b.galvani@gmail.com \
--cc=borntraeger@de.ibm.com \
--cc=cornelia.huck@de.ibm.com \
--cc=david@gibson.dropbear.id.au \
--cc=edgar.iglesias@gmail.com \
--cc=ehabkost@redhat.com \
--cc=frank.blaschka@de.ibm.com \
--cc=imammedo@redhat.com \
--cc=jasowang@redhat.com \
--cc=jsnow@redhat.com \
--cc=kraxel@redhat.com \
--cc=kwolf@redhat.com \
--cc=lersek@redhat.com \
--cc=marcel@redhat.com \
--cc=mreitz@redhat.com \
--cc=mst@redhat.com \
--cc=pbonzini@redhat.com \
--cc=peter.maydell@linaro.org \
--cc=pjp@fedoraproject.org \
--cc=pmorel@linux.vnet.ibm.com \
--cc=qemu-arm@nongnu.org \
--cc=qemu-block@nongnu.org \
--cc=qemu-devel@nongnu.org \
--cc=qemu-ppc@nongnu.org \
--cc=robh@kernel.org \
--cc=rth@twiddle.net \
--cc=somlo@cmu.edu \
--cc=sstabellini@kernel.org \
--cc=thuth@redhat.com \
--cc=zhaoshenglong@huawei.com \
--cc=zyimin@linux.vnet.ibm.com \
/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).