Re: [Qemu-devel] [PATCH 0/3] hw/arm/virt: Support Cortex-A57

2014-05-01 Thread Peter Maydell
On 24 April 2014 18:54, Peter Maydell  wrote:
> This patchset wires up our new Cortex-A57 emulation into
> the "virt" machine model. Rather than the somewhat hacky
> approach in the previous system emulation patchsets, I've
> decided that our best approach is to have the board model
> create the GIC itself. This essentially corresponds to
> modelling a board with a standalone GIC -- you can see
> this in some real hardware which uses a GIC-400. I think
> this makes more sense than either borrowing the a15mpcore_priv
> device, or creating an a57mpcore_priv device (since the A57
> does not actually have a built-in GICv2).
>
> To handle hosts with 64K pages in KVM mode, we need to
> amke sure our GIC puts its GICC and GICD at 64K boundaries
> (so that the host kernel can map a 64K host page with the
> host GICV in as the guest GICC).
>
> For consistency, we make the 'virt' machine's GIC the
> same for all supported CPUs; 32 bit CPUs don't need
> the 64K spacing, but they don't object to it either, and
> it's simpler to use the same memory map for everything
> rather than fiddle with it based on CPU features.
>
> Peter Maydell (3):
>   hw/arm/virt: Create the GIC ourselves rather than (ab)using
> a15mpcore_priv
>   hw/arm/virt: Put GIC register banks on 64K boundaries
>   hw/arm/virt: Add support for Cortex-A57
>
>  hw/arm/virt.c | 93 
> +++
>  1 file changed, 61 insertions(+), 32 deletions(-)

Applying to target-arm.next...

thanks
-- PMM



Re: [Qemu-devel] [PATCH 0/3] hw/arm/virt: Support Cortex-A57

2014-04-25 Thread Christoffer Dall
On Fri, Apr 25, 2014 at 12:24:29PM +0100, Peter Maydell wrote:
> On 25 April 2014 11:42, Christoffer Dall  wrote:
> > So we're adding an incompletely modelled A57 to the virt board, and
> > adding a "board mounted" GICv2.  Doesn't sound like something that could
> > ever exist in real life, but I agree that the way we are tying things
> > together, semantically letting the board decide how to place the GIC
> > makes the most sense.
> 
> Actually I think a lot of A57 hardware right now is
> using a standalone GIC. The ARM Server Base System
> Architecture spec mandates a v2 GIC for level 0/1
> compliance, GICv3 only comes in at level 2. So it's
> not that far from reality (and it leaves us the
> obvious space to put in a v3 GIC emulation eventually).
> 
> > Oh well.  Let's implement GICv3 support some time.
> 
> You first :-)
> 
I hear rumors of people doing this for KVM, so I started refactoring the
QEMU GIC code to look more like the in-kernel emulation in terms of
style (patches not ready for posting yet), so we can hopefully share
some more code later on.

-Christoffer



Re: [Qemu-devel] [PATCH 0/3] hw/arm/virt: Support Cortex-A57

2014-04-25 Thread Peter Maydell
On 25 April 2014 11:42, Christoffer Dall  wrote:
> So we're adding an incompletely modelled A57 to the virt board, and
> adding a "board mounted" GICv2.  Doesn't sound like something that could
> ever exist in real life, but I agree that the way we are tying things
> together, semantically letting the board decide how to place the GIC
> makes the most sense.

Actually I think a lot of A57 hardware right now is
using a standalone GIC. The ARM Server Base System
Architecture spec mandates a v2 GIC for level 0/1
compliance, GICv3 only comes in at level 2. So it's
not that far from reality (and it leaves us the
obvious space to put in a v3 GIC emulation eventually).

> Oh well.  Let's implement GICv3 support some time.

You first :-)

thanks
-- PMM



Re: [Qemu-devel] [PATCH 0/3] hw/arm/virt: Support Cortex-A57

2014-04-25 Thread Christoffer Dall
On Thu, Apr 24, 2014 at 06:54:40PM +0100, Peter Maydell wrote:
> This patchset wires up our new Cortex-A57 emulation into
> the "virt" machine model. Rather than the somewhat hacky
> approach in the previous system emulation patchsets, I've
> decided that our best approach is to have the board model
> create the GIC itself. This essentially corresponds to
> modelling a board with a standalone GIC -- you can see
> this in some real hardware which uses a GIC-400. I think
> this makes more sense than either borrowing the a15mpcore_priv
> device, or creating an a57mpcore_priv device (since the A57
> does not actually have a built-in GICv2).

So we're adding an incompletely modelled A57 to the virt board, and
adding a "board mounted" GICv2.  Doesn't sound like something that could
ever exist in real life, but I agree that the way we are tying things
together, semantically letting the board decide how to place the GIC
makes the most sense.

Oh well.  Let's implement GICv3 support some time.

-Christoffer