From: Avi Kivity <avi@redhat.com>
To: Alex Williamson <alex.williamson@redhat.com>
Cc: linux-pci@vger.kernel.org, kvm@vger.kernel.org,
jan.kiszka@siemens.com, jbarnes@virtuousgeek.org
Subject: Re: [PATCH 1/2] PCI: Add interfaces to store and load the device saved state
Date: Sun, 17 Apr 2011 12:23:50 +0300 [thread overview]
Message-ID: <4DAAB1A6.4000308@redhat.com> (raw)
In-Reply-To: <20110415195433.2838.96871.stgit@s20.home>
On 04/15/2011 10:54 PM, Alex Williamson wrote:
> 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 into a buffer and reloaded
> back into struct pci_dev at a later time.
>
> +/**
> + * pci_store_saved_state - Store the device saved state into a buffer
> + * @dev: - PCI device that we're dealing with
> + *
> + * Returns an opaque buffer containing the device saved state.
> + * NULL if no state or error.
> + */
> +void *pci_store_saved_state(struct pci_dev *dev)
This is too opaque - no type safety. You can return a struct pci_state
*, leaving it undefined in headers files.
--
error compiling committee.c: too many arguments to function
next prev parent reply other threads:[~2011-04-17 9:23 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
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 [this message]
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4DAAB1A6.4000308@redhat.com \
--to=avi@redhat.com \
--cc=alex.williamson@redhat.com \
--cc=jan.kiszka@siemens.com \
--cc=jbarnes@virtuousgeek.org \
--cc=kvm@vger.kernel.org \
--cc=linux-pci@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).