diff options
author | Alexander Graf <agraf@suse.de> | 2011-08-10 11:57:08 (GMT) |
---|---|---|
committer | Avi Kivity <avi@redhat.com> | 2011-09-25 16:52:27 (GMT) |
commit | af8f38b3499f0d4a3c354df2435f0fb2dded250a (patch) | |
tree | 129cf6f362fb623c80f8c2aa89c6fb3030b04c8d /arch/powerpc/kvm/44x.c | |
parent | 930b412a005bde2ea3f05911eaaeeb10f11d79ab (diff) | |
download | linux-af8f38b3499f0d4a3c354df2435f0fb2dded250a.tar.xz |
KVM: PPC: Add sanity checking to vcpu_run
There are multiple features in PowerPC KVM that can now be enabled
depending on the user's wishes. Some of the combinations don't make
sense or don't work though.
So this patch adds a way to check if the executing environment would
actually be able to run the guest properly. It also adds sanity
checks if PVR is set (should always be true given the current code
flow), if PAPR is only used with book3s_64 where it works and that
HV KVM is only used in PAPR mode.
Signed-off-by: Alexander Graf <agraf@suse.de>
Diffstat (limited to 'arch/powerpc/kvm/44x.c')
-rw-r--r-- | arch/powerpc/kvm/44x.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/arch/powerpc/kvm/44x.c b/arch/powerpc/kvm/44x.c index da3a122..ca1f88b 100644 --- a/arch/powerpc/kvm/44x.c +++ b/arch/powerpc/kvm/44x.c @@ -78,6 +78,8 @@ int kvmppc_core_vcpu_setup(struct kvm_vcpu *vcpu) for (i = 0; i < ARRAY_SIZE(vcpu_44x->shadow_refs); i++) vcpu_44x->shadow_refs[i].gtlb_index = -1; + vcpu->arch.cpu_type = KVM_CPU_440; + return 0; } |