diff mbox

[RFC,10/19] sysbus-ahci: Remove user_creatable flag

Message ID 20170401004624.30886-11-ehabkost@redhat.com
State New
Headers show

Commit Message

Eduardo Habkost April 1, 2017, 12:46 a.m. UTC
The sysbus-ahci devices are supposed to be created and wired by
code from other devices, like calxeda_init() and
xlnx_zynqmp_realize(), and won't work with -device. Remove the
user_creatable flag from the device class.

Cc: John Snow <jsnow@redhat.com>
Cc: qemu-block@nongnu.org
Cc: Rob Herring <robh@kernel.org>
Cc: Peter Maydell <peter.maydell@linaro.org>
Cc: Alistair Francis <alistair.francis@xilinx.com>
Cc: "Edgar E. Iglesias" <edgar.iglesias@gmail.com>
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
---
 hw/ide/ahci.c | 5 -----
 1 file changed, 5 deletions(-)

Comments

Alistair Francis April 3, 2017, 5:19 p.m. UTC | #1
On Fri, Mar 31, 2017 at 5:46 PM, Eduardo Habkost <ehabkost@redhat.com> wrote:
> The sysbus-ahci devices are supposed to be created and wired by
> code from other devices, like calxeda_init() and
> xlnx_zynqmp_realize(), and won't work with -device. Remove the
> user_creatable flag from the device class.
>
> Cc: John Snow <jsnow@redhat.com>
> Cc: qemu-block@nongnu.org
> Cc: Rob Herring <robh@kernel.org>
> Cc: Peter Maydell <peter.maydell@linaro.org>
> Cc: Alistair Francis <alistair.francis@xilinx.com>
> Cc: "Edgar E. Iglesias" <edgar.iglesias@gmail.com>
> Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
> ---
>  hw/ide/ahci.c | 5 -----
>  1 file changed, 5 deletions(-)
>
> diff --git a/hw/ide/ahci.c b/hw/ide/ahci.c
> index b1b7780d56..68f2ce09ee 100644
> --- a/hw/ide/ahci.c
> +++ b/hw/ide/ahci.c
> @@ -1721,11 +1721,6 @@ static void sysbus_ahci_class_init(ObjectClass *klass, void *data)
>      dc->props = sysbus_ahci_properties;
>      dc->reset = sysbus_ahci_reset;
>      set_bit(DEVICE_CATEGORY_STORAGE, dc->categories);
> -    /*
> -     * FIXME: Set only for compatibility on q35 machine-type.
> -     * Probably never meant to be user-creatable
> -     */
> -    dc->user_creatable = true;

Part of me thinks this is a step backwards by marking it unsupported.
On the other hand I don't see how this could usefully be connected any
other way.

Reviewed-by: Alistair Francis <alistair.francis@xilinx.com>

Thanks,

Alistair

>  }
>
>  static const TypeInfo sysbus_ahci_info = {
> --
> 2.11.0.259.g40922b1
>
>
diff mbox

Patch

diff --git a/hw/ide/ahci.c b/hw/ide/ahci.c
index b1b7780d56..68f2ce09ee 100644
--- a/hw/ide/ahci.c
+++ b/hw/ide/ahci.c
@@ -1721,11 +1721,6 @@  static void sysbus_ahci_class_init(ObjectClass *klass, void *data)
     dc->props = sysbus_ahci_properties;
     dc->reset = sysbus_ahci_reset;
     set_bit(DEVICE_CATEGORY_STORAGE, dc->categories);
-    /*
-     * FIXME: Set only for compatibility on q35 machine-type.
-     * Probably never meant to be user-creatable
-     */
-    dc->user_creatable = true;
 }
 
 static const TypeInfo sysbus_ahci_info = {