KVM: PPC: Only use QPRs when available
authorAlexander Graf <agraf@suse.de>
Thu, 1 Apr 2010 13:33:21 +0000 (15:33 +0200)
committerAvi Kivity <avi@redhat.com>
Mon, 17 May 2010 09:17:24 +0000 (12:17 +0300)
BookE KVM doesn't know about QPRs, so let's not try to access then.

This fixes a build error on BookE KVM.

Signed-off-by: Alexander Graf <agraf@suse.de>
Signed-off-by: Avi Kivity <avi@redhat.com>
arch/powerpc/kvm/powerpc.c

index 9a4dd81..ffbe4ca 100644 (file)
@@ -335,6 +335,7 @@ static void kvmppc_complete_mmio_load(struct kvm_vcpu *vcpu,
        case KVM_REG_FPR:
                vcpu->arch.fpr[vcpu->arch.io_gpr & KVM_REG_MASK] = gpr;
                break;
+#ifdef CONFIG_PPC_BOOK3S
        case KVM_REG_QPR:
                vcpu->arch.qpr[vcpu->arch.io_gpr & KVM_REG_MASK] = gpr;
                break;
@@ -342,6 +343,7 @@ static void kvmppc_complete_mmio_load(struct kvm_vcpu *vcpu,
                vcpu->arch.fpr[vcpu->arch.io_gpr & KVM_REG_MASK] = gpr;
                vcpu->arch.qpr[vcpu->arch.io_gpr & KVM_REG_MASK] = gpr;
                break;
+#endif
        default:
                BUG();
        }