OSDN Git Service

vfio: Fix 128 bit handling when deleting region
authorAlexey Kardashevskiy <aik@ozlabs.ru>
Thu, 26 May 2016 15:43:22 +0000 (09:43 -0600)
committerAlex Williamson <alex.williamson@redhat.com>
Thu, 26 May 2016 17:12:07 +0000 (11:12 -0600)
commit7a057b4fb9dec2baf975d1737a7258602e793c40
tree9c68c565d84e073ee0ec8aca46b4fac92e95adf1
parent0eb734241762bc63bf8308bed3573431f195ddcf
vfio: Fix 128 bit handling when deleting region

7532d3cbf "vfio: Fix 128 bit handling" added support for 64bit IOMMU
memory regions when those are added to VFIO address space; however
removing code cannot cope with these as int128_get64() will fail on
1<<64.

This copies 128bit handling from region_add() to region_del().

Since the only machine type which is actually going to use 64bit IOMMU
is pseries and it never really removes them (instead it will dynamically
add/remove subregions), this should cause no behavioral change.

Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>
Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
hw/vfio/common.c