ia64/xen-unstable

view xen/include/public/memory.h @ 7959:ff18a169e866

Update the memory_op() hypercall. Add two new subcommands, to
query a domain's current and maximum memory reservation. Also,
XENMEM_maximum_ram_page now returns the max_page directly,
rather than writing through a passed-in pointer.

Also, disable PAE in the default config (accidentally checked
in two changesets ago).

Signed-off-by: Keir Fraser <keir@xensource.com>
author kaf24@firebug.cl.cam.ac.uk
date Mon Nov 21 16:56:39 2005 +0100 (2005-11-21)
parents b3a255e88810
children c3cfc4ff3b08
line source
1 /******************************************************************************
2 * memory.h
3 *
4 * Memory reservation and information.
5 *
6 * Copyright (c) 2005, Keir Fraser <keir@xensource.com>
7 */
9 #ifndef __XEN_PUBLIC_MEMORY_H__
10 #define __XEN_PUBLIC_MEMORY_H__
12 /*
13 * Increase or decrease the specified domain's memory reservation. Returns a
14 * -ve errcode on failure, or the # extents successfully allocated or freed.
15 * arg == addr of struct xen_memory_reservation.
16 */
17 #define XENMEM_increase_reservation 0
18 #define XENMEM_decrease_reservation 1
19 typedef struct xen_memory_reservation {
21 /*
22 * MFN bases of extents to free (XENMEM_decrease_reservation).
23 * MFN bases of extents that were allocated (XENMEM_increase_reservation).
24 */
25 unsigned long *extent_start;
27 /* Number of extents, and size/alignment of each (2^extent_order pages). */
28 unsigned long nr_extents;
29 unsigned int extent_order;
31 /*
32 * XENMEM_increase_reservation: maximum # bits addressable by the user
33 * of the allocated region (e.g., I/O devices often have a 32-bit
34 * limitation even in 64-bit systems). If zero then the user has no
35 * addressing restriction.
36 * XENMEM_decrease_reservation: unused.
37 */
38 unsigned int address_bits;
40 /*
41 * Domain whose reservation is being changed.
42 * Unprivileged domains can specify only DOMID_SELF.
43 */
44 domid_t domid;
46 } xen_memory_reservation_t;
48 /*
49 * Returns the maximum machine frame number of mapped RAM in this system.
50 * This command always succeeds (it never returns an error code).
51 * arg == NULL.
52 */
53 #define XENMEM_maximum_ram_page 2
55 /*
56 * Returns the current or maximum memory reservation, in pages, of the
57 * specified domain (may be DOMID_SELF). Returns -ve errcode on failure.
58 * arg == addr of domid_t.
59 */
60 #define XENMEM_current_reservation 3
61 #define XENMEM_maximum_reservation 4
63 #endif /* __XEN_PUBLIC_MEMORY_H__ */
65 /*
66 * Local variables:
67 * mode: C
68 * c-set-style: "BSD"
69 * c-basic-offset: 4
70 * tab-width: 4
71 * indent-tabs-mode: nil
72 * End:
73 */