qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH] Allow setting the vendor_id string with x86's -cpu option
@ 2007-11-25 13:23 Dan Kenigsberg
  2007-12-09  3:02 ` Thiemo Seufer
  2007-12-20 16:40 ` [Qemu-devel] [PATCH] Allow setting the vendor and model_id strings " Dan Kenigsberg
  0 siblings, 2 replies; 9+ messages in thread
From: Dan Kenigsberg @ 2007-11-25 13:23 UTC (permalink / raw)
  To: qemu-devel

Having AuthenticAMD hard-coded is nice, but allowing the user to impersonate
whatever CPU she wants is even nicer.

Also, an English typo (due to me) is corrected.

Dan.

--- a/target-i386/helper2.c
+++ b/target-i386/helper2.c
@@ -254,8 +254,17 @@ static int cpu_x86_find_by_name(x86_def_t *x86_cpu_def, const char *cpu_model)
                     goto error;
                 }
                 x86_cpu_def->stepping = stepping;
+            }  else if (!strcmp(featurestr, "vendor")) {
+                if (strlen(val) != 12) {
+                    fprintf(stderr, "vendor string must be 12 chars long\n");
+                    x86_cpu_def = 0;
+                    goto error;
+                }
+                x86_cpu_def->vendor1 = *(uint32_t *)val;
+                x86_cpu_def->vendor2 = *(uint32_t *)(val + 4);
+                x86_cpu_def->vendor3 = *(uint32_t *)(val + 8);
             } else {
-                fprintf(stderr, "unregnized feature %s\n", featurestr);
+                fprintf(stderr, "unrecognized feature %s\n", featurestr);
                 x86_cpu_def = 0;
                 goto error;
             }

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2007-12-21 10:02 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-11-25 13:23 [Qemu-devel] [PATCH] Allow setting the vendor_id string with x86's -cpu option Dan Kenigsberg
2007-12-09  3:02 ` Thiemo Seufer
2007-12-09  9:27   ` Dan Kenigsberg
2007-12-09 11:36     ` Paul Brook
2007-12-09 13:52       ` Dan Kenigsberg
2007-12-09 18:29         ` Andreas Schwab
2007-12-09 18:58           ` Dan Kenigsberg
2007-12-09 20:00             ` Dan Kenigsberg
2007-12-20 16:40 ` [Qemu-devel] [PATCH] Allow setting the vendor and model_id strings " Dan Kenigsberg

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).