All of lore.kernel.org
 help / color / mirror / Atom feed
From: Thiemo Seufer <ths@networkno.de>
To: Dan Kenigsberg <danken@qumranet.com>
Cc: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH] Allow setting the vendor_id string with x86's -cpu option
Date: Sun, 9 Dec 2007 03:02:44 +0000	[thread overview]
Message-ID: <20071209030244.GC12436@networkno.de> (raw)
In-Reply-To: <20071125132334.GA9555@karma.qumranet.com>

Dan Kenigsberg wrote:
> 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);

Endianness bug.


Thiemo

  reply	other threads:[~2007-12-09  3:02 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20071209030244.GC12436@networkno.de \
    --to=ths@networkno.de \
    --cc=danken@qumranet.com \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.