diff options
| author | Eric Auger <eric.auger@redhat.com> | 2016-10-17 10:57:57 -0600 |
|---|---|---|
| committer | Alex Williamson <alex.williamson@redhat.com> | 2016-10-17 10:57:57 -0600 |
| commit | cde4279baa246fdfadb06d021e3b8d0a0234879f (patch) | |
| tree | 3bf68badcb445d737c9e5e6d200fc1d0629bcfff /hw/vfio/pci-quirks.c | |
| parent | 426ec9049e29397af95f8c28e020590bd1fe57dd (diff) | |
| download | focaccia-qemu-cde4279baa246fdfadb06d021e3b8d0a0234879f.tar.gz focaccia-qemu-cde4279baa246fdfadb06d021e3b8d0a0234879f.zip | |
vfio/pci: Pass an error object to vfio_populate_vga
Pass an error object to prepare for the same operation in vfio_populate_device. Eventually this contributes to the migration to VFIO-PCI realize. We now report an error on vfio_get_region_info failure. vfio_probe_igd_bar4_quirk is not involved in the migration to realize and simply calls error_reportf_err. Signed-off-by: Eric Auger <eric.auger@redhat.com> Reviewed-by: Markus Armbruster <armbru@redhat.com> Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
Diffstat (limited to 'hw/vfio/pci-quirks.c')
| -rw-r--r-- | hw/vfio/pci-quirks.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/hw/vfio/pci-quirks.c b/hw/vfio/pci-quirks.c index bec694c8d8..806ea5d21a 100644 --- a/hw/vfio/pci-quirks.c +++ b/hw/vfio/pci-quirks.c @@ -1363,6 +1363,7 @@ static void vfio_probe_igd_bar4_quirk(VFIOPCIDevice *vdev, int nr) uint64_t *bdsm_size; uint32_t gmch; uint16_t cmd_orig, cmd; + Error *err = NULL; /* * This must be an Intel VGA device at address 00:02.0 for us to even @@ -1464,7 +1465,8 @@ static void vfio_probe_igd_bar4_quirk(VFIOPCIDevice *vdev, int nr) * try to enable it. Probably shouldn't be using legacy mode without VGA, * but also no point in us enabling VGA if disabled in hardware. */ - if (!(gmch & 0x2) && !vdev->vga && vfio_populate_vga(vdev)) { + if (!(gmch & 0x2) && !vdev->vga && vfio_populate_vga(vdev, &err)) { + error_reportf_err(err, ERR_PREFIX, vdev->vbasedev.name); error_report("IGD device %s failed to enable VGA access, " "legacy mode disabled", vdev->vbasedev.name); goto out; |