[pve-devel] r5631 - pve-qemu-kvm/trunk/debian/patches

svn-commits at proxmox.com svn-commits at proxmox.com
Tue Mar 1 12:52:03 CET 2011


Author: dietmar
Date: 2011-03-01 12:52:03 +0100 (Tue, 01 Mar 2011)
New Revision: 5631

Added:
   pve-qemu-kvm/trunk/debian/patches/msix-eventfd-fix.patch
Modified:
   pve-qemu-kvm/trunk/debian/patches/series
Log:


Added: pve-qemu-kvm/trunk/debian/patches/msix-eventfd-fix.patch
===================================================================
--- pve-qemu-kvm/trunk/debian/patches/msix-eventfd-fix.patch	                        (rev 0)
+++ pve-qemu-kvm/trunk/debian/patches/msix-eventfd-fix.patch	2011-03-01 11:52:03 UTC (rev 5631)
@@ -0,0 +1,35 @@
+
+  glibc < 2.8 does not have eventfd support. So we define the 
+  syscall manually. That is required for vhost=on.
+
+Index: new/hw/event_notifier.c
+===================================================================
+--- new.orig/hw/event_notifier.c	2011-03-01 12:16:30.000000000 +0100
++++ new/hw/event_notifier.c	2011-03-01 12:36:02.000000000 +0100
+@@ -14,6 +14,13 @@
+ #include "event_notifier.h"
+ #ifdef CONFIG_EVENTFD
+ #include <sys/eventfd.h>
++#else
++#include <sys/syscall.h>
++#include <unistd.h>
++/* this is for AMD64 */ 
++#define __NR_eventfd2				290
++#define EFD_NONBLOCK  04000
++#define EFD_CLOEXEC 02000000
+ #endif
+ 
+ int event_notifier_init(EventNotifier *e, int active)
+@@ -25,7 +32,11 @@
+     e->fd = fd;
+     return 0;
+ #else
+-    return -ENOSYS;
++    int fd = syscall(__NR_eventfd2, !!active, EFD_NONBLOCK | EFD_CLOEXEC);
++    if (fd < 0)
++        return -errno;
++    e->fd = fd;
++    return 0;
+ #endif
+ }
+ 

Modified: pve-qemu-kvm/trunk/debian/patches/series
===================================================================
--- pve-qemu-kvm/trunk/debian/patches/series	2011-02-25 12:21:29 UTC (rev 5630)
+++ pve-qemu-kvm/trunk/debian/patches/series	2011-03-01 11:52:03 UTC (rev 5631)
@@ -7,3 +7,4 @@
 set-max-nics.patch
 use-local-linux-kvm-h.diff
 fr-ca-keymap-corrections.diff
+msix-eventfd-fix.patch




More information about the pve-devel mailing list