From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from [140.186.70.92] (port=56907 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OMBDy-0001dQ-BR for qemu-devel@nongnu.org; Tue, 08 Jun 2010 22:41:03 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OMBDx-0007UF-50 for qemu-devel@nongnu.org; Tue, 08 Jun 2010 22:41:02 -0400 Received: from mail-gw0-f45.google.com ([74.125.83.45]:33790) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OMBDx-0007U7-0F for qemu-devel@nongnu.org; Tue, 08 Jun 2010 22:41:01 -0400 Received: by gwj17 with SMTP id 17so551158gwj.4 for ; Tue, 08 Jun 2010 19:41:00 -0700 (PDT) Message-ID: <4C0EFF39.9070602@codemonkey.ws> Date: Tue, 08 Jun 2010 21:40:57 -0500 From: Anthony Liguori MIME-Version: 1.0 Subject: Re: [Qemu-devel] [RFC PATCH 3/6] RAMBlock: Add a name field References: <20100608191447.4451.47795.stgit@localhost.localdomain> <20100608191557.4451.30384.stgit@localhost.localdomain> <201006090330.10324.paul@codesourcery.com> In-Reply-To: <201006090330.10324.paul@codesourcery.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Paul Brook Cc: chrisw@redhat.com, Alex Williamson , qemu-devel@nongnu.org, kvm@vger.kernel.org, quintela@redhat.com On 06/08/2010 09:30 PM, Paul Brook wrote: >> 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. > Not all ram is associated with a device. For instance, the base ram for a guest. Regards, Anthony Liguori > Paul > >