/qemu/tests/unit/ |
H A D | test-qtree.c | 6 * https://gitlab.gnome.org/GNOME/glib/-/blob/main/glib/tests/tree.c 94 QTree *tree; in test_tree_search() local 99 tree = q_tree_new_with_data(my_compare_with_data, GINT_TO_POINTER(123)); in test_tree_search() 102 q_tree_insert(tree, &chars[i], &chars[i]); in test_tree_search() 105 q_tree_foreach(tree, my_traverse, NULL); in test_tree_search() 107 g_assert(q_tree_nnodes(tree) == strlen(chars)); in test_tree_search() 108 g_assert(q_tree_height(tree) == 6); in test_tree_search() 111 q_tree_foreach(tree, check_order, &p); in test_tree_search() 114 removed = q_tree_remove(tree, &chars[i + 10]); in test_tree_search() 119 removed = q_tree_remove(tree, &c); in test_tree_search() [all …]
|
H A D | test-interval-tree.c | 10 #include "qemu/interval-tree.h" 40 /* Create a tree of a single node, which is the point [1,1]. */ in test_find_one_point() 64 /* Create a tree of a two nodes, which are both the point [1,1]. */ in test_find_two_point() 89 /* Create a tree of a single node, which is the range [1,8]. */ in test_find_one_range() 112 * Create a tree of many nodes in [0,99] and [200,299], in test_find_one_range_many() 200 g_test_add_func("/interval-tree/empty", test_empty); in main() 201 g_test_add_func("/interval-tree/find-one-point", test_find_one_point); in main() 202 g_test_add_func("/interval-tree/find-two-point", test_find_two_point); in main() 203 g_test_add_func("/interval-tree/find-one-range", test_find_one_range); in main() 204 g_test_add_func("/interval-tree/find-one-range-many", in main() [all …]
|
/qemu/include/qemu/ |
H A D | qtree.h | 34 * used by the tree implementation. Until Glib 2.75.3, GTree uses Glib's 65 QTree *q_tree_ref(QTree *tree); 66 void q_tree_unref(QTree *tree); 67 void q_tree_destroy(QTree *tree); 68 void q_tree_insert(QTree *tree, 71 void q_tree_replace(QTree *tree, 74 gboolean q_tree_remove(QTree *tree, 76 gboolean q_tree_steal(QTree *tree, 78 gpointer q_tree_lookup(QTree *tree, 80 gboolean q_tree_lookup_extended(QTree *tree, [all …]
|
H A D | iova-tree.h | 2 * An very simplified iova tree implementation based on GTree. 15 * Currently the iova tree will only allow to keep ranges 18 * tree. It can save a lot of memory when the ranges are split but 22 * protections. Callers of the iova tree should be responsible 46 * Create a new GPA->IOVA tree. 48 * Returns: the tree point on success, or NULL otherwise. 55 * @tree: The GPA->IOVA tree we're inserting the mapping to 58 * Inserts a GPA range to the GPA->IOVA tree. If there are overlapped 63 int gpa_tree_insert(IOVATree *tree, const DMAMap *map); 68 * Create a new iova tree. [all …]
|
H A D | interval-tree.h | 47 * @root: root of the tree. 49 * Returns true if the tree contains no nodes. 59 * @root: root of the tree. 68 * @root: root of the tree. 76 * @root: root of the tree, 79 * Locate the "first" of a set of nodes within the tree at @root 91 * Locate the "next" of a set of nodes within the tree that overlap the
|
H A D | selfmap.h | 12 #include "qemu/interval-tree.h" 32 * Read /proc/self/maps and return a tree of MapInfo structures. 38 * @info: an interval tree 40 * Free a tree of MapInfo structures.
|
/qemu/util/ |
H A D | qtree.c | 73 * [balanced binary tree][glib-Balanced-Binary-Trees]. It should be 99 static QTreeNode *q_tree_insert_internal(QTree *tree, 103 static gboolean q_tree_remove_internal(QTree *tree, 107 static QTreeNode *q_tree_find_node(QTree *tree, 199 QTree *tree; in q_tree_new_full() local 203 tree = g_new(QTree, 1); in q_tree_new_full() 204 tree->root = NULL; in q_tree_new_full() 205 tree->key_compare = key_compare_func; in q_tree_new_full() 206 tree->key_destroy_func = key_destroy_func; in q_tree_new_full() 207 tree->value_destroy_func = value_destroy_func; in q_tree_new_full() [all …]
|
H A D | iova-tree.c | 2 * IOVA tree implementation based on GTree. 13 #include "qemu/iova-tree.h" 16 GTree *tree; member 49 * @next: The next mapping in the tree. Can be NULL to signal the last one 79 iova_tree->tree = g_tree_new_full(iova_tree_compare, NULL, g_free, NULL); in iova_tree_new() 84 const DMAMap *iova_tree_find(const IOVATree *tree, const DMAMap *map) in iova_tree_find() argument 86 return g_tree_lookup(tree->tree, map); in iova_tree_find() 108 const DMAMap *iova_tree_find_iova(const IOVATree *tree, const DMAMap *map) in iova_tree_find_iova() argument 114 g_tree_foreach(tree->tree, iova_tree_find_address_iterator, &args); in iova_tree_find_iova() 124 int iova_tree_insert(IOVATree *tree, const DMAMap *map) in iova_tree_insert() argument [all …]
|
H A D | qsp.c | 44 * - For reports, just use a binary tree as we aggregate data, instead of having 236 /* make sure this file's path in the tree is up to date with QSP_REL_PATH */ in qsp_do_init() 523 GTree *tree = userp; in qsp_sort() local 525 g_tree_insert(tree, e, NULL); in qsp_sort() 599 static void qsp_mktree(GTree *tree, bool callsite_coalesce) in qsp_mktree() argument 638 /* sort the hash table elements by using a tree */ in qsp_mktree() 639 qht_iter(htp, qsp_sort, tree); in qsp_mktree() 641 /* free the hash table, but keep the elements (those are in the tree now) */ in qsp_mktree() 771 GTree *tree = g_tree_new_full(qsp_tree_cmp, &sort_by, g_free, NULL); in qsp_report() local 780 qsp_mktree(tree, callsite_coalesce); in qsp_report() [all …]
|
/qemu/hw/virtio/ |
H A D | vhost-iova-tree.c | 2 * vhost software live migration iova tree 11 #include "qemu/iova-tree.h" 12 #include "vhost-iova-tree.h" 46 VhostIOVATree *tree = g_new(VhostIOVATree, 1); in vhost_iova_tree_new() local 49 tree->iova_first = MAX(iova_first, iova_min_addr); in vhost_iova_tree_new() 50 tree->iova_last = iova_last; in vhost_iova_tree_new() 52 tree->iova_taddr_map = iova_tree_new(); in vhost_iova_tree_new() 53 tree->iova_map = iova_tree_new(); in vhost_iova_tree_new() 54 tree->gpa_iova_map = gpa_tree_new(); in vhost_iova_tree_new() 55 return tree; in vhost_iova_tree_new() [all …]
|
/qemu/docs/devel/ |
H A D | codebase.rst | 48 * `accel <https://gitlab.com/qemu-project/qemu/-/tree/master/accel>`_: 53 `target <https://gitlab.com/qemu-project/qemu/-/tree/master/target>`_. 54 * `audio <https://gitlab.com/qemu-project/qemu/-/tree/master/audio>`_: 56 * `authz <https://gitlab.com/qemu-project/qemu/-/tree/master/authz>`_: 58 * `backends <https://gitlab.com/qemu-project/qemu/-/tree/master/backends>`_: 61 * `block <https://gitlab.com/qemu-project/qemu/-/tree/master/block>`_: 63 * `bsd-user <https://gitlab.com/qemu-project/qemu/-/tree/master/bsd-user>`_: 67 * `chardev <https://gitlab.com/qemu-project/qemu/-/tree/master/chardev>`_: 69 * `common-user <https://gitlab.com/qemu-project/qemu/-/tree/master/common-user>`_: 71 * `configs <https://gitlab.com/qemu-project/qemu/-/tree/master/configs>`_: [all …]
|
/qemu/hw/hyperv/ |
H A D | hv-balloon-page_range_tree.c | 37 static GTreeNode *page_range_tree_insert_new(PageRangeTree tree, in page_range_tree_insert_new() argument 48 return g_tree_insert_node(tree.t, key, range); in page_range_tree_insert_new() 51 void hvb_page_range_tree_insert(PageRangeTree tree, in hvb_page_range_tree_insert() argument 65 node = g_tree_upper_bound(tree.t, &start); in hvb_page_range_tree_insert() 69 node = g_tree_node_last(tree.t); in hvb_page_range_tree_insert() 82 * !node case: the tree is empty or the very first node in the tree in hvb_page_range_tree_insert() 84 * the other case: there is a gap in the tree between the new range in hvb_page_range_tree_insert() 86 * anyway, let's just insert the new range into the tree. in hvb_page_range_tree_insert() 88 node = page_range_tree_insert_new(tree, start, count); in hvb_page_range_tree_insert() 94 * the previous range in the tree either partially covers the new in hvb_page_range_tree_insert() [all …]
|
H A D | hv-balloon-page_range_tree.h | 97 static inline bool page_range_tree_is_empty(PageRangeTree tree) in page_range_tree_is_empty() argument 99 guint nnodes = g_tree_nnodes(tree.t); in page_range_tree_is_empty() 104 void hvb_page_range_tree_init(PageRangeTree *tree); 105 void hvb_page_range_tree_destroy(PageRangeTree *tree); 107 bool hvb_page_range_tree_intree_any(PageRangeTree tree, 110 bool hvb_page_range_tree_pop(PageRangeTree tree, PageRange *out, 113 void hvb_page_range_tree_insert(PageRangeTree tree,
|
/qemu/tests/bench/ |
H A D | qtree-bench.c | 86 void *tree; in init_empty_tree_and_keys() local 89 tree = g_tree_new(compare_func); in init_empty_tree_and_keys() 92 tree = q_tree_new(compare_func); in init_empty_tree_and_keys() 98 *ret_tree = tree; in init_empty_tree_and_keys() 107 static inline void remove_all(void *tree, enum impl_type impl) in remove_all() argument 111 g_tree_destroy(tree); in remove_all() 114 q_tree_destroy(tree); in remove_all() 125 void *tree; in run_benchmark() local 128 init_empty_tree_and_keys(impl, &tree, &keys, n_elems); in run_benchmark() 133 g_tree_insert(tree, &keys[i], &keys[i]); in run_benchmark() [all …]
|
/qemu/include/system/ |
H A D | device_tree.h | 2 * Header with function prototypes to help device tree manipulation using 3 * libfdt. It also provides functions to read entries from device tree proc 21 * load_device_tree_from_sysfs: reads the device tree information in the 22 * /proc/device-tree directory and return the corresponding binary blob 95 * @fdt: pointer to the device tree blob 108 * @fdt: pointer to the device tree blob 138 * @fdt: device tree blob 144 * Set the specified property on the specified node in the device tree 152 * This function is useful because device tree nodes often have cell arrays 171 * @fdt: device tree blob [all …]
|
/qemu/python/qemu/utils/ |
H A D | qom.py | 4 usage: qom [-h] {set,get,list,tree,fuse} ... 12 {set,get,list,tree,fuse} 16 tree Show QOM tree from a given path 17 fuse Mount a QOM tree as a FUSE filesystem 30 # Based on ./scripts/qmp/qom-[set|get|tree|list] 193 QOM Command - Show the full tree below a given path. 195 usage: qom-tree [-h] [--socket SOCKET] [<path>] 197 Show QOM tree from a given path 208 name = 'tree' 209 help = 'Show QOM tree from a given path'
|
/qemu/tests/qtest/ |
H A D | device-introspect-test.c | 201 g_autofree char *qom_tree_start = qtest_hmp(qts, "info qom-tree"); in test_device_intro_none() 209 qom_tree_end = qtest_hmp(qts, "info qom-tree"); in test_device_intro_none() 220 g_autofree char *qom_tree_start = qtest_hmp(qts, "info qom-tree"); in test_device_intro_abstract() 228 qom_tree_end = qtest_hmp(qts, "info qom-tree"); in test_device_intro_abstract() 242 g_autofree char *qom_tree_start = qtest_hmp(qts, "info qom-tree"); in test_device_intro_concrete() 258 * "info qom-tree" or "info qtree" have a good chance at crashing then. in test_device_intro_concrete() 259 * Also make sure that the tree did not change. in test_device_intro_concrete() 261 qom_tree_end = qtest_hmp(qts, "info qom-tree"); in test_device_intro_concrete()
|
/qemu/docs/specs/ |
H A D | ppc-spapr-hotplug.rst | 22 Device tree description of DRCs 25 A set of four Open Firmware device tree array properties are used to describe 28 paths in the device tree depending on the type of resource the DRCs manage. 32 arrays would be fetched as part of the device tree retrieval interfaces 262 Used to fetch an OpenFirmware device tree description of the resource associated 272 ``0``: completed transmittal of device tree node. 274 ``1``: instruct guest to prepare for next device tree sibling node. 276 ``2``: instruct guest to prepare for next device tree child node. 278 ``3``: instruct guest to prepare for next device tree property. 280 ``4``: instruct guest to ascend to parent device tree node. [all …]
|
/qemu/system/ |
H A D | device_tree.c | 2 * Functions to help device tree manipulation using libfdt. 3 * It also provides functions to read entries from device tree proc 67 error_report("%s: Unable to copy device tree into memory: %s", in create_device_tree() 88 error_report("Unable to get size of device tree file '%s'", in load_device_tree() 93 error_report("Device tree file '%s' is too large", filename_path); in load_device_tree() 100 /* First allocate space in qemu for device tree */ in load_device_tree() 105 error_report("Unable to open device tree file '%s'", in load_device_tree() 112 error_report("%s: Unable to copy device tree into memory: %s", in load_device_tree() 117 /* Check sanity of device tree */ in load_device_tree() 119 error_report("Device tree file loaded into memory is invalid: %s", in load_device_tree() [all …]
|
/qemu/hw/core/ |
H A D | sysbus-fdt.c | 2 * ARM Platform Bus device tree generation helpers 48 void *fdt; /* device tree handle */ 74 * copies properties listed in an array from host device tree to 75 * guest device tree. If a non optional property is not found, the 77 * in the host device tree. 80 * @host_dt: host device tree blob 81 * @guest_dt: guest device tree blob 133 * @host_fdt: host device tree blob from which info are retrieved 134 * @guest_fdt: guest device tree blob where the clock node is added 135 * @host_phandle: phandle of the clock in host device tree [all …]
|
/qemu/scripts/coverity-scan/ |
H A D | run-coverity-scan | 18 # tree, and that tree is a fresh clean one, because we do an in-tree 21 # regular expressions it uses; an out-of-tree build won't work for this.) 41 # --srcdir : QEMU source tree to analyze (default: current working dir) 59 # a reasonable default if this is run from a git tree. 299 # we are in a source tree or have upload rights for this, 300 # so do it before some of the command line and source tree checks. 322 echo "Checking this is a QEMU source tree..." 324 echo "Not in a QEMU source tree?"
|
/qemu/scripts/simplebench/ |
H A D | table_templater.py | 34 self.tree = parser.parse(template) 38 for x in self.tree.children: 52 for x in self.tree.children:
|
/qemu/ |
H A D | Makefile | 7 # Always point to the root of the build tree (needs GNU make). 10 # Before including a proper config-host.mak, assume we are in the source tree 48 # 0. ensure the build tree is okay 50 # Check that we're not trying to do an out-of-tree build from 51 # a tree that's been used for an in-tree build. 54 $(error This is an out of tree build but your source tree ($(SRC_PATH)) \ 55 seems to have been used for an in-tree build. You can fix this by running \ 56 "$(MAKE) distclean && rm -rf *-linux-user *-softmmu" in your source tree)
|
/qemu/scripts/ |
H A D | decodetree.py | 19 # Generate a decoding tree from a specification file. 712 class Tree: class 713 """Class representing a node in a decode tree""" 776 # end Tree 783 # Defer everything to our decomposed Tree node 784 self.tree.output_code(i, extracted, outerbits, outermask) 796 t = Tree(outermask, innermask) 818 t = Tree(fullmask, innermask) 830 self.tree = self.__build_tree(self.pats, self.fixedbits, 834 def __prop_format(tree): argument [all …]
|
/qemu/include/exec/ |
H A D | translation-block.h | 15 #include "qemu/interval-tree.h" 35 * search tree, and the only fields needed to compare TB's in the tree are 100 * and we use a unified interval tree. For system, we use a 191 * node is added to the interval tree. in tb_set_page_addr0()
|