diff options
author | Cédric Le Goater <clg@kaod.org> | 2021-07-20 15:42:08 +0200 |
---|---|---|
committer | Michael Ellerman <mpe@ellerman.id.au> | 2021-08-10 15:15:01 +0200 |
commit | b68c6646cce5ee8caefa6333ee743f960222dcea (patch) | |
tree | ed859956bea3ed1c9de275166a94aeb0b9e6174e /arch/powerpc/kvm/book3s_xive.h | |
parent | powerpc: use IRQF_NO_DEBUG for IPIs (diff) | |
download | linux-b68c6646cce5ee8caefa6333ee743f960222dcea.tar.xz linux-b68c6646cce5ee8caefa6333ee743f960222dcea.zip |
KVM: PPC: Book3S HV: XIVE: Add a 'flags' field
Use it to hold platform specific features. P9 DD2 introduced
single-escalation support. P10 will add others.
Signed-off-by: Cédric Le Goater <clg@kaod.org>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/20210720134209.256133-2-clg@kaod.org
Diffstat (limited to 'arch/powerpc/kvm/book3s_xive.h')
-rw-r--r-- | arch/powerpc/kvm/book3s_xive.h | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/arch/powerpc/kvm/book3s_xive.h b/arch/powerpc/kvm/book3s_xive.h index afe9eeac6d56..73c3cd25093c 100644 --- a/arch/powerpc/kvm/book3s_xive.h +++ b/arch/powerpc/kvm/book3s_xive.h @@ -97,6 +97,8 @@ struct kvmppc_xive_ops { int (*reset_mapped)(struct kvm *kvm, unsigned long guest_irq); }; +#define KVMPPC_XIVE_FLAG_SINGLE_ESCALATION 0x1 + struct kvmppc_xive { struct kvm *kvm; struct kvm_device *dev; @@ -133,7 +135,7 @@ struct kvmppc_xive { u32 q_page_order; /* Flags */ - u8 single_escalation; + u8 flags; /* Number of entries in the VP block */ u32 nr_servers; @@ -308,5 +310,10 @@ void xive_cleanup_single_escalation(struct kvm_vcpu *vcpu, int kvmppc_xive_compute_vp_id(struct kvmppc_xive *xive, u32 cpu, u32 *vp); int kvmppc_xive_set_nr_servers(struct kvmppc_xive *xive, u64 addr); +static inline bool kvmppc_xive_has_single_escalation(struct kvmppc_xive *xive) +{ + return xive->flags & KVMPPC_XIVE_FLAG_SINGLE_ESCALATION; +} + #endif /* CONFIG_KVM_XICS */ #endif /* _KVM_PPC_BOOK3S_XICS_H */ |