|
|
9ae3a8 |
From 72dbf6a170042cdeccc37ef106df264a48631d71 Mon Sep 17 00:00:00 2001
|
|
|
9ae3a8 |
From: Eduardo Habkost <ehabkost@redhat.com>
|
|
|
9ae3a8 |
Date: Fri, 2 Aug 2013 14:08:51 +0200
|
|
|
9ae3a8 |
Subject: target-i386: Pass X86CPU object to cpu_x86_find_by_name()
|
|
|
9ae3a8 |
|
|
|
9ae3a8 |
RH-Author: Eduardo Habkost <ehabkost@redhat.com>
|
|
|
9ae3a8 |
Message-id: <1375452533-12507-2-git-send-email-ehabkost@redhat.com>
|
|
|
9ae3a8 |
Patchwork-id: 52932
|
|
|
9ae3a8 |
O-Subject: [RHEL-7 PATCH 1/3] target-i386: Pass X86CPU object to cpu_x86_find_by_name()
|
|
|
9ae3a8 |
Bugzilla: 853101
|
|
|
9ae3a8 |
RH-Acked-by: Bandan Das <bsd@redhat.com>
|
|
|
9ae3a8 |
RH-Acked-by: Markus Armbruster <armbru@redhat.com>
|
|
|
9ae3a8 |
RH-Acked-by: Gleb Natapov <gleb@redhat.com>
|
|
|
9ae3a8 |
|
|
|
9ae3a8 |
Bugzilla: 853101
|
|
|
9ae3a8 |
|
|
|
9ae3a8 |
This will help us change the initialization code to not require carrying
|
|
|
9ae3a8 |
some intermediate values in a x86_def_t struct (and eventually kill the
|
|
|
9ae3a8 |
x86_def_t struct entirely).
|
|
|
9ae3a8 |
|
|
|
9ae3a8 |
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
|
|
|
9ae3a8 |
Signed-off-by: Andreas Färber <afaerber@suse.de>
|
|
|
9ae3a8 |
(cherry picked from commit c139911261c5acc9dae56b1180db320ba25636bd)
|
|
|
9ae3a8 |
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
|
|
|
9ae3a8 |
|
|
|
9ae3a8 |
diff --git a/target-i386/cpu.c b/target-i386/cpu.c
|
|
|
9ae3a8 |
index 4b2da0d..0c9a99a 100644
|
|
|
9ae3a8 |
--- a/target-i386/cpu.c
|
|
|
9ae3a8 |
+++ b/target-i386/cpu.c
|
|
|
9ae3a8 |
@@ -1475,7 +1475,8 @@ static void x86_cpu_get_feature_words(Object *obj, Visitor *v, void *opaque,
|
|
|
9ae3a8 |
error_propagate(errp, err);
|
|
|
9ae3a8 |
}
|
|
|
9ae3a8 |
|
|
|
9ae3a8 |
-static int cpu_x86_find_by_name(x86_def_t *x86_cpu_def, const char *name)
|
|
|
9ae3a8 |
+static int cpu_x86_find_by_name(X86CPU *cpu, x86_def_t *x86_cpu_def,
|
|
|
9ae3a8 |
+ const char *name)
|
|
|
9ae3a8 |
{
|
|
|
9ae3a8 |
x86_def_t *def;
|
|
|
9ae3a8 |
int i;
|
|
|
9ae3a8 |
@@ -1742,7 +1743,7 @@ static void cpu_x86_register(X86CPU *cpu, const char *name, Error **errp)
|
|
|
9ae3a8 |
|
|
|
9ae3a8 |
memset(def, 0, sizeof(*def));
|
|
|
9ae3a8 |
|
|
|
9ae3a8 |
- if (cpu_x86_find_by_name(def, name) < 0) {
|
|
|
9ae3a8 |
+ if (cpu_x86_find_by_name(cpu, def, name) < 0) {
|
|
|
9ae3a8 |
error_setg(errp, "Unable to find CPU definition: %s", name);
|
|
|
9ae3a8 |
return;
|
|
|
9ae3a8 |
}
|