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_S390_SIEIC 8*edb5b700SSean Christopherson ucall_arch_init(struct kvm_vm * vm,vm_paddr_t mmio_gpa)9b35f4c73SSean Christophersonstatic inline void ucall_arch_init(struct kvm_vm *vm, vm_paddr_t mmio_gpa) 10b35f4c73SSean Christopherson { 11b35f4c73SSean Christopherson } 12b35f4c73SSean Christopherson ucall_arch_do_ucall(vm_vaddr_t uc)13b35f4c73SSean Christophersonstatic inline void ucall_arch_do_ucall(vm_vaddr_t uc) 14b35f4c73SSean Christopherson { 15b35f4c73SSean Christopherson /* Exit via DIAGNOSE 0x501 (normally used for breakpoints) */ 16b35f4c73SSean Christopherson asm volatile ("diag 0,%0,0x501" : : "a"(uc) : "memory"); 17b35f4c73SSean Christopherson } 18b35f4c73SSean Christopherson 19b35f4c73SSean Christopherson #endif 20