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>
This commit is contained in:
Paolo Bonzini 2010-04-19 18:59:30 +00:00 committed by Blue Swirl
parent c66b5c2cb6
commit 98c8573eb3
5 changed files with 153 additions and 21 deletions

View file

@ -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
}