[v2,05/17] pci: set owner for BARs

Submitted by Paolo Bonzini on June 4, 2013, 12:13 p.m.

Details

Message ID 1370348041-6768-6-git-send-email-pbonzini@redhat.com
State New
Headers show

Commit Message

Paolo Bonzini June 4, 2013, 12:13 p.m.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
 hw/pci/pci.c | 2 ++
 1 file changed, 2 insertions(+)

Patch hide | download patch | download mbox

diff --git a/hw/pci/pci.c b/hw/pci/pci.c
index 26851ac..776ad96 100644
--- a/hw/pci/pci.c
+++ b/hw/pci/pci.c
@@ -913,6 +913,8 @@  void pci_register_bar(PCIDevice *pci_dev, int region_num,
     uint64_t wmask;
     pcibus_t size = memory_region_size(memory);
 
+    memory_region_set_owner(memory, OBJECT(pci_dev));
+
     assert(region_num >= 0);
     assert(region_num < PCI_NUM_REGIONS);
     if (size & (size-1)) {