From mboxrd@z Thu Jan 1 00:00:00 1970 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 Message-ID: <201006090330.10324.paul@codesourcery.com> References: <20100608191447.4451.47795.stgit@localhost.localdomain> <20100608191557.4451.30384.stgit@localhost.localdomain> Mime-Version: 1.0 Content-Type: Text/Plain; charset="utf-8" Content-Transfer-Encoding: 7bit Cc: Alex Williamson , anthony@codemonkey.ws, chrisw@redhat.com, kvm@vger.kernel.org, quintela@redhat.com To: qemu-devel@nongnu.org Return-path: Received: from mail.codesourcery.com ([38.113.113.100]:32966 "EHLO mail.codesourcery.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751673Ab0FICbI (ORCPT ); Tue, 8 Jun 2010 22:31:08 -0400 In-Reply-To: <20100608191557.4451.30384.stgit@localhost.localdomain> Sender: kvm-owner@vger.kernel.org List-ID: > 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