[Intel-gfx] [PATCH] drm/i915: refine qemu south bridge detection

Bjørn Mork bjorn at mork.no
Mon Jan 25 01:11:25 PST 2016


Jani Nikula <jani.nikula at linux.intel.com> writes:

> On Mon, 25 Jan 2016, Gerd Hoffmann <kraxel at redhat.com> wrote:
>> The test for the qemu q35 south bridge added by commit
>> "39bfcd52 drm/i915: more virtual south bridge detection"
>> also matches on real hardware.  Having the check for
>> virtual systems last in the list is not enough to avoid
>> that ...
>>
>> Refine the check by additionally verifying the pci
>> subsystem id to see whenever it *really* is qemu.
>>
>> Reported-by: Bjørn Mork <bjorn at mork.no>
>> Signed-off-by: Gerd Hoffmann <kraxel at redhat.com>
>
> Already sent the revert in [1], but I'm fine with this if it works for
> Bjørn.

Gerd's fix works fine for me (of course).  Tested it now just to be 100%
sure, although it was pretty obvious from the code that it would have
the same effect as an revert on my system.

But I have a feeling Gerd might want to send you a v2 of it in any
case...  I was curious about this QEMU subsystem vendor ID, so I went
grepping for it - and found nothing!

 |> +				    pch->subsystem_vendor == 0x1a4f &&
 |> +				    pch->subsystem_device == 0x1100)) {

Looks like a typo:

 bjorn at nemi:/usr/local/src/git/qemu$ git grep PCI_SUBVENDOR_ID_REDHAT_QUMRANET
 hw/pci/pci.c:static uint16_t pci_default_sub_vendor_id = PCI_SUBVENDOR_ID_REDHAT_QUMRANET;
 include/hw/pci/pci.h:#define PCI_SUBVENDOR_ID_REDHAT_QUMRANET 0x1af4


0x1af4 != 0x1a4f

Thanks a lot both of you for a really fast fix.  But it seems Gerd was a
little too fast :)



Bjørn


More information about the Intel-gfx mailing list