qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Avi Kivity <avi@redhat.com>
To: Joerg Roedel <joerg.roedel@amd.com>
Cc: Anthony Liguori <aliguori@us.ibm.com>,
	Marcelo Tosatti <mtosatti@redhat.com>,
	qemu-devel <qemu-devel@nongnu.org>,
	kvm@vger.kernel.org
Subject: Re: [Qemu-devel] [PATCH 1/2] qemu-x86: Add tsc_khz option to -cpu
Date: Sun, 19 Jun 2011 14:32:55 +0300	[thread overview]
Message-ID: <4DFDDE67.6070901@redhat.com> (raw)
In-Reply-To: <1308319214-8474-2-git-send-email-joerg.roedel@amd.com>

On 06/17/2011 05:00 PM, Joerg Roedel wrote:
> To let the user configure the desired tsc frequency for the
> guest if running in KVM.
>
> @@ -704,6 +705,14 @@ static int cpu_x86_find_by_name(x86_def_t *x86_cpu_def, const char *cpu_model)
>               } else if (!strcmp(featurestr, "model_id")) {
>                   pstrcpy(x86_cpu_def->model_id, sizeof(x86_cpu_def->model_id),
>                           val);
> +            } else if (!strcmp(featurestr, "tsc_khz")) {
> +                char *err;
> +                numvalue = strtoul(val,&err, 0);
> +                if (!*val || *err) {
> +                    fprintf(stderr, "bad numerical value %s\n", val);
> +                    goto error;
> +                }
> +                x86_cpu_def->tsc_khz = numvalue;
>               } else {
>                   fprintf(stderr, "unrecognized feature %s\n", featurestr);
>                   goto error;

Frequency should be in Hz, not kHz.  We can use [kMG] suffixes for 
simpler specification (but 1GHz = 10^9 Hz, not the binary thing).

-- 
error compiling committee.c: too many arguments to function

  reply	other threads:[~2011-06-19 11:33 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-06-17 14:00 [Qemu-devel] [PATCH 0/2] Initial TSC-Scaling support for uq/master Joerg Roedel
2011-06-17 14:00 ` [Qemu-devel] [PATCH 1/2] qemu-x86: Add tsc_khz option to -cpu Joerg Roedel
2011-06-19 11:32   ` Avi Kivity [this message]
2011-06-17 14:00 ` [Qemu-devel] [PATCH 2/2] qemu-x86: Set tsc_khz in kvm when supported Joerg Roedel

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=4DFDDE67.6070901@redhat.com \
    --to=avi@redhat.com \
    --cc=aliguori@us.ibm.com \
    --cc=joerg.roedel@amd.com \
    --cc=kvm@vger.kernel.org \
    --cc=mtosatti@redhat.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 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).