From: Peter Xu <peterx@redhat.com>
To: "Michael S. Tsirkin" <mst@redhat.com>
Cc: Alex Williamson <alex.williamson@redhat.com>,
qemu-devel@nongnu.org, pbonzini@redhat.com, jan.kiszka@web.de,
rkrcmar@redhat.com, Marcel Apfelbaum <marcel.a@redhat.com>
Subject: Re: [Qemu-devel] [PATCH v2] pci: fix pci_requester_id()
Date: Tue, 17 May 2016 13:35:26 +0800 [thread overview]
Message-ID: <20160517053526.GA3285@pxdev.xzpeter.org> (raw)
In-Reply-To: <20160516201944-mutt-send-email-mst@redhat.com>
On Mon, May 16, 2016 at 08:20:46PM +0300, Michael S. Tsirkin wrote:
[...]
> > > Actually I am curious about how generic PCI system delivers
> > > requester ID (if there is)... For PCIe, we have encoded TLP header,
> > > and requester ID is filled in the specific field of the header.
> > > However for legacy PCI system, all the data is transmitted via the
> > > parallel interface (no matter 32/64 bits) and I found no place that
> > > the requester ID can be included. I was assuming there is some way
> > > for the root complex to know it (when request comes, the root
> > > complex should be able to know where the request come from, or say,
> > > its connected BDF). Never digger into the details, or am I wrong?
> >
> > There's no such thing as a requester ID on conventional PCI. We should
> > probably be making use of pci_bus_is_express() to determine whether we
> > have a valid requester ID and error if we hit pci_bus_is_root() and we
> > still don't have an express bus. And as MST says, testing for
> > bus number zero is not a valid test for the root bus. Thanks,
> >
> > Alex
>
> Well MSI code sticks the requester ID in the MSI message
> unconditionally. It's typically later ignored by the the
> PC machine type though.
Yes, I can first detect root PCI bus type as mentioned by Alex, and
fill in SID_INVALID if it's a conventional PCI root complex.
-- peterx
prev parent reply other threads:[~2016-05-17 5:35 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-05-16 7:13 [Qemu-devel] [PATCH v2] pci: fix pci_requester_id() Peter Xu
2016-05-16 7:54 ` Michael S. Tsirkin
2016-05-16 9:00 ` Peter Xu
2016-05-16 9:21 ` Michael S. Tsirkin
2016-05-16 9:58 ` Peter Xu
2016-05-16 15:44 ` Alex Williamson
2016-05-16 17:20 ` Michael S. Tsirkin
2016-05-17 5:35 ` Peter Xu [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=20160517053526.GA3285@pxdev.xzpeter.org \
--to=peterx@redhat.com \
--cc=alex.williamson@redhat.com \
--cc=jan.kiszka@web.de \
--cc=marcel.a@redhat.com \
--cc=mst@redhat.com \
--cc=pbonzini@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=rkrcmar@redhat.com \
/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).