]> xenbits.xensource.com Git - qemu-upstream-4.4-testing.git/commit
xen_disk: fix unmapping of persistent grants qemu-xen-4.4.2 qemu-xen-4.4.2-rc1
authorRoger Pau Monne <roger.pau@citrix.com>
Thu, 13 Nov 2014 17:42:09 +0000 (18:42 +0100)
committerStefano Stabellini <stefano.stabellini@eu.citrix.com>
Mon, 17 Nov 2014 14:50:51 +0000 (14:50 +0000)
commitb04df88d41f64fc6b56d193b6e90fb840cedb1d3
tree8d170c4a7a18ed5bbb30847851cbb4edb4a7897a
parent65fc9b78ba3d868a26952db0d8e51cecf01d47b4
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>
Cc: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
hw/block/xen_disk.c