* [PATCH 0/15] Hypervisor-mode KVM on POWER7 and PPC970
@ 2011-06-18 8:27 Paul Mackerras
2011-06-18 14:34 ` Alexander Graf
2011-06-21 9:53 ` Alexander Graf
0 siblings, 2 replies; 8+ messages in thread
From: Paul Mackerras @ 2011-06-18 8:27 UTC (permalink / raw)
To: linuxppc-dev, kvm, kvm-ppc
The following series of patches enable KVM to exploit the hardware
hypervisor mode on 64-bit Power ISA Book3S machines. At present,
POWER7 and PPC970 processors are supported. (Note that the PPC970
processors in Apple G5 machines don't have a usable hypervisor mode
and are not supported by these patches.)
Running the KVM host in hypervisor mode means that the guest can use
both supervisor mode and user mode. That means that the guest can
execute supervisor-privilege instructions and access supervisor-
privilege registers. In addition the hardware directs most exceptions
to the guest. Thus we don't need to emulate any instructions in the
host. Generally, the only times we need to exit the guest are when it
does a hypercall or when an external interrupt or host timer
(decrementer) interrupt occurs.
The focus of this KVM implementation is to run guests that use the
PAPR (Power Architecture Platform Requirements) paravirtualization
interface, which is the interface supplied by PowerVM on IBM pSeries
machines. Currently the "pseries" machine type in qemu is only
supported by book3s_hv KVM, and book3s_hv KVM only supports the
"pseries" machine type. That will hopefully change in future.
These patches are against Alex Graf's kvm-ppc-next branch.
Paul.
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH 0/15] Hypervisor-mode KVM on POWER7 and PPC970
2011-06-18 8:27 Paul Mackerras
@ 2011-06-18 14:34 ` Alexander Graf
2011-06-19 1:01 ` Paul Mackerras
2011-06-21 9:53 ` Alexander Graf
1 sibling, 1 reply; 8+ messages in thread
From: Alexander Graf @ 2011-06-18 14:34 UTC (permalink / raw)
To: Paul Mackerras; +Cc: linuxppc-dev, kvm-ppc, kvm
On 18.06.2011, at 10:27, Paul Mackerras wrote:
> The following series of patches enable KVM to exploit the hardware
> hypervisor mode on 64-bit Power ISA Book3S machines. At present,
> POWER7 and PPC970 processors are supported. (Note that the PPC970
> processors in Apple G5 machines don't have a usable hypervisor mode
> and are not supported by these patches.)
>=20
> Running the KVM host in hypervisor mode means that the guest can use
> both supervisor mode and user mode. That means that the guest can
> execute supervisor-privilege instructions and access supervisor-
> privilege registers. In addition the hardware directs most exceptions
> to the guest. Thus we don't need to emulate any instructions in the
> host. Generally, the only times we need to exit the guest are when it
> does a hypercall or when an external interrupt or host timer
> (decrementer) interrupt occurs.
>=20
> The focus of this KVM implementation is to run guests that use the
> PAPR (Power Architecture Platform Requirements) paravirtualization
> interface, which is the interface supplied by PowerVM on IBM pSeries
> machines. Currently the "pseries" machine type in qemu is only
> supported by book3s_hv KVM, and book3s_hv KVM only supports the
> "pseries" machine type. That will hopefully change in future.
>=20
> These patches are against Alex Graf's kvm-ppc-next branch.
I just applied them on top of kvm-ppc-next and started compiling for =
book3s_64_pr=3DM:
arch/powerpc/kernel/exceptions-64s.S: Assembler messages:
arch/powerpc/kernel/exceptions-64s.S:314: Error: undefined symbol =
`PACA_KVM_SVCPU' in operation
arch/powerpc/kernel/exceptions-64s.S:314: Error: undefined symbol =
`SVCPU_IN_GUEST' in operation
make[1]: *** [arch/powerpc/kernel/head_64.o] Error 1
make: *** [arch/powerpc/kernel] Error 2
Alex
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH 0/15] Hypervisor-mode KVM on POWER7 and PPC970
2011-06-18 14:34 ` Alexander Graf
@ 2011-06-19 1:01 ` Paul Mackerras
0 siblings, 0 replies; 8+ messages in thread
From: Paul Mackerras @ 2011-06-19 1:01 UTC (permalink / raw)
To: Alexander Graf; +Cc: linuxppc-dev, kvm-ppc, kvm
On Sat, Jun 18, 2011 at 04:34:14PM +0200, Alexander Graf wrote:
> I just applied them on top of kvm-ppc-next and started compiling for book3s_64_pr=M:
>
> arch/powerpc/kernel/exceptions-64s.S: Assembler messages:
> arch/powerpc/kernel/exceptions-64s.S:314: Error: undefined symbol `PACA_KVM_SVCPU' in operation
> arch/powerpc/kernel/exceptions-64s.S:314: Error: undefined symbol `SVCPU_IN_GUEST' in operation
> make[1]: *** [arch/powerpc/kernel/head_64.o] Error 1
> make: *** [arch/powerpc/kernel] Error 2
Ah, good catch, you must be compiling with CONFIG_POWER4_ONLY=n.
I did test compiling for book3s_pr but I had CONFIG_POWER4_ONLY=y.
I'll post revised versions of patches 8/15 and 9/15.
Paul.
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH 0/15] Hypervisor-mode KVM on POWER7 and PPC970
2011-06-18 8:27 Paul Mackerras
2011-06-18 14:34 ` Alexander Graf
@ 2011-06-21 9:53 ` Alexander Graf
1 sibling, 0 replies; 8+ messages in thread
From: Alexander Graf @ 2011-06-21 9:53 UTC (permalink / raw)
To: Paul Mackerras; +Cc: linuxppc-dev, kvm-ppc, kvm
On 18.06.2011, at 10:27, Paul Mackerras wrote:
> The following series of patches enable KVM to exploit the hardware
> hypervisor mode on 64-bit Power ISA Book3S machines. At present,
> POWER7 and PPC970 processors are supported. (Note that the PPC970
> processors in Apple G5 machines don't have a usable hypervisor mode
> and are not supported by these patches.)
>=20
> Running the KVM host in hypervisor mode means that the guest can use
> both supervisor mode and user mode. That means that the guest can
> execute supervisor-privilege instructions and access supervisor-
> privilege registers. In addition the hardware directs most exceptions
> to the guest. Thus we don't need to emulate any instructions in the
> host. Generally, the only times we need to exit the guest are when it
> does a hypercall or when an external interrupt or host timer
> (decrementer) interrupt occurs.
>=20
> The focus of this KVM implementation is to run guests that use the
> PAPR (Power Architecture Platform Requirements) paravirtualization
> interface, which is the interface supplied by PowerVM on IBM pSeries
> machines. Currently the "pseries" machine type in qemu is only
> supported by book3s_hv KVM, and book3s_hv KVM only supports the
> "pseries" machine type. That will hopefully change in future.
>=20
> These patches are against Alex Graf's kvm-ppc-next branch.
Could you please also add some mechanism that sets the guest machine =
type? We currently support 2:
* bare metal
* PAPR
BOOK3S_PR can't do PAPR (yet), BOOK3S_HV can't do bare metal (ever). =
User space needs to know about these limitations, so it can set the type =
accordingly and fail to start if kernel space can't provide it.
Since we might end up supporting PAPR even with _pr, it can't just be as =
simple as a CAP bitmap, since we really need to set the type.
Alex
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH 0/15] Hypervisor-mode KVM on POWER7 and PPC970
[not found] <20110618082705.GA28413__14973.6630417921$1308385948$gmane$org@bloggs.ozlabs.ibm.com>
@ 2011-06-21 14:18 ` Dmitry Eremin-Solenikov
2011-06-22 3:20 ` Paul Mackerras
0 siblings, 1 reply; 8+ messages in thread
From: Dmitry Eremin-Solenikov @ 2011-06-21 14:18 UTC (permalink / raw)
To: linuxppc-dev
Paul Mackerras wrote:
> The following series of patches enable KVM to exploit the hardware
> hypervisor mode on 64-bit Power ISA Book3S machines. At present,
> POWER7 and PPC970 processors are supported. (Note that the PPC970
> processors in Apple G5 machines don't have a usable hypervisor mode
> and are not supported by these patches.)
I have a Maple board (dual PPC970FX). Will this patchset work on it?
Should I add any additional changes to add support for this platform?
Thanks!
--
With best wishes
Dmitry
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH 0/15] Hypervisor-mode KVM on POWER7 and PPC970
2011-06-21 14:18 ` [PATCH 0/15] Hypervisor-mode KVM on POWER7 and PPC970 Dmitry Eremin-Solenikov
@ 2011-06-22 3:20 ` Paul Mackerras
2011-06-22 6:17 ` Benjamin Herrenschmidt
2011-06-22 8:17 ` Dmitry Eremin-Solenikov
0 siblings, 2 replies; 8+ messages in thread
From: Paul Mackerras @ 2011-06-22 3:20 UTC (permalink / raw)
To: Dmitry Eremin-Solenikov; +Cc: linuxppc-dev
On Tue, Jun 21, 2011 at 02:18:39PM +0000, Dmitry Eremin-Solenikov wrote:
> I have a Maple board (dual PPC970FX). Will this patchset work on it?
> Should I add any additional changes to add support for this platform?
Provided the firmware gives you control in hypervisor mode, yes it
should work, and I don't know of any extra changes you would need.
I don't recall what firmware the Maple boards had on them, though.
Paul.
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH 0/15] Hypervisor-mode KVM on POWER7 and PPC970
2011-06-22 3:20 ` Paul Mackerras
@ 2011-06-22 6:17 ` Benjamin Herrenschmidt
2011-06-22 8:17 ` Dmitry Eremin-Solenikov
1 sibling, 0 replies; 8+ messages in thread
From: Benjamin Herrenschmidt @ 2011-06-22 6:17 UTC (permalink / raw)
To: Paul Mackerras; +Cc: Dmitry Eremin-Solenikov, linuxppc-dev
On Wed, 2011-06-22 at 13:20 +1000, Paul Mackerras wrote:
> On Tue, Jun 21, 2011 at 02:18:39PM +0000, Dmitry Eremin-Solenikov wrote:
>
> > I have a Maple board (dual PPC970FX). Will this patchset work on it?
> > Should I add any additional changes to add support for this platform?
>
> Provided the firmware gives you control in hypervisor mode, yes it
> should work, and I don't know of any extra changes you would need.
> I don't recall what firmware the Maple boards had on them, though.
I think it's more specifically whether the FW of the service processor
configure the mode rings of the 970 to "Apple" mode or not.
Cheers,
Ben.
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH 0/15] Hypervisor-mode KVM on POWER7 and PPC970
2011-06-22 3:20 ` Paul Mackerras
2011-06-22 6:17 ` Benjamin Herrenschmidt
@ 2011-06-22 8:17 ` Dmitry Eremin-Solenikov
1 sibling, 0 replies; 8+ messages in thread
From: Dmitry Eremin-Solenikov @ 2011-06-22 8:17 UTC (permalink / raw)
To: Paul Mackerras; +Cc: linuxppc-dev
On 6/22/11, Paul Mackerras <paulus@samba.org> wrote:
> On Tue, Jun 21, 2011 at 02:18:39PM +0000, Dmitry Eremin-Solenikov wrote:
>
>> I have a Maple board (dual PPC970FX). Will this patchset work on it?
>> Should I add any additional changes to add support for this platform?
>
> Provided the firmware gives you control in hypervisor mode, yes it
> should work, and I don't know of any extra changes you would need.
> I don't recall what firmware the Maple boards had on them, though.
On my board I have a PIBS firmware which programs all PPC970 registers
with special script. I think one of the scripts bears "hypervisor" settings,
so I'll try to give this patchset a try.
--
With best wishes
Dmitry
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2011-06-22 8:17 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <20110618082705.GA28413__14973.6630417921$1308385948$gmane$org@bloggs.ozlabs.ibm.com>
2011-06-21 14:18 ` [PATCH 0/15] Hypervisor-mode KVM on POWER7 and PPC970 Dmitry Eremin-Solenikov
2011-06-22 3:20 ` Paul Mackerras
2011-06-22 6:17 ` Benjamin Herrenschmidt
2011-06-22 8:17 ` Dmitry Eremin-Solenikov
2011-06-18 8:27 Paul Mackerras
2011-06-18 14:34 ` Alexander Graf
2011-06-19 1:01 ` Paul Mackerras
2011-06-21 9:53 ` Alexander Graf
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).