From ce008f75e0375e640e5cd9a44bf75ba514f0825d Mon Sep 17 00:00:00 2001
From: Igor Mammedov <imammedo@redhat.com>
Date: Mon, 1 Aug 2016 08:12:07 +0200
Subject: [PATCH 67/99] pc: cpu: Allow device_add to be used with x86 cpu

RH-Author: Igor Mammedov <imammedo@redhat.com>
Message-id: <1470039143-24450-63-git-send-email-imammedo@redhat.com>
Patchwork-id: 71678
O-Subject: [RHEV-7.3 qemu-kvm-rhev PATCH 62/78] pc: cpu: Allow device_add to be used with x86 cpu
Bugzilla: 1087672
RH-Acked-by: Marcel Apfelbaum <marcel@redhat.com>
RH-Acked-by: David Gibson <dgibson@redhat.com>
RH-Acked-by: Eduardo Habkost <ehabkost@redhat.com>

Signed-off-by: Igor Mammedov <imammedo@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
(cherry picked from commit edd1211194cd71afd78daf148c46801937ec11f5)
Signed-off-by: Miroslav Rezanina <mrezanin@redhat.com>
---
 target-i386/cpu.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/target-i386/cpu.c b/target-i386/cpu.c
index ccafbf3..7c66d09 100644
--- a/target-i386/cpu.c
+++ b/target-i386/cpu.c
@@ -3346,6 +3346,7 @@ static void x86_cpu_common_class_init(ObjectClass *oc, void *data)
     cc->cpu_exec_enter = x86_cpu_exec_enter;
     cc->cpu_exec_exit = x86_cpu_exec_exit;
 
+    dc->cannot_instantiate_with_device_add_yet = false;
     /*
      * Reason: x86_cpu_initfn() calls cpu_exec_init(), which saves the
      * object in cpus -> dangling pointer after final object_unref().
-- 
1.8.3.1

