[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v2 02/21] sysbus: Set user_creatable=false by de
From: |
Juergen Gross |
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 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0 |
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 <address@hidden>
> Cc: Alex Williamson <address@hidden>
> Cc: Alistair Francis <address@hidden>
> Cc: Beniamino Galvani <address@hidden>
> Cc: Christian Borntraeger <address@hidden>
> Cc: Cornelia Huck <address@hidden>
> Cc: David Gibson <address@hidden>
> Cc: "Edgar E. Iglesias" <address@hidden>
> Cc: Eduardo Habkost <address@hidden>
> Cc: Frank Blaschka <address@hidden>
> Cc: Gabriel L. Somlo <address@hidden>
> Cc: Gerd Hoffmann <address@hidden>
> Cc: Igor Mammedov <address@hidden>
> Cc: Jason Wang <address@hidden>
> Cc: John Snow <address@hidden>
> Cc: Juergen Gross <address@hidden>
> Cc: Kevin Wolf <address@hidden>
> Cc: Laszlo Ersek <address@hidden>
> Cc: Marcel Apfelbaum <address@hidden>
> Cc: Markus Armbruster <address@hidden>
> Cc: Max Reitz <address@hidden>
> Cc: "Michael S. Tsirkin" <address@hidden>
> Cc: Paolo Bonzini <address@hidden>
> Cc: Peter Maydell <address@hidden>
> Cc: Pierre Morel <address@hidden>
> Cc: Prasad J Pandit <address@hidden>
> Cc: address@hidden
> Cc: address@hidden
> Cc: address@hidden
> Cc: Richard Henderson <address@hidden>
> Cc: Rob Herring <address@hidden>
> Cc: Shannon Zhao <address@hidden>
> Cc: address@hidden
> Cc: Thomas Huth <address@hidden>
> Cc: Yi Min Zhao <address@hidden>
> Signed-off-by: Eduardo Habkost <address@hidden>
> ---
> 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 <address@hidden>
Juergen
- Re: [Qemu-devel] [PATCH v2 01/21] qdev: Replace cannot_instantiate_with_device_add_yet with !user_creatable, (continued)
Re: [Qemu-devel] [PATCH v2 01/21] qdev: Replace cannot_instantiate_with_device_add_yet with !user_creatable, Thomas Huth, 2017/04/06
[Qemu-devel] [PATCH v2 03/21] xen-backend: Remove FIXME comment about user_creatable flag, Eduardo Habkost, 2017/04/04
[Qemu-devel] [PATCH v2 04/21] iommu: Remove FIXME comment about user_creatable=true, Eduardo Habkost, 2017/04/04
[Qemu-devel] [PATCH v2 05/21] fdc: Remove user_creatable flag from sysbus-fdc & SUNW, fdtwo, Eduardo Habkost, 2017/04/04
[Qemu-devel] [PATCH v2 02/21] sysbus: Set user_creatable=false by default on TYPE_SYS_BUS_DEVICE, Eduardo Habkost, 2017/04/04
[Qemu-devel] [PATCH v2 06/21] pflash_cfi01: Remove user_creatable flag, Eduardo Habkost, 2017/04/04
[Qemu-devel] [PATCH v2 07/21] kvmclock: Remove user_creatable flag, Eduardo Habkost, 2017/04/04
[Qemu-devel] [PATCH v2 08/21] ioapic: Remove user_creatable flag, Eduardo Habkost, 2017/04/04
[Qemu-devel] [PATCH v2 09/21] kvmvapic: Remove user_creatable flag, Eduardo Habkost, 2017/04/04
[Qemu-devel] [PATCH v2 12/21] isabus-bridge: Remove user_creatable flag, Eduardo Habkost, 2017/04/04
[Qemu-devel] [PATCH v2 11/21] allwinner-ahci: Remove user_creatable flag, Eduardo Habkost, 2017/04/04
[Qemu-devel] [PATCH v2 10/21] sysbus-ahci: Remove user_creatable flag, Eduardo Habkost, 2017/04/04
[Qemu-devel] [PATCH v2 13/21] unimplemented-device: Remove user_creatable flag, Eduardo Habkost, 2017/04/04
[Qemu-devel] [PATCH v2 14/21] fw_cfg: Remove user_creatable flag, Eduardo Habkost, 2017/04/04