android_kernel_xiaomi_sdm845/drivers/pci
Yuji Shimada 32a9a682be PCI: allow assignment of memory resources with a specified alignment
This patch allows memory resources to be assigned with a specified
alignment at boot-time or run-time. The patch is useful when we use PCI
pass-through, because page-aligned memory resources are required to
securely share PCI resources with guest drivers.

If you want to assign the resource at boot time, please set
"pci=resource_alignment=" boot parameter.

This is format of "pci=resource_alignment=" boot parameter:

        [<order of align>@][<domain>:]<bus>:<slot>.<func>[; ...]
                Specifies alignment and device to reassign
                aligned memory resources.
                If <order of align> is not specified, PAGE_SIZE is
                used as alignment.
                PCI-PCI bridge can be specified, if resource
                windows need to be expanded.

This is example:

        pci=resource_alignment=20@07:00.0;18@0f:00.0;00:1d.7

If you want to assign the resource at run-time, please set
"/sys/bus/pci/resource_alignment" file, and hot-remove the device and
hot-add the device.  For this purpose, fakephp or PCI hotplug interfaces
can be used.

The format of "/sys/bus/pci/resource_alignment" file is the same with
boot parameter. You can use "," instead of ";".

For example:

        # cd /sys/bus/pci
        # echo -n 20@12:00.0 > resource_alignment
        # echo 1 > devices/0000:12:00.0/remove
        # echo 1 > rescan

Reviewed-by: Alex Chiang <achiang@hp.com>
Reviewed-by: Yu Zhao <yu.zhao@intel.com>
Signed-off-by: Yuji Shimada <shimada-yxb@necst.nec.co.jp>
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
2009-03-20 10:48:15 -07:00
..
hotplug PCI hotplug: fix wrong assumption in acpi_get_hp_hw_control_from_firmware 2009-03-20 10:48:02 -07:00
pcie PCI: PCIe portdrv: Implement pm object 2009-03-20 10:47:49 -07:00
.gitignore Add some basic .gitignore files 2005-10-18 08:26:15 -07:00
access.c PCI: add interface to set visible size of VPD 2009-01-07 11:13:18 -08:00
bus.c PCI: constify pci_bus_add_devices() 2009-03-19 19:29:35 -07:00
dmar.c intel-iommu: fix endless "Unknown DMAR structure type" loop 2009-02-14 08:33:34 +00:00
hotplug-pci.c PCI: fix section mismatch warning in pci_scan_child_bus 2008-03-04 15:07:03 -08:00
hotplug.c Driver core: change add_uevent_var to use a struct 2007-10-12 14:51:01 -07:00
htirq.c genirq: remove sparse irq code 2008-10-16 16:53:15 +02:00
intel-iommu.c PCI: add missing KERN_* constants to printks 2009-03-19 19:29:27 -07:00
intr_remapping.c VT-d: handle Invalidation Queue Error to avoid system hang 2009-02-09 11:03:17 +00:00
intr_remapping.h VT-d: Changes to support KVM 2008-10-15 14:24:08 +02:00
iova.c VT-d: Changes to support KVM 2008-10-15 14:24:08 +02:00
irq.c PCI: struct device - replace bus_id with dev_name(), dev_set_name() 2009-01-07 11:12:23 -08:00
Kconfig PCI: pci-stub module to reserve pci device 2009-01-07 11:12:38 -08:00
Makefile PCI: pci-stub module to reserve pci device 2009-01-07 11:12:38 -08:00
msi.c PCI MSI: Add support for multiple MSI 2009-03-20 10:48:14 -07:00
msi.h PCI MSI: Add support for multiple MSI 2009-03-20 10:48:14 -07:00
pci-acpi.c PCI/ACPI: move _OSC code to pci_root.c 2009-03-19 19:29:32 -07:00
pci-driver.c PCI: add remove_id sysfs entry 2009-03-20 10:48:11 -07:00
pci-stub.c PCI: pci-stub module to reserve pci device 2009-01-07 11:12:38 -08:00
pci-sysfs.c PCI/alpha: pci sysfs resources 2009-03-19 19:29:36 -07:00
pci.c PCI: allow assignment of memory resources with a specified alignment 2009-03-20 10:48:15 -07:00
pci.h PCI: allow assignment of memory resources with a specified alignment 2009-03-20 10:48:15 -07:00
probe.c PCI: fix wrong assumption in pci_read_bridge_bases 2009-03-20 10:48:04 -07:00
proc.c PCI: define PCI resource names in an 'enum' 2009-01-07 11:13:01 -08:00
quirks.c PCI: allow assignment of memory resources with a specified alignment 2009-03-20 10:48:15 -07:00
remove.c PCI: check if a bus is added when removing it 2009-03-19 19:29:26 -07:00
rom.c PCI: fix rom.c kernel-doc warning 2009-02-13 12:01:56 -08:00
search.c PCI: fix wrong assumption in pci_find_upstream_pcie_bridge 2009-03-20 10:48:03 -07:00
setup-bus.c PCI: constify pci_bus_assign_resources() 2009-03-19 19:29:35 -07:00
setup-irq.c PCI: use dev_printk when possible 2008-06-25 16:05:13 -07:00
setup-res.c PCI: allow assignment of memory resources with a specified alignment 2009-03-20 10:48:15 -07:00
slot.c PCI: enhance physical slot debug information 2009-03-19 19:29:30 -07:00
syscall.c [CVE-2009-0029] System call wrappers part 26 2009-01-14 14:15:29 +01:00