json: Update references to RFC 7159 to RFC 8259
[qemu/armbru.git] / target / i386 / hvf / x86_mmu.h
blob0bd1acc94fd0c41f1e9de423813bf7d346fccd0f
1 /*
2 * Copyright (C) 2016 Veertu Inc,
3 * Copyright (C) 2017 Google Inc,
5 * This program is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU Lesser General Public
7 * License as published by the Free Software Foundation; either
8 * version 2 of the License, or (at your option) any later version.
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 * Lesser General Public License for more details.
15 * You should have received a copy of the GNU Lesser General Public
16 * License along with this program; if not, see <http://www.gnu.org/licenses/>.
18 #ifndef __X86_MMU_H__
19 #define __X86_MMU_H__
21 #define PT_PRESENT (1 << 0)
22 #define PT_WRITE (1 << 1)
23 #define PT_USER (1 << 2)
24 #define PT_WT (1 << 3)
25 #define PT_CD (1 << 4)
26 #define PT_ACCESSED (1 << 5)
27 #define PT_DIRTY (1 << 6)
28 #define PT_PS (1 << 7)
29 #define PT_GLOBAL (1 << 8)
30 #define PT_NX (1llu << 63)
32 /* error codes */
33 #define MMU_PAGE_PT (1 << 0)
34 #define MMU_PAGE_WT (1 << 1)
35 #define MMU_PAGE_US (1 << 2)
36 #define MMU_PAGE_NX (1 << 3)
38 bool mmu_gva_to_gpa(struct CPUState *cpu, target_ulong gva, uint64_t *gpa);
40 void vmx_write_mem(struct CPUState *cpu, target_ulong gva, void *data, int bytes);
41 void vmx_read_mem(struct CPUState *cpu, void *data, target_ulong gva, int bytes);
43 #endif /* __X86_MMU_H__ */