Blob Blame History Raw
From 782eba126f0af8ccbb3625fe1ac1d92bf923a10d Mon Sep 17 00:00:00 2001
From: Kevin Wolf <kwolf@redhat.com>
Date: Wed, 6 Nov 2013 14:41:22 +0100
Subject: [PATCH 46/81] rhel: Revert unwanted cannot_instantiate_with_device_add_yet changes

RH-Author: Kevin Wolf <kwolf@redhat.com>
Message-id: <1383748882-22831-18-git-send-email-kwolf@redhat.com>
Patchwork-id: 55543
O-Subject: [RHEL-7.0 qemu-kvm PATCH v2 17/17] rhel: Revert unwanted cannot_instantiate_with_device_add_yet changes
Bugzilla: 1001216
RH-Acked-by: Marcel Apfelbaum <marcel.a@redhat.com>
RH-Acked-by: Paolo Bonzini <pbonzini@redhat.com>
RH-Acked-by: Kevin Wolf <kwolf@redhat.com>
RH-Acked-by: Miroslav Rezanina <mrezanin@redhat.com>

From: Markus Armbruster <armbru@redhat.com>

The no-user series just backported from upstream makes the following
onboard devices also available with -device / device_add:

* PCI [PATCH 07-08]: piix3-ide, piix3-ide-xen, piix4-ide, via-ide
* ISA [PATCH 09]: i8042, isa-fdc

Not wanted for RHEL, so revert that part.

Note: via-ide just for consistency; we don't actually compile it.

Signed-off-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
---
 hw/block/fdc.c   | 2 ++
 hw/ide/piix.c    | 6 ++++++
 hw/ide/via.c     | 2 ++
 hw/input/pckbd.c | 2 ++
 4 files changed, 12 insertions(+)

Signed-off-by: Miroslav Rezanina <mrezanin@redhat.com>
---
 hw/block/fdc.c   |    2 ++
 hw/ide/piix.c    |    6 ++++++
 hw/ide/via.c     |    2 ++
 hw/input/pckbd.c |    2 ++
 4 files changed, 12 insertions(+), 0 deletions(-)

diff --git a/hw/block/fdc.c b/hw/block/fdc.c
index f3b5bec..322d863 100644
--- a/hw/block/fdc.c
+++ b/hw/block/fdc.c
@@ -2210,6 +2210,8 @@ static void isabus_fdc_class_init(ObjectClass *klass, void *data)
     dc->vmsd = &vmstate_isa_fdc;
     dc->props = isa_fdc_properties;
     set_bit(DEVICE_CATEGORY_STORAGE, dc->categories);
+    /* Disabled for Red Hat Enterprise Linux: */
+    dc->cannot_instantiate_with_device_add_yet = true;
 }
 
 static const TypeInfo isa_fdc_info = {
diff --git a/hw/ide/piix.c b/hw/ide/piix.c
index 304cab0..1757ae0 100644
--- a/hw/ide/piix.c
+++ b/hw/ide/piix.c
@@ -249,6 +249,8 @@ static void piix3_ide_class_init(ObjectClass *klass, void *data)
     k->device_id = PCI_DEVICE_ID_INTEL_82371SB_1;
     k->class_id = PCI_CLASS_STORAGE_IDE;
     set_bit(DEVICE_CATEGORY_STORAGE, dc->categories);
+    /* Disabled for Red Hat Enterprise Linux: */
+    dc->cannot_instantiate_with_device_add_yet = true;
 }
 
 static const TypeInfo piix3_ide_info = {
@@ -269,6 +271,8 @@ static void piix3_ide_xen_class_init(ObjectClass *klass, void *data)
     k->class_id = PCI_CLASS_STORAGE_IDE;
     set_bit(DEVICE_CATEGORY_STORAGE, dc->categories);
     dc->unplug = pci_piix3_xen_ide_unplug;
+    /* Disabled for Red Hat Enterprise Linux: */
+    dc->cannot_instantiate_with_device_add_yet = true;
 }
 
 static const TypeInfo piix3_ide_xen_info = {
@@ -290,6 +294,8 @@ static void piix4_ide_class_init(ObjectClass *klass, void *data)
     k->device_id = PCI_DEVICE_ID_INTEL_82371AB;
     k->class_id = PCI_CLASS_STORAGE_IDE;
     set_bit(DEVICE_CATEGORY_STORAGE, dc->categories);
+    /* Disabled for Red Hat Enterprise Linux: */
+    dc->cannot_instantiate_with_device_add_yet = true;
 }
 
 static const TypeInfo piix4_ide_info = {
diff --git a/hw/ide/via.c b/hw/ide/via.c
index 326722c..30bdc60 100644
--- a/hw/ide/via.c
+++ b/hw/ide/via.c
@@ -224,6 +224,8 @@ static void via_ide_class_init(ObjectClass *klass, void *data)
     k->revision = 0x06;
     k->class_id = PCI_CLASS_STORAGE_IDE;
     set_bit(DEVICE_CATEGORY_STORAGE, dc->categories);
+    /* Disabled for Red Hat Enterprise Linux: */
+    dc->cannot_instantiate_with_device_add_yet = true;
 }
 
 static const TypeInfo via_ide_info = {
diff --git a/hw/input/pckbd.c b/hw/input/pckbd.c
index ed396bf..850a92c 100644
--- a/hw/input/pckbd.c
+++ b/hw/input/pckbd.c
@@ -515,6 +515,8 @@ static void i8042_class_initfn(ObjectClass *klass, void *data)
     ISADeviceClass *ic = ISA_DEVICE_CLASS(klass);
     ic->init = i8042_initfn;
     dc->vmsd = &vmstate_kbd_isa;
+    /* Disabled for Red Hat Enterprise Linux: */
+    dc->cannot_instantiate_with_device_add_yet = true;
 }
 
 static const TypeInfo i8042_info = {
-- 
1.7.1