Skip to contentSkip to conversation

KVM: PPC: Only use QPRs when available

PATCH New Alexander Graf 1 participant 2 messages Apr 1, 2010 1 message not in the archive

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/2 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.

---
 arch/powerpc/kvm/powerpc.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
arch/powerpc/kvm/powerpc.c +2 -0
index a0e3172..cbb2ade 100644
@@ -331,6 +331,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;
@@ -338,6 +339,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();
 	}
Signature · 1 line
1.6.0.2

A message that is not in the archive (sent off-list or not yet received): 1270128802-12985-1-git-send-email-agraf-l3A5Bk7waGM@public.gmane.org

#2 lore raw

PATCH 2/2 KVM: PPC: Don't export Book3S symbols on BookE

Book3S knows how to convert floats to doubles and vice versa. BookE doesn't. So let's make sure we don't export them on BookE.

This fixes a link error on BookE with CONFIG_KVM=y.

---
 arch/powerpc/kernel/ppc_ksyms.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
arch/powerpc/kernel/ppc_ksyms.c +2 -0
index 58fdb3a..bc9f39d 100644
@@ -101,8 +101,10 @@ EXPORT_SYMBOL(pci_dram_offset);
 EXPORT_SYMBOL(start_thread);
 EXPORT_SYMBOL(kernel_thread);
 
+#ifndef CONFIG_BOOKE
 EXPORT_SYMBOL_GPL(cvt_df);
 EXPORT_SYMBOL_GPL(cvt_fd);
+#endif
 EXPORT_SYMBOL(giveup_fpu);
 #ifdef CONFIG_ALTIVEC
 EXPORT_SYMBOL(giveup_altivec);
Signature · 1 line
1.6.0.2