From: David Gibson <david@gibson.dropbear.id.au>
To: Alexander Graf <agraf@suse.de>
Cc: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH 1/3] pseries: Support SMT systems for KVM Book3S-HV
Date: Fri, 30 Sep 2011 11:02:24 +1000 [thread overview]
Message-ID: <20110930010224.GA4704@yookeroo.fritz.box> (raw)
In-Reply-To: <BD605FB5-0604-4A7D-B40A-7CA722F9C98A@suse.de>
On Thu, Sep 29, 2011 at 03:17:11PM +0200, Alexander Graf wrote:
> On 29.09.2011, at 08:45, David Gibson wrote:
[snip]
> > diff --git a/hw/spapr.c b/hw/spapr.c
> > index b118975..ba9ae1c 100644
> > --- a/hw/spapr.c
> > +++ b/hw/spapr.c
> > @@ -29,6 +29,9 @@
> > #include "elf.h"
> > #include "net.h"
> > #include "blockdev.h"
> > +#include "cpus.h"
> > +#include "kvm.h"
> > +#include "kvm_ppc.h"
> >
> > #include "hw/boards.h"
> > #include "hw/ppc.h"
> > @@ -103,6 +106,7 @@ static void *spapr_create_fdt_skel(const char *cpu_model,
> > uint32_t interrupt_server_ranges_prop[] = {0, cpu_to_be32(smp_cpus)};
> > int i;
> > char *modelname;
> > + int smt = kvmppc_smt_threads();
> >
> > #define _FDT(exp) \
> > do { \
> > @@ -162,13 +166,17 @@ static void *spapr_create_fdt_skel(const char *cpu_model,
> >
> > for (env = first_cpu; env != NULL; env = env->next_cpu) {
> > int index = env->cpu_index;
> > - uint32_t gserver_prop[] = {cpu_to_be32(index), 0}; /* HACK! */
> > + uint32_t servers_prop[smp_threads];
> > + uint32_t gservers_prop[smp_threads * 2];
> > char *nodename;
> > uint32_t segs[] = {cpu_to_be32(28), cpu_to_be32(40),
> > 0xffffffff, 0xffffffff};
> > uint32_t tbfreq = kvm_enabled() ? kvmppc_get_tbfreq() : TIMEBASE_FREQ;
> > uint32_t cpufreq = kvm_enabled() ? kvmppc_get_clockfreq() : 1000000000;
> >
> > + if ((index % smt) != 0)
> > + continue;
>
> Please run through checkpatch.pl
Actually, checkpatch.pl didn't spot that one, for zome bizarre
reason. Fixed, nonetheless.
--
David Gibson | I'll have my music baroque, and my code
david AT gibson.dropbear.id.au | minimalist, thank you. NOT _the_ _other_
| _way_ _around_!
http://www.ozlabs.org/~dgibson
next prev parent reply other threads:[~2011-09-30 1:58 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-09-29 6:45 [Qemu-devel] [0/3] pseries: Support and improvements for KVM Book3S-HV support David Gibson
2011-09-29 6:45 ` [Qemu-devel] [PATCH 1/3] pseries: Support SMT systems for KVM Book3S-HV David Gibson
2011-09-29 7:27 ` Jan Kiszka
2011-09-29 13:17 ` Alexander Graf
2011-09-30 1:02 ` David Gibson [this message]
2011-09-29 6:45 ` [Qemu-devel] [PATCH 2/3] pseries: Allow KVM Book3S-HV on PPC970 CPUS David Gibson
2011-09-29 13:25 ` Alexander Graf
2011-09-29 6:45 ` [Qemu-devel] [PATCH 3/3] pseries: Use Book3S-HV TCE acceleration capabilities David Gibson
2011-09-29 7:27 ` Jan Kiszka
2011-09-29 13:29 ` Alexander Graf
2011-09-30 2:37 ` David Gibson
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=20110930010224.GA4704@yookeroo.fritz.box \
--to=david@gibson.dropbear.id.au \
--cc=agraf@suse.de \
--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).