]> git.proxmox.com Git - mirror_qemu.git/blame - include/sysemu/kvm_int.h
hvf: Introduce hvf vcpu struct
[mirror_qemu.git] / include / sysemu / kvm_int.h
CommitLineData
8571ed35
PB
1/*
2 * Internal definitions for a target's KVM support
3 *
4 * This work is licensed under the terms of the GNU GPL, version 2 or later.
5 * See the COPYING file in the top-level directory.
6 *
7 */
8
9#ifndef QEMU_KVM_INT_H
10#define QEMU_KVM_INT_H
11
ec150c7e 12#include "exec/memory.h"
940e43aa 13#include "qemu/accel.h"
8571ed35
PB
14#include "sysemu/kvm.h"
15
16typedef struct KVMSlot
17{
18 hwaddr start_addr;
19 ram_addr_t memory_size;
20 void *ram;
21 int slot;
22 int flags;
6c090d4a 23 int old_flags;
9f4bf4ba
PX
24 /* Dirty bitmap cache for the slot */
25 unsigned long *dirty_bmap;
563d32ba 26 unsigned long dirty_bmap_size;
e65e5f50
PX
27 /* Cache of the address space ID */
28 int as_id;
2c20b27e
PX
29 /* Cache of the offset in ram address space */
30 ram_addr_t ram_start_offset;
8571ed35
PB
31} KVMSlot;
32
7bbda04c
PB
33typedef struct KVMMemoryListener {
34 MemoryListener listener;
35 KVMSlot *slots;
38bfe691 36 int as_id;
7bbda04c
PB
37} KVMMemoryListener;
38
38bfe691
PB
39void kvm_memory_listener_register(KVMState *s, KVMMemoryListener *kml,
40 AddressSpace *as, int as_id);
41
023ae9a8 42void kvm_set_max_memslot_size(hwaddr max_slot_size);
6b552b9b
DG
43
44/**
45 * kvm_hwpoison_page_add:
46 *
47 * Parameters:
48 * @ram_addr: the address in the RAM for the poisoned page
49 *
50 * Add a poisoned page to the list
51 *
52 * Return: None.
53 */
54void kvm_hwpoison_page_add(ram_addr_t ram_addr);
8571ed35 55#endif