[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 14/15] kvm: Make kvm_state globally available
From: |
Jan Kiszka |
Subject: |
[Qemu-devel] [PATCH 14/15] kvm: Make kvm_state globally available |
Date: |
Mon, 7 Feb 2011 12:19:25 +0100 |
KVM-assisted devices need access to it but we have no clean channel to
distribute a reference. As a workaround until there is a better
solution, export kvm_state for global use, though use should remain
restricted to the mentioned scenario.
Signed-off-by: Jan Kiszka <address@hidden>
---
kvm-all.c | 2 +-
kvm.h | 1 +
2 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/kvm-all.c b/kvm-all.c
index ecac0b3..e6a7de4 100644
--- a/kvm-all.c
+++ b/kvm-all.c
@@ -78,7 +78,7 @@ struct KVMState
int many_ioeventfds;
};
-static KVMState *kvm_state;
+KVMState *kvm_state;
static const KVMCapabilityInfo kvm_required_capabilites[] = {
KVM_CAP_INFO(USER_MEMORY),
diff --git a/kvm.h b/kvm.h
index 4caa6ec..59b2c29 100644
--- a/kvm.h
+++ b/kvm.h
@@ -85,6 +85,7 @@ int kvm_on_sigbus(int code, void *addr);
struct KVMState;
typedef struct KVMState KVMState;
+extern KVMState *kvm_state;
int kvm_ioctl(KVMState *s, int type, ...);
--
1.7.1
[Qemu-devel] [PATCH 05/15] Refactor debug and vmstop request interface, Jan Kiszka, 2011/02/07
[Qemu-devel] [PATCH 10/15] kvm: x86: Catch and report failing IRQ and NMI injections, Jan Kiszka, 2011/02/07