From: Stefan Hajnoczi Date: Tue, 25 Jan 2011 16:17:14 +0000 (+0000) Subject: virtio-pci: Disable virtio-ioeventfd when !CONFIG_IOTHREAD X-Git-Tag: Tizen_Studio_1.3_Release_p2.3.1~3633 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=bd3c32792ebb6072436fe9d31066c2a7ed04196d;p=sdk%2Femulator%2Fqemu.git virtio-pci: Disable virtio-ioeventfd when !CONFIG_IOTHREAD It is not possible to use virtio-ioeventfd when building without an I/O thread. We rely on a signal to kick us out of vcpu execution. Timers and AIO use SIGALRM and SIGUSR2 respectively. Unfortunately eventfd does not support O_ASYNC (SIGIO) so eventfd cannot be used in a signal driven manner. Signed-off-by: Stefan Hajnoczi Acked-by: Michael S. Tsirkin Signed-off-by: Kevin Wolf --- diff --git a/kvm-all.c b/kvm-all.c index 255b6fad9c..8f0e17cbf3 100644 --- a/kvm-all.c +++ b/kvm-all.c @@ -449,10 +449,14 @@ int kvm_check_extension(KVMState *s, unsigned int extension) static int kvm_check_many_ioeventfds(void) { - /* Older kernels have a 6 device limit on the KVM io bus. Find out so we + /* Userspace can use ioeventfd for io notification. This requires a host + * that supports eventfd(2) and an I/O thread; since eventfd does not + * support SIGIO it cannot interrupt the vcpu. + * + * Older kernels have a 6 device limit on the KVM io bus. Find out so we * can avoid creating too many ioeventfds. */ -#ifdef CONFIG_EVENTFD +#if defined(CONFIG_EVENTFD) && defined(CONFIG_IOTHREAD) int ioeventfds[7]; int i, ret = 0; for (i = 0; i < ARRAY_SIZE(ioeventfds); i++) {