From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:33402) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QjA31-00046A-DW for qemu-devel@nongnu.org; Tue, 19 Jul 2011 09:09:17 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QjA2z-0006yS-1F for qemu-devel@nongnu.org; Tue, 19 Jul 2011 09:09:15 -0400 Received: from mail-gw0-f45.google.com ([74.125.83.45]:50602) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QjA2y-0006yK-Ie for qemu-devel@nongnu.org; Tue, 19 Jul 2011 09:09:12 -0400 Received: by gwb19 with SMTP id 19so1968591gwb.4 for ; Tue, 19 Jul 2011 06:09:11 -0700 (PDT) Message-ID: <4E2581F4.5090004@codemonkey.ws> Date: Tue, 19 Jul 2011 08:09:08 -0500 From: Anthony Liguori MIME-Version: 1.0 References: <1310901265-32051-1-git-send-email-avi@redhat.com> In-Reply-To: <1310901265-32051-1-git-send-email-avi@redhat.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [RFC v4 00/58] Memory API List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Avi Kivity Cc: qemu-devel@nongnu.org, kvm@vger.kernel.org On 07/17/2011 06:13 AM, Avi Kivity wrote: > New in this version: > MemoryRegionOps gained .old_mmio and .old_portio members, which allow > reusing old-style callbacks with the new API. All uses were converted, > except for eepro100.c, which uses the same MemoryRegionOps for both > portio and mmio. Some intermediate patches do introduce dispatching > callbacks, but they are removed later. > > Caveats: > - some devices still grab a global memory region instead of inheriting > it from their bus. Seen in the code as #include "exec-memory.h" Could you write up a quick document on how to use this new api for docs/? There's bits I don't like about the interface but I think it's a huge improvement over what we have now so I'm inclined to commit once it includes documentation. Regards, Anthony Liguori > > Avi Kivity (58): > Hierarchical memory region API > memory: implement dirty tracking > memory: merge adjacent segments of a single memory region > Internal interfaces for memory API > memory: abstract address space operations > memory: rename MemoryRegion::has_ram_addr to ::terminates > memory: late initialization of ram_addr > memory: I/O address space support > memory: add backward compatibility for old portio registration > memory: add backward compatibility for old mmio registration > memory: add ioeventfd support > exec.c: initialize memory map > ioport: register ranges by byte aligned addresses always > pc: grab system_memory > pc: convert pc_memory_init() to memory API > pc: move global memory map out of pc_init1() and into its callers > pci: pass address space to pci bus when created > pci: add MemoryRegion based BAR management API > sysbus: add MemoryRegion based memory management API > usb-ohci: convert to MemoryRegion > pci: add API to get a BAR's mapped address > vmsvga: don't remember pci BAR address in callback any more > vga: convert vga and its derivatives to the memory API > cirrus: simplify mmio BAR access functions > cirrus: simplify bitblt BAR access functions > cirrus: simplify vga window mmio access functions > vga: simplify vga window mmio access functions > cirrus: simplify linear framebuffer access functions > Integrate I/O memory regions into qemu > exec.c: fix initialization of system I/O memory region > pci: pass I/O address space to new PCI bus > pci: allow I/O BARs to be registered with pci_register_bar_region() > rtl8139: convert to memory API > ac97: convert to memory API > e1000: convert to memory API > eepro100: convert to memory API > es1370: convert to memory API > ide: convert to memory API > ivshmem: convert to memory API > virtio-pci: convert to memory API > ahci: convert to memory API > intel-hda: convert to memory API > lsi53c895a: convert to memory API > ppc: convert to memory API > ne2000: convert to memory API > pcnet: convert to memory API > i6300esb: convert to memory API > isa-mmio: concert to memory API > sun4u: convert to memory API > ehci: convert to memory API > uhci: convert to memory API > xen-platform: convert to memory API > msix: convert to memory API > pci: remove pci_register_bar_simple() > pci: convert pci rom to memory API > pci: remove pci_register_bar() > pci: fold BAR mapping function into its caller > pci: rename pci_register_bar_region() to pci_register_bar() > > Makefile.target | 1 + > exec-memory.h | 28 ++ > exec.c | 29 ++ > hw/ac97.c | 88 +++-- > hw/apb_pci.c | 3 + > hw/bonito.c | 5 +- > hw/cirrus_vga.c | 460 +++++++--------------- > hw/cuda.c | 6 +- > hw/e1000.c | 113 +++---- > hw/eepro100.c | 181 ++------- > hw/es1370.c | 43 ++- > hw/escc.c | 42 +- > hw/escc.h | 2 +- > hw/grackle_pci.c | 9 +- > hw/gt64xxx.c | 6 +- > hw/heathrow_pic.c | 29 +- > hw/ide.h | 2 +- > hw/ide/ahci.c | 31 +- > hw/ide/ahci.h | 2 +- > hw/ide/cmd646.c | 204 +++++++---- > hw/ide/ich.c | 3 +- > hw/ide/macio.c | 36 +- > hw/ide/pci.c | 25 +- > hw/ide/pci.h | 19 +- > hw/ide/piix.c | 63 +++- > hw/ide/via.c | 64 +++- > hw/intel-hda.c | 35 +- > hw/isa.h | 2 + > hw/isa_mmio.c | 30 +- > hw/ivshmem.c | 158 +++----- > hw/lance.c | 31 +- > hw/lsi53c895a.c | 257 +++---------- > hw/mac_dbdma.c | 32 +- > hw/mac_dbdma.h | 4 +- > hw/mac_nvram.c | 39 +-- > hw/macio.c | 73 ++-- > hw/msix.c | 64 +-- > hw/msix.h | 6 +- > hw/ne2000-isa.c | 14 +- > hw/ne2000.c | 77 +++-- > hw/ne2000.h | 8 +- > hw/openpic.c | 81 ++-- > hw/openpic.h | 2 +- > hw/pc.c | 62 ++- > hw/pc.h | 11 +- > hw/pc_piix.c | 24 +- > hw/pci.c | 104 +++--- > hw/pci.h | 30 +- > hw/pci_host.h | 1 + > hw/pci_internals.h | 2 + > hw/pcnet-pci.c | 74 +++-- > hw/pcnet.h | 4 +- > hw/piix_pci.c | 17 +- > hw/ppc4xx_pci.c | 6 +- > hw/ppc_mac.h | 30 +- > hw/ppc_newworld.c | 35 +- > hw/ppc_oldworld.c | 28 +- > hw/ppc_prep.c | 3 +- > hw/ppce500_pci.c | 7 +- > hw/prep_pci.c | 9 +- > hw/prep_pci.h | 5 +- > hw/qxl-render.c | 2 +- > hw/qxl.c | 125 +++---- > hw/qxl.h | 6 +- > hw/rtl8139.c | 70 ++-- > hw/sh_pci.c | 6 +- > hw/sun4u.c | 53 ++-- > hw/sysbus.c | 27 ++- > hw/sysbus.h | 3 + > hw/unin_pci.c | 18 +- > hw/usb-ehci.c | 36 +-- > hw/usb-ohci.c | 42 +-- > hw/usb-uhci.c | 42 ++- > hw/versatile_pci.c | 2 + > hw/vga-isa-mm.c | 45 ++- > hw/vga-isa.c | 11 +- > hw/vga-pci.c | 27 +-- > hw/vga.c | 178 +++------ > hw/vga_int.h | 19 +- > hw/virtio-pci.c | 86 ++--- > hw/virtio-pci.h | 3 +- > hw/vmware_vga.c | 153 ++++---- > hw/wdt_i6300esb.c | 43 ++- > hw/xen_platform.c | 82 +++-- > ioport.c | 4 +- > memory.c | 1092 ++++++++++++++++++++++++++++++++++++++++++++++++++++ > memory.h | 251 ++++++++++++ > 87 files changed, 3205 insertions(+), 2080 deletions(-) > create mode 100644 exec-memory.h > create mode 100644 memory.c > create mode 100644 memory.h >