diff options
author | Paolo Bonzini <pbonzini@redhat.com> | 2010-04-19 18:59:30 +0000 |
---|---|---|
committer | Blue Swirl <blauwirbel@gmail.com> | 2010-04-19 18:59:30 +0000 |
commit | 98c8573eb37bf5d7bb0c07225985a78537c73101 (patch) | |
tree | c709ea4646f51f34804bbf8de7dc1245254334b2 /kvm-all.c | |
parent | c66b5c2cb6bf5ab9869bf0739ff3cdf143ab778c (diff) |
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.c | 6 |
1 files changed, 4 insertions, 2 deletions
@@ -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 +} |