yeahuh / rpms / qemu-kvm

Forked from rpms/qemu-kvm 2 years ago
Clone

Blame SOURCES/kvm-vt82c686-Clean-up-use-of-cannot_instantiate_with_dev.patch

218e99
From 86a622181cfcb4205877595fa53b3bbc87cf9431 Mon Sep 17 00:00:00 2001
218e99
From: Kevin Wolf <kwolf@redhat.com>
218e99
Date: Wed, 6 Nov 2013 14:41:19 +0100
218e99
Subject: [PATCH 43/81] vt82c686: Clean up use of cannot_instantiate_with_device_add_yet
218e99
218e99
RH-Author: Kevin Wolf <kwolf@redhat.com>
218e99
Message-id: <1383748882-22831-15-git-send-email-kwolf@redhat.com>
218e99
Patchwork-id: 55540
218e99
O-Subject: [RHEL-7.0 qemu-kvm PATCH v2 14/17] vt82c686: Clean up use of cannot_instantiate_with_device_add_yet
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
A VT82C686B southbridge has multiple functions.  We model each
218e99
function as a separate qdev.  One of them need some special wiring set
218e99
up in mips_fulong2e_init() to work: the ISA bridge at 05.0.
218e99
218e99
The IDE controller at 05.1 (via-ide) has always had
218e99
cannot_instantiate_with_device_add_yet set, but there is no obvious
218e99
reason why device_add could not work for them.  Drop it.
218e99
218e99
Signed-off-by: Markus Armbruster <armbru@redhat.com>
218e99
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
218e99
(cherry picked from pending upstream submission)
218e99
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
218e99
---
218e99
 hw/ide/via.c      | 1 -
218e99
 hw/isa/vt82c686.c | 6 +++++-
218e99
 2 files changed, 5 insertions(+), 2 deletions(-)
218e99
218e99
Signed-off-by: Miroslav Rezanina <mrezanin@redhat.com>
218e99
---
218e99
 hw/ide/via.c      |    1 -
218e99
 hw/isa/vt82c686.c |    6 +++++-
218e99
 2 files changed, 5 insertions(+), 2 deletions(-)
218e99
218e99
diff --git a/hw/ide/via.c b/hw/ide/via.c
218e99
index 6ba99c8..326722c 100644
218e99
--- a/hw/ide/via.c
218e99
+++ b/hw/ide/via.c
218e99
@@ -224,7 +224,6 @@ 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
-    dc->cannot_instantiate_with_device_add_yet = true; /* FIXME explain why */
218e99
 }
218e99
 
218e99
 static const TypeInfo via_ide_info = {
218e99
diff --git a/hw/isa/vt82c686.c b/hw/isa/vt82c686.c
218e99
index 563e154..bb84414 100644
218e99
--- a/hw/isa/vt82c686.c
218e99
+++ b/hw/isa/vt82c686.c
218e99
@@ -468,8 +468,12 @@ static void via_class_init(ObjectClass *klass, void *data)
218e99
     k->class_id = PCI_CLASS_BRIDGE_ISA;
218e99
     k->revision = 0x40;
218e99
     dc->desc = "ISA bridge";
218e99
-    dc->cannot_instantiate_with_device_add_yet = true; /* FIXME explain why */
218e99
     dc->vmsd = &vmstate_via;
218e99
+    /*
218e99
+     * Reason: part of VIA VT82C686 southbridge, needs to be wired up,
218e99
+     * e.g. by mips_fulong2e_init()
218e99
+     */
218e99
+    dc->cannot_instantiate_with_device_add_yet = true;
218e99
 }
218e99
 
218e99
 static const TypeInfo via_info = {
218e99
-- 
218e99
1.7.1
218e99