From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from [140.186.70.92] (port=56266 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OM6Xl-00033K-N4 for qemu-devel@nongnu.org; Tue, 08 Jun 2010 17:41:10 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OM6Xk-0001es-D4 for qemu-devel@nongnu.org; Tue, 08 Jun 2010 17:41:09 -0400 Received: from mx1.redhat.com ([209.132.183.28]:46767) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OM6Xk-0001ei-6P for qemu-devel@nongnu.org; Tue, 08 Jun 2010 17:41:08 -0400 Date: Tue, 8 Jun 2010 14:41:03 -0700 From: Chris Wright Message-ID: <20100608214103.GT28492@x200.localdomain> References: <20100608191447.4451.47795.stgit@localhost.localdomain> <20100608191557.4451.30384.stgit@localhost.localdomain> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20100608191557.4451.30384.stgit@localhost.localdomain> Subject: [Qemu-devel] Re: [RFC PATCH 3/6] RAMBlock: Add a name field List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Alex Williamson Cc: chrisw@redhat.com, quintela@redhat.com, qemu-devel@nongnu.org, kvm@vger.kernel.org * Alex Williamson (alex.williamson@redhat.com) wrote: > + // XXX check duplicates Yes, definitely. You created a notion of a hierarchical namespace, can this be formalized any more? Currently scattered... > + char name[14]; > + snprintf(name, sizeof(name), "pci:%02x.%x.bar%d", > + PCI_SLOT(pci_dev->dev.devfn), > + PCI_FUNC(pci_dev->dev.devfn), i); > + pci_dev->v_addrs[i].memory_index = qemu_ram_map(name, > + cur_region->size, virtbase); > + ram_addr = qemu_ram_alloc("ram.pc.lowmem", below_4g_mem_size); > + ram_addr = qemu_ram_alloc("ram.pc.highmem", above_4g_mem_size); > + bios_offset = qemu_ram_alloc("ram.pc.bios", bios_size); > + option_rom_offset = qemu_ram_alloc("ram.pc.rom", PC_ROM_SIZE); > + char name[13]; (13, 14...good to be consistent, maybe w/ helper like, pci_ram_alloc_{bar,rom}) > + snprintf(name, sizeof(name), "pci:%02x.%x.rom", > + PCI_SLOT(pdev->devfn), PCI_FUNC(pdev->devfn)); > + pdev->rom_offset = qemu_ram_alloc(name, size); > + s->vram_offset = qemu_ram_alloc("ram.vga.vram", vga_ram_size); > + s->fifo_offset = qemu_ram_alloc("ram.vmsvga.fifo", s->fifo_size); So far we have: ram. pc. lowmem highmem bios rom vga. vram vmsvga. fifo pci. D.F. (B:D.F?) bar rom