android_kernel_motorola_sm6225/drivers/xen
Konrad Rzeszutek Wilk c341ca45ce xen/pciback: Restore the PCI config space after an FLR.
When we do an FLR, or D0->D3_hot we may lose the BARs as the
device has turned itself off (and on). This means the device cannot
function unless the pci_restore_state is called - which it is
when the PCI device is unbound from the Xen PCI backend driver.
For PV guests it ends up calling pci_enable_device / pci_enable_msi[x]
which does the proper steps

That however is not happening if a HVM guest is run as QEMU
deals with PCI configuration space. QEMU also requires that the
device be "parked"  under the ownership of a pci-stub driver to
guarantee that the PCI device is not being used. Hence we
follow the same incantation as pci_reset_function does - by
doing an FLR, then restoring the PCI configuration space.

The result of this patch is that when you run lspci, you get
now this:

-       Region 0: [virtual] Memory at fe8c0000 (32-bit, non-prefetchable) [size=128K]
-       Region 1: [virtual] Memory at fe800000 (32-bit, non-prefetchable) [size=512K]
+       Region 0: Memory at fe8c0000 (32-bit, non-prefetchable) [size=128K]
+       Region 1: Memory at fe800000 (32-bit, non-prefetchable) [size=512K]
        Region 2: I/O ports at c000 [size=32]
-       Region 3: [virtual] Memory at fe8e0000 (32-bit, non-prefetchable) [size=16K]
+       Region 3: Memory at fe8e0000 (32-bit, non-prefetchable) [size=16K]

The [virtual] means that lspci read those entries from SysFS but when
it read them from the device it got a different value (0xfffffff).

CC: stable@vger.kernel.org #only for 3.5, 3.6
Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
2012-09-25 17:26:28 -04:00
..
xen-pciback xen/pciback: Restore the PCI config space after an FLR. 2012-09-25 17:26:28 -04:00
xenbus xen/gndev: Xen backend support for paged out grant targets V4. 2012-09-21 09:23:51 -04:00
xenfs xen: Add xenbus device driver 2011-12-16 13:29:39 -05:00
acpi.c xen/acpi/sleep: Enable ACPI sleep via the __acpi_os_prepare_sleep 2012-05-07 15:33:18 -04:00
balloon.c xen/balloon: Avoid OOM when requesting highmem 2011-11-16 12:13:43 -05:00
biomerge.c xen: using EXPORT_SYMBOL requires including export.h 2012-01-18 15:37:49 -08:00
cpu_hotplug.c xen/bootup: During bootup suppress XENBUS: Unable to read cpu state 2012-02-03 16:05:30 -05:00
events.c xen: clear IRQ_NOAUTOEN and IRQ_NOREQUEST 2012-08-23 10:18:12 -04:00
evtchn.c xen/event: Add reference counting to event channels 2011-11-21 17:14:48 -05:00
features.c xen: clean up asm/xen/hypervisor.h 2008-12-16 21:50:31 +01:00
gntalloc.c xen-gntalloc: introduce missing kfree 2012-01-03 13:39:04 -05:00
gntdev.c xen/apic/xenbus/swiotlb/pcifront/grant/tmem: Make functions or variables static. 2012-08-21 14:50:03 -04:00
grant-table.c xen/gndev: Xen backend support for paged out grant targets V4. 2012-09-21 09:23:51 -04:00
Kconfig xen/mce: Add mcelog support for Xen platform 2012-07-19 15:51:36 -04:00
Makefile xen/pcpu: Xen physical cpus online/offline sys interface 2012-07-19 15:51:39 -04:00
manage.c xen/resume: Fix compile warnings. 2012-04-19 15:12:49 -04:00
mcelog.c xen/mce: add .poll method for mcelog device driver 2012-07-19 15:51:41 -04:00
pci.c xen/pci: Check for PCI bridge before using it. 2012-05-30 10:16:35 -04:00
pcpu.c xen/pcpu: Xen physical cpus online/offline sys interface 2012-07-19 15:51:39 -04:00
platform-pci.c Revert "xen PVonHVM: move shared_info to MMIO before kexec" 2012-08-16 13:05:25 -04:00
privcmd.c xen/privcmd: return -EFAULT on error 2012-09-10 15:34:56 -04:00
privcmd.h xen: Add privcmd device driver 2011-12-16 13:29:31 -05:00
swiotlb-xen.c Merge branch 'stable/late-swiotlb.v3.3' into stable/for-linus-3.7 2012-09-22 20:01:24 -04:00
sys-hypervisor.c xen/sysfs: Use XENVER_guest_handle to query UUID 2012-08-23 10:16:18 -04:00
tmem.c xen/apic/xenbus/swiotlb/pcifront/grant/tmem: Make functions or variables static. 2012-08-21 14:50:03 -04:00
xen-acpi-processor.c xen/acpi: Fix potential memory leak. 2012-07-19 15:51:42 -04:00
xen-balloon.c Features: 2012-03-22 20:16:14 -07:00
xen-selfballoon.c xen: Add selfballoning memory reservation tunable. 2012-05-21 10:52:53 -04:00
xencomm.c include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h 2010-03-30 22:02:32 +09:00