]> git.proxmox.com Git - mirror_qemu.git/blame - include/qemu/plugin-memory.h
Merge tag 'misc-fixes-20231113' of https://github.com/philmd/qemu into staging
[mirror_qemu.git] / include / qemu / plugin-memory.h
CommitLineData
235537fa
AB
1/*
2 * Plugin Memory API
3 *
4 * Copyright (c) 2019 Linaro Ltd
5 *
6 * SPDX-License-Identifier: GPL-2.0-or-later
7 */
8
e52ee00d
AA
9#ifndef PLUGIN_MEMORY_H
10#define PLUGIN_MEMORY_H
235537fa 11
7a5951f6
MA
12#include "exec/cpu-defs.h"
13#include "exec/hwaddr.h"
14
235537fa
AB
15struct qemu_plugin_hwaddr {
16 bool is_io;
17 bool is_store;
405c02d8
RH
18 hwaddr phys_addr;
19 MemoryRegion *mr;
235537fa
AB
20};
21
22/**
23 * tlb_plugin_lookup: query last TLB lookup
24 * @cpu: cpu environment
25 *
26 * This function can be used directly after a memory operation to
27 * query information about the access. It is used by the plugin
28 * infrastructure to expose more information about the address.
29 *
30 * It would only fail if not called from an instrumented memory access
31 * which would be an abuse of the API.
32 */
732d5487 33bool tlb_plugin_lookup(CPUState *cpu, vaddr addr, int mmu_idx,
235537fa
AB
34 bool is_store, struct qemu_plugin_hwaddr *data);
35
ea9cea93 36#endif /* PLUGIN_MEMORY_H */