Skip to content
Commit 3f63a1d7 authored by Keir Fraser's avatar Keir Fraser Committed by Michael S. Tsirkin
Browse files

virtio: pci: check bar values read from virtio config space



virtio pci config structures may in future have non-standard bar
values in the bar field. We should anticipate this by skipping any
structures containing such a reserved value.

The bar value should never change: check for harmful modified values
we re-read it from the config space in vp_modern_map_capability().

Also clean up an existing check to consistently use PCI_STD_NUM_BARS.

Signed-off-by: default avatarKeir Fraser <keirf@google.com>
Link: https://lore.kernel.org/r/20220323140727.3499235-1-keirf@google.com
Signed-off-by: default avatarMichael S. Tsirkin <mst@redhat.com>
parent eb4cecb4
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment