Skip to content
Navigation Menu
Toggle navigation
Sign in
In this repository
All GitHub Enterprise
↵
Jump to
↵
No suggested jump to results
In this repository
All GitHub Enterprise
↵
Jump to
↵
In this organization
All GitHub Enterprise
↵
Jump to
↵
In this repository
All GitHub Enterprise
↵
Jump to
↵
Sign in
Reseting focus
You signed in with another tab or window.
Reload
to refresh your session.
You signed out in another tab or window.
Reload
to refresh your session.
You switched accounts on another tab or window.
Reload
to refresh your session.
Dismiss alert
{{ message }}
mariux64
/
linux
Public
Notifications
You must be signed in to change notification settings
Fork
0
Star
0
Code
Issues
2
Pull requests
0
Actions
Projects
0
Wiki
Security
Insights
Additional navigation options
Code
Issues
Pull requests
Actions
Projects
Wiki
Security
Insights
Files
d50582e
Documentation
arch
alpha
arc
arm
boot
common
configs
crypto
firmware
include
asm
crypto
hardware
mach
xen
events.h
hypercall.h
hypervisor.h
interface.h
page-coherent.h
page.h
Kbuild
arch_timer.h
asm-offsets.h
assembler.h
atomic.h
bL_switcher.h
barrier.h
bitops.h
bug.h
bugs.h
cache.h
cacheflush.h
cachetype.h
checksum.h
clkdev.h
cmpxchg.h
compiler.h
cp15.h
cpu.h
cpuidle.h
cputype.h
cti.h
dcc.h
delay.h
device.h
div64.h
dma-contiguous.h
dma-iommu.h
dma-mapping.h
dma.h
domain.h
ecard.h
edac.h
elf.h
entry-macro-multi.S
exception.h
fb.h
fiq.h
firmware.h
fixmap.h
flat.h
floppy.h
fncpy.h
fpstate.h
ftrace.h
futex.h
glue-cache.h
glue-df.h
glue-pf.h
glue-proc.h
glue.h
gpio.h
hardirq.h
highmem.h
hugetlb-3level.h
hugetlb.h
hw_breakpoint.h
hw_irq.h
hwcap.h
hypervisor.h
ide.h
idmap.h
io.h
irq.h
irqflags.h
jump_label.h
kexec.h
kgdb.h
kmap_types.h
kprobes.h
kvm_arm.h
kvm_asm.h
kvm_coproc.h
kvm_emulate.h
kvm_host.h
kvm_mmio.h
kvm_mmu.h
kvm_psci.h
limits.h
linkage.h
mach-types.h
mc146818rtc.h
mcpm.h
mcs_spinlock.h
memblock.h
memory.h
mmu.h
mmu_context.h
module.h
mpu.h
mtd-xip.h
mutex.h
neon.h
nwflash.h
opcodes-sec.h
opcodes-virt.h
opcodes.h
outercache.h
page-nommu.h
page.h
pci.h
percpu.h
perf_event.h
pgalloc.h
pgtable-2level-hwdef.h
pgtable-2level-types.h
pgtable-2level.h
pgtable-3level-hwdef.h
pgtable-3level-types.h
pgtable-3level.h
pgtable-hwdef.h
pgtable-nommu.h
pgtable.h
pmu.h
probes.h
proc-fns.h
processor.h
procinfo.h
prom.h
psci.h
ptrace.h
seccomp.h
setup.h
shmparam.h
signal.h
smp.h
smp_plat.h
smp_scu.h
smp_twd.h
sparsemem.h
spinlock.h
spinlock_types.h
stackprotector.h
stacktrace.h
string.h
suspend.h
swab.h
switch_to.h
sync_bitops.h
syscall.h
system_info.h
system_misc.h
tcm.h
therm.h
thread_info.h
thread_notify.h
timex.h
tlb.h
tlbflush.h
tls.h
topology.h
traps.h
trusted_foundations.h
types.h
uaccess.h
ucontext.h
unified.h
unistd.h
unwind.h
uprobes.h
user.h
v7m.h
vfp.h
vfpmacros.h
vga.h
virt.h
word-at-a-time.h
xor.h
debug
uapi
kernel
kvm
lib
mach-at91
mach-axxia
mach-bcm
mach-berlin
mach-clps711x
mach-cns3xxx
mach-davinci
mach-dove
mach-ebsa110
mach-efm32
mach-ep93xx
mach-exynos
mach-footbridge
mach-gemini
mach-highbank
mach-hisi
mach-imx
mach-integrator
mach-iop13xx
mach-iop32x
mach-iop33x
mach-ixp4xx
mach-keystone
mach-ks8695
mach-lpc32xx
mach-mediatek
mach-mmp
mach-moxart
mach-msm
mach-mv78xx0
mach-mvebu
mach-mxs
mach-netx
mach-nomadik
mach-nspire
mach-omap1
mach-omap2
mach-orion5x
mach-picoxcell
mach-prima2
mach-pxa
mach-qcom
mach-realview
mach-rockchip
mach-rpc
mach-s3c24xx
mach-s3c64xx
mach-s5pv210
mach-sa1100
mach-shmobile
mach-socfpga
mach-spear
mach-sti
mach-sunxi
mach-tegra
mach-u300
mach-ux500
mach-versatile
mach-vexpress
mach-vt8500
mach-w90x900
mach-zynq
mm
net
nwfpe
oprofile
plat-iop
plat-omap
plat-orion
plat-pxa
plat-samsung
plat-versatile
tools
vfp
xen
Kconfig
Kconfig-nommu
Kconfig.debug
Makefile
arm64
avr32
blackfin
c6x
cris
frv
hexagon
ia64
m32r
m68k
metag
microblaze
mips
mn10300
openrisc
parisc
powerpc
s390
score
sh
sparc
tile
um
unicore32
x86
xtensa
.gitignore
Kconfig
block
crypto
drivers
firmware
fs
include
init
ipc
kernel
lib
mm
net
samples
scripts
security
sound
tools
usr
virt
.gitignore
.mailmap
COPYING
CREDITS
Kbuild
Kconfig
MAINTAINERS
Makefile
README
REPORTING-BUGS
Breadcrumbs
linux
/
arch
/
arm
/
include
/
asm
/
xen
/
page.h
Blame
Blame
Latest commit
History
History
110 lines (85 loc) · 2.87 KB
Breadcrumbs
linux
/
arch
/
arm
/
include
/
asm
/
xen
/
page.h
Top
File metadata and controls
Code
Blame
110 lines (85 loc) · 2.87 KB
Raw
#ifndef _ASM_ARM_XEN_PAGE_H #define _ASM_ARM_XEN_PAGE_H #include <asm/page.h> #include <asm/pgtable.h> #include <linux/pfn.h> #include <linux/types.h> #include <linux/dma-mapping.h> #include <xen/xen.h> #include <xen/interface/grant_table.h> #define phys_to_machine_mapping_valid(pfn) (1) #define mfn_to_virt(m) (__va(mfn_to_pfn(m) << PAGE_SHIFT)) #define pte_mfn pte_pfn #define mfn_pte pfn_pte /* Xen machine address */ typedef struct xmaddr { phys_addr_t maddr; } xmaddr_t; /* Xen pseudo-physical address */ typedef struct xpaddr { phys_addr_t paddr; } xpaddr_t; #define XMADDR(x) ((xmaddr_t) { .maddr = (x) }) #define XPADDR(x) ((xpaddr_t) { .paddr = (x) }) #define INVALID_P2M_ENTRY (~0UL) unsigned long __pfn_to_mfn(unsigned long pfn); extern struct rb_root phys_to_mach; static inline unsigned long pfn_to_mfn(unsigned long pfn) { unsigned long mfn; if (phys_to_mach.rb_node != NULL) { mfn = __pfn_to_mfn(pfn); if (mfn != INVALID_P2M_ENTRY) return mfn; } return pfn; } static inline unsigned long mfn_to_pfn(unsigned long mfn) { return mfn; } #define mfn_to_local_pfn(mfn) mfn_to_pfn(mfn) static inline xmaddr_t phys_to_machine(xpaddr_t phys) { unsigned offset = phys.paddr & ~PAGE_MASK; return XMADDR(PFN_PHYS(pfn_to_mfn(PFN_DOWN(phys.paddr))) | offset); } static inline xpaddr_t machine_to_phys(xmaddr_t machine) { unsigned offset = machine.maddr & ~PAGE_MASK; return XPADDR(PFN_PHYS(mfn_to_pfn(PFN_DOWN(machine.maddr))) | offset); } /* VIRT <-> MACHINE conversion */ #define virt_to_machine(v) (phys_to_machine(XPADDR(__pa(v)))) #define virt_to_mfn(v) (pfn_to_mfn(virt_to_pfn(v))) #define mfn_to_virt(m) (__va(mfn_to_pfn(m) << PAGE_SHIFT)) static inline xmaddr_t arbitrary_virt_to_machine(void *vaddr) { /* TODO: assuming it is mapped in the kernel 1:1 */ return virt_to_machine(vaddr); } /* TODO: this shouldn't be here but it is because the frontend drivers * are using it (its rolled in headers) even though we won't hit the code path. * So for right now just punt with this. */ static inline pte_t *lookup_address(unsigned long address, unsigned int *level) { BUG(); return NULL; } extern int set_foreign_p2m_mapping(struct gnttab_map_grant_ref *map_ops, struct gnttab_map_grant_ref *kmap_ops, struct page **pages, unsigned int count); extern int clear_foreign_p2m_mapping(struct gnttab_unmap_grant_ref *unmap_ops, struct gnttab_map_grant_ref *kmap_ops, struct page **pages, unsigned int count); bool __set_phys_to_machine(unsigned long pfn, unsigned long mfn); bool __set_phys_to_machine_multi(unsigned long pfn, unsigned long mfn, unsigned long nr_pages); static inline bool set_phys_to_machine(unsigned long pfn, unsigned long mfn) { return __set_phys_to_machine(pfn, mfn); } #define xen_remap(cookie, size) ioremap_cache((cookie), (size)) #define xen_unmap(cookie) iounmap((cookie)) #endif /* _ASM_ARM_XEN_PAGE_H */
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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
You can’t perform that action at this time.