From patchwork Tue Jun 4 12:13:49 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paolo Bonzini X-Patchwork-Id: 248593 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 8B0172C0099 for ; Tue, 4 Jun 2013 23:47:27 +1000 (EST) Received: from localhost ([::1]:57825 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Ujq9r-0001No-1a for incoming@patchwork.ozlabs.org; Tue, 04 Jun 2013 08:16:11 -0400 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) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:from:to:cc:subject:date:message-id:x-mailer:in-reply-to :references; bh=vg7BJncpsNL2IcB4f1HJ2eXsgHCaweG1kRJ3paT7rOU=; b=oh3+V/FVbJaOrbTEbYVQHQtV0xwZb1qXCvq9a6rUQN1R1g6YhCS1mFxXWPzfIjrKUT DlneaKYn0U4a3BbrRX8pSITEg0GvyAQhY5shWjhKsFEI9lrZkfWQl5jEFKEQvPEpR8lQ y1H4Q5NYgq+ARsC3jPZNFSbANcAfFNZbDhwQsk7k2pZW82TpVRWfd3wMmUqihvwTSy7v EevZLMWGh0oxdH21n7DsNi/1B94Jaauihm9kcgMOE3X1fSR28J548yauqxH2J1k+RXSp eva8e3VQi7y8O0beIufCtFdqqQ5W9U4YAmvnowpJxxLw89RcWndBbU/c2Dgff+w22oW0 wC9g== X-Received: by 10.205.26.70 with SMTP id rl6mr8039415bkb.54.1370348056952; Tue, 04 Jun 2013 05:14:16 -0700 (PDT) Received: from playground.lan (net-37-116-217-184.cust.dsl.vodafone.it. [37.116.217.184]) by mx.google.com with ESMTPSA id es13sm22715636bkc.8.2013.06.04.05.14.14 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Tue, 04 Jun 2013 05:14:15 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Date: Tue, 4 Jun 2013 14:13:49 +0200 Message-Id: <1370348041-6768-6-git-send-email-pbonzini@redhat.com> X-Mailer: git-send-email 1.8.1.4 In-Reply-To: <1370348041-6768-1-git-send-email-pbonzini@redhat.com> References: <1370348041-6768-1-git-send-email-pbonzini@redhat.com> X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2a00:1450:4008:c01::234 Cc: peter.maydell@linaro.org Subject: [Qemu-devel] [PATCH v2 05/17] pci: set owner for BARs X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.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)) {