]> www.infradead.org Git - users/jedix/linux-maple.git/commit
Interface to mark SR-IOV device ready for use by LDoms guest
authorAlexandre Chartre <alexandre.chartre@oracle.com>
Thu, 17 Mar 2016 10:31:24 +0000 (03:31 -0700)
committerAllen Pais <allen.pais@oracle.com>
Tue, 24 May 2016 05:34:58 +0000 (11:04 +0530)
commit0fc852d81f2e9cf2b52bac2efb0e5efcc432ffa6
tree2bd8fc842b2ae1526573cdb4ba3f424131b0b654
parent99f508b8734aa49aafd708626e7208d85b9a9773
Interface to mark SR-IOV device ready for use by LDoms guest

Add a iov_ready file to all PCI devices (/sys/bus/pci/devices/*/iov_ready).
The iov_ready file is write only, and mapped to the pci_iov_dev_ready
hypervisor call, which is used to indicate that a PCI device is ready
or no longer ready to be shared with other domains

Write "1" to the file to indicate that the PCI device is ready.
For example:

  # echo 1 > /sys/bus/pci/devices/0001:03:00.0/iov_ready

Write "0" to the file to indicate that the PCI device is no longer ready.
For example:

  # echo 0 > /sys/bus/pci/devices/0001:03:00.0/iov_ready

Orabug: 22909608

Signed-off-by: Alexandre Chartre <alexandre.chartre@oracle.com>
Reviewed-by: Babu Moger <babu.moger@oracle.com>
Signed-off-by: Allen Pais <allen.pais@oracle.com>
(cherry picked from commit 14f6e82264924f1db2cad628edae7964caa9c03e)
arch/sparc/include/asm/hypervisor.h
arch/sparc/kernel/pci.c
arch/sparc/kernel/pci_impl.h
arch/sparc/kernel/pci_sun4v.c
arch/sparc/kernel/pci_sun4v.h
arch/sparc/kernel/pci_sun4v_asm.S
drivers/pci/pci-sysfs.c
include/linux/pci.h