blob: e094d13dd282142bea6841de253e703206047796 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
|
#ifndef __ASM_PMAP_H__
#define __ASM_PMAP_H__
#include <xen/mm.h>
#include <asm/fixmap.h>
static inline void arch_pmap_map(unsigned int slot, mfn_t mfn)
{
lpae_t *entry = &xen_fixmap[slot];
lpae_t pte;
ASSERT(!lpae_is_valid(*entry));
pte = mfn_to_xen_entry(mfn, PAGE_HYPERVISOR_RW);
pte.pt.table = 1;
write_pte(entry, pte);
}
static inline void arch_pmap_unmap(unsigned int slot)
{
lpae_t pte = {};
write_pte(&xen_fixmap[slot], pte);
flush_xen_tlb_range_va_local(FIXMAP_ADDR(slot), PAGE_SIZE);
}
#endif /* __ASM_PMAP_H__ */
|