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