From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from [140.186.70.92] (port=58394 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OMB4R-0005Py-B2 for qemu-devel@nongnu.org; Tue, 08 Jun 2010 22:31:12 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OMB4Q-0006dQ-6x for qemu-devel@nongnu.org; Tue, 08 Jun 2010 22:31:11 -0400 Received: from mail.codesourcery.com ([38.113.113.100]:59114) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OMB4P-0006d8-Ul for qemu-devel@nongnu.org; Tue, 08 Jun 2010 22:31:10 -0400 From: Paul Brook Subject: Re: [Qemu-devel] [RFC PATCH 3/6] RAMBlock: Add a name field Date: Wed, 9 Jun 2010 03:30:01 +0100 References: <20100608191447.4451.47795.stgit@localhost.localdomain> <20100608191557.4451.30384.stgit@localhost.localdomain> In-Reply-To: <20100608191557.4451.30384.stgit@localhost.localdomain> MIME-Version: 1.0 Content-Type: Text/Plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <201006090330.10324.paul@codesourcery.com> List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: chrisw@redhat.com, Alex Williamson , kvm@vger.kernel.org, quintela@redhat.com > The offset given to a block created via qemu_ram_alloc/map() is arbitrary, > let the caller specify a name so we can make a positive match. > @@ -1924,7 +1925,9 @@ static int pci_add_option_rom(PCIDevice *pdev) > + snprintf(name, sizeof(name), "pci:%02x.%x.rom", > + PCI_SLOT(pdev->devfn), PCI_FUNC(pdev->devfn)); > + pdev->rom_offset = qemu_ram_alloc(name, size); This looks pretty bogus. It should be associated with the device, rather than incorrectly trying to generate a globally unique name. Paul