mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-01 23:03:54 -06:00
kvm: Make kvm_state globally available
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 <jan.kiszka@siemens.com> Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
This commit is contained in:
parent
638a84af9f
commit
6a7af8cb04
2 changed files with 2 additions and 1 deletions
|
@ -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),
|
||||
|
|
1
kvm.h
1
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, ...);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue