MAINTAINERS: Make section QOM cover hw/core/*bus.c as well
[qemu/armbru.git] / include / sysemu / kvm_int.h
blobc660a70c51a8558e964a4900c324ea67ff3fb92f
1 /*
2 * Internal definitions for a target's KVM support
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.
7 */
9 #ifndef QEMU_KVM_INT_H
10 #define QEMU_KVM_INT_H
12 #include "exec/memory.h"
13 #include "sysemu/accel.h"
14 #include "sysemu/kvm.h"
16 typedef struct KVMSlot
18 hwaddr start_addr;
19 ram_addr_t memory_size;
20 void *ram;
21 int slot;
22 int flags;
23 int old_flags;
24 /* Dirty bitmap cache for the slot */
25 unsigned long *dirty_bmap;
26 } KVMSlot;
28 typedef struct KVMMemoryListener {
29 MemoryListener listener;
30 /* Protects the slots and all inside them */
31 QemuMutex slots_lock;
32 KVMSlot *slots;
33 int as_id;
34 } KVMMemoryListener;
36 #define TYPE_KVM_ACCEL ACCEL_CLASS_NAME("kvm")
38 #define KVM_STATE(obj) \
39 OBJECT_CHECK(KVMState, (obj), TYPE_KVM_ACCEL)
41 void kvm_memory_listener_register(KVMState *s, KVMMemoryListener *kml,
42 AddressSpace *as, int as_id);
44 void kvm_set_max_memslot_size(hwaddr max_slot_size);
46 /**
47 * kvm_hwpoison_page_add:
49 * Parameters:
50 * @ram_addr: the address in the RAM for the poisoned page
52 * Add a poisoned page to the list
54 * Return: None.
56 void kvm_hwpoison_page_add(ram_addr_t ram_addr);
57 #endif