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 2/2] KVM: Use pci_store/load_saved_state() around VM device usage
Date: Wed, 20 Apr 2011 18:27:21 +0300 [thread overview]
Message-ID: <4DAEFB59.5060705@redhat.com> (raw)
In-Reply-To: <1303312396.3110.142.camel@x201>
On 04/20/2011 06:13 PM, Alex Williamson wrote:
> >
> > > This is also why I changed the
> > > __pci_reset_function() back to a normal pci_reset_function(), so we're
> > > never left with an uninitialized device like we are now.
> > >
> > > We could be more verbose or return an error here, but we've gone for a
> > > long time not even doing this save/restore across VM usage, so I don't
> > > think it's worthy of preventing the device attachment if it fails.
> >
> > At least a log?
>
> Ok, I'm not sure what corrective action a user would take or what they
> should expect not to work, but I guess a KERN_DEBUG printk is
> reasonable.
"X didn't work" vs "X didn't work and I got this in the log"
> > Note avoiding the pointer would have removed the problem altogether.
>
> Returning a struct on store? We lose any kind of opacity that way since
> the caller needs to know about the struct then. I thought the pointer
> makes it clear the caller shouldn't be touching the contents, but if you
> think it's a better way to go, I can try it. Thanks,
Avoid the allocation altogether. Having the caller be responsible for
storage (in our case, embed the struct instead of the pointer).
You can encrypt the contents using the TPM, or maybe a comment
indicating that the contents should suffice.
--
error compiling committee.c: too many arguments to function
prev parent reply other threads:[~2011-04-20 15:27 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
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 message]
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=4DAEFB59.5060705@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).