diff options
author | Alex Williamson <alex.williamson@redhat.com> | 2014-01-16 09:22:07 -0700 |
---|---|---|
committer | Alex Williamson <alex.williamson@redhat.com> | 2014-01-16 09:22:07 -0700 |
commit | 87ca1f77b1c406137fe36ab73b2dc91fb75f8d0a (patch) | |
tree | f96d347ac11f7a50cee6abdd30175ef64f633ef3 /kvm-all.c | |
parent | d3a2fd9b29e43e202315d5e99399b99622469c4a (diff) |
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