vfio/pci: Fix return of vfio_populate_vga()
commit4225f2b67089ab2dc6c0af24a9648a421f2cdb51
authorAlex Williamson <alex.williamson@redhat.com>
Thu, 26 May 2016 15:43:20 +0000 (26 09:43 -0600)
committerAlex Williamson <alex.williamson@redhat.com>
Thu, 26 May 2016 17:11:56 +0000 (26 11:11 -0600)
treead4169ece2080c0599852f48778d40d084c3fc3e
parente61a424f0573634a1bc180de965b2cb794c1038e
vfio/pci: Fix return of vfio_populate_vga()

This function returns success if either we setup the VGA region or
the host vfio doesn't return enough regions to support the VGA index.
This latter case doesn't make any sense.  If we're asked to populate
VGA, fail if it doesn't exist and let the caller decide if that's
important.

Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
Reviewed-by: Gerd Hoffmann <kraxel@redhat.com>
Tested-by: Gerd Hoffmann <kraxel@redhat.com>
hw/vfio/pci.c