master
h 33 lines 821 Bytes
Raw
1 /*
2 * Declarations of basic RAMBlock-related types and macros
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 or
10 * later. See the COPYING file in the top-level directory.
11 *
12 */
13
14 #ifndef RAM_ADDR_H
15 #define RAM_ADDR_H
16
17 /* address in the RAM (different from a physical address) */
18 #if defined(CONFIG_XEN_BACKEND)
19 typedef uint64_t ram_addr_t;
20 # define RAM_ADDR_MAX UINT64_MAX
21 # define RAM_ADDR_FMT "%" PRIx64
22 #else
23 typedef uintptr_t ram_addr_t;
24 # define RAM_ADDR_MAX UINTPTR_MAX
25 # define RAM_ADDR_FMT "%" PRIxPTR
26 #endif
27
28 #define DIRTY_MEMORY_VGA 0
29 #define DIRTY_MEMORY_CODE 1
30 #define DIRTY_MEMORY_MIGRATION 2
31 #define DIRTY_MEMORY_NUM 3 /* num of dirty bits */
32
33 #endif