Revision ca821806 kvm.h
b/kvm.h | ||
---|---|---|
14 | 14 |
#ifndef QEMU_KVM_H |
15 | 15 |
#define QEMU_KVM_H |
16 | 16 |
|
17 |
#include <stdbool.h> |
|
18 |
#include <errno.h> |
|
17 | 19 |
#include "config-host.h" |
18 | 20 |
#include "qemu-queue.h" |
19 | 21 |
|
20 |
extern int kvm_allowed; |
|
22 |
#ifdef CONFIG_KVM |
|
23 |
#include <linux/kvm.h> |
|
24 |
#endif |
|
21 | 25 |
|
22 | 26 |
#ifdef CONFIG_KVM |
27 |
extern int kvm_allowed; |
|
23 | 28 |
#define kvm_enabled() (kvm_allowed) |
24 | 29 |
#else |
25 | 30 |
#define kvm_enabled() (0) |
... | ... | |
161 | 166 |
kvm_cpu_synchronize_post_init(env); |
162 | 167 |
} |
163 | 168 |
} |
169 |
|
|
170 |
#if defined(KVM_IOEVENTFD) && defined(CONFIG_KVM) |
|
171 |
int kvm_set_ioeventfd_pio_word(int fd, uint16_t adr, uint16_t val, bool assign); |
|
172 |
#else |
|
173 |
static inline |
|
174 |
int kvm_set_ioeventfd_pio_word(int fd, uint16_t adr, uint16_t val, bool assign) |
|
175 |
{ |
|
176 |
return -ENOSYS; |
|
177 |
} |
|
178 |
#endif |
|
179 |
|
|
164 | 180 |
#endif |
165 | 181 |
#endif |
Also available in: Unified diff