ia64/xen-unstable

changeset 18338:7c10be016e43

vtd: Don't do FLR when we create domain or hotplug device into guest.

VT-d hot-plug is done in such a way: 1) xend sends 'pci-ins' command
to ioemu via xenstore; 2) ioemu creates pass-through device and raises
SCI to guest OS; guest OS loads device driver, and device driver
initializes the hot-plugged device; 3) xend does FLR. There is a race
condition about 2) and 3). If 3) runs slow, we have troubles. Thanks
for Yuji Shimada's locating the issues.

We can work around the issues by not doing FLR when we create domain
or hotplug device into guest, namely, we only do FLR when we destroy
domain or hotplug device from guest.

Signed-off-by: Dexuan Cui <dexuan.cui@intel.com>
Signed-off-by: Dongxiao Xu <dongxiao.xu@intel.com>
author Keir Fraser <keir.fraser@citrix.com>
date Tue Aug 19 10:51:41 2008 +0100 (2008-08-19)
parents 2af894d8cecd
children 6e3c97f43f9c
files tools/python/xen/xend/server/pciif.py
line diff
     1.1 --- a/tools/python/xen/xend/server/pciif.py	Tue Aug 19 10:48:39 2008 +0100
     1.2 +++ b/tools/python/xen/xend/server/pciif.py	Tue Aug 19 10:51:41 2008 +0100
     1.3 @@ -290,8 +290,12 @@ class PciController(DevController):
     1.4  
     1.5          self.CheckSiblingDevices(fe_domid, dev)
     1.6  
     1.7 -        if arch.type != "ia64":
     1.8 -            dev.do_FLR()
     1.9 +        # We don't do FLR when we create domain and hotplug device into guest,
    1.10 +        # namely, we only do FLR when we destroy domain or hotplug device from
    1.11 +        # guest. This is mainly to work around the race condition in hotplug code
    1.12 +        # paths. See the changeset's description for details.
    1.13 +        # if arch.type != "ia64":
    1.14 +        #    dev.do_FLR()
    1.15  
    1.16          PCIQuirk(dev.vendor, dev.device, dev.subvendor, dev.subdevice, domain, 
    1.17                  bus, slot, func)