Merge tag 'pull-loongarch-20241016' of https://gitlab.com/gaosong/qemu into staging
[qemu/armbru.git] / include / exec / memory-internal.h
blob100c1237ac21520294070c4585d4f4806ddd24b4
1 /*
2 * Declarations for functions which are internal to the memory subsystem.
4 * Copyright 2011 Red Hat, Inc. and/or its affiliates
6 * Authors:
7 * Avi Kivity <avi@redhat.com>
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.
15 * This header is for use by exec.c, memory.c and accel/tcg/cputlb.c ONLY,
16 * for declarations which are shared between the memory subsystem's
17 * internals and the TCG TLB code. Do not include it from elsewhere.
20 #ifndef MEMORY_INTERNAL_H
21 #define MEMORY_INTERNAL_H
23 #include "cpu.h"
25 #ifndef CONFIG_USER_ONLY
26 static inline AddressSpaceDispatch *flatview_to_dispatch(FlatView *fv)
28 return fv->dispatch;
31 static inline AddressSpaceDispatch *address_space_to_dispatch(AddressSpace *as)
33 return flatview_to_dispatch(address_space_to_flatview(as));
36 FlatView *address_space_get_flatview(AddressSpace *as);
37 void flatview_unref(FlatView *view);
39 extern const MemoryRegionOps unassigned_mem_ops;
41 void flatview_add_to_dispatch(FlatView *fv, MemoryRegionSection *section);
42 AddressSpaceDispatch *address_space_dispatch_new(FlatView *fv);
43 void address_space_dispatch_compact(AddressSpaceDispatch *d);
44 void address_space_dispatch_free(AddressSpaceDispatch *d);
46 void mtree_print_dispatch(struct AddressSpaceDispatch *d,
47 MemoryRegion *root);
48 #endif
49 #endif