vfio: Query and store the maximum number of possible DMA mappings
commit3eed155caf0a9a6db1e140c01bd8f0300ac475ce
authorDavid Hildenbrand <david@redhat.com>
Tue, 13 Apr 2021 09:55:25 +0000 (13 11:55 +0200)
committerEduardo Habkost <ehabkost@redhat.com>
Thu, 8 Jul 2021 19:54:45 +0000 (8 15:54 -0400)
treea1eb16060e7b1931ccd9ddd2d2cc5279a27b658c
parent5e3b981c330c58c4e97ab85e40c3bd2ee54b2fa7
vfio: Query and store the maximum number of possible DMA mappings

Let's query the maximum number of possible DMA mappings by querying the
available mappings when creating the container (before any mappings are
created). We'll use this informaton soon to perform some sanity checks
and warn the user.

Reviewed-by: Alex Williamson <alex.williamson@redhat.com>
Acked-by: Alex Williamson <alex.williamson@redhat.com>
Acked-by: Michael S. Tsirkin <mst@redhat.com>
Cc: Paolo Bonzini <pbonzini@redhat.com>
Cc: "Michael S. Tsirkin" <mst@redhat.com>
Cc: Alex Williamson <alex.williamson@redhat.com>
Cc: Dr. David Alan Gilbert <dgilbert@redhat.com>
Cc: Igor Mammedov <imammedo@redhat.com>
Cc: Pankaj Gupta <pankaj.gupta.linux@gmail.com>
Cc: Peter Xu <peterx@redhat.com>
Cc: Auger Eric <eric.auger@redhat.com>
Cc: Wei Yang <richard.weiyang@linux.alibaba.com>
Cc: teawater <teawaterz@linux.alibaba.com>
Cc: Marek Kedzierski <mkedzier@redhat.com>
Signed-off-by: David Hildenbrand <david@redhat.com>
Message-Id: <20210413095531.25603-8-david@redhat.com>
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
hw/vfio/common.c
include/hw/vfio/vfio-common.h