irq.h 386 B

12345678910111213141516171819202122
  1. /* SPDX-License-Identifier: GPL-2.0 */
  2. #ifndef __IRQ_H
  3. #define __IRQ_H
  4. #include <linux/kvm_host.h>
  5. static inline int irqchip_in_kernel(struct kvm *kvm)
  6. {
  7. int ret = 0;
  8. #ifdef CONFIG_KVM_MPIC
  9. ret = ret || (kvm->arch.mpic != NULL);
  10. #endif
  11. #ifdef CONFIG_KVM_XICS
  12. ret = ret || (kvm->arch.xics != NULL);
  13. ret = ret || (kvm->arch.xive != NULL);
  14. #endif
  15. smp_rmb();
  16. return ret;
  17. }
  18. #endif