[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 05/58] PPC: Add CPU local MMIO regions to MPIC
From: |
Peter Maydell |
Subject: |
Re: [Qemu-devel] [PATCH 05/58] PPC: Add CPU local MMIO regions to MPIC |
Date: |
Wed, 14 Sep 2011 11:07:31 +0100 |
On 14 September 2011 09:42, Alexander Graf <address@hidden> wrote:
> The MPIC exports a register set for each CPU connected to it. They can all
> be accessed through specific registers or using a shadow page that is mapped
> differently depending on which CPU accesses it.
>
> This patch implements the shadow map, making it possible for guests to access
> the CPU local registers using the same address on each CPU.
> +static int get_current_cpu(void)
> +{
> + return cpu_single_env->cpu_index;
> +}
This is the standard way of doing this (we use it on ARM as well), but
it's pretty clearly a hack. "which master sent this memory transaction"
is an attribute that ought to be passed down to the MMIO read/write
functions, really (along with other interesting things like "priv or
not?" and probably architecture specific attributes like ARM's
"secure/non-secure"); this matches how hardware does it where the
attributes are passed along as extra signals in the bus fabric.
(Sometimes hardware also does this by having buses from the different
cores be totally separate paths at the point where this kind of device
is connected, before merging together later; we don't really support
modelling that either :-))
Not a nak, just an observation while I'm thinking about it.
-- PMM
- Re: [Qemu-devel] [PATCH 03/58] spapr: make irq customizable via qdev, (continued)
- [Qemu-devel] [PATCH 30/58] MPC8544DS: Generate CPU nodes on init, Alexander Graf, 2011/09/14
- [Qemu-devel] [PATCH 21/58] PPC: KVM: Add stubs for kvm helper functions, Alexander Graf, 2011/09/14
- [Qemu-devel] [PATCH 22/58] PPC: E500: Update freqs for all CPUs, Alexander Graf, 2011/09/14
- [Qemu-devel] [PATCH 09/58] PPC: MPIC: Remove read functionality for WO registers, Alexander Graf, 2011/09/14
- [Qemu-devel] [PATCH 39/58] pseries: More complete WIMG validation in H_ENTER code, Alexander Graf, 2011/09/14
- [Qemu-devel] [PATCH 32/58] PPC: Add new target config for pseries, Alexander Graf, 2011/09/14
- [Qemu-devel] [PATCH 05/58] PPC: Add CPU local MMIO regions to MPIC, Alexander Graf, 2011/09/14
- Re: [Qemu-devel] [PATCH 05/58] PPC: Add CPU local MMIO regions to MPIC,
Peter Maydell <=
- [Qemu-devel] [PATCH 42/58] pseries: use macro for firmware filename, Alexander Graf, 2011/09/14
- [Qemu-devel] [PATCH 33/58] KVM: update kernel headers, Alexander Graf, 2011/09/14
[Qemu-devel] [PATCH 19/58] PPC: bamboo: Use kvm api for freq and clock frequencies, Alexander Graf, 2011/09/14