]> git.proxmox.com Git - mirror_qemu.git/blame - include/exec/plugin-gen.h
virtio: don't zero out memory region cache for indirect descriptors
[mirror_qemu.git] / include / exec / plugin-gen.h
CommitLineData
38b47b19
EC
1/*
2 * Copyright (C) 2017, Emilio G. Cota <cota@braap.org>
3 *
4 * License: GNU GPL, version 2 or later.
5 * See the COPYING file in the top-level directory.
6 *
7 * plugin-gen.h - TCG-dependent definitions for generating plugin code
8 *
9 * This header should be included only from plugin.c and C files that emit
10 * TCG code.
11 */
12#ifndef QEMU_PLUGIN_GEN_H
13#define QEMU_PLUGIN_GEN_H
14
38b47b19
EC
15#include "tcg/tcg.h"
16
17struct DisasContextBase;
18
19#ifdef CONFIG_PLUGIN
20
b21af662
RH
21bool plugin_gen_tb_start(CPUState *cpu, const struct DisasContextBase *db,
22 bool supress);
38b47b19
EC
23void plugin_gen_tb_end(CPUState *cpu);
24void plugin_gen_insn_start(CPUState *cpu, const struct DisasContextBase *db);
25void plugin_gen_insn_end(void);
26
27void plugin_gen_disable_mem_helpers(void);
fcdab382 28void plugin_gen_empty_mem_callback(TCGv_i64 addr, uint32_t info);
38b47b19
EC
29
30#else /* !CONFIG_PLUGIN */
31
b21af662
RH
32static inline bool
33plugin_gen_tb_start(CPUState *cpu, const struct DisasContextBase *db, bool sup)
38b47b19
EC
34{
35 return false;
36}
37
38static inline
39void plugin_gen_insn_start(CPUState *cpu, const struct DisasContextBase *db)
40{ }
41
42static inline void plugin_gen_insn_end(void)
43{ }
44
45static inline void plugin_gen_tb_end(CPUState *cpu)
46{ }
47
48static inline void plugin_gen_disable_mem_helpers(void)
49{ }
50
fcdab382 51static inline void plugin_gen_empty_mem_callback(TCGv_i64 addr, uint32_t info)
38b47b19
EC
52{ }
53
54#endif /* CONFIG_PLUGIN */
55
56#endif /* QEMU_PLUGIN_GEN_H */
57