From mboxrd@z Thu Jan 1 00:00:00 1970 From: Matt Evans Subject: [PATCH] kvm tools: Repair running on non ioeventfd-capable platforms Date: Tue, 31 Jan 2012 17:30:41 +1100 Message-ID: <4F278A91.3030205@ozlabs.org> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: Pekka Enberg , Sasha Levin To: KVM list Return-path: Received: from ozlabs.org ([203.10.76.45]:52555 "EHLO ozlabs.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753666Ab2AaGao (ORCPT ); Tue, 31 Jan 2012 01:30:44 -0500 Sender: kvm-owner@vger.kernel.org List-ID: Commit d3923126a24212f1e746a84a575dadbd9f259418 added a bunch of nice error checking around ioevent__init() but the init may gracefully fail if ioevents simply aren't supported (PPC64 KVM). This commit adds a new return code for the init -- positive, but identifiable as 'not success 0'. Signed-off-by: Matt Evans --- Sasha, you screwed PPC64! And it took me a month to notice.... hahaha! tools/kvm/ioeventfd.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/tools/kvm/ioeventfd.c b/tools/kvm/ioeventfd.c index 9133101..f2d5a30 100644 --- a/tools/kvm/ioeventfd.c +++ b/tools/kvm/ioeventfd.c @@ -67,7 +67,7 @@ int ioeventfd__init(struct kvm *kvm) ioeventfd_avail = kvm__supports_extension(kvm, KVM_CAP_IOEVENTFD); if (!ioeventfd_avail) - return -ENOSYS; + return 1; /* Not fatal, but let caller determine no-go. */ epoll_fd = epoll_create(IOEVENTFD_MAX_EVENTS); if (epoll_fd < 0) -- 1.7.0.4