[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-devel] PCI hotplug related issues



Hello,
 
I am encountering an interesting problem when using PCI-hotplug to assign devices to a VM (HVM) in a Xen environment (SLES 11 SP2).
 
1. If the VM is powered on before the PCI device is brought on-line, the guest OS is unable to see the device (I have tried using
    the acpiphp/pciehp drivers in the guest OS, as well as manually rescanning the PCI bus from within the VM).
 
    However, Xen reports that the hot-plug operation was successful. When I try to verify the PCI device state from Xen's perspective
    by looking  at a) the list of (remaining) assignable devices and b) list of devices attached to the VM, the xm and xl tool-sets report
    that the PCI device is indeed assigned to the VM.
 
2. If the VM is powered on after the PCI device (an FPGA in this case) is brought on-line, the guest OS inside the VM can see and
    configure the device as expected (using the appropriate driver for the device).
 
Upon examining the output of /var/log/xen/qemu-dm-VMName.log, I see that in the former case QEMU returned a failure, while in the latter case it reported success (see below).
 
 
Case 1: VM was powered on 'before' PCI device (FPGA) was brought on-line
-------------------------------------------------------------------------------------------------------------
dm-command: hot insert pass-through pci dev
register_real_device: Assigning real physical device 01:00.0 ...
register_real_device: Error: couldn't locate device in libpci structures
 
 
Case 2: VM was powered on 'after' PCI device (FPGA) was brought on-line
----------------------------------------------------------------------------------------------------------
dm-command: hot insert pass-through pci dev
register_real_device: Assigning real physical device 01:00.0 ...
register_real_device: Enable MSI translation via per device option
register_real_device: Disable power management
pt_iomul_init: Error: pt_iomul_init can't open file /dev/xen/pci_iomul: No such file or directory: 0x1:0x0.0x0
pt_register_regions: IO region registered (size=0x00100000 base_addr=0xc6000000)
pt_register_regions: IO region registered (size=0x00100000 base_addr=0xc6100000)
pt_msi_setup: msi mapped with pirq 84 pci_intx: intx=1
register_real_device: Real physical device 01:00.0 registered successfuly!
 
I have seen this behavior when running both WindRiver and Ubuntu based operating environments inside the VM. It doesn't seem related to the type of guest OS.
 
I have two questions, that I hoped someone on this list can answer for me.
 
A) Does Xen support case 1 (hotplugging a PCI device to a running VM that was powered-on before the device was added to
    the host)?
 
B) Why is Xen reporting that the hotplug operation was successful and that the device is assigned to the VM, when QEMU reported
    an error? Shouldn't the Xen hotplug operation have failed as well?
 
Any help on this matter will be most appreciated.
 
Thanks.
-Anil
 
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.