qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Scott Wood <scottwood@freescale.com>
To: Alexander Graf <agraf@suse.de>
Cc: QEMU-devel Developers <qemu-devel@nongnu.org>
Subject: Re: [Qemu-devel] [PATCH 01/23] PPC: Add secondary CPU spinning code
Date: Thu, 21 Jul 2011 12:46:05 -0500	[thread overview]
Message-ID: <20110721124605.2be28f75@schlenkerla.am.freescale.net> (raw)
In-Reply-To: <9F5BB83D-7B43-49BE-9993-FD82EF06934D@suse.de>

On Thu, 21 Jul 2011 18:49:44 +0200
Alexander Graf <agraf@suse.de> wrote:

> 
> On 21.07.2011, at 18:38, Scott Wood wrote:
> 
> > On Thu, 21 Jul 2011 03:27:12 +0200
> > Alexander Graf <agraf@suse.de> wrote:
> > 
> >> When directly starting an SMP system with -kernel on PPC e500, we need to
> >> simulate the spin table code from u-boot. This code adds a small c file
> >> plus generated .elf file that enable secondary CPUs to spin just like they
> >> would with u-boot.
> > 
> > Why not just handle the spin table as an MMIO region?
> > 
> > Besides being simpler, it avoids any spinning overhead if the guest doesn't
> > spin up all the cpus.
> 
> Hmm - sounds like a nice idea. We'd have to reserve the region in the dt, but overall I agree that it might end up being simpler.

The region needs to be reserved in the dt regardless.

> > You're jumping through a lot of hoops to (nominally) do this in C.
> 
> Yeah, but at the end of the day C is a lot more readable than asm IMHO :).

I'm not so sure in this case.

> >> +    info->pir = pir;
> > 
> > While I'm fine with not allowing the guest to set PIR (the ISA says it's
> > read-only in virtualized implementations), I'm not sure we should be
> > overwriting the spintable value here.
> 
> I merely do what the u-boot code is doing.

Never mind, ePAPR does say to update the spin table with the actual PIR
prior to entry.

> >> +    entry = (void*)(unsigned long)info->addr;
> > 
> > You're ignoring addr_hi, and you should create an IMA appropriate for the
> > guest's chosen entry point rather than assume it's in the first 64M.
> 
> Hm - we have a linear map of 256MB. But yes, maybe creating a mapping instead of just assuming it'll be within there is a good idea :).

In the KVM direct-mapped memory case there might not be any memory at all
in the first 256M.  We've got a patch in our queue to choose an appropriate
IMA at runtime.

> > And don't forget about r3_hi and r6_hi on future 64-bit targets.
> 
> The code as is is 100% 32-bit.

Right, but it'd be nice to minimize the things that silently break on
64-bit.

-Scott

  reply	other threads:[~2011-07-21 17:46 UTC|newest]

Thread overview: 39+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-07-21  1:27 [Qemu-devel] [PATCH 00/23] SMP support for MPC8544DS Alexander Graf
2011-07-21  1:27 ` [Qemu-devel] [PATCH 01/23] PPC: Add secondary CPU spinning code Alexander Graf
2011-07-21 16:38   ` Scott Wood
2011-07-21 16:49     ` Alexander Graf
2011-07-21 17:46       ` Scott Wood [this message]
2011-07-21  1:27 ` [Qemu-devel] [PATCH 02/23] PPC: Move openpic to target specific code compilation Alexander Graf
2011-07-21  1:27 ` [Qemu-devel] [PATCH 03/23] PPC: Add CPU definitions for up to 32 guest CPUs Alexander Graf
2011-07-21 16:46   ` Scott Wood
2011-07-21 16:54     ` Alexander Graf
2011-07-21  1:27 ` [Qemu-devel] [PATCH 04/23] PPC: Add CPU local MMIO regions to MPIC Alexander Graf
2011-07-21  1:27 ` [Qemu-devel] [PATCH 05/23] PPC: Extend MPIC MMIO range Alexander Graf
2011-07-21  1:27 ` [Qemu-devel] [PATCH 06/23] PPC: Fix IPI support in MPIC Alexander Graf
2011-07-22 14:08   ` Elie Richa
2011-07-22 15:01     ` Alexander Graf
2011-07-22 16:37       ` Scott Wood
2011-07-21  1:27 ` [Qemu-devel] [PATCH 07/23] PPC: Remove cINT code from MPIC Alexander Graf
2011-07-21 16:49   ` Scott Wood
2011-07-21 16:52     ` Alexander Graf
2011-07-21  1:27 ` [Qemu-devel] [PATCH 08/23] PPC: Bump MPIC up to 32 supported CPUs Alexander Graf
2011-07-22 14:10   ` Elie Richa
2011-07-22 15:01     ` Alexander Graf
2011-07-21  1:27 ` [Qemu-devel] [PATCH 09/23] PPC: E500: create multiple envs Alexander Graf
2011-07-21  1:27 ` [Qemu-devel] [PATCH 10/23] PPC: E500: Generate IRQ lines for many CPUs Alexander Graf
2011-07-21  1:27 ` [Qemu-devel] [PATCH 11/23] PPC: E500: Use spin code for secondary CPUs Alexander Graf
2011-07-21  1:27 ` [Qemu-devel] [PATCH 12/23] device tree: add nop_node Alexander Graf
2011-07-21  1:27 ` [Qemu-devel] [PATCH 13/23] PPC: bamboo: Move host fdt copy to target Alexander Graf
2011-07-21  1:27 ` [Qemu-devel] [PATCH 14/23] PPC: KVM: Add generic function to read host clockfreq Alexander Graf
2011-07-21 17:51   ` Scott Wood
2011-07-21 18:59     ` Alexander Graf
2011-07-21 19:06       ` Scott Wood
2011-07-21  1:27 ` [Qemu-devel] [PATCH 15/23] PPC: E500: Use generic kvm function for freq Alexander Graf
2011-07-21  1:27 ` [Qemu-devel] [PATCH 16/23] PPC: E500: Remove mpc8544_copy_soc_cell Alexander Graf
2011-07-21  1:27 ` [Qemu-devel] [PATCH 17/23] PPC: bamboo: Use kvm api for freq and clock frequencies Alexander Graf
2011-07-21  1:27 ` [Qemu-devel] [PATCH 18/23] PPC: KVM: Remove kvmppc_read_host_property Alexander Graf
2011-07-21  1:27 ` [Qemu-devel] [PATCH 19/23] PPC: KVM: Add stubs for kvm helper functions Alexander Graf
2011-07-21  1:27 ` [Qemu-devel] [PATCH 20/23] PPC: E500: Update freqs for all CPUs Alexander Graf
2011-07-21  1:27 ` [Qemu-devel] [PATCH 21/23] PPC: E500: Remove unneeded CPU nodes Alexander Graf
2011-07-21  1:27 ` [Qemu-devel] [PATCH 22/23] PPC: E500: Update cpu-release-addr property in cpu nodes Alexander Graf
2011-07-21  1:27 ` [Qemu-devel] [PATCH 23/23] PPC: E500: Bump CPU count to 32 Alexander Graf

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=20110721124605.2be28f75@schlenkerla.am.freescale.net \
    --to=scottwood@freescale.com \
    --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).