Bug 510679
Summary: | host pci device hot-unplug is not implemented | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Product: | Red Hat Enterprise Linux 5 | Reporter: | Shaohui <shaohui.zheng> | ||||||||
Component: | libvirt | Assignee: | Jiri Denemark <jdenemar> | ||||||||
Status: | CLOSED ERRATA | QA Contact: | Virtualization Bugs <virt-bugs> | ||||||||
Severity: | medium | Docs Contact: | |||||||||
Priority: | low | ||||||||||
Version: | 5.4 | CC: | berrange, dallan, haicheng.li, hbrock, jdenemar, jiajun.xu, kxiong, llim, rlerch, veillard, virt-maint, weizhan, xen-maint, xudong.hao | ||||||||
Target Milestone: | rc | ||||||||||
Target Release: | --- | ||||||||||
Hardware: | All | ||||||||||
OS: | Linux | ||||||||||
Whiteboard: | |||||||||||
Fixed In Version: | libvirt-0.8.2-1.el5 | Doc Type: | Bug Fix | ||||||||
Doc Text: |
Hotunplug of PCI devices is not supported in this release. This feature will be introduced in a future update.
|
Story Points: | --- | ||||||||
Clone Of: | Environment: | ||||||||||
Last Closed: | 2011-01-13 22:51:46 UTC | Type: | --- | ||||||||
Regression: | --- | Mount Type: | --- | ||||||||
Documentation: | --- | CRM: | |||||||||
Verified Versions: | Category: | --- | |||||||||
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||||||
Cloudforms Team: | --- | Target Upstream Version: | |||||||||
Embargoed: | |||||||||||
Bug Depends On: | |||||||||||
Bug Blocks: | 513501 | ||||||||||
Attachments: |
|
Description
Shaohui
2009-07-10 08:58:45 UTC
Thanks for the report. Can you please attach ~/.virt-manager/virt-manager.log? Created attachment 351418 [details]
log file from virt-manager
Relevant portion: [Mon, 13 Jul 2009 10:43:26 virt-manager 6706] DEBUG (domain:1111) Hostdev xpath string: /domain/devices/hostdev[@type='pci' and source/address/@bus='0x00' and source/address/@slot='0x19' and source/address/@function='0x0' and source/address/@domain='0x0000'] [Mon, 13 Jul 2009 10:43:26 virt-manager 6706] DEBUG (details:1767) Device could not be hotUNplugged: POST operation failed: xend_post: error from xen daemon: (xend.err "(22, 'Invalid argument')") So this is likely a libvirt or xen bug. Reassigning to libvirt for now. Shaohui, can you attach the XML of guest (virsh dumpxml <vmname>) with the host device attached? Thanks. Created attachment 351566 [details]
dumpxml from virsh
<hostdev mode='subsystem' type='pci' managed='no'>
<source>
<address domain='0x0000' bus='0x00' slot='0x19' function='0x0'/>
</source>
</hostdev>
</devices>
I see a suspected field managed='no'. it might be the root cause.
For the Libvirt Xen driver, PCI devices are always setup with managed='no', only QEMU allows for managed='yes'. I'm thinking it looks like a XenD bug - could you provide the /var/log/xen/xend.log file from just after the failure to unplug. It should give us more info about the errro. Created attachment 351605 [details]
xend.log
I was able to reproduce it and attached is what shows in xend.log when hitting the remove button in virt-manager.
I investigated a bit further and xend gets a request with the following arguments: {'type': ['`\xfc\x8d\t\xff\x7f'], 'force': ['0'], 'dev': ['\xd8B\xfe '], 'rm_cfg': ['1'], 'op': ['device_destroy']} I guess the type should have been 'pci'. Dan, any reply to Jirka's comment #9. Hang on a minute. We never actually implemented PCI device hotplug/unplug for the libvirt Xen driver, so I'm surprised its even getting as far as XenD. Oh I tell a lie, we partially implemented it. Hotplug should work, but hotunplug will not. Unfortunately we left some bogus code in virDomainXMLDevID() method, } else if (dev->type == VIR_DOMAIN_DEVICE_HOSTDEV && dev->data.hostdev->mode == VIR_DOMAIN_HOSTDEV_MODE_SUBSYS && dev->data.hostdev->source.subsys.type == VIR_DOMAIN_HOSTDEV_SUBSYS_TYPE_PCI) { } else { virXendError(NULL, VIR_ERR_NO_SUPPORT, "%s", _("hotplug of device type not supported")); return -1; } return 0; so it'll return success, even though its not implemented. We should remove that test for PCI hostdevs here, so you'll get a proper error from libvirt, and then target a real implementation for RHEL-5.5 Release note added. If any revisions are required, please set the "requires_release_notes" flag to "?" and edit the "Release Notes" field accordingly. All revisions will be proofread by the Engineering Content Services team. New Contents: Hotunplug of PCI devices is not supported in this release. This feature will be introduced in a future update. Okay, at this point it's clear it's too late for 5.5, so retargetted for 5.6, Daniel Test with RHEL5.5 Beta, pci device hot-unplug can not work in Virt-Manager for both Xen and KVM. (In reply to comment #23) > Test with RHEL5.5 Beta, pci device hot-unplug can not work in Virt-Manager for > both Xen and KVM. Seems what I met is another issue while the assigned device is MFD behind a bridge. If the device is single device, the hot-unplug can work in RHEL5.5 Beta. So pls. skip my comments in comment 23. I will open another bug for the MFD hotplug issue. Re: comment 24, are you saying that the problem is fixed? Fixed in libvirt-0.8.2-1.el5 The comment #29 is irrelevant, this bug is for xen hypervisor, not kvm. Verified on Server-x86_64-Xen and Client-i386-Xen ia64-Xen doesn't support modprobe acpiphp 1. # virsh nodedev-list --tree 2. # virsh nodedev-dumpxml pci_8086_10bd 3. Dettach this network device from host virsh nodedev-dettach pci_8086_10bd 4. Add the following code to <guest> xml file ... <hostdev mode='subsystem' type='pci'> <source> <address bus='0' slot='25' function='0'/> </source> </hostdev> ... 5.virsh start <guest> 6.run #modprobe acpiphp on guest # 7.On virt-manager remove the device,device can be removed An advisory has been issued which should help the problem described in this bug report. This report is therefore being closed with a resolution of ERRATA. For more information on therefore solution and/or where to find the updated files, please follow the link below. You may reopen this bug report if the solution does not work for you. http://rhn.redhat.com/errata/RHEA-2011-0060.html |