]> git.proxmox.com Git - mirror_qemu.git/commit - hw/i386/intel_iommu.c
intel_iommu: redo configuraton check in realize
authorRadim Krčmář <rkrcmar@redhat.com>
Mon, 10 Oct 2016 15:28:45 +0000 (17:28 +0200)
committerEduardo Habkost <ehabkost@redhat.com>
Mon, 17 Oct 2016 17:44:49 +0000 (15:44 -0200)
commit6333e93c772f78baf26a5c97c1a67ffa7cd76068
tree5ade4168fb3fceea825910c3007028c786a10a83
parent329460191d527e0cfa9ddbd14c75994e73de1975
intel_iommu: redo configuraton check in realize

* there no point in configuring the device if realization is going to
  fail, so move the check to the beginning,
* create a separate function for the check,
* use error_setg() instead error_report().

Reviewed-by: Igor Mammedov <imammedo@redhat.com>
Reviewed-by: Peter Xu <peterx@redhat.com>
Signed-off-by: Radim Krčmář <rkrcmar@redhat.com>
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
hw/i386/intel_iommu.c