kvm-all: add support for multiple address spaces

Make kvm_memory_listener_register public, and assign a kernel
address space id to each KVMMemoryListener.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
This commit is contained in:
Paolo Bonzini 2015-06-18 18:30:14 +02:00
parent 7bbda04c8d
commit 38bfe69180
2 changed files with 10 additions and 7 deletions

View file

@ -25,6 +25,7 @@ typedef struct KVMSlot
typedef struct KVMMemoryListener {
MemoryListener listener;
KVMSlot *slots;
int as_id;
} KVMMemoryListener;
#define TYPE_KVM_ACCEL ACCEL_CLASS_NAME("kvm")
@ -32,4 +33,7 @@ typedef struct KVMMemoryListener {
#define KVM_STATE(obj) \
OBJECT_CHECK(KVMState, (obj), TYPE_KVM_ACCEL)
void kvm_memory_listener_register(KVMState *s, KVMMemoryListener *kml,
AddressSpace *as, int as_id);
#endif