Lines Matching +full:merge +full:- +full:status
1 /* SPDX-License-Identifier: MIT */
7 * page-ownership transfers.
12 * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
50 * This capability-based system allows shared-memory communications
62 /* Some rough guidelines on accessing and updating grant-table entries
63 * in a concurrency-safe manner. For more information, Linux contains a
65 …* http://git.kernel.org/?p=linux/kernel/git/torvalds/linux.git;a=blob;f=drivers/xen/grant-table.c;…
67 * NB. WMB is a no-op on current-generation x86 processors. However, a
71 * 1. Write ent->domid.
72 * 2. Write ent->frame:
74 * GTF_accept_transfer: Pseudo-phys frame slot being filled by new
77 * 4. Write ent->flags, inc. valid type.
80 * 1. flags = ent->flags.
82 * 3. Check result of SMP-safe CMPXCHG(&ent->flags, flags, 0).
83 * NB. No need for WMB as reuse of entry is control-dependent on success of
84 * step 3, and all architectures guarantee ordering of ctrl-dep writes.
86 * Invalidating an in-use GTF_permit_access entry:
92 * 1. flags = ent->flags.
94 * 3. Check result of SMP-safe CMPXCHG(&ent->flags, flags, 0).
95 * NB. No need for WMB as reuse of entry is control-dependent on success of
96 * step 3, and all architectures guarantee ordering of ctrl-dep writes.
101 * ent->flags).
104 * 1. Wait for (ent->flags & GTF_transfer_completed).
106 * Changing a GTF_permit_access from writable to read-only:
107 * Use SMP-safe CMPXCHG to set GTF_readonly, while checking !GTF_writing.
109 * Changing a GTF_permit_access from read-only to writable:
110 * Use SMP-safe bit-setting instruction.
142 * (non-translated guests only). [XEN]
149 * version changes and may be pre-populated at domain creation by tools.
172 * GTF_readonly: Restrict @domid to read-only mappings and accesses. [GST]
203 * GTF_transfer_completed: It is safe for the guest to spin-wait on this flag
222 * @args points to an array of a per-command data structure. The array
252 * that must be presented later to destroy the mapping(s). On error, <status>
253 * is a negative status code.
273 int16_t status; /* => enum grant_status */ member
281 * GNTTABOP_unmap_grant_ref: Destroy one or more grant-reference mappings
283 * field is ignored. If non-zero, they must refer to a device/host mapping
297 int16_t status; /* => enum grant_status */ member
308 * 2. Only a sufficiently-privileged domain may specify <dom> != DOMID_SELF.
309 * 3. Xen may not support more than a single grant-table page per domain.
317 int16_t status; /* => enum grant_status */ member
332 * 2. Only a sufficiently-privileged domain may specify <dom> != DOMID_SELF.
340 int16_t status; /* => enum grant_status */ member
354 /* Accesses to the granted frame will be restricted to read-only access. */
381 * Values for error status returns. All errors are -ve.
385 #define GNTST_general_error (-1) /* General undefined error */
386 #define GNTST_bad_domain (-2) /* Unrecognsed domain id */
387 #define GNTST_bad_gntref (-3) /* Unrecognised or inappropriate gntref */
388 #define GNTST_bad_handle (-4) /* Unrecognised or inappropriate handle */
389 #define GNTST_bad_virt_addr (-5) /* Inappropriate virtual address to map */
390 #define GNTST_bad_dev_addr (-6) /* Inappropriate device address to unmap */
391 #define GNTST_no_device_space (-7) /* Out of space in I/O MMU */
392 #define GNTST_permission_denied (-8) /* Not enough privilege for operation */
393 #define GNTST_bad_page (-9) /* Specified page was invalid for op */
394 #define GNTST_bad_copy_arg (-10) /* copy arguments cross page boundary */
395 #define GNTST_address_too_big (-11) /* transfer page address too large */
396 #define GNTST_eagain (-12) /* Operation not done; try again */