Skip to contentSkip to conversation

kvm tools: Repair running on non ioeventfd-capable platforms

PATCH Applied Matt Evans 3 participants 3 messages Jan 31, 2012 KVM

lore
Share & tools
lore

Matt Evans

author
#0 lore raw

PATCH 1/1 kvm tools: Repair running on non ioeventfd-capable platforms

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'.

---

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(-)
tools/kvm/ioeventfd.c +1 -1
index 9133101..f2d5a30 100644
@@ -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)
Signature · 1 line
1.7.0.4
Applied
#1 lore raw
Quoted 8 lines · Matt Evans

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'.

Applied, thanks!

#2 lore raw
In reply to Matt Evans
Quoted 5 lines · Matt Evans

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).

Quoted 7 lines

This commit adds a new return code for the init -- positive, but identifiable as 'not success 0'.

---

Sasha, you screwed PPC64! And it took me a month to notice.... hahaha!

I only broke it two days ago :)

Signature · 1 line
Sasha.