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
564eb71
Documentation
arch
block
crypto
drivers
firmware
fs
include
acpi
asm-generic
clocksource
crypto
drm
dt-bindings
keys
kvm
linux
math-emu
media
memory
misc
net
pcmcia
ras
rdma
rxrpc
scsi
sound
target
trace
uapi
video
xen
interface
acpi.h
balloon.h
events.h
features.h
grant_table.h
hvc-console.h
hvm.h
page.h
platform_pci.h
swiotlb-xen.h
tmem.h
xen-ops.h
xen.h
xenbus.h
xenbus_dev.h
xencomm.h
Kbuild
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
/
include
/
xen
/
xencomm.h
Copy path
Blame
Blame
Latest commit
History
History
77 lines (67 loc) · 2.55 KB
Breadcrumbs
linux
/
include
/
xen
/
xencomm.h
Top
File metadata and controls
Code
Blame
77 lines (67 loc) · 2.55 KB
Raw
/* * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * * Copyright (C) IBM Corp. 2006 * * Authors: Hollis Blanchard <hollisb@us.ibm.com> * Jerone Young <jyoung5@us.ibm.com> */ #ifndef _LINUX_XENCOMM_H_ #define _LINUX_XENCOMM_H_ #include <xen/interface/xencomm.h> #define XENCOMM_MINI_ADDRS 3 struct xencomm_mini { struct xencomm_desc _desc; uint64_t address[XENCOMM_MINI_ADDRS]; }; /* To avoid additionnal virt to phys conversion, an opaque structure is presented. */ struct xencomm_handle; extern void xencomm_free(struct xencomm_handle *desc); extern struct xencomm_handle *xencomm_map(void *ptr, unsigned long bytes); extern struct xencomm_handle *__xencomm_map_no_alloc(void *ptr, unsigned long bytes, struct xencomm_mini *xc_area); #if 0 #define XENCOMM_MINI_ALIGNED(xc_desc, n) \ struct xencomm_mini xc_desc ## _base[(n)] \ __attribute__((__aligned__(sizeof(struct xencomm_mini)))); \ struct xencomm_mini *xc_desc = &xc_desc ## _base[0]; #else /* * gcc bug workaround: * http://gcc.gnu.org/bugzilla/show_bug.cgi?id=16660 * gcc doesn't handle properly stack variable with * __attribute__((__align__(sizeof(struct xencomm_mini)))) */ #define XENCOMM_MINI_ALIGNED(xc_desc, n) \ unsigned char xc_desc ## _base[((n) + 1 ) * \ sizeof(struct xencomm_mini)]; \ struct xencomm_mini *xc_desc = (struct xencomm_mini *) \ ((unsigned long)xc_desc ## _base + \ (sizeof(struct xencomm_mini) - \ ((unsigned long)xc_desc ## _base) % \ sizeof(struct xencomm_mini))); #endif #define xencomm_map_no_alloc(ptr, bytes) \ ({ XENCOMM_MINI_ALIGNED(xc_desc, 1); \ __xencomm_map_no_alloc(ptr, bytes, xc_desc); }) /* provided by architecture code: */ extern unsigned long xencomm_vtop(unsigned long vaddr); static inline void *xencomm_pa(void *ptr) { return (void *)xencomm_vtop((unsigned long)ptr); } #define xen_guest_handle(hnd) ((hnd).p) #endif /* _LINUX_XENCOMM_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
You can’t perform that action at this time.