]> git.proxmox.com Git - qemu.git/blob - memory.h
memory: Introduce memory_region_init_reservation
[qemu.git] / memory.h
1 /*
2 * Physical memory management API
3 *
4 * Copyright 2011 Red Hat, Inc. and/or its affiliates
5 *
6 * Authors:
7 * Avi Kivity <avi@redhat.com>
8 *
9 * This work is licensed under the terms of the GNU GPL, version 2. See
10 * the COPYING file in the top-level directory.
11 *
12 */
13
14 #ifndef MEMORY_H
15 #define MEMORY_H
16
17 #ifndef CONFIG_USER_ONLY
18
19 #include <stdint.h>
20 #include <stdbool.h>
21 #include "qemu-common.h"
22 #include "cpu-common.h"
23 #include "targphys.h"
24 #include "qemu-queue.h"
25 #include "iorange.h"
26 #include "ioport.h"
27 #include "int128.h"
28
29 typedef struct MemoryRegionOps MemoryRegionOps;
30 typedef struct MemoryRegion MemoryRegion;
31 typedef struct MemoryRegionPortio MemoryRegionPortio;
32 typedef struct MemoryRegionMmio MemoryRegionMmio;
33
34 /* Must match *_DIRTY_FLAGS in cpu-all.h. To be replaced with dynamic
35 * registration.
36 */
37 #define DIRTY_MEMORY_VGA 0
38 #define DIRTY_MEMORY_CODE 1
39 #define DIRTY_MEMORY_MIGRATION 3
40
41 struct MemoryRegionMmio {
42 CPUReadMemoryFunc *read[3];
43 CPUWriteMemoryFunc *write[3];
44 };
45
46 /*
47 * Memory region callbacks
48 */
49 struct MemoryRegionOps {
50 /* Read from the memory region. @addr is relative to @mr; @size is
51 * in bytes. */
52 uint64_t (*read)(void *opaque,
53 target_phys_addr_t addr,
54 unsigned size);
55 /* Write to the memory region. @addr is relative to @mr; @size is
56 * in bytes. */
57 void (*write)(void *opaque,
58 target_phys_addr_t addr,
59 uint64_t data,
60 unsigned size);
61
62 enum device_endian endianness;
63 /* Guest-visible constraints: */
64 struct {
65 /* If nonzero, specify bounds on access sizes beyond which a machine
66 * check is thrown.
67 */
68 unsigned min_access_size;
69 unsigned max_access_size;
70 /* If true, unaligned accesses are supported. Otherwise unaligned
71 * accesses throw machine checks.
72 */
73 bool unaligned;
74 /*
75 * If present, and returns #false, the transaction is not accepted
76 * by the device (and results in machine dependent behaviour such
77 * as a machine check exception).
78 */
79 bool (*accepts)(void *opaque, target_phys_addr_t addr,
80 unsigned size, bool is_write);
81 } valid;
82 /* Internal implementation constraints: */
83 struct {
84 /* If nonzero, specifies the minimum size implemented. Smaller sizes
85 * will be rounded upwards and a partial result will be returned.
86 */
87 unsigned min_access_size;
88 /* If nonzero, specifies the maximum size implemented. Larger sizes
89 * will be done as a series of accesses with smaller sizes.
90 */
91 unsigned max_access_size;
92 /* If true, unaligned accesses are supported. Otherwise all accesses
93 * are converted to (possibly multiple) naturally aligned accesses.
94 */
95 bool unaligned;
96 } impl;
97
98 /* If .read and .write are not present, old_portio may be used for
99 * backwards compatibility with old portio registration
100 */
101 const MemoryRegionPortio *old_portio;
102 /* If .read and .write are not present, old_mmio may be used for
103 * backwards compatibility with old mmio registration
104 */
105 const MemoryRegionMmio old_mmio;
106 };
107
108 typedef struct CoalescedMemoryRange CoalescedMemoryRange;
109 typedef struct MemoryRegionIoeventfd MemoryRegionIoeventfd;
110
111 struct MemoryRegion {
112 /* All fields are private - violators will be prosecuted */
113 const MemoryRegionOps *ops;
114 void *opaque;
115 MemoryRegion *parent;
116 Int128 size;
117 target_phys_addr_t addr;
118 target_phys_addr_t offset;
119 void (*destructor)(MemoryRegion *mr);
120 ram_addr_t ram_addr;
121 IORange iorange;
122 bool subpage;
123 bool terminates;
124 bool readable;
125 bool ram;
126 bool readonly; /* For RAM regions */
127 bool enabled;
128 bool rom_device;
129 bool warning_printed; /* For reservations */
130 MemoryRegion *alias;
131 target_phys_addr_t alias_offset;
132 unsigned priority;
133 bool may_overlap;
134 QTAILQ_HEAD(subregions, MemoryRegion) subregions;
135 QTAILQ_ENTRY(MemoryRegion) subregions_link;
136 QTAILQ_HEAD(coalesced_ranges, CoalescedMemoryRange) coalesced;
137 const char *name;
138 uint8_t dirty_log_mask;
139 unsigned ioeventfd_nb;
140 MemoryRegionIoeventfd *ioeventfds;
141 };
142
143 struct MemoryRegionPortio {
144 uint32_t offset;
145 uint32_t len;
146 unsigned size;
147 IOPortReadFunc *read;
148 IOPortWriteFunc *write;
149 };
150
151 #define PORTIO_END_OF_LIST() { }
152
153 typedef struct MemoryRegionSection MemoryRegionSection;
154
155 /**
156 * MemoryRegionSection: describes a fragment of a #MemoryRegion
157 *
158 * @mr: the region, or %NULL if empty
159 * @address_space: the address space the region is mapped in
160 * @offset_within_region: the beginning of the section, relative to @mr's start
161 * @size: the size of the section; will not exceed @mr's boundaries
162 * @offset_within_address_space: the address of the first byte of the section
163 * relative to the region's address space
164 */
165 struct MemoryRegionSection {
166 MemoryRegion *mr;
167 MemoryRegion *address_space;
168 target_phys_addr_t offset_within_region;
169 uint64_t size;
170 target_phys_addr_t offset_within_address_space;
171 };
172
173 typedef struct MemoryListener MemoryListener;
174
175 /**
176 * MemoryListener: callbacks structure for updates to the physical memory map
177 *
178 * Allows a component to adjust to changes in the guest-visible memory map.
179 * Use with memory_listener_register() and memory_listener_unregister().
180 */
181 struct MemoryListener {
182 void (*region_add)(MemoryListener *listener, MemoryRegionSection *section);
183 void (*region_del)(MemoryListener *listener, MemoryRegionSection *section);
184 void (*log_start)(MemoryListener *listener, MemoryRegionSection *section);
185 void (*log_stop)(MemoryListener *listener, MemoryRegionSection *section);
186 void (*log_sync)(MemoryListener *listener, MemoryRegionSection *section);
187 void (*log_global_start)(MemoryListener *listener);
188 void (*log_global_stop)(MemoryListener *listener);
189 QLIST_ENTRY(MemoryListener) link;
190 };
191
192 /**
193 * memory_region_init: Initialize a memory region
194 *
195 * The region typically acts as a container for other memory regions. Use
196 * memory_region_add_subregion() to add subregions.
197 *
198 * @mr: the #MemoryRegion to be initialized
199 * @name: used for debugging; not visible to the user or ABI
200 * @size: size of the region; any subregions beyond this size will be clipped
201 */
202 void memory_region_init(MemoryRegion *mr,
203 const char *name,
204 uint64_t size);
205 /**
206 * memory_region_init_io: Initialize an I/O memory region.
207 *
208 * Accesses into the region will cause the callbacks in @ops to be called.
209 * if @size is nonzero, subregions will be clipped to @size.
210 *
211 * @mr: the #MemoryRegion to be initialized.
212 * @ops: a structure containing read and write callbacks to be used when
213 * I/O is performed on the region.
214 * @opaque: passed to to the read and write callbacks of the @ops structure.
215 * @name: used for debugging; not visible to the user or ABI
216 * @size: size of the region.
217 */
218 void memory_region_init_io(MemoryRegion *mr,
219 const MemoryRegionOps *ops,
220 void *opaque,
221 const char *name,
222 uint64_t size);
223
224 /**
225 * memory_region_init_ram: Initialize RAM memory region. Accesses into the
226 * region will modify memory directly.
227 *
228 * @mr: the #MemoryRegion to be initialized.
229 * @name: the name of the region.
230 * @size: size of the region.
231 */
232 void memory_region_init_ram(MemoryRegion *mr,
233 const char *name,
234 uint64_t size);
235
236 /**
237 * memory_region_init_ram: Initialize RAM memory region from a user-provided.
238 * pointer. Accesses into the region will modify
239 * memory directly.
240 *
241 * @mr: the #MemoryRegion to be initialized.
242 * @name: the name of the region.
243 * @size: size of the region.
244 * @ptr: memory to be mapped; must contain at least @size bytes.
245 */
246 void memory_region_init_ram_ptr(MemoryRegion *mr,
247 const char *name,
248 uint64_t size,
249 void *ptr);
250
251 /**
252 * memory_region_init_alias: Initialize a memory region that aliases all or a
253 * part of another memory region.
254 *
255 * @mr: the #MemoryRegion to be initialized.
256 * @name: used for debugging; not visible to the user or ABI
257 * @orig: the region to be referenced; @mr will be equivalent to
258 * @orig between @offset and @offset + @size - 1.
259 * @offset: start of the section in @orig to be referenced.
260 * @size: size of the region.
261 */
262 void memory_region_init_alias(MemoryRegion *mr,
263 const char *name,
264 MemoryRegion *orig,
265 target_phys_addr_t offset,
266 uint64_t size);
267
268 /**
269 * memory_region_init_rom_device: Initialize a ROM memory region. Writes are
270 * handled via callbacks.
271 *
272 * @mr: the #MemoryRegion to be initialized.
273 * @ops: callbacks for write access handling.
274 * @name: the name of the region.
275 * @size: size of the region.
276 */
277 void memory_region_init_rom_device(MemoryRegion *mr,
278 const MemoryRegionOps *ops,
279 void *opaque,
280 const char *name,
281 uint64_t size);
282
283 /**
284 * memory_region_init_reservation: Initialize a memory region that reserves
285 * I/O space.
286 *
287 * A reservation region primariy serves debugging purposes. It claims I/O
288 * space that is not supposed to be handled by QEMU itself. Any access via
289 * the memory API will cause an abort().
290 *
291 * @mr: the #MemoryRegion to be initialized
292 * @name: used for debugging; not visible to the user or ABI
293 * @size: size of the region.
294 */
295 void memory_region_init_reservation(MemoryRegion *mr,
296 const char *name,
297 uint64_t size);
298 /**
299 * memory_region_destroy: Destroy a memory region and reclaim all resources.
300 *
301 * @mr: the region to be destroyed. May not currently be a subregion
302 * (see memory_region_add_subregion()) or referenced in an alias
303 * (see memory_region_init_alias()).
304 */
305 void memory_region_destroy(MemoryRegion *mr);
306
307 /**
308 * memory_region_size: get a memory region's size.
309 *
310 * @mr: the memory region being queried.
311 */
312 uint64_t memory_region_size(MemoryRegion *mr);
313
314 /**
315 * memory_region_is_ram: check whether a memory region is random access
316 *
317 * Returns %true is a memory region is random access.
318 *
319 * @mr: the memory region being queried
320 */
321 bool memory_region_is_ram(MemoryRegion *mr);
322
323 /**
324 * memory_region_name: get a memory region's name
325 *
326 * Returns the string that was used to initialize the memory region.
327 *
328 * @mr: the memory region being queried
329 */
330 const char *memory_region_name(MemoryRegion *mr);
331
332 /**
333 * memory_region_is_logging: return whether a memory region is logging writes
334 *
335 * Returns %true if the memory region is logging writes
336 *
337 * @mr: the memory region being queried
338 */
339 bool memory_region_is_logging(MemoryRegion *mr);
340
341 /**
342 * memory_region_is_rom: check whether a memory region is ROM
343 *
344 * Returns %true is a memory region is read-only memory.
345 *
346 * @mr: the memory region being queried
347 */
348 bool memory_region_is_rom(MemoryRegion *mr);
349
350 /**
351 * memory_region_get_ram_ptr: Get a pointer into a RAM memory region.
352 *
353 * Returns a host pointer to a RAM memory region (created with
354 * memory_region_init_ram() or memory_region_init_ram_ptr()). Use with
355 * care.
356 *
357 * @mr: the memory region being queried.
358 */
359 void *memory_region_get_ram_ptr(MemoryRegion *mr);
360
361 /**
362 * memory_region_set_offset: Sets an offset to be added to MemoryRegionOps
363 * callbacks.
364 *
365 * This function is deprecated and should not be used in new code.
366 */
367 void memory_region_set_offset(MemoryRegion *mr, target_phys_addr_t offset);
368
369 /**
370 * memory_region_set_log: Turn dirty logging on or off for a region.
371 *
372 * Turns dirty logging on or off for a specified client (display, migration).
373 * Only meaningful for RAM regions.
374 *
375 * @mr: the memory region being updated.
376 * @log: whether dirty logging is to be enabled or disabled.
377 * @client: the user of the logging information; %DIRTY_MEMORY_MIGRATION or
378 * %DIRTY_MEMORY_VGA.
379 */
380 void memory_region_set_log(MemoryRegion *mr, bool log, unsigned client);
381
382 /**
383 * memory_region_get_dirty: Check whether a page is dirty for a specified
384 * client.
385 *
386 * Checks whether a page has been written to since the last
387 * call to memory_region_reset_dirty() with the same @client. Dirty logging
388 * must be enabled.
389 *
390 * @mr: the memory region being queried.
391 * @addr: the address (relative to the start of the region) being queried.
392 * @client: the user of the logging information; %DIRTY_MEMORY_MIGRATION or
393 * %DIRTY_MEMORY_VGA.
394 */
395 bool memory_region_get_dirty(MemoryRegion *mr, target_phys_addr_t addr,
396 unsigned client);
397
398 /**
399 * memory_region_set_dirty: Mark a page as dirty in a memory region.
400 *
401 * Marks a page as dirty, after it has been dirtied outside guest code.
402 *
403 * @mr: the memory region being queried.
404 * @addr: the address (relative to the start of the region) being dirtied.
405 */
406 void memory_region_set_dirty(MemoryRegion *mr, target_phys_addr_t addr);
407
408 /**
409 * memory_region_sync_dirty_bitmap: Synchronize a region's dirty bitmap with
410 * any external TLBs (e.g. kvm)
411 *
412 * Flushes dirty information from accelerators such as kvm and vhost-net
413 * and makes it available to users of the memory API.
414 *
415 * @mr: the region being flushed.
416 */
417 void memory_region_sync_dirty_bitmap(MemoryRegion *mr);
418
419 /**
420 * memory_region_reset_dirty: Mark a range of pages as clean, for a specified
421 * client.
422 *
423 * Marks a range of pages as no longer dirty.
424 *
425 * @mr: the region being updated.
426 * @addr: the start of the subrange being cleaned.
427 * @size: the size of the subrange being cleaned.
428 * @client: the user of the logging information; %DIRTY_MEMORY_MIGRATION or
429 * %DIRTY_MEMORY_VGA.
430 */
431 void memory_region_reset_dirty(MemoryRegion *mr, target_phys_addr_t addr,
432 target_phys_addr_t size, unsigned client);
433
434 /**
435 * memory_region_set_readonly: Turn a memory region read-only (or read-write)
436 *
437 * Allows a memory region to be marked as read-only (turning it into a ROM).
438 * only useful on RAM regions.
439 *
440 * @mr: the region being updated.
441 * @readonly: whether rhe region is to be ROM or RAM.
442 */
443 void memory_region_set_readonly(MemoryRegion *mr, bool readonly);
444
445 /**
446 * memory_region_rom_device_set_readable: enable/disable ROM readability
447 *
448 * Allows a ROM device (initialized with memory_region_init_rom_device() to
449 * to be marked as readable (default) or not readable. When it is readable,
450 * the device is mapped to guest memory. When not readable, reads are
451 * forwarded to the #MemoryRegion.read function.
452 *
453 * @mr: the memory region to be updated
454 * @readable: whether reads are satisified directly (%true) or via callbacks
455 * (%false)
456 */
457 void memory_region_rom_device_set_readable(MemoryRegion *mr, bool readable);
458
459 /**
460 * memory_region_set_coalescing: Enable memory coalescing for the region.
461 *
462 * Enabled writes to a region to be queued for later processing. MMIO ->write
463 * callbacks may be delayed until a non-coalesced MMIO is issued.
464 * Only useful for IO regions. Roughly similar to write-combining hardware.
465 *
466 * @mr: the memory region to be write coalesced
467 */
468 void memory_region_set_coalescing(MemoryRegion *mr);
469
470 /**
471 * memory_region_add_coalescing: Enable memory coalescing for a sub-range of
472 * a region.
473 *
474 * Like memory_region_set_coalescing(), but works on a sub-range of a region.
475 * Multiple calls can be issued coalesced disjoint ranges.
476 *
477 * @mr: the memory region to be updated.
478 * @offset: the start of the range within the region to be coalesced.
479 * @size: the size of the subrange to be coalesced.
480 */
481 void memory_region_add_coalescing(MemoryRegion *mr,
482 target_phys_addr_t offset,
483 uint64_t size);
484
485 /**
486 * memory_region_clear_coalescing: Disable MMIO coalescing for the region.
487 *
488 * Disables any coalescing caused by memory_region_set_coalescing() or
489 * memory_region_add_coalescing(). Roughly equivalent to uncacheble memory
490 * hardware.
491 *
492 * @mr: the memory region to be updated.
493 */
494 void memory_region_clear_coalescing(MemoryRegion *mr);
495
496 /**
497 * memory_region_add_eventfd: Request an eventfd to be triggered when a word
498 * is written to a location.
499 *
500 * Marks a word in an IO region (initialized with memory_region_init_io())
501 * as a trigger for an eventfd event. The I/O callback will not be called.
502 * The caller must be prepared to handle failure (that is, take the required
503 * action if the callback _is_ called).
504 *
505 * @mr: the memory region being updated.
506 * @addr: the address within @mr that is to be monitored
507 * @size: the size of the access to trigger the eventfd
508 * @match_data: whether to match against @data, instead of just @addr
509 * @data: the data to match against the guest write
510 * @fd: the eventfd to be triggered when @addr, @size, and @data all match.
511 **/
512 void memory_region_add_eventfd(MemoryRegion *mr,
513 target_phys_addr_t addr,
514 unsigned size,
515 bool match_data,
516 uint64_t data,
517 int fd);
518
519 /**
520 * memory_region_del_eventfd: Cancel an eventfd.
521 *
522 * Cancels an eventfd trigger requested by a previous
523 * memory_region_add_eventfd() call.
524 *
525 * @mr: the memory region being updated.
526 * @addr: the address within @mr that is to be monitored
527 * @size: the size of the access to trigger the eventfd
528 * @match_data: whether to match against @data, instead of just @addr
529 * @data: the data to match against the guest write
530 * @fd: the eventfd to be triggered when @addr, @size, and @data all match.
531 */
532 void memory_region_del_eventfd(MemoryRegion *mr,
533 target_phys_addr_t addr,
534 unsigned size,
535 bool match_data,
536 uint64_t data,
537 int fd);
538 /**
539 * memory_region_add_subregion: Add a subregion to a container.
540 *
541 * Adds a subregion at @offset. The subregion may not overlap with other
542 * subregions (except for those explicitly marked as overlapping). A region
543 * may only be added once as a subregion (unless removed with
544 * memory_region_del_subregion()); use memory_region_init_alias() if you
545 * want a region to be a subregion in multiple locations.
546 *
547 * @mr: the region to contain the new subregion; must be a container
548 * initialized with memory_region_init().
549 * @offset: the offset relative to @mr where @subregion is added.
550 * @subregion: the subregion to be added.
551 */
552 void memory_region_add_subregion(MemoryRegion *mr,
553 target_phys_addr_t offset,
554 MemoryRegion *subregion);
555 /**
556 * memory_region_add_subregion: Add a subregion to a container, with overlap.
557 *
558 * Adds a subregion at @offset. The subregion may overlap with other
559 * subregions. Conflicts are resolved by having a higher @priority hide a
560 * lower @priority. Subregions without priority are taken as @priority 0.
561 * A region may only be added once as a subregion (unless removed with
562 * memory_region_del_subregion()); use memory_region_init_alias() if you
563 * want a region to be a subregion in multiple locations.
564 *
565 * @mr: the region to contain the new subregion; must be a container
566 * initialized with memory_region_init().
567 * @offset: the offset relative to @mr where @subregion is added.
568 * @subregion: the subregion to be added.
569 * @priority: used for resolving overlaps; highest priority wins.
570 */
571 void memory_region_add_subregion_overlap(MemoryRegion *mr,
572 target_phys_addr_t offset,
573 MemoryRegion *subregion,
574 unsigned priority);
575
576 /**
577 * memory_region_get_ram_addr: Get the ram address associated with a memory
578 * region
579 *
580 * DO NOT USE THIS FUNCTION. This is a temporary workaround while the Xen
581 * code is being reworked.
582 */
583 ram_addr_t memory_region_get_ram_addr(MemoryRegion *mr);
584
585 /**
586 * memory_region_del_subregion: Remove a subregion.
587 *
588 * Removes a subregion from its container.
589 *
590 * @mr: the container to be updated.
591 * @subregion: the region being removed; must be a current subregion of @mr.
592 */
593 void memory_region_del_subregion(MemoryRegion *mr,
594 MemoryRegion *subregion);
595
596 /*
597 * memory_region_set_enabled: dynamically enable or disable a region
598 *
599 * Enables or disables a memory region. A disabled memory region
600 * ignores all accesses to itself and its subregions. It does not
601 * obscure sibling subregions with lower priority - it simply behaves as
602 * if it was removed from the hierarchy.
603 *
604 * Regions default to being enabled.
605 *
606 * @mr: the region to be updated
607 * @enabled: whether to enable or disable the region
608 */
609 void memory_region_set_enabled(MemoryRegion *mr, bool enabled);
610
611 /*
612 * memory_region_set_address: dynamically update the address of a region
613 *
614 * Dynamically updates the address of a region, relative to its parent.
615 * May be used on regions are currently part of a memory hierarchy.
616 *
617 * @mr: the region to be updated
618 * @addr: new address, relative to parent region
619 */
620 void memory_region_set_address(MemoryRegion *mr, target_phys_addr_t addr);
621
622 /*
623 * memory_region_set_alias_offset: dynamically update a memory alias's offset
624 *
625 * Dynamically updates the offset into the target region that an alias points
626 * to, as if the fourth argument to memory_region_init_alias() has changed.
627 *
628 * @mr: the #MemoryRegion to be updated; should be an alias.
629 * @offset: the new offset into the target memory region
630 */
631 void memory_region_set_alias_offset(MemoryRegion *mr,
632 target_phys_addr_t offset);
633
634 /**
635 * memory_region_find: locate a MemoryRegion in an address space
636 *
637 * Locates the first #MemoryRegion within an address space given by
638 * @address_space that overlaps the range given by @addr and @size.
639 *
640 * Returns a #MemoryRegionSection that describes a contiguous overlap.
641 * It will have the following characteristics:
642 * .@offset_within_address_space >= @addr
643 * .@offset_within_address_space + .@size <= @addr + @size
644 * .@size = 0 iff no overlap was found
645 * .@mr is non-%NULL iff an overlap was found
646 *
647 * @address_space: a top-level (i.e. parentless) region that contains
648 * the region to be found
649 * @addr: start of the area within @address_space to be searched
650 * @size: size of the area to be searched
651 */
652 MemoryRegionSection memory_region_find(MemoryRegion *address_space,
653 target_phys_addr_t addr, uint64_t size);
654
655
656 /**
657 * memory_global_sync_dirty_bitmap: synchronize the dirty log for all memory
658 *
659 * Synchronizes the dirty page log for an entire address space.
660 * @address_space: a top-level (i.e. parentless) region that contains the
661 * memory being synchronized
662 */
663 void memory_global_sync_dirty_bitmap(MemoryRegion *address_space);
664
665 /**
666 * memory_region_transaction_begin: Start a transaction.
667 *
668 * During a transaction, changes will be accumulated and made visible
669 * only when the transaction ends (is committed).
670 */
671 void memory_region_transaction_begin(void);
672
673 /**
674 * memory_region_transaction_commit: Commit a transaction and make changes
675 * visible to the guest.
676 */
677 void memory_region_transaction_commit(void);
678
679 /**
680 * memory_listener_register: register callbacks to be called when memory
681 * sections are mapped or unmapped into an address
682 * space
683 *
684 * @listener: an object containing the callbacks to be called
685 */
686 void memory_listener_register(MemoryListener *listener);
687
688 /**
689 * memory_listener_unregister: undo the effect of memory_listener_register()
690 *
691 * @listener: an object containing the callbacks to be removed
692 */
693 void memory_listener_unregister(MemoryListener *listener);
694
695 /**
696 * memory_global_dirty_log_start: begin dirty logging for all regions
697 */
698 void memory_global_dirty_log_start(void);
699
700 /**
701 * memory_global_dirty_log_stop: begin dirty logging for all regions
702 */
703 void memory_global_dirty_log_stop(void);
704
705 void mtree_info(fprintf_function mon_printf, void *f);
706
707 #endif
708
709 #endif