mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-04 00:03:54 -06:00
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:
parent
c66b5c2cb6
commit
98c8573eb3
5 changed files with 153 additions and 21 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
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue