On 2026-01-13 03:08 PM, Alex Mastro wrote:

> +FIXTURE_SETUP(vfio_dma_mapping_mmio_test)
> +{
> +     self->iommu = iommu_init(variant->iommu_mode);
> +     self->device = vfio_pci_device_init(device_bdf, self->iommu);
> +     self->iova_allocator = iova_allocator_init(self->iommu);
> +     self->bar = largest_mapped_bar(self->device);
> +
> +     if (!self->bar)
> +             SKIP(return, "No mappable BAR found on device %s", device_bdf);
> +
> +     if (self->bar->info.size < 2 * getpagesize())
> +             SKIP(return, "BAR too small (size=0x%llx)", 
> self->bar->info.size);

It seems like the selftest should only skip map_partial_bar if the BAR
is less than 2 pages. map_full_bar would still be a valid test to run.

Reply via email to