ucall.h 455 B

1234567891011121314151617181920
  1. /* SPDX-License-Identifier: GPL-2.0-only */
  2. #ifndef SELFTEST_KVM_UCALL_H
  3. #define SELFTEST_KVM_UCALL_H
  4. #include "kvm_util.h"
  5. #define UCALL_EXIT_REASON KVM_EXIT_MMIO
  6. /*
  7. * ucall_exit_mmio_addr holds per-VM values (global data is duplicated by each
  8. * VM), it must not be accessed from host code.
  9. */
  10. extern vm_vaddr_t *ucall_exit_mmio_addr;
  11. static inline void ucall_arch_do_ucall(vm_vaddr_t uc)
  12. {
  13. WRITE_ONCE(*ucall_exit_mmio_addr, uc);
  14. }
  15. #endif