summaryrefslogtreecommitdiffstats
path: root/arch/powerpc/kvm/book3s_xive.h
diff options
context:
space:
mode:
authorGreg Kurz <groug@kaod.org>2019-09-27 13:53:55 +0200
committerPaul Mackerras <paulus@ozlabs.org>2019-10-22 07:29:02 +0200
commit8db29ea2391cc6f5b73cc9c04b2dee4409b9fc05 (patch)
tree2ab71ed7ee4181ec6a7eb6afee2c1bb9bb6a36c5 /arch/powerpc/kvm/book3s_xive.h
parentKVM: PPC: Book3S HV: XIVE: Show VP id in debugfs (diff)
downloadlinux-8db29ea2391cc6f5b73cc9c04b2dee4409b9fc05.tar.xz
linux-8db29ea2391cc6f5b73cc9c04b2dee4409b9fc05.zip
KVM: PPC: Book3S HV: XIVE: Compute the VP id in a common helper
Reduce code duplication by consolidating the checking of vCPU ids and VP ids to a common helper used by both legacy and native XIVE KVM devices. And explain the magic with a comment. Signed-off-by: Greg Kurz <groug@kaod.org> Signed-off-by: Paul Mackerras <paulus@ozlabs.org>
Diffstat (limited to 'arch/powerpc/kvm/book3s_xive.h')
-rw-r--r--arch/powerpc/kvm/book3s_xive.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/arch/powerpc/kvm/book3s_xive.h b/arch/powerpc/kvm/book3s_xive.h
index fe3ed50e0818..90cf6ec35a68 100644
--- a/arch/powerpc/kvm/book3s_xive.h
+++ b/arch/powerpc/kvm/book3s_xive.h
@@ -296,6 +296,7 @@ int kvmppc_xive_attach_escalation(struct kvm_vcpu *vcpu, u8 prio,
struct kvmppc_xive *kvmppc_xive_get_device(struct kvm *kvm, u32 type);
void xive_cleanup_single_escalation(struct kvm_vcpu *vcpu,
struct kvmppc_xive_vcpu *xc, int irq);
+int kvmppc_xive_compute_vp_id(struct kvmppc_xive *xive, u32 cpu, u32 *vp);
#endif /* CONFIG_KVM_XICS */
#endif /* _KVM_PPC_BOOK3S_XICS_H */