From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:34637) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Ujq83-0007aQ-Ch for qemu-devel@nongnu.org; Tue, 04 Jun 2013 08:14:20 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Ujq81-0002PQ-R9 for qemu-devel@nongnu.org; Tue, 04 Jun 2013 08:14:19 -0400 Received: from mail-bk0-x234.google.com ([2a00:1450:4008:c01::234]:46613) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Ujq81-0002P4-Lq for qemu-devel@nongnu.org; Tue, 04 Jun 2013 08:14:17 -0400 Received: by mail-bk0-f52.google.com with SMTP id e11so91504bkh.11 for ; Tue, 04 Jun 2013 05:14:17 -0700 (PDT) Sender: Paolo Bonzini From: Paolo Bonzini Date: Tue, 4 Jun 2013 14:13:49 +0200 Message-Id: <1370348041-6768-6-git-send-email-pbonzini@redhat.com> In-Reply-To: <1370348041-6768-1-git-send-email-pbonzini@redhat.com> References: <1370348041-6768-1-git-send-email-pbonzini@redhat.com> Subject: [Qemu-devel] [PATCH v2 05/17] pci: set owner for BARs List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: peter.maydell@linaro.org Signed-off-by: Paolo Bonzini --- hw/pci/pci.c | 2 ++ 1 file changed, 2 insertions(+) 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)) { -- 1.8.1.4