diff options
author | Alexander Graf <agraf@suse.de> | 2011-08-08 11:29:42 -0400 |
---|---|---|
committer | Avi Kivity <avi@redhat.com> | 2011-09-25 12:52:26 -0400 |
commit | 930b412a005bde2ea3f05911eaaeeb10f11d79ab (patch) | |
tree | aac017faf38837319a24fe9276e056fa6af1f4d8 /arch | |
parent | a668f2bd3f14ce7f92e119f4b5d9b50cdc59e855 (diff) |
KVM: PPC: Enable the PAPR CAP for Book3S
Now that Book3S PV mode can also run PAPR guests, we can add a PAPR cap and
enable it for all Book3S targets. Enabling that CAP switches KVM into PAPR
mode.
Signed-off-by: Alexander Graf <agraf@suse.de>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/powerpc/kvm/powerpc.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/arch/powerpc/kvm/powerpc.c b/arch/powerpc/kvm/powerpc.c index 17a5c83e1ccc..13bc798a4441 100644 --- a/arch/powerpc/kvm/powerpc.c +++ b/arch/powerpc/kvm/powerpc.c | |||
@@ -189,6 +189,7 @@ int kvm_dev_ioctl_check_extension(long ext) | |||
189 | #else | 189 | #else |
190 | case KVM_CAP_PPC_SEGSTATE: | 190 | case KVM_CAP_PPC_SEGSTATE: |
191 | case KVM_CAP_PPC_HIOR: | 191 | case KVM_CAP_PPC_HIOR: |
192 | case KVM_CAP_PPC_PAPR: | ||
192 | #endif | 193 | #endif |
193 | case KVM_CAP_PPC_UNSET_IRQ: | 194 | case KVM_CAP_PPC_UNSET_IRQ: |
194 | case KVM_CAP_PPC_IRQ_LEVEL: | 195 | case KVM_CAP_PPC_IRQ_LEVEL: |
@@ -572,6 +573,10 @@ static int kvm_vcpu_ioctl_enable_cap(struct kvm_vcpu *vcpu, | |||
572 | r = 0; | 573 | r = 0; |
573 | vcpu->arch.osi_enabled = true; | 574 | vcpu->arch.osi_enabled = true; |
574 | break; | 575 | break; |
576 | case KVM_CAP_PPC_PAPR: | ||
577 | r = 0; | ||
578 | vcpu->arch.papr_enabled = true; | ||
579 | break; | ||
575 | default: | 580 | default: |
576 | r = -EINVAL; | 581 | r = -EINVAL; |
577 | break; | 582 | break; |