public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 0/2] Store and load PCI device saved state across function resets
@ 2011-04-19 20:12 Alex Williamson
  2011-04-19 20:12 ` [PATCH v2 1/2] PCI: Add interfaces to store and load the device saved state Alex Williamson
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Alex Williamson @ 2011-04-19 20:12 UTC (permalink / raw)
  To: linux-pci, kvm; +Cc: linux-kernel, alex.williamson, jan.kiszka, avi, jbarnes

v1 -> v2:
  Make the pointer passed around less opaque for type safety.

Bug https://bugs.launchpad.net/qemu/+bug/754591 is caused because
the KVM module attempts to do a pci_save_state() before assigning
the device to a VM, expecting that the saved state will remain
valid until we release the device.  This is in conflict with our
need to reset devices using PCI sysfs during a VM reset to
quiesce the device.  Any calls to pci_reset_function() will
overwrite the device saved stated prior to reset, and reload and
invalidate the state after.  KVM then ends up trying to restore
the state, but it's already invalid, so the device ends up with
reset values.

This series adds a mechanism to pull the saved state off the
struct pci_dev and reload it later.  Thanks,

Alex
---

Alex Williamson (2):
      KVM: Use pci_store/load_saved_state() around VM device usage
      PCI: Add interfaces to store and load the device saved state


 drivers/pci/pci.c        |   94 ++++++++++++++++++++++++++++++++++++++++++++++
 include/linux/kvm_host.h |    1 
 include/linux/pci.h      |    4 ++
 virt/kvm/assigned-dev.c  |    8 ++--
 4 files changed, 104 insertions(+), 3 deletions(-)

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2011-04-20  8:19 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-04-19 20:12 [PATCH v2 0/2] Store and load PCI device saved state across function resets Alex Williamson
2011-04-19 20:12 ` [PATCH v2 1/2] PCI: Add interfaces to store and load the device saved state Alex Williamson
2011-04-19 20:12 ` [PATCH v2 2/2] KVM: Use pci_store/load_saved_state() around VM device usage Alex Williamson
2011-04-20  8:19 ` [PATCH v2 0/2] Store and load PCI device saved state across function resets Avi Kivity

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox