aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorAlex Williamson <alex.williamson@redhat.com>2011-05-10 12:02:27 -0400
committerJesse Barnes <jbarnes@virtuousgeek.org>2011-05-21 15:17:09 -0400
commitffbdd3f7931fb7cb7e36d00d16303ec433be5145 (patch)
tree503e1ad819bb3f1d682de24de5271935849ba5ff /include
parent24a4742f0be6226eb0106fbb17caf4d711d1ad43 (diff)
PCI: Add interfaces to store and load the device saved state
For KVM device assignment, we'd like to save off the state of a device prior to passing it to the guest and restore it later. We also want to allow pci_reset_funciton() to be called while the device is owned by the guest. This however overwrites and invalidates the struct pci_dev buffers, so we can't just manually call save and restore. Add generic interfaces for the saved state to be stored and reloaded back into struct pci_dev at a later time. Signed-off-by: Alex Williamson <alex.williamson@redhat.com> Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
Diffstat (limited to 'include')
-rw-r--r--include/linux/pci.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/include/linux/pci.h b/include/linux/pci.h
index 61ef8f2f9b19..4604d1d5514d 100644
--- a/include/linux/pci.h
+++ b/include/linux/pci.h
@@ -812,6 +812,10 @@ size_t pci_get_rom_size(struct pci_dev *pdev, void __iomem *rom, size_t size);
812/* Power management related routines */ 812/* Power management related routines */
813int pci_save_state(struct pci_dev *dev); 813int pci_save_state(struct pci_dev *dev);
814void pci_restore_state(struct pci_dev *dev); 814void pci_restore_state(struct pci_dev *dev);
815struct pci_saved_state *pci_store_saved_state(struct pci_dev *dev);
816int pci_load_saved_state(struct pci_dev *dev, struct pci_saved_state *state);
817int pci_load_and_free_saved_state(struct pci_dev *dev,
818 struct pci_saved_state **state);
815int __pci_complete_power_transition(struct pci_dev *dev, pci_power_t state); 819int __pci_complete_power_transition(struct pci_dev *dev, pci_power_t state);
816int pci_set_power_state(struct pci_dev *dev, pci_power_t state); 820int pci_set_power_state(struct pci_dev *dev, pci_power_t state);
817pci_power_t pci_choose_state(struct pci_dev *dev, pm_message_t state); 821pci_power_t pci_choose_state(struct pci_dev *dev, pm_message_t state);