• Alex Williamson's avatar
    vfio-pci: Mask cap zero · e9aaff2b
    Alex Williamson authored
    [ Upstream commit bc138db1 ]
    
    The PCI Code and ID Assignment Specification changed capability ID 0
    from reserved to a NULL capability in the v1.1 revision.  The NULL
    capability is defined to include only the 16-bit capability header,
    ie. only the ID and next pointer.  Unfortunately vfio-pci creates a
    map of config space, where ID 0 is used to reserve the standard type
    0 header.  Finding an actual capability with this ID therefore results
    in a bogus range marked in that map and conflicts with subsequent
    capabilities.  As this seems to be a dummy capability anyway and we
    already support dropping capabilities, let's hide this one rather than
    delving into the potentially subtle dependencies within our map.
    
    Seen on an NVIDIA Tesla T4.
    Reviewed-by: default avatarCornelia Huck <cohuck@redhat.com>
    Signed-off-by: default avatarAlex Williamson <alex.williamson@redhat.com>
    Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
    e9aaff2b
vfio_pci_config.c 50.1 KB