[PATCH v2 0/12] Hypervisor-mode KVM on POWER7

Paul Mackerras paulus at samba.org
Wed Jun 1 15:20:54 EST 2011


On Tue, May 31, 2011 at 02:50:20PM +0200, Alexander Graf wrote:
> 
> On 31.05.2011, at 14:35, Paul Mackerras wrote:
> 
> > On Tue, May 31, 2011 at 12:40:31PM +0200, Alexander Graf wrote:
> > 
> >> Thinking about the testability of this a bit more ... how much
> >> effort would it be to get this code running on a 970MP with SLOF?
> >> There should only be a few POWER7 specific pieces, right?
> > 
> > Do you have a 970MP that has a usable hypervisor mode, i.e. not an
> > Apple machine?  The 970s in Apple machines have the HV hard-wired to
> > 1, which means they do have a hypervisor mode but it isn't any use.
> > 
> > If you do have such a machine, then we would have to look at some
> > details like the instruction sequence for the partition switch, and
> > make sure we don't try to use SMT4 mode.  Also, I believe we will have
> > to flush the TLB on partition switches, since Power processors prior
> > to POWER7 didn't tag the TLB entries with the partition ID.
> > 
> > So it should be quite feasible if you have a non-Apple machine.
> > I will check whether the 970MP machines that Terrasoft were
> > distributing would be suitable.  We have one of them in the lab.
> 
> That's the one I was thinking of and yes, I have one available. That
> way I could test 99% of your code, you don't have to release
> hardware, and everyone's happy :).

I checked our YDL PowerStation and it does appear to have a usable
hypervisor mode. :)

As Jimi X pointed out, there are a few things that POWER7 has that 970
doesn't.  In particular the lack of VRMA mode means that we will have
to find 64MB of physically contiguous memory, aligned on a 64MB
address boundary, for the real mode area (RMO) for the guest.  64MB is
the smallest RMO size that the 970 supports; it also supports 128MB,
256MB, 1GB, 16GB and 256GB.  I think we'll have to reserve some memory
at boot.  We may get away with bumping up CONFIG_FORCE_MAX_ZONEORDER,
but relying on allocating a physically contiguous 64MB at runtime
seems somewhat fragile.  Also, we'll need some qemu changes since it
won't be able to allocate the RMO itself.

The other thing is that we have to flush the TLB on every partitions
switch, plus make sure that we're not switching the partition ID while
any other cpu in the same partition is doing a tlbie or tlbsync.
Still, it should all be doable.

Paul.


More information about the Linuxppc-dev mailing list