summaryrefslogtreecommitdiff
path: root/kvm-all.c
diff options
context:
space:
mode:
authorAlex Williamson <alex.williamson@redhat.com>2014-01-16 09:22:07 -0700
committerAlex Williamson <alex.williamson@redhat.com>2014-01-16 09:22:07 -0700
commit87ca1f77b1c406137fe36ab73b2dc91fb75f8d0a (patch)
treef96d347ac11f7a50cee6abdd30175ef64f633ef3 /kvm-all.c
parentd3a2fd9b29e43e202315d5e99399b99622469c4a (diff)
downloadqemu-87ca1f77b1c406137fe36ab73b2dc91fb75f8d0a.tar.gz
vfio-pci: Fail initfn on DMA mapping errors
The vfio-pci initfn will currently succeed even if DMA mappings fail. A typical reason for failure is if the user does not have sufficient privilege to lock all the memory for the guest. In this case, the device gets attached, but can only access a portion of guest memory and is extremely unlikely to work. DMA mappings are done via a MemoryListener, which provides no direct error return path. We therefore stuff the errno into our container structure and check for error after registration completes. We can also test for mapping errors during runtime, but our only option for resolution at that point is to kill the guest with a hw_error. Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
Diffstat (limited to 'kvm-all.c')
0 files changed, 0 insertions, 0 deletions