summaryrefslogtreecommitdiff
path: root/kvm-all.c
diff options
context:
space:
mode:
authorPaolo Bonzini <pbonzini@redhat.com>2010-04-19 18:59:30 +0000
committerBlue Swirl <blauwirbel@gmail.com>2010-04-19 18:59:30 +0000
commit98c8573eb37bf5d7bb0c07225985a78537c73101 (patch)
treec709ea4646f51f34804bbf8de7dc1245254334b2 /kvm-all.c
parentc66b5c2cb6bf5ab9869bf0739ff3cdf143ab778c (diff)
downloadqemu-98c8573eb37bf5d7bb0c07225985a78537c73101.tar.gz
provide a stub version of kvm-all.c if !CONFIG_KVM
This allows limited use of kvm functions (which will return ENOSYS) even in once-compiled modules. The patch also improves a bit the error messages for KVM initialization. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> [blauwirbel@gmail.com: fixed Win32 build] Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
Diffstat (limited to 'kvm-all.c')
-rw-r--r--kvm-all.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/kvm-all.c b/kvm-all.c
index 065fd6a250..2ede4b9ea7 100644
--- a/kvm-all.c
+++ b/kvm-all.c
@@ -1157,9 +1157,9 @@ int kvm_set_signal_mask(CPUState *env, const sigset_t *sigset)
return r;
}
-#ifdef KVM_IOEVENTFD
int kvm_set_ioeventfd_pio_word(int fd, uint16_t addr, uint16_t val, bool assign)
{
+#ifdef KVM_IOEVENTFD
struct kvm_ioeventfd kick = {
.datamatch = val,
.addr = addr,
@@ -1176,5 +1176,7 @@ int kvm_set_ioeventfd_pio_word(int fd, uint16_t addr, uint16_t val, bool assign)
if (r < 0)
return r;
return 0;
-}
+#else
+ return -ENOSYS;
#endif
+}