OSDN Git Service
(root)
/
qmiga
/
qemu.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
ea7697f
)
target-i386: Fix x86_cpuid_set_model_id()
author
Andreas Färber
<afaerber@suse.de>
Tue, 24 Apr 2012 14:22:31 +0000
(16:22 +0200)
committer
Anthony Liguori
<aliguori@us.ibm.com>
Thu, 26 Apr 2012 18:14:57 +0000
(13:14 -0500)
Don't assume zeroed cpuid_model[] fields.
This didn't break anything yet but QOM properties should be able to set
the value to something else without setting an intermediate zero string.
Signed-off-by: Andreas Färber <afaerber@suse.de>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
target-i386/cpu.c
patch
|
blob
|
history
diff --git
a/target-i386/cpu.c
b/target-i386/cpu.c
index
3df53ca
..
e1517e6
100644
(file)
--- a/
target-i386/cpu.c
+++ b/
target-i386/cpu.c
@@
-627,6
+627,7
@@
static void x86_cpuid_set_model_id(CPUX86State *env, const char *model_id)
model_id = "";
}
len = strlen(model_id);
+ memset(env->cpuid_model, 0, 48);
for (i = 0; i < 48; i++) {
if (i >= len) {
c = '\0';