iPXE
grant_table.h
Go to the documentation of this file.
1/* SPDX-License-Identifier: MIT */
2/******************************************************************************
3 * grant_table.h
4 *
5 * Interface for granting foreign access to page frames, and receiving
6 * page-ownership transfers.
7 *
8 * Copyright (c) 2004, K A Fraser
9 */
10
11#ifndef __XEN_PUBLIC_GRANT_TABLE_H__
12#define __XEN_PUBLIC_GRANT_TABLE_H__
13
15FILE_SECBOOT ( PERMITTED );
16
17#include "xen.h"
18
19/*
20 * `incontents 150 gnttab Grant Tables
21 *
22 * Xen's grant tables provide a generic mechanism to memory sharing
23 * between domains. This shared memory interface underpins the split
24 * device drivers for block and network IO.
25 *
26 * Each domain has its own grant table. This is a data structure that
27 * is shared with Xen; it allows the domain to tell Xen what kind of
28 * permissions other domains have on its pages. Entries in the grant
29 * table are identified by grant references. A grant reference is an
30 * integer, which indexes into the grant table. It acts as a
31 * capability which the grantee can use to perform operations on the
32 * granter's memory.
33 *
34 * This capability-based system allows shared-memory communications
35 * between unprivileged domains. A grant reference also encapsulates
36 * the details of a shared page, removing the need for a domain to
37 * know the real machine address of a page it is sharing. This makes
38 * it possible to share memory correctly with domains running in
39 * fully virtualised memory.
40 */
41
42/***********************************
43 * GRANT TABLE REPRESENTATION
44 */
45
46/* Some rough guidelines on accessing and updating grant-table entries
47 * in a concurrency-safe manner. For more information, Linux contains a
48 * reference implementation for guest OSes (drivers/xen/grant_table.c, see
49 * http://git.kernel.org/?p=linux/kernel/git/torvalds/linux.git;a=blob;f=drivers/xen/grant-table.c;hb=HEAD
50 *
51 * NB. WMB is a no-op on current-generation x86 processors. However, a
52 * compiler barrier will still be required.
53 *
54 * Introducing a valid entry into the grant table:
55 * 1. Write ent->domid.
56 * 2. Write ent->frame:
57 * GTF_permit_access: Frame to which access is permitted.
58 * GTF_accept_transfer: Pseudo-phys frame slot being filled by new
59 * frame, or zero if none.
60 * 3. Write memory barrier (WMB).
61 * 4. Write ent->flags, inc. valid type.
62 *
63 * Invalidating an unused GTF_permit_access entry:
64 * 1. flags = ent->flags.
65 * 2. Observe that !(flags & (GTF_reading|GTF_writing)).
66 * 3. Check result of SMP-safe CMPXCHG(&ent->flags, flags, 0).
67 * NB. No need for WMB as reuse of entry is control-dependent on success of
68 * step 3, and all architectures guarantee ordering of ctrl-dep writes.
69 *
70 * Invalidating an in-use GTF_permit_access entry:
71 * This cannot be done directly. Request assistance from the domain controller
72 * which can set a timeout on the use of a grant entry and take necessary
73 * action. (NB. This is not yet implemented!).
74 *
75 * Invalidating an unused GTF_accept_transfer entry:
76 * 1. flags = ent->flags.
77 * 2. Observe that !(flags & GTF_transfer_committed). [*]
78 * 3. Check result of SMP-safe CMPXCHG(&ent->flags, flags, 0).
79 * NB. No need for WMB as reuse of entry is control-dependent on success of
80 * step 3, and all architectures guarantee ordering of ctrl-dep writes.
81 * [*] If GTF_transfer_committed is set then the grant entry is 'committed'.
82 * The guest must /not/ modify the grant entry until the address of the
83 * transferred frame is written. It is safe for the guest to spin waiting
84 * for this to occur (detect by observing GTF_transfer_completed in
85 * ent->flags).
86 *
87 * Invalidating a committed GTF_accept_transfer entry:
88 * 1. Wait for (ent->flags & GTF_transfer_completed).
89 *
90 * Changing a GTF_permit_access from writable to read-only:
91 * Use SMP-safe CMPXCHG to set GTF_readonly, while checking !GTF_writing.
92 *
93 * Changing a GTF_permit_access from read-only to writable:
94 * Use SMP-safe bit-setting instruction.
95 */
96
97/*
98 * Reference to a grant entry in a specified domain's grant table.
99 */
101
102/*
103 * A grant table comprises a packed array of grant entries in one or more
104 * page frames shared between Xen and a guest.
105 * [XEN]: This field is written by Xen and read by the sharing guest.
106 * [GST]: This field is written by the guest and read by Xen.
107 */
108
109/*
110 * Version 1 of the grant table entry structure is maintained largely for
111 * backwards compatibility. New guests are recommended to support using
112 * version 2 to overcome version 1 limitations, but to default to version 1.
113 */
114#if __XEN_INTERFACE_VERSION__ < 0x0003020a
115#define grant_entry_v1 grant_entry
116#define grant_entry_v1_t grant_entry_t
117#endif
119 /* GTF_xxx: various type and flag information. [XEN,GST] */
121 /* The domain being granted foreign privileges. [GST] */
123 /*
124 * GTF_permit_access: GFN that @domid is allowed to map and access. [GST]
125 * GTF_accept_transfer: GFN that @domid is allowed to transfer into. [GST]
126 * GTF_transfer_completed: MFN whose ownership transferred by @domid
127 * (non-translated guests only). [XEN]
128 */
130};
132
133/* The first few grant table entries will be preserved across grant table
134 * version changes and may be pre-populated at domain creation by tools.
135 */
136#define GNTTAB_NR_RESERVED_ENTRIES 8
137#define GNTTAB_RESERVED_CONSOLE 0
138#define GNTTAB_RESERVED_XENSTORE 1
139
140/*
141 * Type of grant entry.
142 * GTF_invalid: This grant entry grants no privileges.
143 * GTF_permit_access: Allow @domid to map/access @frame.
144 * GTF_accept_transfer: Allow @domid to transfer ownership of one page frame
145 * to this guest. Xen writes the page number to @frame.
146 * GTF_transitive: Allow @domid to transitively access a subrange of
147 * @trans_grant in @trans_domid. No mappings are allowed.
148 */
149#define GTF_invalid (0U<<0)
150#define GTF_permit_access (1U<<0)
151#define GTF_accept_transfer (2U<<0)
152#define GTF_transitive (3U<<0)
153#define GTF_type_mask (3U<<0)
154
155/*
156 * Subflags for GTF_permit_access and GTF_transitive.
157 * GTF_readonly: Restrict @domid to read-only mappings and accesses. [GST]
158 * GTF_reading: Grant entry is currently mapped for reading by @domid. [XEN]
159 * GTF_writing: Grant entry is currently mapped for writing by @domid. [XEN]
160 * Further subflags for GTF_permit_access only.
161 * GTF_PAT, GTF_PWT, GTF_PCD: (x86) cache attribute flags to be used for
162 * mappings of the grant [GST]
163 * GTF_sub_page: Grant access to only a subrange of the page. @domid
164 * will only be allowed to copy from the grant, and not
165 * map it. [GST]
166 */
167#define _GTF_readonly (2)
168#define GTF_readonly (1U<<_GTF_readonly)
169#define _GTF_reading (3)
170#define GTF_reading (1U<<_GTF_reading)
171#define _GTF_writing (4)
172#define GTF_writing (1U<<_GTF_writing)
173#define _GTF_PWT (5)
174#define GTF_PWT (1U<<_GTF_PWT)
175#define _GTF_PCD (6)
176#define GTF_PCD (1U<<_GTF_PCD)
177#define _GTF_PAT (7)
178#define GTF_PAT (1U<<_GTF_PAT)
179#define _GTF_sub_page (8)
180#define GTF_sub_page (1U<<_GTF_sub_page)
181
182/*
183 * Subflags for GTF_accept_transfer:
184 * GTF_transfer_committed: Xen sets this flag to indicate that it is committed
185 * to transferring ownership of a page frame. When a guest sees this flag
186 * it must /not/ modify the grant entry until GTF_transfer_completed is
187 * set by Xen.
188 * GTF_transfer_completed: It is safe for the guest to spin-wait on this flag
189 * after reading GTF_transfer_committed. Xen will always write the frame
190 * address, followed by ORing this flag, in a timely manner.
191 */
192#define _GTF_transfer_committed (2)
193#define GTF_transfer_committed (1U<<_GTF_transfer_committed)
194#define _GTF_transfer_completed (3)
195#define GTF_transfer_completed (1U<<_GTF_transfer_completed)
196
197/*
198 * Version 2 grant table entries. These fulfil the same role as
199 * version 1 entries, but can represent more complicated operations.
200 * Any given domain will have either a version 1 or a version 2 table,
201 * and every entry in the table will be the same version.
202 *
203 * The interface by which domains use grant references does not depend
204 * on the grant table version in use by the other domain.
205 */
206#if __XEN_INTERFACE_VERSION__ >= 0x0003020a
207/*
208 * Version 1 and version 2 grant entries share a common prefix. The
209 * fields of the prefix are documented as part of struct
210 * grant_entry_v1.
211 */
212struct grant_entry_header {
215};
216typedef struct grant_entry_header grant_entry_header_t;
217
218/*
219 * Version 2 of the grant entry structure.
220 */
221union grant_entry_v2 {
222 grant_entry_header_t hdr;
223
224 /*
225 * This member is used for V1-style full page grants, where either:
226 *
227 * -- hdr.type is GTF_accept_transfer, or
228 * -- hdr.type is GTF_permit_access and GTF_sub_page is not set.
229 *
230 * In that case, the frame field has the same semantics as the
231 * field of the same name in the V1 entry structure.
232 */
233 struct {
234 grant_entry_header_t hdr;
235 uint32_t pad0;
237 } full_page;
238
239 /*
240 * If the grant type is GTF_grant_access and GTF_sub_page is set,
241 * @domid is allowed to access bytes [@page_off,@page_off+@length)
242 * in frame @frame.
243 */
244 struct {
245 grant_entry_header_t hdr;
246 uint16_t page_off;
249 } sub_page;
250
251 /*
252 * If the grant is GTF_transitive, @domid is allowed to use the
253 * grant @gref in domain @trans_domid, as if it was the local
254 * domain. Obviously, the transitive access must be compatible
255 * with the original grant.
256 *
257 * The current version of Xen does not allow transitive grants
258 * to be mapped.
259 */
260 struct {
261 grant_entry_header_t hdr;
262 domid_t trans_domid;
263 uint16_t pad0;
264 grant_ref_t gref;
265 } transitive;
266
267 uint32_t __spacer[4]; /* Pad to a power of two */
268};
269typedef union grant_entry_v2 grant_entry_v2_t;
270
271typedef uint16_t grant_status_t;
272
273#endif /* __XEN_INTERFACE_VERSION__ */
274
275/***********************************
276 * GRANT TABLE QUERIES AND USES
277 */
278
279/* ` enum neg_errnoval
280 * ` HYPERVISOR_grant_table_op(enum grant_table_op cmd,
281 * ` void *args,
282 * ` unsigned int count)
283 * `
284 *
285 * @args points to an array of a per-command data structure. The array
286 * has @count members
287 */
288
289/* ` enum grant_table_op { // GNTTABOP_* => struct gnttab_* */
290#define GNTTABOP_map_grant_ref 0
291#define GNTTABOP_unmap_grant_ref 1
292#define GNTTABOP_setup_table 2
293#define GNTTABOP_dump_table 3
294#define GNTTABOP_transfer 4
295#define GNTTABOP_copy 5
296#define GNTTABOP_query_size 6
297#define GNTTABOP_unmap_and_replace 7
298#if __XEN_INTERFACE_VERSION__ >= 0x0003020a
299#define GNTTABOP_set_version 8
300#define GNTTABOP_get_status_frames 9
301#define GNTTABOP_get_version 10
302#define GNTTABOP_swap_grant_ref 11
303#define GNTTABOP_cache_flush 12
304#endif /* __XEN_INTERFACE_VERSION__ */
305/* ` } */
306
307/*
308 * Handle to track a mapping created via a grant reference.
309 */
311
312/*
313 * GNTTABOP_map_grant_ref: Map the grant entry (<dom>,<ref>) for access
314 * by devices and/or host CPUs. If successful, <handle> is a tracking number
315 * that must be presented later to destroy the mapping(s). On error, <status>
316 * is a negative status code.
317 * NOTES:
318 * 1. If GNTMAP_device_map is specified then <dev_bus_addr> is the address
319 * via which I/O devices may access the granted frame.
320 * 2. If GNTMAP_host_map is specified then a mapping will be added at
321 * either a host virtual address in the current address space, or at
322 * a PTE at the specified machine address. The type of mapping to
323 * perform is selected through the GNTMAP_contains_pte flag, and the
324 * address is specified in <host_addr>.
325 * 3. Mappings should only be destroyed via GNTTABOP_unmap_grant_ref. If a
326 * host mapping is destroyed by other means then it is *NOT* guaranteed
327 * to be accounted to the correct grant reference!
328 */
330 /* IN parameters. */
332 uint32_t flags; /* GNTMAP_* */
335 /* OUT parameters. */
336 int16_t status; /* => enum grant_status */
339};
342
343/*
344 * GNTTABOP_unmap_grant_ref: Destroy one or more grant-reference mappings
345 * tracked by <handle>. If <host_addr> or <dev_bus_addr> is zero, that
346 * field is ignored. If non-zero, they must refer to a device/host mapping
347 * that is tracked by <handle>
348 * NOTES:
349 * 1. The call may fail in an undefined manner if either mapping is not
350 * tracked by <handle>.
351 * 3. After executing a batch of unmaps, it is guaranteed that no stale
352 * mappings will remain in the device or host TLBs.
353 */
355 /* IN parameters. */
359 /* OUT parameters. */
360 int16_t status; /* => enum grant_status */
361};
364
365/*
366 * GNTTABOP_setup_table: Set up a grant table for <dom> comprising at least
367 * <nr_frames> pages. The frame addresses are written to the <frame_list>.
368 * Only <nr_frames> addresses are written, even if the table is larger.
369 * NOTES:
370 * 1. <dom> may be specified as DOMID_SELF.
371 * 2. Only a sufficiently-privileged domain may specify <dom> != DOMID_SELF.
372 * 3. Xen may not support more than a single grant-table page per domain.
373 */
375 /* IN parameters. */
378 /* OUT parameters. */
379 int16_t status; /* => enum grant_status */
380#if __XEN_INTERFACE_VERSION__ < 0x00040300
381 XEN_GUEST_HANDLE(ulong) frame_list;
382#else
383 XEN_GUEST_HANDLE(xen_pfn_t) frame_list;
384#endif
385};
388
389/*
390 * GNTTABOP_dump_table: Dump the contents of the grant table to the
391 * xen console. Debugging use only.
392 */
394 /* IN parameters. */
396 /* OUT parameters. */
397 int16_t status; /* => enum grant_status */
398};
401
402/*
403 * GNTTABOP_transfer: Transfer <frame> to a foreign domain. The foreign domain
404 * has previously registered its interest in the transfer via <domid, ref>.
405 *
406 * Note that, even if the transfer fails, the specified page no longer belongs
407 * to the calling domain *unless* the error is GNTST_bad_page.
408 *
409 * Note further that only PV guests can use this operation.
410 */
412 /* IN parameters. */
416 /* OUT parameters. */
418};
421
422
423/*
424 * GNTTABOP_copy: Hypervisor based copy
425 * source and destinations can be eithers MFNs or, for foreign domains,
426 * grant references. the foreign domain has to grant read/write access
427 * in its grant table.
428 *
429 * The flags specify what type source and destinations are (either MFN
430 * or grant reference).
431 *
432 * Note that this can also be used to copy data between two domains
433 * via a third party if the source and destination domains had previously
434 * grant appropriate access to their pages to the third party.
435 *
436 * source_offset specifies an offset in the source frame, dest_offset
437 * the offset in the target frame and len specifies the number of
438 * bytes to be copied.
439 */
440
441#define _GNTCOPY_source_gref (0)
442#define GNTCOPY_source_gref (1<<_GNTCOPY_source_gref)
443#define _GNTCOPY_dest_gref (1)
444#define GNTCOPY_dest_gref (1<<_GNTCOPY_dest_gref)
445
447 /* IN parameters. */
457 uint16_t flags; /* GNTCOPY_* */
458 /* OUT parameters. */
460};
463
464/*
465 * GNTTABOP_query_size: Query the current and maximum sizes of the shared
466 * grant table.
467 * NOTES:
468 * 1. <dom> may be specified as DOMID_SELF.
469 * 2. Only a sufficiently-privileged domain may specify <dom> != DOMID_SELF.
470 */
472 /* IN parameters. */
474 /* OUT parameters. */
477 int16_t status; /* => enum grant_status */
478};
481
482/*
483 * GNTTABOP_unmap_and_replace: Destroy one or more grant-reference mappings
484 * tracked by <handle> but atomically replace the page table entry with one
485 * pointing to the machine address under <new_addr>. <new_addr> will be
486 * redirected to the null entry.
487 * NOTES:
488 * 1. The call may fail in an undefined manner if either mapping is not
489 * tracked by <handle>.
490 * 2. After executing a batch of unmaps, it is guaranteed that no stale
491 * mappings will remain in the device or host TLBs.
492 */
494 /* IN parameters. */
498 /* OUT parameters. */
499 int16_t status; /* => enum grant_status */
500};
503
504#if __XEN_INTERFACE_VERSION__ >= 0x0003020a
505/*
506 * GNTTABOP_set_version: Request a particular version of the grant
507 * table shared table structure. This operation may be used to toggle
508 * between different versions, but must be performed while no grants
509 * are active. The only defined versions are 1 and 2.
510 */
511struct gnttab_set_version {
512 /* IN/OUT parameters */
514};
515typedef struct gnttab_set_version gnttab_set_version_t;
516DEFINE_XEN_GUEST_HANDLE(gnttab_set_version_t);
517
518
519/*
520 * GNTTABOP_get_status_frames: Get the list of frames used to store grant
521 * status for <dom>. In grant format version 2, the status is separated
522 * from the other shared grant fields to allow more efficient synchronization
523 * using barriers instead of atomic cmpexch operations.
524 * <nr_frames> specify the size of vector <frame_list>.
525 * The frame addresses are returned in the <frame_list>.
526 * Only <nr_frames> addresses are returned, even if the table is larger.
527 * NOTES:
528 * 1. <dom> may be specified as DOMID_SELF.
529 * 2. Only a sufficiently-privileged domain may specify <dom> != DOMID_SELF.
530 */
531struct gnttab_get_status_frames {
532 /* IN parameters. */
533 uint32_t nr_frames;
534 domid_t dom;
535 /* OUT parameters. */
536 int16_t status; /* => enum grant_status */
537 XEN_GUEST_HANDLE(uint64_t) frame_list;
538};
539typedef struct gnttab_get_status_frames gnttab_get_status_frames_t;
540DEFINE_XEN_GUEST_HANDLE(gnttab_get_status_frames_t);
541
542/*
543 * GNTTABOP_get_version: Get the grant table version which is in
544 * effect for domain <dom>.
545 */
546struct gnttab_get_version {
547 /* IN parameters */
548 domid_t dom;
550 /* OUT parameters */
552};
553typedef struct gnttab_get_version gnttab_get_version_t;
554DEFINE_XEN_GUEST_HANDLE(gnttab_get_version_t);
555
556/*
557 * GNTTABOP_swap_grant_ref: Swap the contents of two grant entries.
558 */
559struct gnttab_swap_grant_ref {
560 /* IN parameters */
561 grant_ref_t ref_a;
562 grant_ref_t ref_b;
563 /* OUT parameters */
564 int16_t status; /* => enum grant_status */
565};
566typedef struct gnttab_swap_grant_ref gnttab_swap_grant_ref_t;
567DEFINE_XEN_GUEST_HANDLE(gnttab_swap_grant_ref_t);
568
569/*
570 * Issue one or more cache maintenance operations on a portion of a
571 * page granted to the calling domain by a foreign domain.
572 */
573struct gnttab_cache_flush {
574 union {
575 uint64_t dev_bus_addr;
577 } a;
578 uint16_t offset; /* offset from start of grant */
579 uint16_t length; /* size within the grant */
580#define GNTTAB_CACHE_CLEAN (1u<<0)
581#define GNTTAB_CACHE_INVAL (1u<<1)
582#define GNTTAB_CACHE_SOURCE_GREF (1u<<31)
583 uint32_t op;
584};
585typedef struct gnttab_cache_flush gnttab_cache_flush_t;
586DEFINE_XEN_GUEST_HANDLE(gnttab_cache_flush_t);
587
588#endif /* __XEN_INTERFACE_VERSION__ */
589
590/*
591 * Bitfield values for gnttab_map_grant_ref.flags.
592 */
593 /* Map the grant entry for access by I/O devices. */
594#define _GNTMAP_device_map (0)
595#define GNTMAP_device_map (1<<_GNTMAP_device_map)
596 /* Map the grant entry for access by host CPUs. */
597#define _GNTMAP_host_map (1)
598#define GNTMAP_host_map (1<<_GNTMAP_host_map)
599 /* Accesses to the granted frame will be restricted to read-only access. */
600#define _GNTMAP_readonly (2)
601#define GNTMAP_readonly (1<<_GNTMAP_readonly)
602 /*
603 * GNTMAP_host_map subflag:
604 * 0 => The host mapping is usable only by the guest OS.
605 * 1 => The host mapping is usable by guest OS + current application.
606 */
607#define _GNTMAP_application_map (3)
608#define GNTMAP_application_map (1<<_GNTMAP_application_map)
609
610 /*
611 * GNTMAP_contains_pte subflag:
612 * 0 => This map request contains a host virtual address.
613 * 1 => This map request contains the machine addess of the PTE to update.
614 */
615#define _GNTMAP_contains_pte (4)
616#define GNTMAP_contains_pte (1<<_GNTMAP_contains_pte)
617
618/*
619 * Bits to be placed in guest kernel available PTE bits (architecture
620 * dependent; only supported when XENFEAT_gnttab_map_avail_bits is set).
621 */
622#define _GNTMAP_guest_avail0 (16)
623#define GNTMAP_guest_avail_mask ((uint32_t)~0 << _GNTMAP_guest_avail0)
624
625/*
626 * Values for error status returns. All errors are -ve.
627 */
628/* ` enum grant_status { */
629#define GNTST_okay (0) /* Normal return. */
630#define GNTST_general_error (-1) /* General undefined error. */
631#define GNTST_bad_domain (-2) /* Unrecognsed domain id. */
632#define GNTST_bad_gntref (-3) /* Unrecognised or inappropriate gntref. */
633#define GNTST_bad_handle (-4) /* Unrecognised or inappropriate handle. */
634#define GNTST_bad_virt_addr (-5) /* Inappropriate virtual address to map. */
635#define GNTST_bad_dev_addr (-6) /* Inappropriate device address to unmap.*/
636#define GNTST_no_device_space (-7) /* Out of space in I/O MMU. */
637#define GNTST_permission_denied (-8) /* Not enough privilege for operation. */
638#define GNTST_bad_page (-9) /* Specified page was invalid for op. */
639#define GNTST_bad_copy_arg (-10) /* copy arguments cross page boundary. */
640#define GNTST_address_too_big (-11) /* transfer page address too large. */
641#define GNTST_eagain (-12) /* Operation not done; try again. */
642#define GNTST_no_space (-13) /* Out of space (handles etc). */
643/* ` } */
644
645#define GNTTABOP_error_msgs { \
646 "okay", \
647 "undefined error", \
648 "unrecognised domain id", \
649 "invalid grant reference", \
650 "invalid mapping handle", \
651 "invalid virtual address", \
652 "invalid device address", \
653 "no spare translation slot in the I/O MMU", \
654 "permission denied", \
655 "bad page", \
656 "copy arguments cross page boundary", \
657 "page address size too large", \
658 "operation not done; try again", \
659 "out of space", \
660}
661
662#endif /* __XEN_PUBLIC_GRANT_TABLE_H__ */
663
664/*
665 * Local variables:
666 * mode: C
667 * c-file-style: "BSD"
668 * c-basic-offset: 4
669 * tab-width: 4
670 * indent-tabs-mode: nil
671 * End:
672 */
struct golan_inbox_hdr hdr
Message header.
Definition CIB_PRM.h:0
u32 pad[9]
Padding.
Definition ar9003_mac.h:23
signed short int16_t
Definition stdint.h:16
unsigned short uint16_t
Definition stdint.h:11
unsigned int uint32_t
Definition stdint.h:12
unsigned long long uint64_t
Definition stdint.h:13
if(len >=6 *4) __asm__ __volatile__("movsl" if(len >=5 *4) __asm__ __volatile__("movsl" if(len >=4 *4) __asm__ __volatile__("movsl" if(len >=3 *4) __asm__ __volatile__("movsl" if(len >=2 *4) __asm__ __volatile__("movsl" if(len >=1 *4) __asm__ __volatile__("movsl" if((len % 4) >=2) __asm__ __volatile__("movsw" if((len % 2) >=1) __asm__ __volatile__("movsb" retur dest)
Definition string.h:151
u32 version
Driver version.
Definition ath9k_hw.c:1985
uint16_t offset
Offset to command line.
Definition bzimage.h:3
union @104331263140136355135267063077374276003064103115 u
uint8_t flags
Flags.
Definition ena.h:7
uint8_t status
Status.
Definition ena.h:5
uint32_t grant_handle_t
struct gnttab_query_size gnttab_query_size_t
struct gnttab_copy gnttab_copy_t
struct gnttab_unmap_and_replace gnttab_unmap_and_replace_t
struct gnttab_transfer gnttab_transfer_t
struct gnttab_unmap_grant_ref gnttab_unmap_grant_ref_t
struct gnttab_setup_table gnttab_setup_table_t
struct gnttab_dump_table gnttab_dump_table_t
struct gnttab_map_grant_ref gnttab_map_grant_ref_t
#define grant_entry_v1_t
#define grant_entry_v1
uint32_t grant_ref_t
#define FILE_LICENCE(_licence)
Declare a particular licence as applying to a file.
Definition compiler.h:896
#define FILE_SECBOOT(_status)
Declare a file's UEFI Secure Boot permission status.
Definition compiler.h:926
uint16_t domid_t
Definition xen.h:622
static const char grant_ref_t ref
Definition netfront.h:93
static uint16_t struct vmbus_xfer_pages_operations * op
Definition netvsc.h:327
#define XEN_GUEST_HANDLE(name)
Definition nonxen.h:17
#define DEFINE_XEN_GUEST_HANDLE(name)
Definition nonxen.h:26
unsigned long xen_pfn_t
Definition nonxen.h:28
u16 length
Definition sky2.h:1
uint16_t len
struct gnttab_copy::gnttab_copy_ptr source
uint16_t flags
int16_t status
grant_handle_t handle
uint32_t max_nr_frames
XEN_GUEST_HANDLE(ulong) frame_list
grant_ref_t ref
grant_handle_t handle
uint16_t flags
domid_t domid
uint32_t frame
static grant_ref_t domid_t domid
Definition xengrant.h:175
unsigned long frame
Definition xengrant.h:180