All of lore.kernel.org
 help / color / mirror / Atom feed
* qemu-kvm-0.14.0 msix_mask_notifier failed.
@ 2011-02-28 11:16 Dietmar Maurer
  2011-03-01 11:43 ` Dietmar Maurer
  0 siblings, 1 reply; 4+ messages in thread
From: Dietmar Maurer @ 2011-02-28 11:16 UTC (permalink / raw)
  To: kvm@vger.kernel.org

Hi all,

I get this error when I run new kvm 0.14.0 on kernel 2.6.35 (vhost=on):

# kvm -netdev type=tap,id=n0,vhost=on -device virtio-net-pci,netdev=n0 -cdrom ubuntu-10.10-desktop-amd64.iso

kvm: /home/code/qemu-kvm/hw/msix.c:639: msix_unset_mask_notifier: Assertion `dev->msix_mask_notifier' failed.

Any ideas?

- Dietmar



^ permalink raw reply	[flat|nested] 4+ messages in thread

* RE: qemu-kvm-0.14.0 msix_mask_notifier failed.
  2011-02-28 11:16 qemu-kvm-0.14.0 msix_mask_notifier failed Dietmar Maurer
@ 2011-03-01 11:43 ` Dietmar Maurer
  2011-03-21 20:47   ` Nikola Ciprich
  0 siblings, 1 reply; 4+ messages in thread
From: Dietmar Maurer @ 2011-03-01 11:43 UTC (permalink / raw)
  To: kvm@vger.kernel.org

Seems the bug is related to EVENTFD support.

int event_notifier_init(EventNotifier *e, int active)

That simply return -ENOSYS on older glibc (< 2.8)

I can define the syscall manually, but I wonder if there is a better way? 

- Dietmar


> I get this error when I run new kvm 0.14.0 on kernel 2.6.35 (vhost=on):
> 
> # kvm -netdev type=tap,id=n0,vhost=on -device virtio-net-pci,netdev=n0 -cdrom
> ubuntu-10.10-desktop-amd64.iso
> 
> kvm: /home/code/qemu-kvm/hw/msix.c:639: msix_unset_mask_notifier:
> Assertion `dev->msix_mask_notifier' failed.
> 
> Any ideas?


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: qemu-kvm-0.14.0 msix_mask_notifier failed.
  2011-03-01 11:43 ` Dietmar Maurer
@ 2011-03-21 20:47   ` Nikola Ciprich
  2011-03-22  4:53     ` Dietmar Maurer
  0 siblings, 1 reply; 4+ messages in thread
From: Nikola Ciprich @ 2011-03-21 20:47 UTC (permalink / raw)
  To: Dietmar Maurer; +Cc: kvm@vger.kernel.org, nikola.ciprich

Hello Dietmar,
did You somehow fixed this problem?
BR
nik

On Tue, Mar 01, 2011 at 11:43:39AM +0000, Dietmar Maurer wrote:
> Seems the bug is related to EVENTFD support.
> 
> int event_notifier_init(EventNotifier *e, int active)
> 
> That simply return -ENOSYS on older glibc (< 2.8)
> 
> I can define the syscall manually, but I wonder if there is a better way? 
> 
> - Dietmar
> 
> 
> > I get this error when I run new kvm 0.14.0 on kernel 2.6.35 (vhost=on):
> > 
> > # kvm -netdev type=tap,id=n0,vhost=on -device virtio-net-pci,netdev=n0 -cdrom
> > ubuntu-10.10-desktop-amd64.iso
> > 
> > kvm: /home/code/qemu-kvm/hw/msix.c:639: msix_unset_mask_notifier:
> > Assertion `dev->msix_mask_notifier' failed.
> > 
> > Any ideas?
> 
> --
> To unsubscribe from this list: send the line "unsubscribe kvm" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> 

-- 
-------------------------------------
Ing. Nikola CIPRICH
LinuxBox.cz, s.r.o.
28. rijna 168, 709 01 Ostrava

tel.:   +420 596 603 142
fax:    +420 596 621 273
mobil:  +420 777 093 799

www.linuxbox.cz

mobil servis: +420 737 238 656
email servis: servis@linuxbox.cz
-------------------------------------

^ permalink raw reply	[flat|nested] 4+ messages in thread

* RE: qemu-kvm-0.14.0 msix_mask_notifier failed.
  2011-03-21 20:47   ` Nikola Ciprich
@ 2011-03-22  4:53     ` Dietmar Maurer
  0 siblings, 0 replies; 4+ messages in thread
From: Dietmar Maurer @ 2011-03-22  4:53 UTC (permalink / raw)
  To: Nikola Ciprich; +Cc: kvm@vger.kernel.org

I simply defined the syscall myself - but this only works if your kernel supports the eventfd syscall.
Note: You need to adjust the the syscall NR for your architecture.

-------------------------------------------------------------------------------------
  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
 }

> -----Original Message-----
> From: Nikola Ciprich [mailto:extmaillist@linuxbox.cz]
> Sent: Montag, 21. März 2011 21:48
> To: Dietmar Maurer
> Cc: kvm@vger.kernel.org; nikola.ciprich@linuxbox.cz
> Subject: Re: qemu-kvm-0.14.0 msix_mask_notifier failed.
> 
> Hello Dietmar,
> did You somehow fixed this problem?
> BR
> nik
> 
> On Tue, Mar 01, 2011 at 11:43:39AM +0000, Dietmar Maurer wrote:
> > Seems the bug is related to EVENTFD support.
> >
> > int event_notifier_init(EventNotifier *e, int active)
> >
> > That simply return -ENOSYS on older glibc (< 2.8)
> >
> > I can define the syscall manually, but I wonder if there is a better way?
> >
> > - Dietmar
> >
> >
> > > I get this error when I run new kvm 0.14.0 on kernel 2.6.35 (vhost=on):
> > >
> > > # kvm -netdev type=tap,id=n0,vhost=on -device
> > > virtio-net-pci,netdev=n0 -cdrom ubuntu-10.10-desktop-amd64.iso
> > >
> > > kvm: /home/code/qemu-kvm/hw/msix.c:639: msix_unset_mask_notifier:
> > > Assertion `dev->msix_mask_notifier' failed.
> > >
> > > Any ideas?


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2011-03-22  4:54 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-02-28 11:16 qemu-kvm-0.14.0 msix_mask_notifier failed Dietmar Maurer
2011-03-01 11:43 ` Dietmar Maurer
2011-03-21 20:47   ` Nikola Ciprich
2011-03-22  4:53     ` Dietmar Maurer

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.