1 /*
2  * mem_access.h: architecture specific mem_access handling routines
3  *
4  * This program is free software; you can redistribute it and/or modify it
5  * under the terms and conditions of the GNU General Public License,
6  * version 2, as published by the Free Software Foundation.
7  *
8  * This program is distributed in the hope it will be useful, but WITHOUT
9  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
10  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
11  * more details.
12  *
13  * You should have received a copy of the GNU General Public License along with
14  * this program; If not, see <http://www.gnu.org/licenses/>.
15  */
16 
17 #ifndef _ASM_ARM_MEM_ACCESS_H
18 #define _ASM_ARM_MEM_ACCESS_H
19 
20 static inline
p2m_mem_access_emulate_check(struct vcpu * v,const vm_event_response_t * rsp)21 bool p2m_mem_access_emulate_check(struct vcpu *v,
22                                   const vm_event_response_t *rsp)
23 {
24     /* Not supported on ARM. */
25     return false;
26 }
27 
28 /* vm_event and mem_access are supported on any ARM guest */
p2m_mem_access_sanity_check(struct domain * d)29 static inline bool p2m_mem_access_sanity_check(struct domain *d)
30 {
31     return true;
32 }
33 
34 /*
35  * Send mem event based on the access. Boolean return value indicates if trap
36  * needs to be injected into guest.
37  */
38 bool p2m_mem_access_check(paddr_t gpa, vaddr_t gla, const struct npfec npfec);
39 
40 struct page_info*
41 p2m_mem_access_check_and_get_page(vaddr_t gva, unsigned long flag,
42                                   const struct vcpu *v);
43 
44 #endif /* _ASM_ARM_MEM_ACCESS_H */
45 
46 /*
47  * Local variables:
48  * mode: C
49  * c-file-style: "BSD"
50  * c-basic-offset: 4
51  * indent-tabs-mode: nil
52  * End:
53  */
54