RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 753692 - Booting VM with 232 virtio disks(multifunction=on) caused QEMU error(unable to map ioeventfd: -28)
Summary: Booting VM with 232 virtio disks(multifunction=on) caused QEMU error(unable t...
Keywords:
Status: CLOSED UPSTREAM
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: qemu-kvm
Version: 6.2
Hardware: x86_64
OS: Linux
medium
medium
Target Milestone: rc
: 6.3
Assignee: Amos Kong
QA Contact: Virtualization Bugs
URL:
Whiteboard:
: 802226 1130360 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-11-14 07:34 UTC by FuXiangChun
Modified: 2015-05-25 00:06 UTC (History)
15 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2012-03-13 08:18:08 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
win7 BSOD snapshot (11.53 KB, image/png)
2011-11-14 07:37 UTC, FuXiangChun
no flags Details
boot 232 virtio disks command line (39.60 KB, text/plain)
2011-11-14 07:40 UTC, FuXiangChun
no flags Details

Description FuXiangChun 2011-11-14 07:34:48 UTC
Description of problem:
reinstall a new  win7 guest, only the first time can boot successful with 232 virtio disks, after repeat boot guest, it is always BSOD. 

Version-Release number of selected component (if applicable):
# rpm -qa|grep qemu
qemu-kvm-0.12.1.2-2.209.el6.x86_64
# uname -r
2.6.32-214.el6.x86_64

How reproducible:
90%

Steps to Reproduce:
1.command line is in attachment
2.
3.
  
Actual results:
1.guest BSOD
2.qemu monitor output error message:
qemu-kvm: virtio_pci_set_host_notifier_internal: unable to map ioeventfd: -28
qemu-kvm: virtio_pci_start_ioeventfd: failed. Fallback to a userspace (slower).
3. a snapshot of BSOD is in attachment 

Expected results:
guest boot successful

Additional info:

Comment 1 FuXiangChun 2011-11-14 07:37:04 UTC
Created attachment 533447 [details]
win7 BSOD snapshot

Comment 2 FuXiangChun 2011-11-14 07:40:01 UTC
Created attachment 533448 [details]
boot 232 virtio disks command line

Comment 4 FuXiangChun 2011-11-14 10:40:47 UTC
additional info:
repeat above steps, only get BSOD, but cann't get memory dump file.

Comment 6 Mike Cao 2011-11-23 08:42:43 UTC
Hi, Vadim

Does  virtio-win driver support multifunction now ?
Do you think this is a virtio-win RFE bug ?

Best Regards,
Mike

Comment 7 FuXiangChun 2011-11-23 08:54:14 UTC
if boot rhel6.2 and rhel5.7 guest with 232 virtio disks(enable multifunction=on). they work fine. so only windows guest have this issue.

Comment 8 Vadim Rozenfeld 2011-11-23 09:08:42 UTC
(In reply to comment #6)
> Hi, Vadim
> 
> Does  virtio-win driver support multifunction now ?
> Do you think this is a virtio-win RFE bug ?
> 
> Best Regards,
> Mike

Hi Mike,
Technically, viostor (as any other Windows driver) doesn't care whether it is
running on top of a multi or a single function controller. Windows treats function as an a device. However, it could be some limitation from Storport Miniport driver side. I need to try generating and analyzing a crash dump file, before I can give you a more precise answer. 

Cheers,
Vadim.

Comment 9 Amos Kong 2011-12-14 07:02:45 UTC
qemu-kvm: virtio_pci_set_host_notifier_internal: unable to map ioeventfd: -28

-28 is ENOSPC error, NR_IOBUS_DEVS of rhel6 is limited, upstream already increased it to 300.
Before apply my patch [1], qemu outputs this error when test with rhel6 guest

After apply this patch to rhel6 kernel, qemu-kvm doesn't output this error.

rhel6 guest: OK (guest can identify 232 disks)
rhel5 guest: OK (guest can identify 232 disks)
winXp guest: OK (guest can identify 232 disks)
win7  guest: BSOD
The BSOD occurs before system booting up, so I don't get the mem-dump.
Need to investigate if it's a bug of virtio-win driver.

[1]
diff --git a/include/linux/kvm_host.h b/include/linux/kvm_host.h
index 72a990d..43252c5 100644
--- a/include/linux/kvm_host.h
+++ b/include/linux/kvm_host.h
@@ -55,7 +55,7 @@ extern struct kmem_cache *kvm_vcpu_cache;
  */
 struct kvm_io_bus {
        int                   dev_count;
-#define NR_IOBUS_DEVS 200
+#define NR_IOBUS_DEVS 300
        struct kvm_io_device *devs[NR_IOBUS_DEVS];
 };

brew build:
https://brewweb.devel.redhat.com/taskinfo?taskID=3889443

Comment 10 Amos Kong 2011-12-19 15:51:28 UTC
After talked with Ronen, I created a new bz(768981) for splitting this bz to two parts.

Before applying patch in comment #9, qemu outputs ENOSPC error for all guests(not only win7)
> qemu-kvm: virtio_pci_set_host_notifier_internal: unable to map ioeventfd: -28
> qemu-kvm: virtio_pci_start_ioeventfd: failed. Fallback to a userspace (slower).

This is a bug of host kernel, my patch in comment #9 fixed this problem, qemu doesn't output this error after using this patch.

But BSOD of win7 guest occurs with/without this patch (virtio-win-1.4.0), but guest doesn't BSOD when using virtio-win-1.2.0, 

So we will only fix ENOSPC problem in this bz, and continually track win7 BSOD issue in bz(768981).

Comment 13 Amos Kong 2012-03-12 07:59:30 UTC
*** Bug 802226 has been marked as a duplicate of this bug. ***

Comment 14 Ronen Hod 2012-03-12 09:21:47 UTC
It should work with 196 devices. It was tested with 186 devices.
Since this is not a customer bug, I am moving it to RHEL6.4
Requires some more upstream work.

Comment 15 Amos Kong 2012-03-13 08:18:08 UTC
Upstream qemu will abort when fail to allocate ioeventfd, I will post a patch to fix it.

Internal qemu-kvm will fallback to userspace when it fails to allocate ioeventfd, it's expected. We could not fix this problem by increase iobus dev limitation in kernel, because the limitation will be breached if we use pci-bridge.

So I could close this bug as NOTABUG.

Maybe we can fix the error message by strerror(), but it's not important.

-            error_report("%s: unable to unmap ioeventfd: %d",
-                         __func__, r);
+            error_report("%s: unable to unmap ioeventfd: %s",
+                         __func__, strerror(-r));

> Current error message:
qemu-kvm: virtio_pci_set_host_notifier_internal: unable to map ioeventfd: -28
qemu-kvm: virtio_pci_start_ioeventfd: failed. Fallback to a userspace (slower).

> Fixed error message:
qemu-kvm: virtio_pci_set_host_notifier_internal: unable to map ioeventfd: No space left on device
qemu-kvm: virtio_pci_start_ioeventfd: failed. Fallback to a userspace (slower).

Comment 16 Amos Kong 2014-08-15 12:39:37 UTC
*** Bug 1130360 has been marked as a duplicate of this bug. ***


Note You need to log in before you can comment on or make changes to this bug.