Skip to content

Commit 287d561

Browse files
agrafavikivity
authored andcommitted
KVM: PPC: Only use QPRs when available
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 <[email protected]> Signed-off-by: Avi Kivity <[email protected]>
1 parent 647dc49 commit 287d561

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

arch/powerpc/kvm/powerpc.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -335,13 +335,15 @@ static void kvmppc_complete_mmio_load(struct kvm_vcpu *vcpu,
335335
case KVM_REG_FPR:
336336
vcpu->arch.fpr[vcpu->arch.io_gpr & KVM_REG_MASK] = gpr;
337337
break;
338+
#ifdef CONFIG_PPC_BOOK3S
338339
case KVM_REG_QPR:
339340
vcpu->arch.qpr[vcpu->arch.io_gpr & KVM_REG_MASK] = gpr;
340341
break;
341342
case KVM_REG_FQPR:
342343
vcpu->arch.fpr[vcpu->arch.io_gpr & KVM_REG_MASK] = gpr;
343344
vcpu->arch.qpr[vcpu->arch.io_gpr & KVM_REG_MASK] = gpr;
344345
break;
346+
#endif
345347
default:
346348
BUG();
347349
}

0 commit comments

Comments
 (0)