[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 1/3] pseries: Support SMT systems for KVM Book3S
From: |
David Gibson |
Subject: |
Re: [Qemu-devel] [PATCH 1/3] pseries: Support SMT systems for KVM Book3S-HV |
Date: |
Fri, 30 Sep 2011 11:02:24 +1000 |
User-agent: |
Mutt/1.5.21 (2010-09-15) |
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