]> xenbits.xensource.com Git - qemu-upstream-4.3-testing.git/commit
xen_disk: fix unmapping of persistent grants qemu-xen-4.3.4 qemu-xen-4.3.4-rc1
authorRoger Pau Monne <roger.pau@citrix.com>
Mon, 17 Nov 2014 15:00:52 +0000 (15:00 +0000)
committerStefano Stabellini <stefano.stabellini@eu.citrix.com>
Mon, 17 Nov 2014 15:00:52 +0000 (15:00 +0000)
commit580b1d06aa3eed3ae9c12b4225a1ea1c192ab119
tree96b8c6b2ccd14893f89110b1211c6fb0fef7fcf9
parente16435c95be86244bd92c5c26579bd4298aa65a6
xen_disk: fix unmapping of persistent grants

This patch fixes two issues with persistent grants and the disk PV backend
(Qdisk):

 - Keep track of memory regions where persistent grants have been mapped
   since we need to unmap them as a whole. It is not possible to unmap a
   single grant if it has been batch-mapped. A new check has also been added
   to make sure persistent grants are only used if the whole mapped region
   can be persistently mapped in the batch_maps case.
 - Unmap persistent grants before switching to the closed state, so the
   frontend can also free them.

upstream-commit-id: 2f01dfacb56bc7a0d4639adc9dff9aae131e6216

Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Release-Acked-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Reported-by: George Dunlap <george.dunlap@eu.citrix.com>
Cc: Kevin Wolf <kwolf@redhat.com>
Cc: Stefan Hajnoczi <stefanha@redhat.com>
Cc: George Dunlap <george.dunlap@eu.citrix.com>
hw/xen_disk.c