From: Thomas Zimmermann <tzimmermann@suse.de>
To: "Uwe Kleine-König (The Capable Hub)" <u.kleine-koenig@baylibre.com>
Cc: Dexuan Cui <decui@microsoft.com>, Long Li <longli@microsoft.com>,
Saurabh Sengar <ssengar@linux.microsoft.com>,
Maarten Lankhorst <maarten.lankhorst@linux.intel.com>,
Maxime Ripard <mripard@kernel.org>,
David Airlie <airlied@gmail.com>, Simona Vetter <simona@ffwll.ch>,
linux-hyperv@vger.kernel.org, dri-devel@lists.freedesktop.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH v1 2/4] drm/hyperv: Explicitly set subvendor and subdevice for pci match array
Date: Thu, 2 Jul 2026 11:15:14 +0200 [thread overview]
Message-ID: <4e421c5a-1ecc-4155-8262-69c163af9624@suse.de> (raw)
In-Reply-To: <akYkWQzXIo-y3n4J@monoceros>
Hi
Am 02.07.26 um 10:52 schrieb Uwe Kleine-König (The Capable Hub):
> Hallo Thomas,
>
> On Thu, Jul 02, 2026 at 08:43:32AM +0200, Thomas Zimmermann wrote:
>> Am 01.07.26 um 19:05 schrieb Uwe Kleine-König (The Capable Hub):
>>> .subvendor and .subdevice were set to 0 implicitly, so only devices with
>>> these two values set to 0 in hardware can probe automatically. Make this
>>> requirement explicit.
>>>
>>> While touching this array item, also make use of the pci macro designed
>>> for that case.
>>>
>>> Signed-off-by: Uwe Kleine-König (The Capable Hub) <u.kleine-koenig@baylibre.com>
>>> ---
>>> drivers/gpu/drm/hyperv/hyperv_drm_drv.c | 4 ++--
>>> 1 file changed, 2 insertions(+), 2 deletions(-)
>>>
>>> diff --git a/drivers/gpu/drm/hyperv/hyperv_drm_drv.c b/drivers/gpu/drm/hyperv/hyperv_drm_drv.c
>>> index 2e75fb793495..e766d87b7a9d 100644
>>> --- a/drivers/gpu/drm/hyperv/hyperv_drm_drv.c
>>> +++ b/drivers/gpu/drm/hyperv/hyperv_drm_drv.c
>>> @@ -51,8 +51,8 @@ static void hv_drm_pci_remove(struct pci_dev *pdev)
>>> static const struct pci_device_id hv_drm_pci_tbl[] = {
>>> {
>>> - .vendor = PCI_VENDOR_ID_MICROSOFT,
>>> - .device = PCI_DEVICE_ID_HYPERV_VIDEO,
>>> + PCI_VDEVICE_SUB(MICROSOFT, PCI_DEVICE_ID_HYPERV_VIDEO,
>>> + 0, 0),
>> IDK, but it looks like an oversight to me. Setting the sub-fields to ANY
>> seems like the better fix.
> That was my initial reflex, too. However while writing the commit log
> for that change I noticed that since commit d750785f305e ("Staging: hv:
> fix hv_utils module to properly autoload") from 2010 (applied to
> v2.6.35-rc4) the driver never worked for hardware with .subvendor != 0
> or .subdevice != 0. I cannot believe that something like that is
> discovered 16 years later by chance during a rework by someone who
> didn't try to run that hardware. And if I understand correctly, this is
> emulated hardware and so I guess used quite a lot.
I wouldn't be surprised. To my knowledge, there's just one
implementation of this device, which is Windows. If they clear their
host-side structures to 0 and pass them to the guest, no one would ever
notice the issue. But let's see what the driver maintainers can comment
on the issue.
Best regards
Thomas
>
> Best regards
> Uwe
--
--
Thomas Zimmermann
Graphics Driver Developer
SUSE Software Solutions Germany GmbH
Frankenstr. 146, 90461 Nürnberg, Germany, www.suse.com
GF: Jochen Jaser, Andrew McDonald, Werner Knoblich, (HRB 36809, AG Nürnberg)
next prev parent reply other threads:[~2026-07-02 9:15 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-01 17:05 [PATCH v1 0/4] drm/hyperv: A fix and a few cleanups Uwe Kleine-König (The Capable Hub)
2026-07-01 17:05 ` [PATCH v1 1/4] drm/hyperv: Unregister pci driver in error path before module unload Uwe Kleine-König (The Capable Hub)
2026-07-02 6:42 ` Thomas Zimmermann
2026-07-02 16:37 ` Michael Kelley
2026-07-01 17:05 ` [PATCH v1 2/4] drm/hyperv: Explicitly set subvendor and subdevice for pci match array Uwe Kleine-König (The Capable Hub)
2026-07-02 6:43 ` Thomas Zimmermann
2026-07-02 8:52 ` Uwe Kleine-König (The Capable Hub)
2026-07-02 9:15 ` Thomas Zimmermann [this message]
2026-07-02 16:37 ` Michael Kelley
2026-07-01 17:05 ` [PATCH v1 3/4] drm/hyperv: Drop useless empty remove callback Uwe Kleine-König (The Capable Hub)
2026-07-02 6:45 ` Thomas Zimmermann
2026-07-01 17:05 ` [PATCH v1 4/4] drm/hyperv: Move MODULE_DEVICE_TABLE to the device_id arrays Uwe Kleine-König (The Capable Hub)
2026-07-02 6:45 ` Thomas Zimmermann
2026-07-02 16:38 ` Michael Kelley
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=4e421c5a-1ecc-4155-8262-69c163af9624@suse.de \
--to=tzimmermann@suse.de \
--cc=airlied@gmail.com \
--cc=decui@microsoft.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=linux-hyperv@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=longli@microsoft.com \
--cc=maarten.lankhorst@linux.intel.com \
--cc=mripard@kernel.org \
--cc=simona@ffwll.ch \
--cc=ssengar@linux.microsoft.com \
--cc=u.kleine-koenig@baylibre.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.