From mboxrd@z Thu Jan 1 00:00:00 1970 From: Anthony Liguori Subject: Re: [Qemu-devel] [RFC PATCH 3/6] RAMBlock: Add a name field Date: Tue, 08 Jun 2010 21:40:57 -0500 Message-ID: <4C0EFF39.9070602@codemonkey.ws> References: <20100608191447.4451.47795.stgit@localhost.localdomain> <20100608191557.4451.30384.stgit@localhost.localdomain> <201006090330.10324.paul@codesourcery.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Cc: qemu-devel@nongnu.org, chrisw@redhat.com, Alex Williamson , kvm@vger.kernel.org, quintela@redhat.com To: Paul Brook Return-path: Received: from mail-yx0-f174.google.com ([209.85.213.174]:61454 "EHLO mail-yx0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751548Ab0FIClA (ORCPT ); Tue, 8 Jun 2010 22:41:00 -0400 Received: by yxl31 with SMTP id 31so1009016yxl.19 for ; Tue, 08 Jun 2010 19:41:00 -0700 (PDT) In-Reply-To: <201006090330.10324.paul@codesourcery.com> Sender: kvm-owner@vger.kernel.org List-ID: 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 > >