1 /* SPDX-License-Identifier: GPL-2.0-only */ 2 /* 3 * include/asm-generic/monitor.h 4 * 5 * Arch-specific monitor_op domctl handler. 6 * 7 * Copyright (c) 2015 Tamas K Lengyel (tamas@tklengyel.com) 8 * Copyright (c) 2016, Bitdefender S.R.L. 9 * 10 */ 11 12 #ifndef __ASM_GENERIC_MONITOR_H__ 13 #define __ASM_GENERIC_MONITOR_H__ 14 15 #include <xen/errno.h> 16 #include <xen/lib.h> 17 18 struct domain; 19 struct xen_domctl_monitor_op; 20 21 static inline arch_monitor_allow_userspace(struct domain * d,bool allow_userspace)22void arch_monitor_allow_userspace(struct domain *d, bool allow_userspace) 23 { 24 } 25 26 static inline arch_monitor_domctl_op(struct domain * d,struct xen_domctl_monitor_op * mop)27int arch_monitor_domctl_op(struct domain *d, struct xen_domctl_monitor_op *mop) 28 { 29 /* No arch-specific monitor ops on GENERIC. */ 30 return -EOPNOTSUPP; 31 } 32 33 #ifndef HAS_ARCH_MONITOR_DOMCTL_EVENT 34 static inline arch_monitor_domctl_event(struct domain * d,struct xen_domctl_monitor_op * mop)35int arch_monitor_domctl_event(struct domain *d, 36 struct xen_domctl_monitor_op *mop) 37 { 38 BUG_ON("unimplemented"); 39 } 40 #endif 41 42 static inline arch_monitor_init_domain(struct domain * d)43int arch_monitor_init_domain(struct domain *d) 44 { 45 /* No arch-specific domain initialization on GENERIC. */ 46 return 0; 47 } 48 49 static inline arch_monitor_cleanup_domain(struct domain * d)50void arch_monitor_cleanup_domain(struct domain *d) 51 { 52 /* No arch-specific domain cleanup on GENERIC. */ 53 } 54 55 #endif /* __ASM_GENERIC_MONITOR_H__ */ 56 57 /* 58 * Local variables: 59 * mode: C 60 * c-file-style: BSD 61 * c-basic-offset: 4 62 * indent-tabs-mode: nil 63 * End: 64 */ 65