xref: /qemu/hw/xen/xen_stubs.c (revision 4d3ad3c3ba1f1e9c217d0581e4913a59ef2ac15f)
1 /*
2  * Various stubs for xen functions
3  *
4  * Those functions are used only if xen_enabled(). This file is linked only if
5  * CONFIG_XEN is not set, so they should never be called.
6  *
7  * Copyright (c) 2025 Linaro, Ltd.
8  *
9  * SPDX-License-Identifier: GPL-2.0-or-later
10  */
11 
12 #include "qemu/osdep.h"
13 #include "system/xen.h"
14 #include "system/xen-mapcache.h"
15 
16 void xen_hvm_modified_memory(ram_addr_t start, ram_addr_t length)
17 {
18     g_assert_not_reached();
19 }
20 
21 void xen_ram_alloc(ram_addr_t ram_addr, ram_addr_t size,
22                    struct MemoryRegion *mr, Error **errp)
23 {
24     g_assert_not_reached();
25 }
26 
27 bool xen_mr_is_memory(MemoryRegion *mr)
28 {
29     g_assert_not_reached();
30 }
31 
32 void xen_invalidate_map_cache_entry(uint8_t *buffer)
33 {
34     g_assert_not_reached();
35 }
36 
37 ram_addr_t xen_ram_addr_from_mapcache(void *ptr)
38 {
39     g_assert_not_reached();
40 }
41 
42 uint8_t *xen_map_cache(MemoryRegion *mr,
43                        hwaddr phys_addr,
44                        hwaddr size,
45                        ram_addr_t ram_addr_offset,
46                        uint8_t lock,
47                        bool dma,
48                        bool is_write)
49 {
50     g_assert_not_reached();
51 }
52