Blame SOURCES/kvm-rhel-Revert-unwanted-cannot_instantiate_with_device_.patch

218e99
From 782eba126f0af8ccbb3625fe1ac1d92bf923a10d Mon Sep 17 00:00:00 2001
218e99
From: Kevin Wolf <kwolf@redhat.com>
218e99
Date: Wed, 6 Nov 2013 14:41:22 +0100
218e99
Subject: [PATCH 46/81] rhel: Revert unwanted cannot_instantiate_with_device_add_yet changes
218e99
218e99
RH-Author: Kevin Wolf <kwolf@redhat.com>
218e99
Message-id: <1383748882-22831-18-git-send-email-kwolf@redhat.com>
218e99
Patchwork-id: 55543
218e99
O-Subject: [RHEL-7.0 qemu-kvm PATCH v2 17/17] rhel: Revert unwanted cannot_instantiate_with_device_add_yet changes
218e99
Bugzilla: 1001216
218e99
RH-Acked-by: Marcel Apfelbaum <marcel.a@redhat.com>
218e99
RH-Acked-by: Paolo Bonzini <pbonzini@redhat.com>
218e99
RH-Acked-by: Kevin Wolf <kwolf@redhat.com>
218e99
RH-Acked-by: Miroslav Rezanina <mrezanin@redhat.com>
218e99
218e99
From: Markus Armbruster <armbru@redhat.com>
218e99
218e99
The no-user series just backported from upstream makes the following
218e99
onboard devices also available with -device / device_add:
218e99
218e99
* PCI [PATCH 07-08]: piix3-ide, piix3-ide-xen, piix4-ide, via-ide
218e99
* ISA [PATCH 09]: i8042, isa-fdc
218e99
218e99
Not wanted for RHEL, so revert that part.
218e99
218e99
Note: via-ide just for consistency; we don't actually compile it.
218e99
218e99
Signed-off-by: Markus Armbruster <armbru@redhat.com>
218e99
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
218e99
---
218e99
 hw/block/fdc.c   | 2 ++
218e99
 hw/ide/piix.c    | 6 ++++++
218e99
 hw/ide/via.c     | 2 ++
218e99
 hw/input/pckbd.c | 2 ++
218e99
 4 files changed, 12 insertions(+)
218e99
218e99
Signed-off-by: Miroslav Rezanina <mrezanin@redhat.com>
218e99
---
218e99
 hw/block/fdc.c   |    2 ++
218e99
 hw/ide/piix.c    |    6 ++++++
218e99
 hw/ide/via.c     |    2 ++
218e99
 hw/input/pckbd.c |    2 ++
218e99
 4 files changed, 12 insertions(+), 0 deletions(-)
218e99
218e99
diff --git a/hw/block/fdc.c b/hw/block/fdc.c
218e99
index f3b5bec..322d863 100644
218e99
--- a/hw/block/fdc.c
218e99
+++ b/hw/block/fdc.c
218e99
@@ -2210,6 +2210,8 @@ static void isabus_fdc_class_init(ObjectClass *klass, void *data)
218e99
     dc->vmsd = &vmstate_isa_fdc;
218e99
     dc->props = isa_fdc_properties;
218e99
     set_bit(DEVICE_CATEGORY_STORAGE, dc->categories);
218e99
+    /* Disabled for Red Hat Enterprise Linux: */
218e99
+    dc->cannot_instantiate_with_device_add_yet = true;
218e99
 }
218e99
 
218e99
 static const TypeInfo isa_fdc_info = {
218e99
diff --git a/hw/ide/piix.c b/hw/ide/piix.c
218e99
index 304cab0..1757ae0 100644
218e99
--- a/hw/ide/piix.c
218e99
+++ b/hw/ide/piix.c
218e99
@@ -249,6 +249,8 @@ static void piix3_ide_class_init(ObjectClass *klass, void *data)
218e99
     k->device_id = PCI_DEVICE_ID_INTEL_82371SB_1;
218e99
     k->class_id = PCI_CLASS_STORAGE_IDE;
218e99
     set_bit(DEVICE_CATEGORY_STORAGE, dc->categories);
218e99
+    /* Disabled for Red Hat Enterprise Linux: */
218e99
+    dc->cannot_instantiate_with_device_add_yet = true;
218e99
 }
218e99
 
218e99
 static const TypeInfo piix3_ide_info = {
218e99
@@ -269,6 +271,8 @@ static void piix3_ide_xen_class_init(ObjectClass *klass, void *data)
218e99
     k->class_id = PCI_CLASS_STORAGE_IDE;
218e99
     set_bit(DEVICE_CATEGORY_STORAGE, dc->categories);
218e99
     dc->unplug = pci_piix3_xen_ide_unplug;
218e99
+    /* Disabled for Red Hat Enterprise Linux: */
218e99
+    dc->cannot_instantiate_with_device_add_yet = true;
218e99
 }
218e99
 
218e99
 static const TypeInfo piix3_ide_xen_info = {
218e99
@@ -290,6 +294,8 @@ static void piix4_ide_class_init(ObjectClass *klass, void *data)
218e99
     k->device_id = PCI_DEVICE_ID_INTEL_82371AB;
218e99
     k->class_id = PCI_CLASS_STORAGE_IDE;
218e99
     set_bit(DEVICE_CATEGORY_STORAGE, dc->categories);
218e99
+    /* Disabled for Red Hat Enterprise Linux: */
218e99
+    dc->cannot_instantiate_with_device_add_yet = true;
218e99
 }
218e99
 
218e99
 static const TypeInfo piix4_ide_info = {
218e99
diff --git a/hw/ide/via.c b/hw/ide/via.c
218e99
index 326722c..30bdc60 100644
218e99
--- a/hw/ide/via.c
218e99
+++ b/hw/ide/via.c
218e99
@@ -224,6 +224,8 @@ static void via_ide_class_init(ObjectClass *klass, void *data)
218e99
     k->revision = 0x06;
218e99
     k->class_id = PCI_CLASS_STORAGE_IDE;
218e99
     set_bit(DEVICE_CATEGORY_STORAGE, dc->categories);
218e99
+    /* Disabled for Red Hat Enterprise Linux: */
218e99
+    dc->cannot_instantiate_with_device_add_yet = true;
218e99
 }
218e99
 
218e99
 static const TypeInfo via_ide_info = {
218e99
diff --git a/hw/input/pckbd.c b/hw/input/pckbd.c
218e99
index ed396bf..850a92c 100644
218e99
--- a/hw/input/pckbd.c
218e99
+++ b/hw/input/pckbd.c
218e99
@@ -515,6 +515,8 @@ static void i8042_class_initfn(ObjectClass *klass, void *data)
218e99
     ISADeviceClass *ic = ISA_DEVICE_CLASS(klass);
218e99
     ic->init = i8042_initfn;
218e99
     dc->vmsd = &vmstate_kbd_isa;
218e99
+    /* Disabled for Red Hat Enterprise Linux: */
218e99
+    dc->cannot_instantiate_with_device_add_yet = true;
218e99
 }
218e99
 
218e99
 static const TypeInfo i8042_info = {
218e99
-- 
218e99
1.7.1
218e99