]> xenbits.xensource.com Git - people/andrewcoop/qemu-traditional.git/commit
qemu-xen-trad: free all the pirqs for msi/msix when driver unloads
authorZhenzhong Duan <zhenzhong.duan@oracle.com>
Tue, 8 Apr 2014 16:50:06 +0000 (16:50 +0000)
committerIan Jackson <Ian.Jackson@eu.citrix.com>
Wed, 25 Jun 2014 14:51:35 +0000 (15:51 +0100)
commitd0395cc49b2ec6d1723c01f1daf2394b9264ca29
treecb342e1e8bfc02a779dfc8cd612d397e5ab2a2d6
parent7f5b3c338e0f8938ba575dec18255dcbee0c2ee2
qemu-xen-trad: free all the pirqs for msi/msix when driver unloads

Pirqs are not freed when driver unloads, then new pirqs are allocated when
driver reloads. This could exhaust pirqs if do it in a loop.

This patch fixes the bug by freeing pirqs when ENABLE bit is cleared in
msi/msix control reg.

There is also other way of fixing it such as reuse pirqs between driver reload,
but this way is better.
Xen-devel: http://marc.info/?l=xen-devel&m=136800120304275&w=2

Signed-off-by: Zhenzhong Duan <zhenzhong.duan@oracle.com>
Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
[ This is the qemu-xen-trad version of qemu-xen-upstream
  1d4fd4f0e2fc5dcae0c60e00cc9af95f52988050 -iwj ]
hw/pass-through.c
hw/pt-msi.c