kvm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/2] Store and load PCI device saved state across function resets
@ 2011-04-15 19:54 Alex Williamson
  2011-04-15 19:54 ` [PATCH 1/2] PCI: Add interfaces to store and load the device saved state Alex Williamson
  2011-04-15 19:54 ` [PATCH 2/2] KVM: Use pci_store/load_saved_state() around VM device usage Alex Williamson
  0 siblings, 2 replies; 13+ messages in thread
From: Alex Williamson @ 2011-04-15 19:54 UTC (permalink / raw)
  To: linux-pci, kvm; +Cc: alex.williamson, jan.kiszka, avi, jbarnes

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 into
an opaue buffer, which can be reloaded into the device at a later
point.  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      |    3 +
 virt/kvm/assigned-dev.c  |    8 ++--
 4 files changed, 103 insertions(+), 3 deletions(-)

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

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

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-04-15 19:54 [PATCH 0/2] Store and load PCI device saved state across function resets Alex Williamson
2011-04-15 19:54 ` [PATCH 1/2] PCI: Add interfaces to store and load the device saved state Alex Williamson
2011-04-17  9:23   ` Avi Kivity
2011-04-18 19:44     ` Alex Williamson
2011-04-15 19:54 ` [PATCH 2/2] KVM: Use pci_store/load_saved_state() around VM device usage Alex Williamson
2011-04-15 20:03   ` Jan Kiszka
2011-04-15 20:13     ` Alex Williamson
2011-04-15 20:28       ` Jan Kiszka
2011-04-17  9:25   ` Avi Kivity
2011-04-18 19:43     ` Alex Williamson
2011-04-20  7:19       ` Avi Kivity
2011-04-20 15:13         ` Alex Williamson
2011-04-20 15:27           ` Avi Kivity

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).