diff options
author | Alex Williamson <alex.williamson@redhat.com> | 2011-05-10 12:02:27 -0400 |
---|---|---|
committer | Jesse Barnes <jbarnes@virtuousgeek.org> | 2011-05-21 15:17:09 -0400 |
commit | ffbdd3f7931fb7cb7e36d00d16303ec433be5145 (patch) | |
tree | 503e1ad819bb3f1d682de24de5271935849ba5ff /include/linux/pci.h | |
parent | 24a4742f0be6226eb0106fbb17caf4d711d1ad43 (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/linux/pci.h')
-rw-r--r-- | include/linux/pci.h | 4 |
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 */ |
813 | int pci_save_state(struct pci_dev *dev); | 813 | int pci_save_state(struct pci_dev *dev); |
814 | void pci_restore_state(struct pci_dev *dev); | 814 | void pci_restore_state(struct pci_dev *dev); |
815 | struct pci_saved_state *pci_store_saved_state(struct pci_dev *dev); | ||
816 | int pci_load_saved_state(struct pci_dev *dev, struct pci_saved_state *state); | ||
817 | int pci_load_and_free_saved_state(struct pci_dev *dev, | ||
818 | struct pci_saved_state **state); | ||
815 | int __pci_complete_power_transition(struct pci_dev *dev, pci_power_t state); | 819 | int __pci_complete_power_transition(struct pci_dev *dev, pci_power_t state); |
816 | int pci_set_power_state(struct pci_dev *dev, pci_power_t state); | 820 | int pci_set_power_state(struct pci_dev *dev, pci_power_t state); |
817 | pci_power_t pci_choose_state(struct pci_dev *dev, pm_message_t state); | 821 | pci_power_t pci_choose_state(struct pci_dev *dev, pm_message_t state); |