From: Anthony Liguori <anthony@codemonkey.ws>
To: "Michael S. Tsirkin" <mst@redhat.com>
Cc: Carsten Otte <cotte@de.ibm.com>,
Gerd Hoffmann <kraxel@redhat.com>,
kvm@vger.kernel.org, Rusty Russell <rusty@rustcorp.com.au>,
qemu-devel@nongnu.org, virtualization@lists.linux-foundation.org,
Christian Borntraeger <borntraeger@de.ibm.com>,
Paul Brook <paul@codesourcery.com>, Avi Kivity <avi@redhat.com>
Subject: [Qemu-devel] Re: pci: is reset incomplete?
Date: Mon, 14 Sep 2009 17:54:36 -0500 [thread overview]
Message-ID: <4AAEC9AC.6080309@codemonkey.ws> (raw)
In-Reply-To: <20090914173625.GA3859@redhat.com>
Michael S. Tsirkin wrote:
> On Mon, Sep 14, 2009 at 12:15:29PM -0500, Anthony Liguori wrote:
>
>> Michael S. Tsirkin wrote:
>>
>>> Hi!
>>> pci bus reset does not seem to clear pci config registers, such as BAR
>>> registers, or memory space enable, of the attached devices: it only
>>> clears the interrupt state.
>>>
>>> This seems wrong, but easy to fix.
>>>
>>>
>> I don't think most pci devices reset their config space in their reset
>> callbacks.
>>
>
> For things like BAR registers, they really must.
>
BARs should be registered via pci_register_bar so you should be able to
centralize their reset.
> class codes are read only registers. Your proposal might be correct for
> some of these. But PCI registers that are reset, change as a result of
> guest activity, and reset values are typically specified by guest spec.
> So I don't think we should let users tweak these.
>
Well, I guess my general point was that it would be good to add more
structure to how config space is initialized. I think a natural
consequence of that is that it becomes easier to automatically fix the
values on reset.
Regards,
Anthony Liguori
prev parent reply other threads:[~2009-09-14 22:54 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-09-14 15:48 [Qemu-devel] pci: is reset incomplete? Michael S. Tsirkin
2009-09-14 17:15 ` [Qemu-devel] " Anthony Liguori
2009-09-14 17:36 ` Michael S. Tsirkin
2009-09-14 22:54 ` Anthony Liguori [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=4AAEC9AC.6080309@codemonkey.ws \
--to=anthony@codemonkey.ws \
--cc=avi@redhat.com \
--cc=borntraeger@de.ibm.com \
--cc=cotte@de.ibm.com \
--cc=kraxel@redhat.com \
--cc=kvm@vger.kernel.org \
--cc=mst@redhat.com \
--cc=paul@codesourcery.com \
--cc=qemu-devel@nongnu.org \
--cc=rusty@rustcorp.com.au \
--cc=virtualization@lists.linux-foundation.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).