From: "Michael S. Tsirkin" <mst@redhat.com>
To: Ladi Prosek <lprosek@redhat.com>
Cc: Gerd Hoffmann <kraxel@redhat.com>,
Yan Vugenfirer <yvugenfi@redhat.com>,
qemu-devel <qemu-devel@nongnu.org>,
Vadim Rozenfeld <vrozenfe@redhat.com>
Subject: Re: [Qemu-devel] [PATCH] virtio-pci: Don't force Subsystem Vendor ID = Vendor ID
Date: Fri, 3 Nov 2017 17:11:01 +0200 [thread overview]
Message-ID: <20171103170426-mutt-send-email-mst@kernel.org> (raw)
In-Reply-To: <CABdb734MR3vMCSBH-JhD8vWYKLBx6QOxrVZFYUyDbuQJg8mZ6Q@mail.gmail.com>
On Fri, Nov 03, 2017 at 09:23:07AM +0100, Ladi Prosek wrote:
> On Fri, Nov 3, 2017 at 8:20 AM, Gerd Hoffmann <kraxel@redhat.com> wrote:
> >
> >> > > Signed-off-by: Ladi Prosek <lprosek@redhat.com>
> >> >
> >> > I wonder whether it's a problem that legacy devices ignore
> >> > the subsystem ID (that's part of spec).
> >>
> >> I don't understand this comment. I don't see anything in the spec
> >> related to ignoring the subsystem ID.
> >
> > Well, the subsystem *device* id is defined to be the virtio device id,
> > so it is certainly not ignored. The subsystem *vendor* id is not used
> > as far I know (or ignored in the sense that it doesn't change driver
> > behavior), allowing to set that makes sense to me.
>
> Yes, thanks, I'm assuming that Michael meant the subsystem device ID.
> The PCI spec seems to be using "subsystem ID" for the name of this
> field.
Exactly.
> I understand that this ID must not change in legacy devices.
Interestingly the device ID is ignored except it must be within
a specific range of values.
> Interestingly, Windows appears to allow matching drivers only on the
> full subsystem device ID + subsystem vendor ID 32-bit value, not on
> only one of the two.
>
> PCI\VEN_v(4)&DEV_d(4)&SUBSYS_s(4)n(4)&REV_r(2)
>
> This might be a potential problem for a legacy driver that wants to
> stay vendor-agnostic but I'm pretty sure there would be a reasonable
> way of working around it. Actually, the device must use a designated
> device ID (like 0x1000) in addition to the subsystem device ID so this
> should be a non-issue altogether.
The original virtio spec wasn't really workable for windows. It requires
ignoring everything except the vendor ID, *range* of device IDs
(specific ID is ignored) and subsystem ID.
So in my humble opinion the right thing for people to do is simply to
avoid legacy devices. Is something preventing that?
> > Possibly not only for virtio devices, most pci devices have 1af4:1100
> > as subsystem id, other vendors might want set it too for consistency.
> >
> > cheers,
> > Gerd
next prev parent reply other threads:[~2017-11-03 15:11 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-11-02 13:31 [Qemu-devel] [PATCH] virtio-pci: Don't force Subsystem Vendor ID = Vendor ID Ladi Prosek
2017-11-02 14:52 ` Michael S. Tsirkin
2017-11-03 6:25 ` Ladi Prosek
2017-11-03 7:20 ` Gerd Hoffmann
2017-11-03 8:23 ` Ladi Prosek
2017-11-03 8:44 ` Vadim Rozenfeld
2017-11-03 15:11 ` Michael S. Tsirkin [this message]
2017-11-06 9:02 ` Ladi Prosek
2017-11-06 9:18 ` Gerd Hoffmann
2017-11-06 16:53 ` Michael S. Tsirkin
2017-11-06 16:51 ` Michael S. Tsirkin
2017-11-07 8:30 ` Ladi Prosek
2017-11-03 15:03 ` Michael S. Tsirkin
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=20171103170426-mutt-send-email-mst@kernel.org \
--to=mst@redhat.com \
--cc=kraxel@redhat.com \
--cc=lprosek@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=vrozenfe@redhat.com \
--cc=yvugenfi@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).