pci: avoid destroying bridge address space windows in a transaction
commit523a59f596a3e62f5a28eb171adba35e71310040
authorAvi Kivity <avi@redhat.com>
Thu, 25 Oct 2012 10:37:57 +0000 (25 12:37 +0200)
committerMichael S. Tsirkin <mst@redhat.com>
Mon, 29 Oct 2012 16:39:49 +0000 (29 18:39 +0200)
treea380c509c813eaf6eff5951df3711077a12aaa0b
parentff3a8066e651230d255e6eea340e2d48e7da4aeb
pci: avoid destroying bridge address space windows in a transaction

Calling memory_region_destroy() in a transaction is illegal (and aborts),
as until the transaction is committed, the region remains live.

Fix by moving destruction until after the transaction commits.  This requires
having an extra set of regions, so the new and old regions can coexist.

Signed-off-by: Avi Kivity <avi@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
hw/pci_bridge.c
hw/pci_internals.h