Skip to contentSkip to conversation

Rename target_phys_addr_t to Phys

PATCH In review Avi Kivity 5 participants 10 messages Jan 4, 2012 – Jan 8, 2012 Arm/Zynq architecture

lore
Share & tools
lore

Avi Kivity

author
#0 lore raw

PATCH 1/1 Rename target_phys_addr_t to Phys

The name 'Phys' conveys exactly the same information as 'target_phys_addr_t':

- it has to be a physical address (no such thing as physical data)
- it has to be a target address (qemu doesn't do host physical addresses)
- the fact that it's a type is implied by the naming convention

As it's 4 characters vs. 18, and C standard compliant to boot, Phys is a clear winner. Rename all instances of target_phys_addr_t to the new name. All hail Phys!

---
 HACKING                       |    2 +-
 cpu-all.h                     |    2 +-
 cpu-common.h                  |   64 +++++++++---------
 cpu-defs.h                    |    2 +-
 disas.h                       |    2 +-
 dma-helpers.c                 |    2 +-
 dma.h                         |    2 +-
 exec-all.h                    |    6 +-
 exec-obsolete.h               |    4 +-
 exec.c                        |  140 +++++++++++++++++++-------------------
 hw/a9mpcore.c                 |    4 +-
 hw/alpha_pci.c                |   12 ++--
 hw/alpha_typhoon.c            |   12 ++--
 hw/an5206.c                   |    2 +-
 hw/apb_pci.c                  |   24 +++---
 hw/apb_pci.h                  |    4 +-
 hw/apic.c                     |   14 ++--
 hw/arm-misc.h                 |   10 ++--
 hw/arm11mpcore.c              |    8 +-
 hw/arm_boot.c                 |   10 ++--
 hw/arm_gic.c                  |   20 +++---
 hw/arm_l2x0.c                 |    4 +-
 hw/arm_mptimer.c              |   12 ++--
 hw/arm_sysctl.c               |    4 +-
 hw/arm_timer.c                |   12 ++--
 hw/armv7m.c                   |   12 ++--
 hw/axis_dev88.c               |    8 +-
 hw/bonito.c                   |   38 +++++-----
 hw/cirrus_vga.c               |   16 ++--
 hw/cris-boot.h                |    2 +-
 hw/cs4231.c                   |    4 +-
 hw/cs4231a.c                  |    4 +-
 hw/cuda.c                     |   12 ++--
 hw/dma.c                      |    4 +-
 hw/dp8393x.c                  |   18 +++---
 hw/ds1225y.c                  |    4 +-
 hw/dummy_m68k.c               |    2 +-
 hw/e1000.c                    |    8 +-
 hw/eccmemctl.c                |    8 +-
 hw/eepro100.c                 |    4 +-
 hw/elf_ops.h                  |    2 +-
 hw/empty_slot.c               |    6 +-
 hw/empty_slot.h               |    2 +-
 hw/escc.c                     |    8 +-
 hw/escc.h                     |    4 +-
 hw/esp.c                      |    8 +-
 hw/esp.h                      |    2 +-
 hw/etraxfs.h                  |    2 +-
 hw/etraxfs_dma.c              |   22 +++---
 hw/etraxfs_dma.h              |    2 +-
 hw/etraxfs_eth.c              |    4 +-
 hw/etraxfs_pic.c              |    4 +-
 hw/etraxfs_ser.c              |    4 +-
 hw/etraxfs_timer.c            |    4 +-
 hw/fdc.c                      |    8 +-
 hw/fdc.h                      |    4 +-
 hw/flash.h                    |    8 +-
 hw/framebuffer.c              |    6 +-
 hw/framebuffer.h              |    2 +-
 hw/fw_cfg.c                   |   16 ++--
 hw/fw_cfg.h                   |    2 +-
 hw/g364fb.c                   |    4 +-
 hw/grlib.h                    |    6 +-
 hw/grlib_apbuart.c            |    4 +-
 hw/grlib_gptimer.c            |    8 +-
 hw/grlib_irqmp.c              |    4 +-
 hw/gt64xxx.c                  |   20 +++---
 hw/heathrow_pic.c             |    4 +-
 hw/hpet.c                     |    8 +-
 hw/i8259.c                    |    8 +-
 hw/ide.h                      |    2 +-
 hw/ide/ahci.c                 |   18 +++---
 hw/ide/cmd646.c               |   12 ++--
 hw/ide/macio.c                |   12 ++--
 hw/ide/mmio.c                 |   10 ++--
 hw/ide/piix.c                 |    4 +-
 hw/ide/via.c                  |    4 +-
 hw/integratorcp.c             |   14 ++--
 hw/intel-hda.c                |   26 ++++----
 hw/ioapic.c                   |    4 +-
 hw/isa-bus.c                  |    2 +-
 hw/isa.h                      |    6 +-
 hw/isa_mmio.c                 |   16 ++--
 hw/ivshmem.c                  |    4 +-
 hw/jazz_led.c                 |   14 ++--
 hw/lan9118.c                  |    4 +-
 hw/lance.c                    |    4 +-
 hw/lm32_boards.c              |   38 +++++-----
 hw/lm32_hwsetup.h             |    2 +-
 hw/lm32_sys.c                 |    4 +-
 hw/lm32_timer.c               |    4 +-
 hw/lm32_uart.c                |    4 +-
 hw/lm4549.c                   |    4 +-
 hw/lm4549.h                   |    4 +-
 hw/loader.c                   |   30 ++++----
 hw/loader.h                   |   22 +++---
 hw/lsi53c895a.c               |   12 ++--
 hw/m48t59.c                   |   14 ++--
 hw/mac_dbdma.c                |    4 +-
 hw/mac_dbdma.h                |    2 +-
 hw/mac_nvram.c                |    8 +-
 hw/mainstone.c                |    2 +-
 hw/marvell_88w8618_audio.c    |    4 +-
 hw/mcf.h                      |   10 ++--
 hw/mcf5206.c                  |   20 +++---
 hw/mcf5208.c                  |   10 ++--
 hw/mcf_fec.c                  |    6 +-
 hw/mcf_intc.c                 |    6 +-
 hw/mcf_uart.c                 |    6 +-
 hw/milkymist-ac97.c           |    4 +-
 hw/milkymist-hpdmc.c          |    4 +-
 hw/milkymist-hw.h             |   24 +++---
 hw/milkymist-memcard.c        |    4 +-
 hw/milkymist-minimac2.c       |    6 +-
 hw/milkymist-pfpu.c           |    8 +-
 hw/milkymist-softusb.c        |    4 +-
 hw/milkymist-sysctl.c         |    4 +-
 hw/milkymist-tmu2.c           |    8 +-
 hw/milkymist-uart.c           |    4 +-
 hw/milkymist-vgafb.c          |    4 +-
 hw/milkymist.c                |   16 ++--
 hw/mips.h                     |    8 +-
 hw/mips_jazz.c                |    8 +-
 hw/mips_malta.c               |    6 +-
 hw/mips_r4k.c                 |    4 +-
 hw/mipsnet.c                  |    4 +-
 hw/mpc8544_guts.c             |    4 +-
 hw/msix.c                     |    4 +-
 hw/mst_fpga.c                 |    4 +-
 hw/multiboot.c                |   16 ++--
 hw/musicpal.c                 |   32 +++++-----
 hw/ne2000.c                   |    4 +-
 hw/nvram.h                    |    2 +-
 hw/omap.h                     |   70 ++++++++++----------
 hw/omap1.c                    |  148 ++++++++++++++++++++--------------------
 hw/omap2.c                    |   28 ++++----
 hw/omap_dma.c                 |   24 +++---
 hw/omap_dss.c                 |   36 +++++-----
 hw/omap_gpio.c                |   16 ++--
 hw/omap_gpmc.c                |   16 ++--
 hw/omap_gptimer.c             |    8 +-
 hw/omap_i2c.c                 |    8 +-
 hw/omap_intc.c                |    8 +-
 hw/omap_l4.c                  |   16 ++--
 hw/omap_lcdc.c                |    8 +-
 hw/omap_mmc.c                 |    6 +-
 hw/omap_sdrc.c                |    6 +-
 hw/omap_spi.c                 |    4 +-
 hw/omap_sx1.c                 |    4 +-
 hw/omap_synctimer.c           |    6 +-
 hw/omap_tap.c                 |    4 +-
 hw/omap_uart.c                |   10 ++--
 hw/onenand.c                  |    8 +-
 hw/opencores_eth.c            |    8 +-
 hw/openpic.c                  |   52 +++++++-------
 hw/openpic.h                  |    2 +-
 hw/palm.c                     |    8 +-
 hw/parallel.c                 |   14 ++--
 hw/pc.c                       |    4 +-
 hw/pc.h                       |   18 +++---
 hw/pc_piix.c                  |    2 +-
 hw/pci.h                      |    2 +-
 hw/pci_host.c                 |    8 +-
 hw/pcie_host.c                |   10 ++--
 hw/pcie_host.h                |    8 +-
 hw/pckbd.c                    |    8 +-
 hw/pcnet-pci.c                |   20 +++---
 hw/pcnet.c                    |   34 +++++-----
 hw/pcnet.h                    |    4 +-
 hw/petalogix_ml605_mmu.c      |   10 ++--
 hw/petalogix_s3adsp1800_mmu.c |   10 ++--
 hw/pflash_cfi01.c             |   48 +++++++-------
 hw/pflash_cfi02.c             |   40 ++++++------
 hw/piix_pci.c                 |   16 ++--
 hw/pl011.c                    |    4 +-
 hw/pl022.c                    |    4 +-
 hw/pl031.c                    |    4 +-
 hw/pl041.c                    |    6 +-
 hw/pl050.c                    |    4 +-
 hw/pl061.c                    |    4 +-
 hw/pl080.c                    |    4 +-
 hw/pl110.c                    |    4 +-
 hw/pl181.c                    |    4 +-
 hw/pl190.c                    |    4 +-
 hw/ppc405.h                   |   12 ++--
 hw/ppc405_boards.c            |   28 ++++----
 hw/ppc405_uc.c                |   64 +++++++++---------
 hw/ppc440.c                   |    4 +-
 hw/ppc440_bamboo.c            |   10 ++--
 hw/ppc4xx.h                   |   16 ++--
 hw/ppc4xx_devs.c              |   28 ++++----
 hw/ppc4xx_pci.c               |   16 ++--
 hw/ppc_mac.h                  |    4 +-
 hw/ppc_newworld.c             |    8 +-
 hw/ppc_oldworld.c             |    2 +-
 hw/ppc_prep.c                 |   34 +++++-----
 hw/ppce500_mpc8544ds.c        |   16 ++--
 hw/ppce500_pci.c              |    4 +-
 hw/ppce500_spin.c             |   16 ++--
 hw/prep_pci.c                 |   14 ++--
 hw/pxa.h                      |   24 +++---
 hw/pxa2xx.c                   |   42 ++++++------
 hw/pxa2xx_dma.c               |   16 ++--
 hw/pxa2xx_gpio.c              |    6 +-
 hw/pxa2xx_keypad.c            |    6 +-
 hw/pxa2xx_lcd.c               |   26 ++++----
 hw/pxa2xx_mmci.c              |   18 +++---
 hw/pxa2xx_pcmcia.c            |   14 ++--
 hw/pxa2xx_pic.c               |   10 ++--
 hw/pxa2xx_timer.c             |    4 +-
 hw/qdev-addr.c                |   16 ++--
 hw/qdev-addr.h                |    4 +-
 hw/qxl.c                      |    4 +-
 hw/r2d.c                      |    6 +-
 hw/rc4030.c                   |   34 +++++-----
 hw/realview.c                 |    4 +-
 hw/rtl8139.c                  |   16 ++--
 hw/s390-virtio-bus.c          |    2 +-
 hw/s390-virtio.c              |    4 +-
 hw/sbi.c                      |    4 +-
 hw/serial.c                   |    6 +-
 hw/sh.h                       |    4 +-
 hw/sh7750.c                   |   24 +++---
 hw/sh_intc.c                  |    4 +-
 hw/sh_pci.c                   |    4 +-
 hw/sh_serial.c                |    6 +-
 hw/sh_timer.c                 |   10 ++--
 hw/sharpsl.h                  |    2 +-
 hw/slavio_intctl.c            |    8 +-
 hw/slavio_misc.c              |   32 +++++-----
 hw/slavio_timer.c             |    4 +-
 hw/sm501.c                    |   18 +++---
 hw/smc91c111.c                |   12 ++--
 hw/soc_dma.c                  |    8 +-
 hw/soc_dma.h                  |   10 ++--
 hw/spapr.c                    |   14 ++--
 hw/spapr.h                    |    8 +-
 hw/spapr_pci.c                |    4 +-
 hw/spapr_pci.h                |    2 +-
 hw/spapr_rtas.c               |    4 +-
 hw/sparc32_dma.c              |    8 +-
 hw/sparc32_dma.h              |    4 +-
 hw/spitz.c                    |    4 +-
 hw/stellaris.c                |   16 ++--
 hw/stellaris_enet.c           |    4 +-
 hw/strongarm.c                |   28 ++++----
 hw/sun4c_intctl.c             |    4 +-
 hw/sun4m.c                    |   84 ++++++++++++------------
 hw/sun4m.h                    |    6 +-
 hw/sun4m_iommu.c              |   26 ++++----
 hw/sun4u.c                    |    6 +-
 hw/sysbus.c                   |   20 +++---
 hw/sysbus.h                   |   18 +++---
 hw/tc6393xb.c                 |   16 ++--
 hw/tcx.c                      |   10 ++--
 hw/tusb6010.c                 |   12 ++--
 hw/unin_pci.c                 |    4 +-
 hw/usb-ehci.c                 |   22 +++---
 hw/usb-libhw.c                |    2 +-
 hw/usb-musb.c                 |   12 ++--
 hw/usb-ohci.c                 |    8 +-
 hw/versatile_pci.c            |    6 +-
 hw/versatilepb.c              |    4 +-
 hw/vga-isa-mm.c               |   20 +++---
 hw/vga.c                      |   10 ++--
 hw/vga_int.h                  |    4 +-
 hw/vhost.c                    |   18 +++---
 hw/virtex_ml507.c             |   12 ++--
 hw/virtio-pci.c               |    4 +-
 hw/virtio.c                   |   76 +++++++++++-----------
 hw/virtio.h                   |   28 ++++----
 hw/vmware_vga.c               |    4 +-
 hw/wdt_i6300esb.c             |   12 ++--
 hw/xen_platform.c             |    4 +-
 hw/xilinx.h                   |   10 ++--
 hw/xilinx_axidma.c            |   10 ++--
 hw/xilinx_axienet.c           |    4 +-
 hw/xilinx_ethlite.c           |    4 +-
 hw/xilinx_intc.c              |    4 +-
 hw/xilinx_timer.c             |    6 +-
 hw/xilinx_uartlite.c          |    4 +-
 hw/xtensa_lx60.c              |   12 ++--
 hw/zaurus.c                   |    6 +-
 kvm-all.c                     |   26 ++++----
 kvm-stub.c                    |    4 +-
 kvm.h                         |    6 +-
 memory.c                      |   64 +++++++++---------
 memory.h                      |   44 ++++++------
 monitor.c                     |   30 ++++----
 softmmu_template.h            |   12 ++--
 target-alpha/cpu.h            |    2 +-
 target-alpha/helper.c         |    2 +-
 target-alpha/op_helper.c      |    2 +-
 target-arm/helper.c           |    2 +-
 target-cris/helper.c          |    2 +-
 target-i386/helper.c          |    6 +-
 target-i386/kvm.c             |    6 +-
 target-i386/op_helper.c       |    6 +-
 target-lm32/helper.c          |    2 +-
 target-m68k/helper.c          |    2 +-
 target-microblaze/cpu.h       |    2 +-
 target-microblaze/helper.c    |    2 +-
 target-microblaze/op_helper.c |    2 +-
 target-mips/cpu.h             |   12 ++--
 target-mips/helper.c          |   18 +++---
 target-mips/op_helper.c       |    6 +-
 target-ppc/cpu.h              |   24 +++---
 target-ppc/helper.c           |   46 ++++++------
 target-ppc/op_helper.c        |    2 +-
 target-s390x/cpu.h            |    2 +-
 target-s390x/helper.c         |    8 +-
 target-s390x/op_helper.c      |   10 ++--
 target-sh4/cpu.h              |   16 ++--
 target-sh4/helper.c           |   18 +++---
 target-sparc/cpu.h            |    4 +-
 target-sparc/ldst_helper.c    |   40 ++++++------
 target-sparc/mmu_helper.c     |   38 +++++-----
 target-xtensa/helper.c        |    2 +-
 targphys.h                    |    8 +-
 xen-all.c                     |   32 +++++-----
 xen-mapcache.c                |   32 +++++-----
 xen-mapcache.h                |    6 +-
 xtensa-semi.c                 |    6 +-
 323 files changed, 1959 insertions(+), 1959 deletions(-)
HACKING +1 -1
index 471cf1d..38e3497 100644
@@ -32,7 +32,7 @@ mandatory for VMState fields.
 
 Don't use Linux kernel internal types like u32, __u32 or __le32.
 
-Use target_phys_addr_t for guest physical addresses except pcibus_t
+Use Phys for guest physical addresses except pcibus_t
 for PCI addresses.  In addition, ram_addr_t is a QEMU internal address
 space that maps guest RAM physical addresses into an intermediate
 address space that can map to host virtual address spaces.  Generally
cpu-all.h +1 -1
index e2c3c49..1940d32 100644
@@ -465,7 +465,7 @@ int cpu_str_to_log_mask(const char *str);
 /* Return the physical page corresponding to a virtual one. Use it
    only for debugging because no protection checks are done. Return -1
    if no page found. */
-target_phys_addr_t cpu_get_phys_page_debug(CPUState *env, target_ulong addr);
+Phys cpu_get_phys_page_debug(CPUState *env, target_ulong addr);
 
 /* memory API */
 
cpu-common.h +32 -32

96 lines not on this page · raw message

cpu-defs.h +1 -1
index 57a709b..824d645 100644
@@ -113,7 +113,7 @@ extern int CPUTLBEntry_wrong_size[sizeof(CPUTLBEntry) == (1 << CPU_TLB_ENTRY_BIT
 #define CPU_COMMON_TLB \
     /* The meaning of the MMU modes is defined in the target code. */   \
     CPUTLBEntry tlb_table[NB_MMU_MODES][CPU_TLB_SIZE];                  \
-    target_phys_addr_t iotlb[NB_MMU_MODES][CPU_TLB_SIZE];               \
+    Phys iotlb[NB_MMU_MODES][CPU_TLB_SIZE];               \
     target_ulong tlb_flush_addr;                                        \
     target_ulong tlb_flush_mask;
 
disas.h +1 -1
index f9287f7..1c11a7d 100644
@@ -22,7 +22,7 @@ struct elf64_sym;
 #if defined(CONFIG_USER_ONLY)
 typedef const char *(*lookup_symbol_t)(struct syminfo *s, target_ulong orig_addr);
 #else
-typedef const char *(*lookup_symbol_t)(struct syminfo *s, target_phys_addr_t orig_addr);
+typedef const char *(*lookup_symbol_t)(struct syminfo *s, Phys orig_addr);
 #endif
 
 struct syminfo {
dma-helpers.c +1 -1
index f08cdb5..a2fa915 100644
@@ -106,7 +106,7 @@ static void dma_complete(DMAAIOCB *dbs, int ret)
 static void dma_bdrv_cb(void *opaque, int ret)
 {
     DMAAIOCB *dbs = (DMAAIOCB *)opaque;
-    target_phys_addr_t cur_addr, cur_len;
+    Phys cur_addr, cur_len;
     void *mem;
 
     trace_dma_bdrv_cb(dbs, ret);
dma.h +1 -1
index a13209d..196b91d 100644
@@ -18,7 +18,7 @@
 typedef struct ScatterGatherEntry ScatterGatherEntry;
 
 #if defined(TARGET_PHYS_ADDR_BITS)
-typedef target_phys_addr_t dma_addr_t;
+typedef Phys dma_addr_t;
 
 #define DMA_ADDR_FMT TARGET_FMT_plx
 
exec-all.h +3 -3
index 51d01f2..ff5471e 100644
@@ -100,7 +100,7 @@ void tlb_flush_page(CPUState *env, target_ulong addr);
 void tlb_flush(CPUState *env, int flush_global);
 #if !defined(CONFIG_USER_ONLY)
 void tlb_set_page(CPUState *env, target_ulong vaddr,
-                  target_phys_addr_t paddr, int prot,
+                  Phys paddr, int prot,
                   int mmu_idx, target_ulong size);
 #endif
 
@@ -299,8 +299,8 @@ extern void *tci_tb_ptr;
 
 #if !defined(CONFIG_USER_ONLY)
 
-uint64_t io_mem_read(int index, target_phys_addr_t addr, unsigned size);
-void io_mem_write(int index, target_phys_addr_t addr, uint64_t value,
+uint64_t io_mem_read(int index, Phys addr, unsigned size);
+void io_mem_write(int index, Phys addr, uint64_t value,
                   unsigned size);
 extern struct MemoryRegion *io_mem_region[IO_MEM_NB_ENTRIES];
 
exec-obsolete.h +2 -2
index f8af27e..7fb475b 100644
@@ -39,8 +39,8 @@ struct MemoryRegionSection;
 void cpu_register_physical_memory_log(struct MemoryRegionSection *section,
                                       bool readable, bool readonly);
 
-void qemu_register_coalesced_mmio(target_phys_addr_t addr, ram_addr_t size);
-void qemu_unregister_coalesced_mmio(target_phys_addr_t addr, ram_addr_t size);
+void qemu_register_coalesced_mmio(Phys addr, ram_addr_t size);
+void qemu_unregister_coalesced_mmio(Phys addr, ram_addr_t size);
 
 int cpu_physical_memory_set_dirty_tracking(int enable);
 
exec.c +70 -70

493 lines not on this page · raw message

hw/a9mpcore.c +2 -2
index 3ef0e13..4693ee6 100644
@@ -39,7 +39,7 @@
     DeviceState *mptimer;
 } a9mp_priv_state;
 
-static uint64_t a9_scu_read(void *opaque, target_phys_addr_t offset,
+static uint64_t a9_scu_read(void *opaque, Phys offset,
                             unsigned size)
 {
     a9mp_priv_state *s = (a9mp_priv_state *)opaque;
@@ -70,7 +70,7 @@ static uint64_t a9_scu_read(void *opaque, target_phys_addr_t offset,
     }
 }
 
-static void a9_scu_write(void *opaque, target_phys_addr_t offset,
+static void a9_scu_write(void *opaque, Phys offset,
                          uint64_t value, unsigned size)
 {
     a9mp_priv_state *s = (a9mp_priv_state *)opaque;
hw/alpha_pci.c +6 -6
index e975702..51a745a 100644
@@ -16,7 +16,7 @@
 /* PCI IO reads/writes, to byte-word addressable memory.  */
 /* ??? Doesn't handle multiple PCI busses.  */
 
-static uint64_t bw_io_read(void *opaque, target_phys_addr_t addr, unsigned size)
+static uint64_t bw_io_read(void *opaque, Phys addr, unsigned size)
 {
     switch (size) {
     case 1:
@@ -29,7 +29,7 @@ static uint64_t bw_io_read(void *opaque, target_phys_addr_t addr, unsigned size)
     abort();
 }
 
-static void bw_io_write(void *opaque, target_phys_addr_t addr,
+static void bw_io_write(void *opaque, Phys addr,
                         uint64_t val, unsigned size)
 {
     switch (size) {
@@ -58,14 +58,14 @@ static void bw_io_write(void *opaque, target_phys_addr_t addr,
 };
 
 /* PCI config space reads/writes, to byte-word addressable memory.  */
-static uint64_t bw_conf1_read(void *opaque, target_phys_addr_t addr,
+static uint64_t bw_conf1_read(void *opaque, Phys addr,
                               unsigned size)
 {
     PCIBus *b = opaque;
     return pci_data_read(b, addr, size);
 }
 
-static void bw_conf1_write(void *opaque, target_phys_addr_t addr,
+static void bw_conf1_write(void *opaque, Phys addr,
                            uint64_t val, unsigned size)
 {
     PCIBus *b = opaque;
@@ -84,12 +84,12 @@ static void bw_conf1_write(void *opaque, target_phys_addr_t addr,
 
 /* PCI/EISA Interrupt Acknowledge Cycle.  */
 
-static uint64_t iack_read(void *opaque, target_phys_addr_t addr, unsigned size)
+static uint64_t iack_read(void *opaque, Phys addr, unsigned size)
 {
     return pic_read_irq(isa_pic);
 }
 
-static void special_write(void *opaque, target_phys_addr_t addr,
+static void special_write(void *opaque, Phys addr,
                           uint64_t val, unsigned size)
 {
     qemu_log("pci: special write cycle");
hw/alpha_typhoon.c +6 -6
index 7d924a3..1b0beef 100644
@@ -64,7 +64,7 @@ static void cpu_irq_change(CPUState *env, uint64_t req)
     }
 }
 
-static uint64_t cchip_read(void *opaque, target_phys_addr_t addr, unsigned size)
+static uint64_t cchip_read(void *opaque, Phys addr, unsigned size)
 {
     CPUState *env = cpu_single_env;
     TyphoonState *s = opaque;
@@ -197,13 +197,13 @@ static uint64_t cchip_read(void *opaque, target_phys_addr_t addr, unsigned size)
     return ret;
 }
 
-static uint64_t dchip_read(void *opaque, target_phys_addr_t addr, unsigned size)
+static uint64_t dchip_read(void *opaque, Phys addr, unsigned size)
 {
     /* Skip this.  It's all related to DRAM timing and setup.  */
     return 0;
 }
 
-static uint64_t pchip_read(void *opaque, target_phys_addr_t addr, unsigned size)
+static uint64_t pchip_read(void *opaque, Phys addr, unsigned size)
 {
     TyphoonState *s = opaque;
     uint64_t ret = 0;
@@ -300,7 +300,7 @@ static uint64_t pchip_read(void *opaque, target_phys_addr_t addr, unsigned size)
     return ret;
 }
 
-static void cchip_write(void *opaque, target_phys_addr_t addr,
+static void cchip_write(void *opaque, Phys addr,
                         uint64_t v32, unsigned size)
 {
     TyphoonState *s = opaque;
@@ -457,13 +457,13 @@ static void cchip_write(void *opaque, target_phys_addr_t addr,
     }
 }
 
-static void dchip_write(void *opaque, target_phys_addr_t addr,
+static void dchip_write(void *opaque, Phys addr,
                         uint64_t val, unsigned size)
 {
     /* Skip this.  It's all related to DRAM timing and setup.  */
 }
 
-static void pchip_write(void *opaque, target_phys_addr_t addr,
+static void pchip_write(void *opaque, Phys addr,
                         uint64_t v32, unsigned size)
 {
     TyphoonState *s = opaque;
hw/an5206.c +1 -1
index d57306d..47ca81e 100644
@@ -27,7 +27,7 @@ static void an5206_init(ram_addr_t ram_size,
     CPUState *env;
     int kernel_size;
     uint64_t elf_entry;
-    target_phys_addr_t entry;
+    Phys entry;
     MemoryRegion *address_space_mem = get_system_memory();
     MemoryRegion *ram = g_new(MemoryRegion, 1);
     MemoryRegion *sram = g_new(MemoryRegion, 1);
hw/apb_pci.c +12 -12
index 3a1b111..44c100a 100644
@@ -82,7 +82,7 @@
     unsigned int nr_resets;
 } APBState;
 
-static void apb_config_writel (void *opaque, target_phys_addr_t addr,
+static void apb_config_writel (void *opaque, Phys addr,
                                uint64_t val, unsigned size)
 {
     APBState *s = opaque;
@@ -131,7 +131,7 @@ static void apb_config_writel (void *opaque, target_phys_addr_t addr,
 }
 
 static uint64_t apb_config_readl (void *opaque,
-                                  target_phys_addr_t addr, unsigned size)
+                                  Phys addr, unsigned size)
 {
     APBState *s = opaque;
     uint32_t val;
@@ -184,7 +184,7 @@ static uint64_t apb_config_readl (void *opaque,
     .endianness = DEVICE_NATIVE_ENDIAN,
 };
 
-static void apb_pci_config_write(void *opaque, target_phys_addr_t addr,
+static void apb_pci_config_write(void *opaque, Phys addr,
                                  uint64_t val, unsigned size)
 {
     APBState *s = opaque;
@@ -194,7 +194,7 @@ static void apb_pci_config_write(void *opaque, target_phys_addr_t addr,
     pci_data_write(s->bus, addr, val, size);
 }
 
-static uint64_t apb_pci_config_read(void *opaque, target_phys_addr_t addr,
+static uint64_t apb_pci_config_read(void *opaque, Phys addr,
                                     unsigned size)
 {
     uint32_t ret;
@@ -206,25 +206,25 @@ static uint64_t apb_pci_config_read(void *opaque, target_phys_addr_t addr,
     return ret;
 }
 
-static void pci_apb_iowriteb (void *opaque, target_phys_addr_t addr,
+static void pci_apb_iowriteb (void *opaque, Phys addr,
                                   uint32_t val)
 {
     cpu_outb(addr & IOPORTS_MASK, val);
 }
 
-static void pci_apb_iowritew (void *opaque, target_phys_addr_t addr,
+static void pci_apb_iowritew (void *opaque, Phys addr,
                                   uint32_t val)
 {
     cpu_outw(addr & IOPORTS_MASK, bswap16(val));
 }
 
-static void pci_apb_iowritel (void *opaque, target_phys_addr_t addr,
+static void pci_apb_iowritel (void *opaque, Phys addr,
                                 uint32_t val)
 {
     cpu_outl(addr & IOPORTS_MASK, bswap32(val));
 }
 
-static uint32_t pci_apb_ioreadb (void *opaque, target_phys_addr_t addr)
+static uint32_t pci_apb_ioreadb (void *opaque, Phys addr)
 {
     uint32_t val;
 
@@ -232,7 +232,7 @@ static uint32_t pci_apb_ioreadb (void *opaque, target_phys_addr_t addr)
     return val;
 }
 
-static uint32_t pci_apb_ioreadw (void *opaque, target_phys_addr_t addr)
+static uint32_t pci_apb_ioreadw (void *opaque, Phys addr)
 {
     uint32_t val;
 
@@ -240,7 +240,7 @@ static uint32_t pci_apb_ioreadw (void *opaque, target_phys_addr_t addr)
     return val;
 }
 
-static uint32_t pci_apb_ioreadl (void *opaque, target_phys_addr_t addr)
+static uint32_t pci_apb_ioreadl (void *opaque, Phys addr)
 {
     uint32_t val;
 
@@ -314,8 +314,8 @@ static int apb_pci_bridge_initfn(PCIDevice *dev)
     return 0;
 }
 
-PCIBus *pci_apb_init(target_phys_addr_t special_base,
-                     target_phys_addr_t mem_base,
+PCIBus *pci_apb_init(Phys special_base,
+                     Phys mem_base,
                      qemu_irq *pic, PCIBus **bus2, PCIBus **bus3)
 {
     DeviceState *dev;
hw/apb_pci.h +2 -2
index 8869f9d..102aea3 100644
@@ -3,7 +3,7 @@
 
 #include "qemu-common.h"
 
-PCIBus *pci_apb_init(target_phys_addr_t special_base,
-                     target_phys_addr_t mem_base,
+PCIBus *pci_apb_init(Phys special_base,
+                     Phys mem_base,
                      qemu_irq *pic, PCIBus **bus2, PCIBus **bus3);
 #endif
hw/apic.c +7 -7
index 9d0f460..74b0ca7 100644
@@ -689,25 +689,25 @@ static void apic_timer(void *opaque)
     apic_timer_update(s, s->next_time);
 }
 
-static uint32_t apic_mem_readb(void *opaque, target_phys_addr_t addr)
+static uint32_t apic_mem_readb(void *opaque, Phys addr)
 {
     return 0;
 }
 
-static uint32_t apic_mem_readw(void *opaque, target_phys_addr_t addr)
+static uint32_t apic_mem_readw(void *opaque, Phys addr)
 {
     return 0;
 }
 
-static void apic_mem_writeb(void *opaque, target_phys_addr_t addr, uint32_t val)
+static void apic_mem_writeb(void *opaque, Phys addr, uint32_t val)
 {
 }
 
-static void apic_mem_writew(void *opaque, target_phys_addr_t addr, uint32_t val)
+static void apic_mem_writew(void *opaque, Phys addr, uint32_t val)
 {
 }
 
-static uint32_t apic_mem_readl(void *opaque, target_phys_addr_t addr)
+static uint32_t apic_mem_readl(void *opaque, Phys addr)
 {
     DeviceState *d;
     APICState *s;
@@ -787,7 +787,7 @@ static uint32_t apic_mem_readl(void *opaque, target_phys_addr_t addr)
     return val;
 }
 
-static void apic_send_msi(target_phys_addr_t addr, uint32_t data)
+static void apic_send_msi(Phys addr, uint32_t data)
 {
     uint8_t dest = (addr & MSI_ADDR_DEST_ID_MASK) >> MSI_ADDR_DEST_ID_SHIFT;
     uint8_t vector = (data & MSI_DATA_VECTOR_MASK) >> MSI_DATA_VECTOR_SHIFT;
@@ -798,7 +798,7 @@ static void apic_send_msi(target_phys_addr_t addr, uint32_t data)
     apic_deliver_irq(dest, dest_mode, delivery, vector, trigger_mode);
 }
 
-static void apic_mem_writel(void *opaque, target_phys_addr_t addr, uint32_t val)
+static void apic_mem_writel(void *opaque, Phys addr, uint32_t val)
 {
     DeviceState *d;
     APICState *s;
hw/arm-misc.h +5 -5
index af403a1..94e0314 100644
@@ -29,16 +29,16 @@ struct arm_boot_info {
     const char *kernel_filename;
     const char *kernel_cmdline;
     const char *initrd_filename;
-    target_phys_addr_t loader_start;
-    target_phys_addr_t smp_loader_start;
-    target_phys_addr_t smp_priv_base;
+    Phys loader_start;
+    Phys smp_loader_start;
+    Phys smp_priv_base;
     int nb_cpus;
     int board_id;
     int (*atag_board)(const struct arm_boot_info *info, void *p);
     /* Used internally by arm_boot.c */
     int is_linux;
-    target_phys_addr_t initrd_size;
-    target_phys_addr_t entry;
+    Phys initrd_size;
+    Phys entry;
 };
 void arm_load_kernel(CPUState *env, struct arm_boot_info *info);
 
hw/arm11mpcore.c +4 -4
index bc0457e..c08181a 100644
@@ -41,7 +41,7 @@
 
 /* Per-CPU private memory mapped IO.  */
 
-static uint64_t mpcore_scu_read(void *opaque, target_phys_addr_t offset,
+static uint64_t mpcore_scu_read(void *opaque, Phys offset,
                                 unsigned size)
 {
     mpcore_priv_state *s = (mpcore_priv_state *)opaque;
@@ -63,7 +63,7 @@ static uint64_t mpcore_scu_read(void *opaque, target_phys_addr_t offset,
     }
 }
 
-static void mpcore_scu_write(void *opaque, target_phys_addr_t offset,
+static void mpcore_scu_write(void *opaque, Phys offset,
                              uint64_t value, unsigned size)
 {
     mpcore_priv_state *s = (mpcore_priv_state *)opaque;
@@ -107,7 +107,7 @@ static void mpcore_priv_map_setup(mpcore_priv_state *s)
      * at 0x200, 0x300...
      */
     for (i = 0; i < (s->num_cpu + 1); i++) {
-        target_phys_addr_t offset = 0x100 + (i * 0x100);
+        Phys offset = 0x100 + (i * 0x100);
         memory_region_add_subregion(&s->container, offset, &s->gic.cpuiomem[i]);
     }
     /* Add the regions for timer and watchdog for "current CPU" and
@@ -117,7 +117,7 @@ static void mpcore_priv_map_setup(mpcore_priv_state *s)
                                       s, (s->num_cpu + 1) * 2);
     for (i = 0; i < (s->num_cpu + 1) * 2; i++) {
         /* Timers at 0x600, 0x700, ...; watchdogs at 0x620, 0x720, ... */
-        target_phys_addr_t offset = 0x600 + (i >> 1) * 0x100 + (i & 1) * 0x20;
+        Phys offset = 0x600 + (i >> 1) * 0x100 + (i & 1) * 0x20;
         memory_region_add_subregion(&s->container, offset,
                                     sysbus_mmio_get_region(busdev, i));
     }
hw/arm_boot.c +5 -5
index 215d5de..f2be28a 100644
@@ -50,9 +50,9 @@
 } while (0)
 
 static void set_kernel_args(const struct arm_boot_info *info,
-                int initrd_size, target_phys_addr_t base)
+                int initrd_size, Phys base)
 {
-    target_phys_addr_t p;
+    Phys p;
 
     p = base + KERNEL_ARGS_ADDR;
     /* ATAG_CORE */
@@ -103,9 +103,9 @@ static void set_kernel_args(const struct arm_boot_info *info,
 }
 
 static void set_kernel_args_old(const struct arm_boot_info *info,
-                int initrd_size, target_phys_addr_t base)
+                int initrd_size, Phys base)
 {
-    target_phys_addr_t p;
+    Phys p;
     const char *s;
 
 
@@ -210,7 +210,7 @@ void arm_load_kernel(CPUState *env, struct arm_boot_info *info)
     int n;
     int is_linux = 0;
     uint64_t elf_entry;
-    target_phys_addr_t entry;
+    Phys entry;
     int big_endian;
 
     /* Load the kernel.  */
hw/arm_gic.c +10 -10
index 0339cf5..bd807e5 100644
@@ -262,7 +262,7 @@ static void gic_complete_irq(gic_state * s, int cpu, int irq)
     }
 }
 
-static uint32_t gic_dist_readb(void *opaque, target_phys_addr_t offset)
+static uint32_t gic_dist_readb(void *opaque, Phys offset)
 {
     gic_state *s = (gic_state *)opaque;
     uint32_t res;
@@ -376,7 +376,7 @@ static uint32_t gic_dist_readb(void *opaque, target_phys_addr_t offset)
     return 0;
 }
 
-static uint32_t gic_dist_readw(void *opaque, target_phys_addr_t offset)
+static uint32_t gic_dist_readw(void *opaque, Phys offset)
 {
     uint32_t val;
     val = gic_dist_readb(opaque, offset);
@@ -384,7 +384,7 @@ static uint32_t gic_dist_readw(void *opaque, target_phys_addr_t offset)
     return val;
 }
 
-static uint32_t gic_dist_readl(void *opaque, target_phys_addr_t offset)
+static uint32_t gic_dist_readl(void *opaque, Phys offset)
 {
     uint32_t val;
 #ifdef NVIC
@@ -399,7 +399,7 @@ static uint32_t gic_dist_readl(void *opaque, target_phys_addr_t offset)
     return val;
 }
 
-static void gic_dist_writeb(void *opaque, target_phys_addr_t offset,
+static void gic_dist_writeb(void *opaque, Phys offset,
                             uint32_t value)
 {
     gic_state *s = (gic_state *)opaque;
@@ -545,14 +545,14 @@ static void gic_dist_writeb(void *opaque, target_phys_addr_t offset,
     hw_error("gic_dist_writeb: Bad offset %x\n", (int)offset);
 }
 
-static void gic_dist_writew(void *opaque, target_phys_addr_t offset,
+static void gic_dist_writew(void *opaque, Phys offset,
                             uint32_t value)
 {
     gic_dist_writeb(opaque, offset, value & 0xff);
     gic_dist_writeb(opaque, offset + 1, value >> 8);
 }
 
-static void gic_dist_writel(void *opaque, target_phys_addr_t offset,
+static void gic_dist_writel(void *opaque, Phys offset,
                             uint32_t value)
 {
     gic_state *s = (gic_state *)opaque;
@@ -648,14 +648,14 @@ static void gic_cpu_write(gic_state *s, int cpu, int offset, uint32_t value)
 }
 
 /* Wrappers to read/write the GIC CPU interface for the current CPU */
-static uint64_t gic_thiscpu_read(void *opaque, target_phys_addr_t addr,
+static uint64_t gic_thiscpu_read(void *opaque, Phys addr,
                                  unsigned size)
 {
     gic_state *s = (gic_state *)opaque;
     return gic_cpu_read(s, gic_get_current_cpu(), addr & 0xff);
 }
 
-static void gic_thiscpu_write(void *opaque, target_phys_addr_t addr,
+static void gic_thiscpu_write(void *opaque, Phys addr,
                               uint64_t value, unsigned size)
 {
     gic_state *s = (gic_state *)opaque;
@@ -665,7 +665,7 @@ static void gic_thiscpu_write(void *opaque, target_phys_addr_t addr,
 /* Wrappers to read/write the GIC CPU interface for a specific CPU.
  * These just decode the opaque pointer into gic_state* + cpu id.
  */
-static uint64_t gic_do_cpu_read(void *opaque, target_phys_addr_t addr,
+static uint64_t gic_do_cpu_read(void *opaque, Phys addr,
                                 unsigned size)
 {
     gic_state **backref = (gic_state **)opaque;
@@ -674,7 +674,7 @@ static uint64_t gic_do_cpu_read(void *opaque, target_phys_addr_t addr,
     return gic_cpu_read(s, id, addr & 0xff);
 }
 
-static void gic_do_cpu_write(void *opaque, target_phys_addr_t addr,
+static void gic_do_cpu_write(void *opaque, Phys addr,
                              uint64_t value, unsigned size)
 {
     gic_state **backref = (gic_state **)opaque;
hw/arm_l2x0.c +2 -2
index 2faed39..f4a0b1d 100644
@@ -51,7 +51,7 @@
 };
 
 
-static uint64_t l2x0_priv_read(void *opaque, target_phys_addr_t offset,
+static uint64_t l2x0_priv_read(void *opaque, Phys offset,
                                unsigned size)
 {
     uint32_t cache_data;
@@ -93,7 +93,7 @@ static uint64_t l2x0_priv_read(void *opaque, target_phys_addr_t offset,
     return 0;
 }
 
-static void l2x0_priv_write(void *opaque, target_phys_addr_t offset,
+static void l2x0_priv_write(void *opaque, Phys offset,
                             uint64_t value, unsigned size)
 {
     l2x0_state *s = (l2x0_state *)opaque;
hw/arm_mptimer.c +6 -6
index 455a0aa..ee23aa7 100644
@@ -92,7 +92,7 @@ static void timerblock_tick(void *opaque)
     timerblock_update_irq(tb);
 }
 
-static uint64_t timerblock_read(void *opaque, target_phys_addr_t addr,
+static uint64_t timerblock_read(void *opaque, Phys addr,
                                 unsigned size)
 {
     timerblock *tb = (timerblock *)opaque;
@@ -121,7 +121,7 @@ static uint64_t timerblock_read(void *opaque, target_phys_addr_t addr,
     }
 }
 
-static void timerblock_write(void *opaque, target_phys_addr_t addr,
+static void timerblock_write(void *opaque, Phys addr,
                              uint64_t value, unsigned size)
 {
     timerblock *tb = (timerblock *)opaque;
@@ -161,7 +161,7 @@ static void timerblock_write(void *opaque, target_phys_addr_t addr,
 /* Wrapper functions to implement the "read timer/watchdog for
  * the current CPU" memory regions.
  */
-static uint64_t arm_thistimer_read(void *opaque, target_phys_addr_t addr,
+static uint64_t arm_thistimer_read(void *opaque, Phys addr,
                                    unsigned size)
 {
     arm_mptimer_state *s = (arm_mptimer_state *)opaque;
@@ -169,7 +169,7 @@ static uint64_t arm_thistimer_read(void *opaque, target_phys_addr_t addr,
     return timerblock_read(&s->timerblock[id * 2], addr, size);
 }
 
-static void arm_thistimer_write(void *opaque, target_phys_addr_t addr,
+static void arm_thistimer_write(void *opaque, Phys addr,
                                 uint64_t value, unsigned size)
 {
     arm_mptimer_state *s = (arm_mptimer_state *)opaque;
@@ -177,7 +177,7 @@ static void arm_thistimer_write(void *opaque, target_phys_addr_t addr,
     timerblock_write(&s->timerblock[id * 2], addr, value, size);
 }
 
-static uint64_t arm_thiswdog_read(void *opaque, target_phys_addr_t addr,
+static uint64_t arm_thiswdog_read(void *opaque, Phys addr,
                                   unsigned size)
 {
     arm_mptimer_state *s = (arm_mptimer_state *)opaque;
@@ -185,7 +185,7 @@ static uint64_t arm_thiswdog_read(void *opaque, target_phys_addr_t addr,
     return timerblock_read(&s->timerblock[id * 2 + 1], addr, size);
 }
 
-static void arm_thiswdog_write(void *opaque, target_phys_addr_t addr,
+static void arm_thiswdog_write(void *opaque, Phys addr,
                                uint64_t value, unsigned size)
 {
     arm_mptimer_state *s = (arm_mptimer_state *)opaque;
hw/arm_sysctl.c +2 -2
index 4b88648..87e6d45 100644
@@ -92,7 +92,7 @@ static void arm_sysctl_reset(DeviceState *d)
     }
 }
 
-static uint64_t arm_sysctl_read(void *opaque, target_phys_addr_t offset,
+static uint64_t arm_sysctl_read(void *opaque, Phys offset,
                                 unsigned size)
 {
     arm_sysctl_state *s = (arm_sysctl_state *)opaque;
@@ -189,7 +189,7 @@ static uint64_t arm_sysctl_read(void *opaque, target_phys_addr_t offset,
     }
 }
 
-static void arm_sysctl_write(void *opaque, target_phys_addr_t offset,
+static void arm_sysctl_write(void *opaque, Phys offset,
                              uint64_t val, unsigned size)
 {
     arm_sysctl_state *s = (arm_sysctl_state *)opaque;
hw/arm_timer.c +6 -6
index 60e1c63..52913b9 100644
@@ -44,7 +44,7 @@ static void arm_timer_update(arm_timer_state *s)
     }
 }
 
-static uint32_t arm_timer_read(void *opaque, target_phys_addr_t offset)
+static uint32_t arm_timer_read(void *opaque, Phys offset)
 {
     arm_timer_state *s = (arm_timer_state *)opaque;
 
@@ -86,7 +86,7 @@ static void arm_timer_recalibrate(arm_timer_state *s, int reload)
     ptimer_set_limit(s->timer, limit, reload);
 }
 
-static void arm_timer_write(void *opaque, target_phys_addr_t offset,
+static void arm_timer_write(void *opaque, Phys offset,
                             uint32_t value)
 {
     arm_timer_state *s = (arm_timer_state *)opaque;
@@ -201,7 +201,7 @@ static void sp804_set_irq(void *opaque, int irq, int level)
     qemu_set_irq(s->irq, s->level[0] || s->level[1]);
 }
 
-static uint64_t sp804_read(void *opaque, target_phys_addr_t offset,
+static uint64_t sp804_read(void *opaque, Phys offset,
                            unsigned size)
 {
     sp804_state *s = (sp804_state *)opaque;
@@ -229,7 +229,7 @@ static uint64_t sp804_read(void *opaque, target_phys_addr_t offset,
     return 0;
 }
 
-static void sp804_write(void *opaque, target_phys_addr_t offset,
+static void sp804_write(void *opaque, Phys offset,
                         uint64_t value, unsigned size)
 {
     sp804_state *s = (sp804_state *)opaque;
@@ -304,7 +304,7 @@ static int sp804_init(SysBusDevice *dev)
     arm_timer_state *timer[3];
 } icp_pit_state;
 
-static uint64_t icp_pit_read(void *opaque, target_phys_addr_t offset,
+static uint64_t icp_pit_read(void *opaque, Phys offset,
                              unsigned size)
 {
     icp_pit_state *s = (icp_pit_state *)opaque;
@@ -319,7 +319,7 @@ static uint64_t icp_pit_read(void *opaque, target_phys_addr_t offset,
     return arm_timer_read(s->timer[n], offset & 0xff);
 }
 
-static void icp_pit_write(void *opaque, target_phys_addr_t offset,
+static void icp_pit_write(void *opaque, Phys offset,
                           uint64_t value, unsigned size)
 {
     icp_pit_state *s = (icp_pit_state *)opaque;
hw/armv7m.c +6 -6
index 5c7a950..714ef11 100644
@@ -25,14 +25,14 @@ static inline uint32_t bitband_addr(void * opaque, uint32_t addr)
 
 }
 
-static uint32_t bitband_readb(void *opaque, target_phys_addr_t offset)
+static uint32_t bitband_readb(void *opaque, Phys offset)
 {
     uint8_t v;
     cpu_physical_memory_read(bitband_addr(opaque, offset), &v, 1);
     return (v & (1 << ((offset >> 2) & 7))) != 0;
 }
 
-static void bitband_writeb(void *opaque, target_phys_addr_t offset,
+static void bitband_writeb(void *opaque, Phys offset,
                            uint32_t value)
 {
     uint32_t addr;
@@ -48,7 +48,7 @@ static void bitband_writeb(void *opaque, target_phys_addr_t offset,
     cpu_physical_memory_write(addr, &v, 1);
 }
 
-static uint32_t bitband_readw(void *opaque, target_phys_addr_t offset)
+static uint32_t bitband_readw(void *opaque, Phys offset)
 {
     uint32_t addr;
     uint16_t mask;
@@ -60,7 +60,7 @@ static uint32_t bitband_readw(void *opaque, target_phys_addr_t offset)
     return (v & mask) != 0;
 }
 
-static void bitband_writew(void *opaque, target_phys_addr_t offset,
+static void bitband_writew(void *opaque, Phys offset,
                            uint32_t value)
 {
     uint32_t addr;
@@ -77,7 +77,7 @@ static void bitband_writew(void *opaque, target_phys_addr_t offset,
     cpu_physical_memory_write(addr, (uint8_t *)&v, 2);
 }
 
-static uint32_t bitband_readl(void *opaque, target_phys_addr_t offset)
+static uint32_t bitband_readl(void *opaque, Phys offset)
 {
     uint32_t addr;
     uint32_t mask;
@@ -89,7 +89,7 @@ static uint32_t bitband_readl(void *opaque, target_phys_addr_t offset)
     return (v & mask) != 0;
 }
 
-static void bitband_writel(void *opaque, target_phys_addr_t offset,
+static void bitband_writel(void *opaque, Phys offset,
                            uint32_t value)
 {
     uint32_t addr;
hw/axis_dev88.c +4 -4
index c9301fd..a3a491a 100644
@@ -47,7 +47,7 @@ struct nand_state_t
 };
 
 static struct nand_state_t nand_state;
-static uint64_t nand_read(void *opaque, target_phys_addr_t addr, unsigned size)
+static uint64_t nand_read(void *opaque, Phys addr, unsigned size)
 {
     struct nand_state_t *s = opaque;
     uint32_t r;
@@ -62,7 +62,7 @@ static uint64_t nand_read(void *opaque, target_phys_addr_t addr, unsigned size)
 }
 
 static void
-nand_write(void *opaque, target_phys_addr_t addr, uint64_t value,
+nand_write(void *opaque, Phys addr, uint64_t value,
            unsigned size)
 {
     struct nand_state_t *s = opaque;
@@ -166,7 +166,7 @@ static void tempsensor_clkedge(struct tempsensor_t *s,
     uint32_t regs[0x5c / 4];
 } gpio_state;
 
-static uint64_t gpio_read(void *opaque, target_phys_addr_t addr, unsigned size)
+static uint64_t gpio_read(void *opaque, Phys addr, unsigned size)
 {
     struct gpio_state_t *s = opaque;
     uint32_t r = 0;
@@ -195,7 +195,7 @@ static uint64_t gpio_read(void *opaque, target_phys_addr_t addr, unsigned size)
     D(printf("%s %x=%x\n", __func__, addr, r));
 }
 
-static void gpio_write(void *opaque, target_phys_addr_t addr, uint64_t value,
+static void gpio_write(void *opaque, Phys addr, uint64_t value,
                        unsigned size)
 {
     struct gpio_state_t *s = opaque;
hw/bonito.c +19 -19
index 04d706a..0ef9d6e 100644
@@ -205,19 +205,19 @@
     MemoryRegion iomem_ldma;
     MemoryRegion iomem_cop;
 
-    target_phys_addr_t bonito_pciio_start;
-    target_phys_addr_t bonito_pciio_length;
+    Phys bonito_pciio_start;
+    Phys bonito_pciio_length;
     int bonito_pciio_handle;
 
-    target_phys_addr_t bonito_localio_start;
-    target_phys_addr_t bonito_localio_length;
+    Phys bonito_localio_start;
+    Phys bonito_localio_length;
     int bonito_localio_handle;
 
 } PCIBonitoState;
 
 PCIBonitoState * bonito_state;
 
-static void bonito_writel(void *opaque, target_phys_addr_t addr,
+static void bonito_writel(void *opaque, Phys addr,
                           uint64_t val, unsigned size)
 {
     PCIBonitoState *s = opaque;
@@ -280,7 +280,7 @@ static void bonito_writel(void *opaque, target_phys_addr_t addr,
     }
 }
 
-static uint64_t bonito_readl(void *opaque, target_phys_addr_t addr,
+static uint64_t bonito_readl(void *opaque, Phys addr,
                              unsigned size)
 {
     PCIBonitoState *s = opaque;
@@ -307,7 +307,7 @@ static uint64_t bonito_readl(void *opaque, target_phys_addr_t addr,
     },
 };
 
-static void bonito_pciconf_writel(void *opaque, target_phys_addr_t addr,
+static void bonito_pciconf_writel(void *opaque, Phys addr,
                                   uint64_t val, unsigned size)
 {
     PCIBonitoState *s = opaque;
@@ -316,7 +316,7 @@ static void bonito_pciconf_writel(void *opaque, target_phys_addr_t addr,
     s->dev.config_write(&s->dev, addr, val, 4);
 }
 
-static uint64_t bonito_pciconf_readl(void *opaque, target_phys_addr_t addr,
+static uint64_t bonito_pciconf_readl(void *opaque, Phys addr,
                                      unsigned size)
 {
 
@@ -338,7 +338,7 @@ static uint64_t bonito_pciconf_readl(void *opaque, target_phys_addr_t addr,
     },
 };
 
-static uint64_t bonito_ldma_readl(void *opaque, target_phys_addr_t addr,
+static uint64_t bonito_ldma_readl(void *opaque, Phys addr,
                                   unsigned size)
 {
     uint32_t val;
@@ -349,7 +349,7 @@ static uint64_t bonito_ldma_readl(void *opaque, target_phys_addr_t addr,
     return val;
 }
 
-static void bonito_ldma_writel(void *opaque, target_phys_addr_t addr,
+static void bonito_ldma_writel(void *opaque, Phys addr,
                                uint64_t val, unsigned size)
 {
     PCIBonitoState *s = opaque;
@@ -367,7 +367,7 @@ static void bonito_ldma_writel(void *opaque, target_phys_addr_t addr,
     },
 };
 
-static uint64_t bonito_cop_readl(void *opaque, target_phys_addr_t addr,
+static uint64_t bonito_cop_readl(void *opaque, Phys addr,
                                  unsigned size)
 {
     uint32_t val;
@@ -378,7 +378,7 @@ static uint64_t bonito_cop_readl(void *opaque, target_phys_addr_t addr,
     return val;
 }
 
-static void bonito_cop_writel(void *opaque, target_phys_addr_t addr,
+static void bonito_cop_writel(void *opaque, Phys addr,
                               uint64_t val, unsigned size)
 {
     PCIBonitoState *s = opaque;
@@ -396,7 +396,7 @@ static void bonito_cop_writel(void *opaque, target_phys_addr_t addr,
     },
 };
 
-static uint32_t bonito_sbridge_pciaddr(void *opaque, target_phys_addr_t addr)
+static uint32_t bonito_sbridge_pciaddr(void *opaque, Phys addr)
 {
     PCIBonitoState *s = opaque;
     uint32_t cfgaddr;
@@ -431,7 +431,7 @@ static uint32_t bonito_sbridge_pciaddr(void *opaque, target_phys_addr_t addr)
     return pciaddr;
 }
 
-static void bonito_spciconf_writeb(void *opaque, target_phys_addr_t addr,
+static void bonito_spciconf_writeb(void *opaque, Phys addr,
                                    uint32_t val)
 {
     PCIBonitoState *s = opaque;
@@ -455,7 +455,7 @@ static void bonito_spciconf_writeb(void *opaque, target_phys_addr_t addr,
     pci_set_word(s->dev.config + PCI_STATUS, status);
 }
 
-static void bonito_spciconf_writew(void *opaque, target_phys_addr_t addr,
+static void bonito_spciconf_writew(void *opaque, Phys addr,
                                    uint32_t val)
 {
     PCIBonitoState *s = opaque;
@@ -481,7 +481,7 @@ static void bonito_spciconf_writew(void *opaque, target_phys_addr_t addr,
     pci_set_word(s->dev.config + PCI_STATUS, status);
 }
 
-static void bonito_spciconf_writel(void *opaque, target_phys_addr_t addr,
+static void bonito_spciconf_writel(void *opaque, Phys addr,
                                    uint32_t val)
 {
     PCIBonitoState *s = opaque;
@@ -507,7 +507,7 @@ static void bonito_spciconf_writel(void *opaque, target_phys_addr_t addr,
     pci_set_word(s->dev.config + PCI_STATUS, status);
 }
 
-static uint32_t bonito_spciconf_readb(void *opaque, target_phys_addr_t addr)
+static uint32_t bonito_spciconf_readb(void *opaque, Phys addr)
 {
     PCIBonitoState *s = opaque;
     uint32_t pciaddr;
@@ -531,7 +531,7 @@ static uint32_t bonito_spciconf_readb(void *opaque, target_phys_addr_t addr)
     return pci_data_read(s->pcihost->bus, s->pcihost->config_reg, 1);
 }
 
-static uint32_t bonito_spciconf_readw(void *opaque, target_phys_addr_t addr)
+static uint32_t bonito_spciconf_readw(void *opaque, Phys addr)
 {
     PCIBonitoState *s = opaque;
     uint32_t pciaddr;
@@ -557,7 +557,7 @@ static uint32_t bonito_spciconf_readw(void *opaque, target_phys_addr_t addr)
     return pci_data_read(s->pcihost->bus, s->pcihost->config_reg, 2);
 }
 
-static uint32_t bonito_spciconf_readl(void *opaque, target_phys_addr_t addr)
+static uint32_t bonito_spciconf_readl(void *opaque, Phys addr)
 {
     PCIBonitoState *s = opaque;
     uint32_t pciaddr;
hw/cirrus_vga.c +8 -8
index f7b1d3d..debfe7d 100644
@@ -1954,7 +1954,7 @@ static void cirrus_mem_writeb_mode4and5_16bpp(CirrusVGAState * s,
  ***************************************/
 
 static uint64_t cirrus_vga_mem_read(void *opaque,
-                                    target_phys_addr_t addr,
+                                    Phys addr,
                                     uint32_t size)
 {
     CirrusVGAState *s = opaque;
@@ -1998,7 +1998,7 @@ static uint64_t cirrus_vga_mem_read(void *opaque,
 }
 
 static void cirrus_vga_mem_write(void *opaque,
-                                 target_phys_addr_t addr,
+                                 Phys addr,
                                  uint64_t mem_value,
                                  uint32_t size)
 {
@@ -2247,7 +2247,7 @@ static void cirrus_cursor_draw_line(VGACommonState *s1, uint8_t *d1, int scr_y)
  *
  ***************************************/
 
-static uint64_t cirrus_linear_read(void *opaque, target_phys_addr_t addr,
+static uint64_t cirrus_linear_read(void *opaque, Phys addr,
                                    unsigned size)
 {
     CirrusVGAState *s = opaque;
@@ -2276,7 +2276,7 @@ static uint64_t cirrus_linear_read(void *opaque, target_phys_addr_t addr,
     return ret;
 }
 
-static void cirrus_linear_write(void *opaque, target_phys_addr_t addr,
+static void cirrus_linear_write(void *opaque, Phys addr,
                                 uint64_t val, unsigned size)
 {
     CirrusVGAState *s = opaque;
@@ -2325,7 +2325,7 @@ static void cirrus_linear_write(void *opaque, target_phys_addr_t addr,
 
 
 static uint64_t cirrus_linear_bitblt_read(void *opaque,
-                                          target_phys_addr_t addr,
+                                          Phys addr,
                                           unsigned size)
 {
     CirrusVGAState *s = opaque;
@@ -2338,7 +2338,7 @@ static uint64_t cirrus_linear_bitblt_read(void *opaque,
 }
 
 static void cirrus_linear_bitblt_write(void *opaque,
-                                       target_phys_addr_t addr,
+                                       Phys addr,
                                        uint64_t val,
                                        unsigned size)
 {
@@ -2628,7 +2628,7 @@ static void cirrus_vga_ioport_write(void *opaque, uint32_t addr, uint32_t val)
  *
  ***************************************/
 
-static uint64_t cirrus_mmio_read(void *opaque, target_phys_addr_t addr,
+static uint64_t cirrus_mmio_read(void *opaque, Phys addr,
                                  unsigned size)
 {
     CirrusVGAState *s = opaque;
@@ -2640,7 +2640,7 @@ static uint64_t cirrus_mmio_read(void *opaque, target_phys_addr_t addr,
     }
 }
 
-static void cirrus_mmio_write(void *opaque, target_phys_addr_t addr,
+static void cirrus_mmio_write(void *opaque, Phys addr,
                               uint64_t val, unsigned size)
 {
     CirrusVGAState *s = opaque;
hw/cris-boot.h +1 -1
index e9caf8d..f10d60b 100644
@@ -5,7 +5,7 @@ struct cris_load_info
     const char *cmdline;
     int image_size;
 
-    target_phys_addr_t entry;
+    Phys entry;
 };
 
 void cris_load_image(CPUState *env, struct cris_load_info *li);
hw/cs4231.c +2 -2
index 2dfb708..065e3f0 100644
@@ -55,7 +55,7 @@ static void cs_reset(DeviceState *d)
     s->dregs[25] = CS_VER;
 }
 
-static uint64_t cs_mem_read(void *opaque, target_phys_addr_t addr,
+static uint64_t cs_mem_read(void *opaque, Phys addr,
                             unsigned size)
 {
     CSState *s = opaque;
@@ -82,7 +82,7 @@ static uint64_t cs_mem_read(void *opaque, target_phys_addr_t addr,
     return ret;
 }
 
-static void cs_mem_write(void *opaque, target_phys_addr_t addr,
+static void cs_mem_write(void *opaque, Phys addr,
                          uint64_t val, unsigned size)
 {
     CSState *s = opaque;
hw/cs4231a.c +2 -2
index dc77a3a..4eda856 100644
@@ -346,7 +346,7 @@ static void cs_reset_voices (CSState *s, uint32_t val)
     }
 }
 
-static uint64_t cs_read (void *opaque, target_phys_addr_t addr, unsigned size)
+static uint64_t cs_read (void *opaque, Phys addr, unsigned size)
 {
     CSState *s = opaque;
     uint32_t saddr, iaddr, ret;
@@ -383,7 +383,7 @@ static uint64_t cs_read (void *opaque, target_phys_addr_t addr, unsigned size)
     return ret;
 }
 
-static void cs_write (void *opaque, target_phys_addr_t addr,
+static void cs_write (void *opaque, Phys addr,
                       uint64_t val64, unsigned size)
 {
     CSState *s = opaque;
hw/cuda.c +6 -6
index 4077436..3ce9c8f 100644
@@ -252,7 +252,7 @@ static void cuda_timer1(void *opaque)
     cuda_update_irq(s);
 }
 
-static uint32_t cuda_readb(void *opaque, target_phys_addr_t addr)
+static uint32_t cuda_readb(void *opaque, Phys addr)
 {
     CUDAState *s = opaque;
     uint32_t val;
@@ -325,7 +325,7 @@ static uint32_t cuda_readb(void *opaque, target_phys_addr_t addr)
     return val;
 }
 
-static void cuda_writeb(void *opaque, target_phys_addr_t addr, uint32_t val)
+static void cuda_writeb(void *opaque, Phys addr, uint32_t val)
 {
     CUDAState *s = opaque;
 
@@ -616,20 +616,20 @@ static void cuda_receive_packet_from_host(CUDAState *s,
     }
 }
 
-static void cuda_writew (void *opaque, target_phys_addr_t addr, uint32_t value)
+static void cuda_writew (void *opaque, Phys addr, uint32_t value)
 {
 }
 
-static void cuda_writel (void *opaque, target_phys_addr_t addr, uint32_t value)
+static void cuda_writel (void *opaque, Phys addr, uint32_t value)
 {
 }
 
-static uint32_t cuda_readw (void *opaque, target_phys_addr_t addr)
+static uint32_t cuda_readw (void *opaque, Phys addr)
 {
     return 0;
 }
 
-static uint32_t cuda_readl (void *opaque, target_phys_addr_t addr)
+static uint32_t cuda_readl (void *opaque, Phys addr)
 {
     return 0;
 }
hw/dma.c +2 -2
index 0a9322d..b3a4c71 100644
@@ -411,7 +411,7 @@ void DMA_register_channel (int nchan,
 int DMA_read_memory (int nchan, void *buf, int pos, int len)
 {
     struct dma_regs *r = &dma_controllers[nchan > 3].regs[nchan & 3];
-    target_phys_addr_t addr = ((r->pageh & 0x7f) << 24) | (r->page << 16) | r->now[ADDR];
+    Phys addr = ((r->pageh & 0x7f) << 24) | (r->page << 16) | r->now[ADDR];
 
     if (r->mode & 0x20) {
         int i;
@@ -433,7 +433,7 @@ int DMA_read_memory (int nchan, void *buf, int pos, int len)
 int DMA_write_memory (int nchan, void *buf, int pos, int len)
 {
     struct dma_regs *r = &dma_controllers[nchan > 3].regs[nchan & 3];
-    target_phys_addr_t addr = ((r->pageh & 0x7f) << 24) | (r->page << 16) | r->now[ADDR];
+    Phys addr = ((r->pageh & 0x7f) << 24) | (r->page << 16) | r->now[ADDR];
 
     if (r->mode & 0x20) {
         int i;
hw/dp8393x.c +9 -9
index 017d074..3813343 100644
@@ -168,7 +168,7 @@
     int loopback_packet;
 
     /* Memory access */
-    void (*memory_rw)(void *opaque, target_phys_addr_t addr, uint8_t *buf, int len, int is_write);
+    void (*memory_rw)(void *opaque, Phys addr, uint8_t *buf, int len, int is_write);
     void* mem_opaque;
 } dp8393xState;
 
@@ -603,7 +603,7 @@ static void dp8393x_watchdog(void *opaque)
     dp8393x_update_irq(s);
 }
 
-static uint32_t dp8393x_readw(void *opaque, target_phys_addr_t addr)
+static uint32_t dp8393x_readw(void *opaque, Phys addr)
 {
     dp8393xState *s = opaque;
     int reg;
@@ -616,13 +616,13 @@ static uint32_t dp8393x_readw(void *opaque, target_phys_addr_t addr)
     return read_register(s, reg);
 }
 
-static uint32_t dp8393x_readb(void *opaque, target_phys_addr_t addr)
+static uint32_t dp8393x_readb(void *opaque, Phys addr)
 {
     uint16_t v = dp8393x_readw(opaque, addr & ~0x1);
     return (v >> (8 * (addr & 0x1))) & 0xff;
 }
 
-static uint32_t dp8393x_readl(void *opaque, target_phys_addr_t addr)
+static uint32_t dp8393x_readl(void *opaque, Phys addr)
 {
     uint32_t v;
     v = dp8393x_readw(opaque, addr);
@@ -630,7 +630,7 @@ static uint32_t dp8393x_readl(void *opaque, target_phys_addr_t addr)
     return v;
 }
 
-static void dp8393x_writew(void *opaque, target_phys_addr_t addr, uint32_t val)
+static void dp8393x_writew(void *opaque, Phys addr, uint32_t val)
 {
     dp8393xState *s = opaque;
     int reg;
@@ -644,7 +644,7 @@ static void dp8393x_writew(void *opaque, target_phys_addr_t addr, uint32_t val)
     write_register(s, reg, (uint16_t)val);
 }
 
-static void dp8393x_writeb(void *opaque, target_phys_addr_t addr, uint32_t val)
+static void dp8393x_writeb(void *opaque, Phys addr, uint32_t val)
 {
     uint16_t old_val = dp8393x_readw(opaque, addr & ~0x1);
 
@@ -659,7 +659,7 @@ static void dp8393x_writeb(void *opaque, target_phys_addr_t addr, uint32_t val)
     dp8393x_writew(opaque, addr & ~0x1, val);
 }
 
-static void dp8393x_writel(void *opaque, target_phys_addr_t addr, uint32_t val)
+static void dp8393x_writel(void *opaque, Phys addr, uint32_t val)
 {
     dp8393x_writew(opaque, addr, val & 0xffff);
     dp8393x_writew(opaque, addr + 2, (val >> 16) & 0xffff);
@@ -879,10 +879,10 @@ static void nic_cleanup(VLANClientState *nc)
     .cleanup = nic_cleanup,
 };
 
-void dp83932_init(NICInfo *nd, target_phys_addr_t base, int it_shift,
+void dp83932_init(NICInfo *nd, Phys base, int it_shift,
                   MemoryRegion *address_space,
                   qemu_irq irq, void* mem_opaque,
-                  void (*memory_rw)(void *opaque, target_phys_addr_t addr, uint8_t *buf, int len, int is_write))
+                  void (*memory_rw)(void *opaque, Phys addr, uint8_t *buf, int len, int is_write))
 {
     dp8393xState *s;
 
hw/ds1225y.c +2 -2
index 7aa0832..b6c8dc7 100644
@@ -34,7 +34,7 @@
     uint8_t *contents;
 } NvRamState;
 
-static uint64_t nvram_read(void *opaque, target_phys_addr_t addr, unsigned size)
+static uint64_t nvram_read(void *opaque, Phys addr, unsigned size)
 {
     NvRamState *s = opaque;
     uint32_t val;
@@ -44,7 +44,7 @@ static uint64_t nvram_read(void *opaque, target_phys_addr_t addr, unsigned size)
     return val;
 }
 
-static void nvram_write(void *opaque, target_phys_addr_t addr, uint64_t val,
+static void nvram_write(void *opaque, Phys addr, uint64_t val,
                         unsigned size)
 {
     NvRamState *s = opaque;
hw/dummy_m68k.c +1 -1
index e3c5740..ca7ade5 100644
@@ -26,7 +26,7 @@ static void dummy_m68k_init(ram_addr_t ram_size,
     MemoryRegion *ram = g_new(MemoryRegion, 1);
     int kernel_size;
     uint64_t elf_entry;
-    target_phys_addr_t entry;
+    Phys entry;
 
     if (!cpu_model)
         cpu_model = "cfv4e";
hw/e1000.c +4 -4
index a29c944..b80e023 100644
@@ -901,7 +901,7 @@ static void (*macreg_writeops[])(E1000State *, int, uint32_t) = {
 enum { NWRITEOPS = ARRAY_SIZE(macreg_writeops) };
 
 static void
-e1000_mmio_write(void *opaque, target_phys_addr_t addr, uint64_t val,
+e1000_mmio_write(void *opaque, Phys addr, uint64_t val,
                  unsigned size)
 {
     E1000State *s = opaque;
@@ -918,7 +918,7 @@ static void (*macreg_writeops[])(E1000State *, int, uint32_t) = {
 }
 
 static uint64_t
-e1000_mmio_read(void *opaque, target_phys_addr_t addr, unsigned size)
+e1000_mmio_read(void *opaque, Phys addr, unsigned size)
 {
     E1000State *s = opaque;
     unsigned int index = (addr & 0x1ffff) >> 2;
@@ -941,7 +941,7 @@ static void (*macreg_writeops[])(E1000State *, int, uint32_t) = {
     },
 };
 
-static uint64_t e1000_io_read(void *opaque, target_phys_addr_t addr,
+static uint64_t e1000_io_read(void *opaque, Phys addr,
                               unsigned size)
 {
     E1000State *s = opaque;
@@ -950,7 +950,7 @@ static uint64_t e1000_io_read(void *opaque, target_phys_addr_t addr,
     return 0;
 }
 
-static void e1000_io_write(void *opaque, target_phys_addr_t addr,
+static void e1000_io_write(void *opaque, Phys addr,
                            uint64_t val, unsigned size)
 {
     E1000State *s = opaque;
hw/eccmemctl.c +4 -4
index 7743465..3215290 100644
@@ -129,7 +129,7 @@
     uint32_t version;
 } ECCState;
 
-static void ecc_mem_write(void *opaque, target_phys_addr_t addr, uint64_t val,
+static void ecc_mem_write(void *opaque, Phys addr, uint64_t val,
                           unsigned size)
 {
     ECCState *s = opaque;
@@ -172,7 +172,7 @@ static void ecc_mem_write(void *opaque, target_phys_addr_t addr, uint64_t val,
     }
 }
 
-static uint64_t ecc_mem_read(void *opaque, target_phys_addr_t addr,
+static uint64_t ecc_mem_read(void *opaque, Phys addr,
                              unsigned size)
 {
     ECCState *s = opaque;
@@ -229,7 +229,7 @@ static uint64_t ecc_mem_read(void *opaque, target_phys_addr_t addr,
     },
 };
 
-static void ecc_diag_mem_write(void *opaque, target_phys_addr_t addr,
+static void ecc_diag_mem_write(void *opaque, Phys addr,
                                uint64_t val, unsigned size)
 {
     ECCState *s = opaque;
@@ -238,7 +238,7 @@ static void ecc_diag_mem_write(void *opaque, target_phys_addr_t addr,
     s->diag[addr & ECC_DIAG_MASK] = val;
 }
 
-static uint64_t ecc_diag_mem_read(void *opaque, target_phys_addr_t addr,
+static uint64_t ecc_diag_mem_read(void *opaque, Phys addr,
                                   unsigned size)
 {
     ECCState *s = opaque;
hw/eepro100.c +2 -2
index 6a162f6..10b5ddc 100644
@@ -1569,7 +1569,7 @@ static void eepro100_write4(EEPRO100State * s, uint32_t addr, uint32_t val)
     }
 }
 
-static uint64_t eepro100_read(void *opaque, target_phys_addr_t addr,
+static uint64_t eepro100_read(void *opaque, Phys addr,
                               unsigned size)
 {
     EEPRO100State *s = opaque;
@@ -1582,7 +1582,7 @@ static uint64_t eepro100_read(void *opaque, target_phys_addr_t addr,
     }
 }
 
-static void eepro100_write(void *opaque, target_phys_addr_t addr,
+static void eepro100_write(void *opaque, Phys addr,
                            uint64_t data, unsigned size)
 {
     EEPRO100State *s = opaque;
hw/elf_ops.h +1 -1
index 6af357f..7d5852d 100644
@@ -74,7 +74,7 @@ static int glue(symfind, SZ)(const void *s0, const void *s1)
 }
 
 static const char *glue(lookup_symbol, SZ)(struct syminfo *s,
-                                           target_phys_addr_t orig_addr)
+                                           Phys orig_addr)
 {
     struct elf_sym *syms = glue(s->disas_symtab.elf, SZ);
     struct elf_sym key;
hw/empty_slot.c +3 -3
index 8b734f2..f22ae53 100644
@@ -28,14 +28,14 @@
     uint64_t size;
 } EmptySlot;
 
-static uint64_t empty_slot_read(void *opaque, target_phys_addr_t addr,
+static uint64_t empty_slot_read(void *opaque, Phys addr,
                                 unsigned size)
 {
     DPRINTF("read from " TARGET_FMT_plx "\n", addr);
     return 0;
 }
 
-static void empty_slot_write(void *opaque, target_phys_addr_t addr,
+static void empty_slot_write(void *opaque, Phys addr,
                              uint64_t val, unsigned size)
 {
     DPRINTF("write 0x%x to " TARGET_FMT_plx "\n", (unsigned)val, addr);
@@ -47,7 +47,7 @@ static void empty_slot_write(void *opaque, target_phys_addr_t addr,
     .endianness = DEVICE_NATIVE_ENDIAN,
 };
 
-void empty_slot_init(target_phys_addr_t addr, uint64_t slot_size)
+void empty_slot_init(Phys addr, uint64_t slot_size)
 {
     if (slot_size > 0) {
         /* Only empty slots larger than 0 byte need handling. */
hw/empty_slot.h +1 -1
index 78dc91d..da041db 100644
@@ -1,2 +1,2 @@
 /* empty_slot.c */
-void empty_slot_init(target_phys_addr_t addr, uint64_t slot_size);
+void empty_slot_init(Phys addr, uint64_t slot_size);
hw/escc.c +4 -4
index 81204a6..efc7a38 100644
@@ -463,7 +463,7 @@ static void escc_update_parameters(ChannelState *s)
     qemu_chr_fe_ioctl(s->chr, CHR_IOCTL_SERIAL_SET_PARAMS, &ssp);
 }
 
-static void escc_mem_write(void *opaque, target_phys_addr_t addr,
+static void escc_mem_write(void *opaque, Phys addr,
                            uint64_t val, unsigned size)
 {
     SerialState *serial = opaque;
@@ -565,7 +565,7 @@ static void escc_mem_write(void *opaque, target_phys_addr_t addr,
     }
 }
 
-static uint64_t escc_mem_read(void *opaque, target_phys_addr_t addr,
+static uint64_t escc_mem_read(void *opaque, Phys addr,
                               unsigned size)
 {
     SerialState *serial = opaque;
@@ -683,7 +683,7 @@ static void serial_event(void *opaque, int event)
     }
 };
 
-MemoryRegion *escc_init(target_phys_addr_t base, qemu_irq irqA, qemu_irq irqB,
+MemoryRegion *escc_init(Phys base, qemu_irq irqA, qemu_irq irqB,
               CharDriverState *chrA, CharDriverState *chrB,
               int clock, int it_shift)
 {
@@ -846,7 +846,7 @@ static void sunmouse_event(void *opaque,
     put_queue(s, 0);
 }
 
-void slavio_serial_ms_kbd_init(target_phys_addr_t base, qemu_irq irq,
+void slavio_serial_ms_kbd_init(Phys base, qemu_irq irq,
                                int disabled, int clock, int it_shift)
 {
     DeviceState *dev;
hw/escc.h +2 -2
index d1da46f..b74eb51 100644
@@ -1,8 +1,8 @@
 /* escc.c */
 #define ESCC_SIZE 4
-MemoryRegion *escc_init(target_phys_addr_t base, qemu_irq irqA, qemu_irq irqB,
+MemoryRegion *escc_init(Phys base, qemu_irq irqA, qemu_irq irqB,
               CharDriverState *chrA, CharDriverState *chrB,
               int clock, int it_shift);
 
-void slavio_serial_ms_kbd_init(target_phys_addr_t base, qemu_irq irq,
+void slavio_serial_ms_kbd_init(Phys base, qemu_irq irq,
                                int disabled, int clock, int it_shift);
hw/esp.c +4 -4
index 9551c78..175c6a6 100644
@@ -505,7 +505,7 @@ static void esp_gpio_demux(void *opaque, int irq, int level)
     }
 }
 
-static uint64_t esp_mem_read(void *opaque, target_phys_addr_t addr,
+static uint64_t esp_mem_read(void *opaque, Phys addr,
                              unsigned size)
 {
     ESPState *s = opaque;
@@ -547,7 +547,7 @@ static uint64_t esp_mem_read(void *opaque, target_phys_addr_t addr,
     return s->rregs[saddr];
 }
 
-static void esp_mem_write(void *opaque, target_phys_addr_t addr,
+static void esp_mem_write(void *opaque, Phys addr,
                           uint64_t val, unsigned size)
 {
     ESPState *s = opaque;
@@ -665,7 +665,7 @@ static void esp_mem_write(void *opaque, target_phys_addr_t addr,
     s->wregs[saddr] = val;
 }
 
-static bool esp_mem_accepts(void *opaque, target_phys_addr_t addr,
+static bool esp_mem_accepts(void *opaque, Phys addr,
                             unsigned size, bool is_write)
 {
     return (size == 1) || (is_write && size == 4);
@@ -700,7 +700,7 @@ static bool esp_mem_accepts(void *opaque, target_phys_addr_t addr,
     }
 };
 
-void esp_init(target_phys_addr_t espaddr, int it_shift,
+void esp_init(Phys espaddr, int it_shift,
               ESPDMAMemoryReadWriteFunc dma_memory_read,
               ESPDMAMemoryReadWriteFunc dma_memory_write,
               void *dma_opaque, qemu_irq irq, qemu_irq *reset,
hw/esp.h +1 -1
index 62bfd4d..285908d 100644
@@ -4,7 +4,7 @@
 /* esp.c */
 #define ESP_MAX_DEVS 7
 typedef void (*ESPDMAMemoryReadWriteFunc)(void *opaque, uint8_t *buf, int len);
-void esp_init(target_phys_addr_t espaddr, int it_shift,
+void esp_init(Phys espaddr, int it_shift,
               ESPDMAMemoryReadWriteFunc dma_memory_read,
               ESPDMAMemoryReadWriteFunc dma_memory_write,
               void *dma_opaque, qemu_irq irq, qemu_irq *reset,
hw/etraxfs.h +1 -1
index 24e8fd8..7aa5f1d 100644
@@ -29,7 +29,7 @@ qemu_irq *cris_pic_init_cpu(CPUState *env);
 
 /* Instantiate an ETRAXFS Ethernet MAC.  */
 static inline DeviceState *
-etraxfs_eth_init(NICInfo *nd, target_phys_addr_t base, int phyaddr,
+etraxfs_eth_init(NICInfo *nd, Phys base, int phyaddr,
                  void *dma_out, void *dma_in)
 {
     DeviceState *dev;
hw/etraxfs_dma.c +11 -11
index d2bd584..06b4329 100644
@@ -212,7 +212,7 @@ static inline int channel_en(struct fs_dma_ctrl *ctrl, int c)
 		&& ctrl->channels[c].client;
 }
 
-static inline int fs_channel(target_phys_addr_t addr)
+static inline int fs_channel(Phys addr)
 {
 	/* Every channel has a 0x2000 ctrl register map.  */
 	return addr >> 13;
@@ -221,7 +221,7 @@ static inline int fs_channel(target_phys_addr_t addr)
 #ifdef USE_THIS_DEAD_CODE
 static void channel_load_g(struct fs_dma_ctrl *ctrl, int c)
 {
-	target_phys_addr_t addr = channel_reg(ctrl, c, RW_GROUP);
+	Phys addr = channel_reg(ctrl, c, RW_GROUP);
 
 	/* Load and decode. FIXME: handle endianness.  */
 	cpu_physical_memory_read (addr, 
@@ -253,7 +253,7 @@ static void dump_d(int ch, struct dma_descr_data *d)
 
 static void channel_load_c(struct fs_dma_ctrl *ctrl, int c)
 {
-	target_phys_addr_t addr = channel_reg(ctrl, c, RW_GROUP_DOWN);
+	Phys addr = channel_reg(ctrl, c, RW_GROUP_DOWN);
 
 	/* Load and decode. FIXME: handle endianness.  */
 	cpu_physical_memory_read (addr, 
@@ -270,7 +270,7 @@ static void channel_load_c(struct fs_dma_ctrl *ctrl, int c)
 
 static void channel_load_d(struct fs_dma_ctrl *ctrl, int c)
 {
-	target_phys_addr_t addr = channel_reg(ctrl, c, RW_SAVED_DATA);
+	Phys addr = channel_reg(ctrl, c, RW_SAVED_DATA);
 
 	/* Load and decode. FIXME: handle endianness.  */
 	D(printf("%s ch=%d addr=" TARGET_FMT_plx "\n", __func__, c, addr));
@@ -284,7 +284,7 @@ static void channel_load_d(struct fs_dma_ctrl *ctrl, int c)
 
 static void channel_store_c(struct fs_dma_ctrl *ctrl, int c)
 {
-	target_phys_addr_t addr = channel_reg(ctrl, c, RW_GROUP_DOWN);
+	Phys addr = channel_reg(ctrl, c, RW_GROUP_DOWN);
 
 	/* Encode and store. FIXME: handle endianness.  */
 	D(printf("%s ch=%d addr=" TARGET_FMT_plx "\n", __func__, c, addr));
@@ -296,7 +296,7 @@ static void channel_store_c(struct fs_dma_ctrl *ctrl, int c)
 
 static void channel_store_d(struct fs_dma_ctrl *ctrl, int c)
 {
-	target_phys_addr_t addr = channel_reg(ctrl, c, RW_SAVED_DATA);
+	Phys addr = channel_reg(ctrl, c, RW_SAVED_DATA);
 
 	/* Encode and store. FIXME: handle endianness.  */
 	D(printf("%s ch=%d addr=" TARGET_FMT_plx "\n", __func__, c, addr));
@@ -557,14 +557,14 @@ static inline int channel_in_run(struct fs_dma_ctrl *ctrl, int c)
 		return 0;
 }
 
-static uint32_t dma_rinvalid (void *opaque, target_phys_addr_t addr)
+static uint32_t dma_rinvalid (void *opaque, Phys addr)
 {
         hw_error("Unsupported short raccess. reg=" TARGET_FMT_plx "\n", addr);
         return 0;
 }
 
 static uint64_t
-dma_read(void *opaque, target_phys_addr_t addr, unsigned int size)
+dma_read(void *opaque, Phys addr, unsigned int size)
 {
         struct fs_dma_ctrl *ctrl = opaque;
 	int c;
@@ -596,7 +596,7 @@ static uint32_t dma_rinvalid (void *opaque, target_phys_addr_t addr)
 }
 
 static void
-dma_winvalid (void *opaque, target_phys_addr_t addr, uint32_t value)
+dma_winvalid (void *opaque, Phys addr, uint32_t value)
 {
         hw_error("Unsupported short waccess. reg=" TARGET_FMT_plx "\n", addr);
 }
@@ -611,7 +611,7 @@ static uint32_t dma_rinvalid (void *opaque, target_phys_addr_t addr)
 }
 
 static void
-dma_write(void *opaque, target_phys_addr_t addr,
+dma_write(void *opaque, Phys addr,
 	  uint64_t val64, unsigned int size)
 {
         struct fs_dma_ctrl *ctrl = opaque;
@@ -746,7 +746,7 @@ static void DMA_run(void *opaque)
         qemu_bh_schedule_idle(etraxfs_dmac->bh);
 }
 
-void *etraxfs_dmac_init(target_phys_addr_t base, int nr_channels)
+void *etraxfs_dmac_init(Phys base, int nr_channels)
 {
 	struct fs_dma_ctrl *ctrl = NULL;
 
hw/etraxfs_dma.h +1 -1
index 96408ab..0693241 100644
@@ -13,7 +13,7 @@ struct etraxfs_dma_client
 	} client;
 };
 
-void *etraxfs_dmac_init(target_phys_addr_t base, int nr_channels);
+void *etraxfs_dmac_init(Phys base, int nr_channels);
 void etraxfs_dmac_connect(void *opaque, int channel, qemu_irq *line,
 			  int input);
 void etraxfs_dmac_connect_client(void *opaque, int c, 
hw/etraxfs_eth.c +2 -2
index b525258..ef35cdd 100644
@@ -374,7 +374,7 @@ static void eth_validate_duplex(struct fs_eth *eth)
 }
 
 static uint64_t
-eth_read(void *opaque, target_phys_addr_t addr, unsigned int size)
+eth_read(void *opaque, Phys addr, unsigned int size)
 {
 	struct fs_eth *eth = opaque;
 	uint32_t r = 0;
@@ -418,7 +418,7 @@ static void eth_update_ma(struct fs_eth *eth, int ma)
 }
 
 static void
-eth_write(void *opaque, target_phys_addr_t addr,
+eth_write(void *opaque, Phys addr,
           uint64_t val64, unsigned int size)
 {
 	struct fs_eth *eth = opaque;
hw/etraxfs_pic.c +2 -2
index 993d6a8..90ce6db 100644
@@ -79,7 +79,7 @@ static void pic_update(struct etrax_pic *fs)
 }
 
 static uint64_t
-pic_read(void *opaque, target_phys_addr_t addr, unsigned int size)
+pic_read(void *opaque, Phys addr, unsigned int size)
 {
     struct etrax_pic *fs = opaque;
     uint32_t rval;
@@ -89,7 +89,7 @@ static void pic_update(struct etrax_pic *fs)
     return rval;
 }
 
-static void pic_write(void *opaque, target_phys_addr_t addr,
+static void pic_write(void *opaque, Phys addr,
                       uint64_t value, unsigned int size)
 {
     struct etrax_pic *fs = opaque;
hw/etraxfs_ser.c +2 -2
index 2623dab..fd87b99 100644
@@ -75,7 +75,7 @@ static void ser_update_irq(struct etrax_serial *s)
 }
 
 static uint64_t
-ser_read(void *opaque, target_phys_addr_t addr, unsigned int size)
+ser_read(void *opaque, Phys addr, unsigned int size)
 {
     struct etrax_serial *s = opaque;
     D(CPUState *env = s->env);
@@ -110,7 +110,7 @@ static void ser_update_irq(struct etrax_serial *s)
 }
 
 static void
-ser_write(void *opaque, target_phys_addr_t addr,
+ser_write(void *opaque, Phys addr,
           uint64_t val64, unsigned int size)
 {
     struct etrax_serial *s = opaque;
hw/etraxfs_timer.c +2 -2
index 319cee1..bb7833b 100644
@@ -74,7 +74,7 @@ struct etrax_timer {
 };
 
 static uint64_t
-timer_read(void *opaque, target_phys_addr_t addr, unsigned int size)
+timer_read(void *opaque, Phys addr, unsigned int size)
 {
     struct etrax_timer *t = opaque;
     uint32_t r = 0;
@@ -241,7 +241,7 @@ static inline void timer_watchdog_update(struct etrax_timer *t, uint32_t value)
 }
 
 static void
-timer_write(void *opaque, target_phys_addr_t addr,
+timer_write(void *opaque, Phys addr,
             uint64_t val64, unsigned int size)
 {
     struct etrax_timer *t = opaque;
hw/fdc.c +4 -4
index 70aa5c7..1adce37 100644
@@ -492,13 +492,13 @@ static void fdctrl_write (void *opaque, uint32_t reg, uint32_t value)
     }
 }
 
-static uint64_t fdctrl_read_mem (void *opaque, target_phys_addr_t reg,
+static uint64_t fdctrl_read_mem (void *opaque, Phys reg,
                                  unsigned ize)
 {
     return fdctrl_read(opaque, (uint32_t)reg);
 }
 
-static void fdctrl_write_mem (void *opaque, target_phys_addr_t reg,
+static void fdctrl_write_mem (void *opaque, Phys reg,
                               uint64_t value, unsigned size)
 {
     fdctrl_write(opaque, (uint32_t)reg, value);
@@ -1805,7 +1805,7 @@ static int fdctrl_connect_drives(FDCtrl *fdctrl)
 }
 
 void fdctrl_init_sysbus(qemu_irq irq, int dma_chann,
-                        target_phys_addr_t mmio_base, DriveInfo **fds)
+                        Phys mmio_base, DriveInfo **fds)
 {
     FDCtrl *fdctrl;
     DeviceState *dev;
@@ -1826,7 +1826,7 @@ void fdctrl_init_sysbus(qemu_irq irq, int dma_chann,
     sysbus_mmio_map(&sys->busdev, 0, mmio_base);
 }
 
-void sun4m_fdctrl_init(qemu_irq irq, target_phys_addr_t io_base,
+void sun4m_fdctrl_init(qemu_irq irq, Phys io_base,
                        DriveInfo **fds, qemu_irq *fdc_tc)
 {
     DeviceState *dev;
hw/fdc.h +2 -2
index 55a8d73..fdbc823 100644
@@ -28,8 +28,8 @@ static inline ISADevice *fdctrl_init_isa(ISABus *bus, DriveInfo **fds)
 }
 
 void fdctrl_init_sysbus(qemu_irq irq, int dma_chann,
-                        target_phys_addr_t mmio_base, DriveInfo **fds);
-void sun4m_fdctrl_init(qemu_irq irq, target_phys_addr_t io_base,
+                        Phys mmio_base, DriveInfo **fds);
+void sun4m_fdctrl_init(qemu_irq irq, Phys io_base,
                        DriveInfo **fds, qemu_irq *fdc_tc);
 void fdc_get_bs(BlockDriverState *bs[], ISADevice *dev);
 
hw/flash.h +4 -4
index 9c9e526..8047333 100644
@@ -5,18 +5,18 @@
 typedef struct pflash_t pflash_t;
 
 /* pflash_cfi01.c */
-pflash_t *pflash_cfi01_register(target_phys_addr_t base,
+pflash_t *pflash_cfi01_register(Phys base,
                                 DeviceState *qdev, const char *name,
-                                target_phys_addr_t size,
+                                Phys size,
                                 BlockDriverState *bs,
                                 uint32_t sector_len, int nb_blocs, int width,
                                 uint16_t id0, uint16_t id1,
                                 uint16_t id2, uint16_t id3, int be);
 
 /* pflash_cfi02.c */
-pflash_t *pflash_cfi02_register(target_phys_addr_t base,
+pflash_t *pflash_cfi02_register(Phys base,
                                 DeviceState *qdev, const char *name,
-                                target_phys_addr_t size,
+                                Phys size,
                                 BlockDriverState *bs, uint32_t sector_len,
                                 int nb_blocs, int nb_mappings, int width,
                                 uint16_t id0, uint16_t id1,
hw/framebuffer.c +3 -3
index b43bcdf..b125ffa 100644
@@ -23,7 +23,7 @@
 void framebuffer_update_display(
     DisplayState *ds,
     MemoryRegion *address_space,
-    target_phys_addr_t base,
+    Phys base,
     int cols, /* Width in pixels.  */
     int rows, /* Leight in pixels.  */
     int src_width, /* Length of source line, in bytes.  */
@@ -35,7 +35,7 @@ void framebuffer_update_display(
     int *first_row, /* Input and output.  */
     int *last_row /* Output only */)
 {
-    target_phys_addr_t src_len;
+    Phys src_len;
     uint8_t *dest;
     uint8_t *src;
     uint8_t *src_base;
@@ -84,7 +84,7 @@ void framebuffer_update_display(
     dest += i * dest_row_pitch;
 
     for (; i < rows; i++) {
-        target_phys_addr_t dirty_offset;
+        Phys dirty_offset;
         dirty = 0;
         dirty_offset = 0;
         while (addr + dirty_offset < TARGET_PAGE_ALIGN(addr + src_width)) {
hw/framebuffer.h +1 -1
index 527a6b8..0cade6d 100644
@@ -10,7 +10,7 @@ typedef void (*drawfn)(void *, uint8_t *, const uint8_t *, int, int);
 void framebuffer_update_display(
     DisplayState *ds,
     MemoryRegion *address_space,
-    target_phys_addr_t base,
+    Phys base,
     int cols,
     int rows,
     int src_width,
hw/fw_cfg.c +8 -8
index f953532..77873fb 100644
@@ -234,37 +234,37 @@ static uint8_t fw_cfg_read(FWCfgState *s)
     return ret;
 }
 
-static uint64_t fw_cfg_data_mem_read(void *opaque, target_phys_addr_t addr,
+static uint64_t fw_cfg_data_mem_read(void *opaque, Phys addr,
                                      unsigned size)
 {
     return fw_cfg_read(opaque);
 }
 
-static void fw_cfg_data_mem_write(void *opaque, target_phys_addr_t addr,
+static void fw_cfg_data_mem_write(void *opaque, Phys addr,
                                   uint64_t value, unsigned size)
 {
     fw_cfg_write(opaque, (uint8_t)value);
 }
 
-static void fw_cfg_ctl_mem_write(void *opaque, target_phys_addr_t addr,
+static void fw_cfg_ctl_mem_write(void *opaque, Phys addr,
                                  uint64_t value, unsigned size)
 {
     fw_cfg_select(opaque, (uint16_t)value);
 }
 
-static bool fw_cfg_ctl_mem_valid(void *opaque, target_phys_addr_t addr,
+static bool fw_cfg_ctl_mem_valid(void *opaque, Phys addr,
                                  unsigned size, bool is_write)
 {
     return is_write && size == 2;
 }
 
-static uint64_t fw_cfg_comb_read(void *opaque, target_phys_addr_t addr,
+static uint64_t fw_cfg_comb_read(void *opaque, Phys addr,
                                  unsigned size)
 {
     return fw_cfg_read(opaque);
 }
 
-static void fw_cfg_comb_write(void *opaque, target_phys_addr_t addr,
+static void fw_cfg_comb_write(void *opaque, Phys addr,
                               uint64_t value, unsigned size)
 {
     switch (size) {
@@ -277,7 +277,7 @@ static void fw_cfg_comb_write(void *opaque, target_phys_addr_t addr,
     }
 }
 
-static bool fw_cfg_comb_valid(void *opaque, target_phys_addr_t addr,
+static bool fw_cfg_comb_valid(void *opaque, Phys addr,
                                   unsigned size, bool is_write)
 {
     return (size == 1) || (is_write && size == 2);
@@ -470,7 +470,7 @@ static void fw_cfg_machine_ready(struct Notifier *n, void *data)
 }
 
 FWCfgState *fw_cfg_init(uint32_t ctl_port, uint32_t data_port,
-                        target_phys_addr_t ctl_addr, target_phys_addr_t data_addr)
+                        Phys ctl_addr, Phys data_addr)
 {
     DeviceState *dev;
     SysBusDevice *d;
hw/fw_cfg.h +1 -1
index 856bf91..b2d7435 100644
@@ -63,7 +63,7 @@ int fw_cfg_add_callback(FWCfgState *s, uint16_t key, FWCfgCallback callback,
 int fw_cfg_add_file(FWCfgState *s, const char *filename, uint8_t *data,
                     uint32_t len);
 FWCfgState *fw_cfg_init(uint32_t ctl_port, uint32_t data_port,
-                        target_phys_addr_t crl_addr, target_phys_addr_t data_addr);
+                        Phys crl_addr, Phys data_addr);
 
 #endif /* NO_QEMU_PROTOS */
 
hw/g364fb.c +2 -2
index 33ec149..013dd7e 100644
@@ -335,7 +335,7 @@ static void g364fb_screen_dump(void *opaque, const char *filename)
 
 /* called for accesses to io ports */
 static uint64_t g364fb_ctrl_read(void *opaque,
-                                 target_phys_addr_t addr,
+                                 Phys addr,
                                  unsigned int size)
 {
     G364State *s = opaque;
@@ -399,7 +399,7 @@ static void g364_invalidate_cursor_position(G364State *s)
 }
 
 static void g364fb_ctrl_write(void *opaque,
-                              target_phys_addr_t addr,
+                              Phys addr,
                               uint64_t val,
                               unsigned int size)
 {
hw/grlib.h +3 -3
index fdf4b11..4ff417c 100644
@@ -41,7 +41,7 @@ void grlib_irqmp_set_irq(void *opaque, int irq, int level);
 void grlib_irqmp_ack(DeviceState *dev, int intno);
 
 static inline
-DeviceState *grlib_irqmp_create(target_phys_addr_t   base,
+DeviceState *grlib_irqmp_create(Phys   base,
                                 CPUState            *env,
                                 qemu_irq           **cpu_irqs,
                                 uint32_t             nr_irqs,
@@ -73,7 +73,7 @@ DeviceState *grlib_irqmp_create(target_phys_addr_t   base,
 /* GPTimer */
 
 static inline
-DeviceState *grlib_gptimer_create(target_phys_addr_t  base,
+DeviceState *grlib_gptimer_create(Phys  base,
                                   uint32_t            nr_timers,
                                   uint32_t            freq,
                                   qemu_irq           *cpu_irqs,
@@ -103,7 +103,7 @@ DeviceState *grlib_gptimer_create(target_phys_addr_t  base,
 /* APB UART */
 
 static inline
-DeviceState *grlib_apbuart_create(target_phys_addr_t  base,
+DeviceState *grlib_apbuart_create(Phys  base,
                                   CharDriverState    *serial,
                                   qemu_irq            irq)
 {
hw/grlib_apbuart.c +2 -2
index 62bdb03..e8d6aa2 100644
@@ -103,7 +103,7 @@ static void grlib_apbuart_event(void *opaque, int event)
 }
 
 static void
-grlib_apbuart_write(void *opaque, target_phys_addr_t addr,
+grlib_apbuart_write(void *opaque, Phys addr,
                     uint64_t value, unsigned size)
 {
     UART          *uart = opaque;
@@ -137,7 +137,7 @@ static void grlib_apbuart_event(void *opaque, int event)
     trace_grlib_apbuart_writel_unknown(addr, value);
 }
 
-static bool grlib_apbuart_accepts(void *opaque, target_phys_addr_t addr,
+static bool grlib_apbuart_accepts(void *opaque, Phys addr,
                                   unsigned size, bool is_write)
 {
     return is_write && size == 4;
hw/grlib_gptimer.c +4 -4
index 5645054..2c308aa 100644
@@ -154,11 +154,11 @@ static void grlib_gptimer_hit(void *opaque)
     }
 }
 
-static uint64_t grlib_gptimer_read(void *opaque, target_phys_addr_t addr,
+static uint64_t grlib_gptimer_read(void *opaque, Phys addr,
                                    unsigned size)
 {
     GPTimerUnit        *unit  = opaque;
-    target_phys_addr_t  timer_addr;
+    Phys  timer_addr;
     int                 id;
     uint32_t            value = 0;
 
@@ -213,11 +213,11 @@ static uint64_t grlib_gptimer_read(void *opaque, target_phys_addr_t addr,
     return 0;
 }
 
-static void grlib_gptimer_write(void *opaque, target_phys_addr_t addr,
+static void grlib_gptimer_write(void *opaque, Phys addr,
                                 uint64_t value, unsigned size)
 {
     GPTimerUnit        *unit = opaque;
-    target_phys_addr_t  timer_addr;
+    Phys  timer_addr;
     int                 id;
 
     addr &= 0xff;
hw/grlib_irqmp.c +2 -2
index 2872556..db16b46 100644
@@ -162,7 +162,7 @@ void grlib_irqmp_set_irq(void *opaque, int irq, int level)
     }
 }
 
-static uint64_t grlib_irqmp_read(void *opaque, target_phys_addr_t addr,
+static uint64_t grlib_irqmp_read(void *opaque, Phys addr,
                                  unsigned size)
 {
     IRQMP      *irqmp = opaque;
@@ -226,7 +226,7 @@ static uint64_t grlib_irqmp_read(void *opaque, target_phys_addr_t addr,
     return 0;
 }
 
-static void grlib_irqmp_write(void *opaque, target_phys_addr_t addr,
+static void grlib_irqmp_write(void *opaque, Phys addr,
                               uint64_t value, unsigned size)
 {
     IRQMP      *irqmp = opaque;
hw/gt64xxx.c +10 -10
index 432683a..c96165b 100644
@@ -225,8 +225,8 @@
 #define GT_PCI1_SERR1MASK    	(0xca8 >> 2)
 
 #define PCI_MAPPING_ENTRY(regname)            \
-    target_phys_addr_t regname ##_start;      \
-    target_phys_addr_t regname ##_length;     \
+    Phys regname ##_start;      \
+    Phys regname ##_length;     \
     MemoryRegion regname ##_mem
 
 typedef struct GT64120State {
@@ -240,11 +240,11 @@
 /* Adjust range to avoid touching space which isn't mappable via PCI */
 /* XXX: Hardcoded values for Malta: 0x1e000000 - 0x1f100000
                                     0x1fc00000 - 0x1fd00000  */
-static void check_reserved_space (target_phys_addr_t *start,
-                                  target_phys_addr_t *length)
+static void check_reserved_space (Phys *start,
+                                  Phys *length)
 {
-    target_phys_addr_t begin = *start;
-    target_phys_addr_t end = *start + *length;
+    Phys begin = *start;
+    Phys end = *start + *length;
 
     if (end >= 0x1e000000LL && end < 0x1f100000LL)
         end = 0x1e000000LL;
@@ -266,8 +266,8 @@ static void check_reserved_space (target_phys_addr_t *start,
 
 static void gt64120_isd_mapping(GT64120State *s)
 {
-    target_phys_addr_t start = s->regs[GT_ISD] << 21;
-    target_phys_addr_t length = 0x1000;
+    Phys start = s->regs[GT_ISD] << 21;
+    Phys length = 0x1000;
 
     if (s->ISD_length) {
         memory_region_del_subregion(get_system_memory(), &s->ISD_mem);
@@ -306,7 +306,7 @@ static void gt64120_pci_mapping(GT64120State *s)
     }
 }
 
-static void gt64120_writel (void *opaque, target_phys_addr_t addr,
+static void gt64120_writel (void *opaque, Phys addr,
                             uint64_t val, unsigned size)
 {
     GT64120State *s = opaque;
@@ -586,7 +586,7 @@ static void gt64120_writel (void *opaque, target_phys_addr_t addr,
 }
 
 static uint64_t gt64120_readl (void *opaque,
-                               target_phys_addr_t addr, unsigned size)
+                               Phys addr, unsigned size)
 {
     GT64120State *s = opaque;
     uint32_t val;
hw/heathrow_pic.c +2 -2
index 16f48d1..ecdd0bf 100644
@@ -63,7 +63,7 @@ static void heathrow_pic_update(HeathrowPICS *s)
     }
 }
 
-static void pic_write(void *opaque, target_phys_addr_t addr,
+static void pic_write(void *opaque, Phys addr,
                       uint64_t value, unsigned size)
 {
     HeathrowPICS *s = opaque;
@@ -91,7 +91,7 @@ static void pic_write(void *opaque, target_phys_addr_t addr,
     }
 }
 
-static uint64_t pic_read(void *opaque, target_phys_addr_t addr,
+static uint64_t pic_read(void *opaque, Phys addr,
                          unsigned size)
 {
     HeathrowPICS *s = opaque;
hw/hpet.c +4 -4
index 5312df7..4a0976b 100644
@@ -342,20 +342,20 @@ static void hpet_del_timer(HPETTimer *t)
 }
 
 #ifdef HPET_DEBUG
-static uint32_t hpet_ram_readb(void *opaque, target_phys_addr_t addr)
+static uint32_t hpet_ram_readb(void *opaque, Phys addr)
 {
     printf("qemu: hpet_read b at %" PRIx64 "\n", addr);
     return 0;
 }
 
-static uint32_t hpet_ram_readw(void *opaque, target_phys_addr_t addr)
+static uint32_t hpet_ram_readw(void *opaque, Phys addr)
 {
     printf("qemu: hpet_read w at %" PRIx64 "\n", addr);
     return 0;
 }
 #endif
 
-static uint64_t hpet_ram_read(void *opaque, target_phys_addr_t addr,
+static uint64_t hpet_ram_read(void *opaque, Phys addr,
                               unsigned size)
 {
     HPETState *s = opaque;
@@ -427,7 +427,7 @@ static uint64_t hpet_ram_read(void *opaque, target_phys_addr_t addr,
     return 0;
 }
 
-static void hpet_ram_write(void *opaque, target_phys_addr_t addr,
+static void hpet_ram_write(void *opaque, Phys addr,
                            uint64_t value, unsigned size)
 {
     int i;
hw/i8259.c +4 -4
index 7331e0e..b3890cd 100644
@@ -275,7 +275,7 @@ static void pic_reset(DeviceState *dev)
     s->elcr = 0;
 }
 
-static void pic_ioport_write(void *opaque, target_phys_addr_t addr64,
+static void pic_ioport_write(void *opaque, Phys addr64,
                              uint64_t val64, unsigned size)
 {
     PicState *s = opaque;
@@ -369,7 +369,7 @@ static void pic_ioport_write(void *opaque, target_phys_addr_t addr64,
     }
 }
 
-static uint64_t pic_ioport_read(void *opaque, target_phys_addr_t addr,
+static uint64_t pic_ioport_read(void *opaque, Phys addr,
                                 unsigned size)
 {
     PicState *s = opaque;
@@ -404,14 +404,14 @@ int pic_get_output(PicState *s)
     return (pic_get_irq(s) >= 0);
 }
 
-static void elcr_ioport_write(void *opaque, target_phys_addr_t addr,
+static void elcr_ioport_write(void *opaque, Phys addr,
                               uint64_t val, unsigned size)
 {
     PicState *s = opaque;
     s->elcr = val & s->elcr_mask;
 }
 
-static uint64_t elcr_ioport_read(void *opaque, target_phys_addr_t addr,
+static uint64_t elcr_ioport_read(void *opaque, Phys addr,
                                  unsigned size)
 {
     PicState *s = opaque;
hw/ide.h +1 -1
index 0b18c90..6e58ad2 100644
@@ -24,7 +24,7 @@ MemoryRegion *pmac_ide_init (DriveInfo **hd_table, qemu_irq irq,
 		   void *dbdma, int channel, qemu_irq dma_irq);
 
 /* ide-mmio.c */
-void mmio_ide_init (target_phys_addr_t membase, target_phys_addr_t membase2,
+void mmio_ide_init (Phys membase, Phys membase2,
                     MemoryRegion *address_space,
                     qemu_irq irq, int shift,
                     DriveInfo *hd0, DriveInfo *hd1);
hw/ide/ahci.c +9 -9
index 0af201d..64c07ca 100644
@@ -172,7 +172,7 @@ static void ahci_trigger_irq(AHCIState *s, AHCIDevice *d,
 
 static void map_page(uint8_t **ptr, uint64_t addr, uint32_t wanted)
 {
-    target_phys_addr_t len = wanted;
+    Phys len = wanted;
 
     if (*ptr) {
         cpu_physical_memory_unmap(*ptr, len, 1, len);
@@ -276,7 +276,7 @@ static void  ahci_port_write(AHCIState *s, int port, int offset, uint32_t val)
     }
 }
 
-static uint64_t ahci_mem_read(void *opaque, target_phys_addr_t addr,
+static uint64_t ahci_mem_read(void *opaque, Phys addr,
                               unsigned size)
 {
     AHCIState *s = opaque;
@@ -314,7 +314,7 @@ static uint64_t ahci_mem_read(void *opaque, target_phys_addr_t addr,
 
 
 
-static void ahci_mem_write(void *opaque, target_phys_addr_t addr,
+static void ahci_mem_write(void *opaque, Phys addr,
                            uint64_t val, unsigned size)
 {
     AHCIState *s = opaque;
@@ -370,7 +370,7 @@ static void ahci_mem_write(void *opaque, target_phys_addr_t addr,
     .endianness = DEVICE_LITTLE_ENDIAN,
 };
 
-static uint64_t ahci_idp_read(void *opaque, target_phys_addr_t addr,
+static uint64_t ahci_idp_read(void *opaque, Phys addr,
                               unsigned size)
 {
     AHCIState *s = opaque;
@@ -386,7 +386,7 @@ static uint64_t ahci_idp_read(void *opaque, target_phys_addr_t addr,
     }
 }
 
-static void ahci_idp_write(void *opaque, target_phys_addr_t addr,
+static void ahci_idp_write(void *opaque, Phys addr,
                            uint64_t val, unsigned size)
 {
     AHCIState *s = opaque;
@@ -629,7 +629,7 @@ static void ahci_write_fis_d2h(AHCIDevice *ad, uint8_t *cmd_fis)
     AHCIPortRegs *pr = &ad->port_regs;
     uint8_t *d2h_fis;
     int i;
-    target_phys_addr_t cmd_len = 0x80;
+    Phys cmd_len = 0x80;
     int cmd_mapped = 0;
 
     if (!ad->res_fis || !(pr->cmd & PORT_CMD_FIS_RX)) {
@@ -681,8 +681,8 @@ static int ahci_populate_sglist(AHCIDevice *ad, QEMUSGList *sglist)
     uint32_t opts = le32_to_cpu(cmd->opts);
     uint64_t prdt_addr = le64_to_cpu(cmd->tbl_addr) + 0x80;
     int sglist_alloc_hint = opts >> AHCI_CMD_HDR_PRDT_LEN;
-    target_phys_addr_t prdt_len = (sglist_alloc_hint * sizeof(AHCI_SG));
-    target_phys_addr_t real_prdt_len = prdt_len;
+    Phys prdt_len = (sglist_alloc_hint * sizeof(AHCI_SG));
+    Phys real_prdt_len = prdt_len;
     uint8_t *prdt;
     int i;
     int r = 0;
@@ -829,7 +829,7 @@ static int handle_cmd(AHCIState *s, int port, int slot)
     uint64_t tbl_addr;
     AHCICmdHdr *cmd;
     uint8_t *cmd_fis;
-    target_phys_addr_t cmd_len;
+    Phys cmd_len;
 
     if (s->dev[port].port.ifs[0].status & (BUSY_STAT|DRQ_STAT)) {
         /* Engine currently busy, try again later */
hw/ide/cmd646.c +6 -6
index 5fe98b1..996e1e9 100644
@@ -43,7 +43,7 @@
 
 static void cmd646_update_irq(PCIIDEState *d);
 
-static uint64_t cmd646_cmd_read(void *opaque, target_phys_addr_t addr,
+static uint64_t cmd646_cmd_read(void *opaque, Phys addr,
                                 unsigned size)
 {
     CMD646BAR *cmd646bar = opaque;
@@ -54,7 +54,7 @@ static uint64_t cmd646_cmd_read(void *opaque, target_phys_addr_t addr,
     return ide_status_read(cmd646bar->bus, addr + 2);
 }
 
-static void cmd646_cmd_write(void *opaque, target_phys_addr_t addr,
+static void cmd646_cmd_write(void *opaque, Phys addr,
                              uint64_t data, unsigned size)
 {
     CMD646BAR *cmd646bar = opaque;
@@ -71,7 +71,7 @@ static void cmd646_cmd_write(void *opaque, target_phys_addr_t addr,
     .endianness = DEVICE_LITTLE_ENDIAN,
 };
 
-static uint64_t cmd646_data_read(void *opaque, target_phys_addr_t addr,
+static uint64_t cmd646_data_read(void *opaque, Phys addr,
                                  unsigned size)
 {
     CMD646BAR *cmd646bar = opaque;
@@ -88,7 +88,7 @@ static uint64_t cmd646_data_read(void *opaque, target_phys_addr_t addr,
     return ((uint64_t)1 << (size * 8)) - 1;
 }
 
-static void cmd646_data_write(void *opaque, target_phys_addr_t addr,
+static void cmd646_data_write(void *opaque, Phys addr,
                              uint64_t data, unsigned size)
 {
     CMD646BAR *cmd646bar = opaque;
@@ -121,7 +121,7 @@ static void setup_cmd646_bar(PCIIDEState *d, int bus_num)
     memory_region_init_io(&bar->data, &cmd646_data_ops, bar, "cmd646-data", 8);
 }
 
-static uint64_t bmdma_read(void *opaque, target_phys_addr_t addr,
+static uint64_t bmdma_read(void *opaque, Phys addr,
                            unsigned size)
 {
     BMDMAState *bm = opaque;
@@ -159,7 +159,7 @@ static uint64_t bmdma_read(void *opaque, target_phys_addr_t addr,
     return val;
 }
 
-static void bmdma_write(void *opaque, target_phys_addr_t addr,
+static void bmdma_write(void *opaque, Phys addr,
                         uint64_t val, unsigned size)
 {
     BMDMAState *bm = opaque;
hw/ide/macio.c +6 -6
index abbc41b..d8c9bdf 100644
@@ -198,7 +198,7 @@ static void pmac_ide_flush(DBDMA_io *io)
 
 /* PowerMac IDE memory IO */
 static void pmac_ide_writeb (void *opaque,
-                             target_phys_addr_t addr, uint32_t val)
+                             Phys addr, uint32_t val)
 {
     MACIOIDEState *d = opaque;
 
@@ -216,7 +216,7 @@ static void pmac_ide_writeb (void *opaque,
     }
 }
 
-static uint32_t pmac_ide_readb (void *opaque,target_phys_addr_t addr)
+static uint32_t pmac_ide_readb (void *opaque,Phys addr)
 {
     uint8_t retval;
     MACIOIDEState *d = opaque;
@@ -238,7 +238,7 @@ static uint32_t pmac_ide_readb (void *opaque,target_phys_addr_t addr)
 }
 
 static void pmac_ide_writew (void *opaque,
-                             target_phys_addr_t addr, uint32_t val)
+                             Phys addr, uint32_t val)
 {
     MACIOIDEState *d = opaque;
 
@@ -249,7 +249,7 @@ static void pmac_ide_writew (void *opaque,
     }
 }
 
-static uint32_t pmac_ide_readw (void *opaque,target_phys_addr_t addr)
+static uint32_t pmac_ide_readw (void *opaque,Phys addr)
 {
     uint16_t retval;
     MACIOIDEState *d = opaque;
@@ -265,7 +265,7 @@ static uint32_t pmac_ide_readw (void *opaque,target_phys_addr_t addr)
 }
 
 static void pmac_ide_writel (void *opaque,
-                             target_phys_addr_t addr, uint32_t val)
+                             Phys addr, uint32_t val)
 {
     MACIOIDEState *d = opaque;
 
@@ -276,7 +276,7 @@ static void pmac_ide_writel (void *opaque,
     }
 }
 
-static uint32_t pmac_ide_readl (void *opaque,target_phys_addr_t addr)
+static uint32_t pmac_ide_readl (void *opaque,Phys addr)
 {
     uint32_t retval;
     MACIOIDEState *d = opaque;
hw/ide/mmio.c +5 -5
index fcfb09e..969ce88 100644
@@ -47,7 +47,7 @@ static void mmio_ide_reset(void *opaque)
     ide_bus_reset(&s->bus);
 }
 
-static uint64_t mmio_ide_read(void *opaque, target_phys_addr_t addr,
+static uint64_t mmio_ide_read(void *opaque, Phys addr,
                               unsigned size)
 {
     MMIOState *s = opaque;
@@ -58,7 +58,7 @@ static uint64_t mmio_ide_read(void *opaque, target_phys_addr_t addr,
         return ide_data_readw(&s->bus, 0);
 }
 
-static void mmio_ide_write(void *opaque, target_phys_addr_t addr,
+static void mmio_ide_write(void *opaque, Phys addr,
                            uint64_t val, unsigned size)
 {
     MMIOState *s = opaque;
@@ -75,14 +75,14 @@ static void mmio_ide_write(void *opaque, target_phys_addr_t addr,
     .endianness = DEVICE_NATIVE_ENDIAN,
 };
 
-static uint64_t mmio_ide_status_read(void *opaque, target_phys_addr_t addr,
+static uint64_t mmio_ide_status_read(void *opaque, Phys addr,
                                      unsigned size)
 {
     MMIOState *s= opaque;
     return ide_status_read(&s->bus, 0);
 }
 
-static void mmio_ide_cmd_write(void *opaque, target_phys_addr_t addr,
+static void mmio_ide_cmd_write(void *opaque, Phys addr,
                                uint64_t val, unsigned size)
 {
     MMIOState *s = opaque;
@@ -107,7 +107,7 @@ static void mmio_ide_cmd_write(void *opaque, target_phys_addr_t addr,
     }
 };
 
-void mmio_ide_init (target_phys_addr_t membase, target_phys_addr_t membase2,
+void mmio_ide_init (Phys membase, Phys membase2,
                     MemoryRegion *address_space,
                     qemu_irq irq, int shift,
                     DriveInfo *hd0, DriveInfo *hd1)
hw/ide/piix.c +2 -2
index 3473345..ad129b9 100644
@@ -32,7 +32,7 @@
 
 #include <hw/ide/pci.h>
 
-static uint64_t bmdma_read(void *opaque, target_phys_addr_t addr, unsigned size)
+static uint64_t bmdma_read(void *opaque, Phys addr, unsigned size)
 {
     BMDMAState *bm = opaque;
     uint32_t val;
@@ -58,7 +58,7 @@ static uint64_t bmdma_read(void *opaque, target_phys_addr_t addr, unsigned size)
     return val;
 }
 
-static void bmdma_write(void *opaque, target_phys_addr_t addr,
+static void bmdma_write(void *opaque, Phys addr,
                         uint64_t val, unsigned size)
 {
     BMDMAState *bm = opaque;
hw/ide/via.c +2 -2
index 4ea2064..5965931 100644
@@ -33,7 +33,7 @@
 
 #include <hw/ide/pci.h>
 
-static uint64_t bmdma_read(void *opaque, target_phys_addr_t addr,
+static uint64_t bmdma_read(void *opaque, Phys addr,
                            unsigned size)
 {
     BMDMAState *bm = opaque;
@@ -60,7 +60,7 @@ static uint64_t bmdma_read(void *opaque, target_phys_addr_t addr,
     return val;
 }
 
-static void bmdma_write(void *opaque, target_phys_addr_t addr,
+static void bmdma_write(void *opaque, Phys addr,
                         uint64_t val, unsigned size)
 {
     BMDMAState *bm = opaque;
hw/integratorcp.c +7 -7
index c8f3955..c0ee7c6 100644
@@ -40,7 +40,7 @@
    0xe, 4, 0x1c, 1, 2, 0x20, 0xc0, 0, 0, 0, 0, 0x30, 0x28, 0x30, 0x28, 0x40
 };
 
-static uint64_t integratorcm_read(void *opaque, target_phys_addr_t offset,
+static uint64_t integratorcm_read(void *opaque, Phys offset,
                                   unsigned size)
 {
     integratorcm_state *s = (integratorcm_state *)opaque;
@@ -153,7 +153,7 @@ static void integratorcm_update(integratorcm_state *s)
         hw_error("Core module interrupt\n");
 }
 
-static void integratorcm_write(void *opaque, target_phys_addr_t offset,
+static void integratorcm_write(void *opaque, Phys offset,
                                uint64_t value, unsigned size)
 {
     integratorcm_state *s = (integratorcm_state *)opaque;
@@ -308,7 +308,7 @@ static void icp_pic_set_irq(void *opaque, int irq, int level)
     icp_pic_update(s);
 }
 
-static uint64_t icp_pic_read(void *opaque, target_phys_addr_t offset,
+static uint64_t icp_pic_read(void *opaque, Phys offset,
                              unsigned size)
 {
     icp_pic_state *s = (icp_pic_state *)opaque;
@@ -337,7 +337,7 @@ static uint64_t icp_pic_read(void *opaque, target_phys_addr_t offset,
     }
 }
 
-static void icp_pic_write(void *opaque, target_phys_addr_t offset,
+static void icp_pic_write(void *opaque, Phys offset,
                           uint64_t value, unsigned size)
 {
     icp_pic_state *s = (icp_pic_state *)opaque;
@@ -394,7 +394,7 @@ static int icp_pic_init(SysBusDevice *dev)
 
 /* CP control registers.  */
 
-static uint64_t icp_control_read(void *opaque, target_phys_addr_t offset,
+static uint64_t icp_control_read(void *opaque, Phys offset,
                                  unsigned size)
 {
     switch (offset >> 2) {
@@ -412,7 +412,7 @@ static uint64_t icp_control_read(void *opaque, target_phys_addr_t offset,
     }
 }
 
-static void icp_control_write(void *opaque, target_phys_addr_t offset,
+static void icp_control_write(void *opaque, Phys offset,
                           uint64_t value, unsigned size)
 {
     switch (offset >> 2) {
@@ -432,7 +432,7 @@ static void icp_control_write(void *opaque, target_phys_addr_t offset,
     .endianness = DEVICE_NATIVE_ENDIAN,
 };
 
-static void icp_control_init(target_phys_addr_t base)
+static void icp_control_init(Phys base)
 {
     MemoryRegion *io;
 
hw/intel-hda.c +13 -13
index 10769e0..c37b22d 100644
@@ -211,9 +211,9 @@ struct IntelHDAReg {
 
 /* --------------------------------------------------------------------- */
 
-static target_phys_addr_t intel_hda_addr(uint32_t lbase, uint32_t ubase)
+static Phys intel_hda_addr(uint32_t lbase, uint32_t ubase)
 {
-    target_phys_addr_t addr;
+    Phys addr;
 
 #if TARGET_PHYS_ADDR_BITS == 32
     addr = lbase;
@@ -304,7 +304,7 @@ static int intel_hda_send_command(IntelHDAState *d, uint32_t verb)
 
 static void intel_hda_corb_run(IntelHDAState *d)
 {
-    target_phys_addr_t addr;
+    Phys addr;
     uint32_t rp, verb;
 
     if (d->ics & ICH6_IRS_BUSY) {
@@ -341,7 +341,7 @@ static void intel_hda_response(HDACodecDevice *dev, bool solicited, uint32_t res
 {
     HDACodecBus *bus = DO_UPCAST(HDACodecBus, qbus, dev->qdev.parent_bus);
     IntelHDAState *d = container_of(bus, IntelHDAState, codecs);
-    target_phys_addr_t addr;
+    Phys addr;
     uint32_t wp, ex;
 
     if (d->ics & ICH6_IRS_BUSY) {
@@ -390,7 +390,7 @@ static bool intel_hda_xfer(HDACodecDevice *dev, uint32_t stnr, bool output,
 {
     HDACodecBus *bus = DO_UPCAST(HDACodecBus, qbus, dev->qdev.parent_bus);
     IntelHDAState *d = container_of(bus, IntelHDAState, codecs);
-    target_phys_addr_t addr;
+    Phys addr;
     uint32_t s, copy, left;
     IntelHDAStream *st;
     bool irq = false;
@@ -462,7 +462,7 @@ static bool intel_hda_xfer(HDACodecDevice *dev, uint32_t stnr, bool output,
 
 static void intel_hda_parse_bdl(IntelHDAState *d, IntelHDAStream *st)
 {
-    target_phys_addr_t addr;
+    Phys addr;
     uint8_t buf[16];
     uint32_t i;
 
@@ -895,7 +895,7 @@ static void intel_hda_set_st_ctl(IntelHDAState *d, const IntelHDAReg *reg, uint3
 
 };
 
-static const IntelHDAReg *intel_hda_reg_find(IntelHDAState *d, target_phys_addr_t addr)
+static const IntelHDAReg *intel_hda_reg_find(IntelHDAState *d, Phys addr)
 {
     const IntelHDAReg *reg;
 
@@ -1038,7 +1038,7 @@ static void intel_hda_regs_reset(IntelHDAState *d)
 
 /* --------------------------------------------------------------------- */
 
-static void intel_hda_mmio_writeb(void *opaque, target_phys_addr_t addr, uint32_t val)
+static void intel_hda_mmio_writeb(void *opaque, Phys addr, uint32_t val)
 {
     IntelHDAState *d = opaque;
     const IntelHDAReg *reg = intel_hda_reg_find(d, addr);
@@ -1046,7 +1046,7 @@ static void intel_hda_mmio_writeb(void *opaque, target_phys_addr_t addr, uint32_
     intel_hda_reg_write(d, reg, val, 0xff);
 }
 
-static void intel_hda_mmio_writew(void *opaque, target_phys_addr_t addr, uint32_t val)
+static void intel_hda_mmio_writew(void *opaque, Phys addr, uint32_t val)
 {
     IntelHDAState *d = opaque;
     const IntelHDAReg *reg = intel_hda_reg_find(d, addr);
@@ -1054,7 +1054,7 @@ static void intel_hda_mmio_writew(void *opaque, target_phys_addr_t addr, uint32_
     intel_hda_reg_write(d, reg, val, 0xffff);
 }
 
-static void intel_hda_mmio_writel(void *opaque, target_phys_addr_t addr, uint32_t val)
+static void intel_hda_mmio_writel(void *opaque, Phys addr, uint32_t val)
 {
     IntelHDAState *d = opaque;
     const IntelHDAReg *reg = intel_hda_reg_find(d, addr);
@@ -1062,7 +1062,7 @@ static void intel_hda_mmio_writel(void *opaque, target_phys_addr_t addr, uint32_
     intel_hda_reg_write(d, reg, val, 0xffffffff);
 }
 
-static uint32_t intel_hda_mmio_readb(void *opaque, target_phys_addr_t addr)
+static uint32_t intel_hda_mmio_readb(void *opaque, Phys addr)
 {
     IntelHDAState *d = opaque;
     const IntelHDAReg *reg = intel_hda_reg_find(d, addr);
@@ -1070,7 +1070,7 @@ static uint32_t intel_hda_mmio_readb(void *opaque, target_phys_addr_t addr)
     return intel_hda_reg_read(d, reg, 0xff);
 }
 
-static uint32_t intel_hda_mmio_readw(void *opaque, target_phys_addr_t addr)
+static uint32_t intel_hda_mmio_readw(void *opaque, Phys addr)
 {
     IntelHDAState *d = opaque;
     const IntelHDAReg *reg = intel_hda_reg_find(d, addr);
@@ -1078,7 +1078,7 @@ static uint32_t intel_hda_mmio_readw(void *opaque, target_phys_addr_t addr)
     return intel_hda_reg_read(d, reg, 0xffff);
 }
 
-static uint32_t intel_hda_mmio_readl(void *opaque, target_phys_addr_t addr)
+static uint32_t intel_hda_mmio_readl(void *opaque, Phys addr)
 {
     IntelHDAState *d = opaque;
     const IntelHDAReg *reg = intel_hda_reg_find(d, addr);
hw/ioapic.c +2 -2
index 27b07c6..3cbfc3a 100644
@@ -197,7 +197,7 @@ void ioapic_eoi_broadcast(int vector)
 }
 
 static uint64_t
-ioapic_mem_read(void *opaque, target_phys_addr_t addr, unsigned int size)
+ioapic_mem_read(void *opaque, Phys addr, unsigned int size)
 {
     IOAPICState *s = opaque;
     int index;
@@ -239,7 +239,7 @@ void ioapic_eoi_broadcast(int vector)
 }
 
 static void
-ioapic_mem_write(void *opaque, target_phys_addr_t addr, uint64_t val,
+ioapic_mem_write(void *opaque, Phys addr, uint64_t val,
                  unsigned int size)
 {
     IOAPICState *s = opaque;
hw/isa-bus.c +1 -1
index 5af790b..429a4ec 100644
@@ -23,7 +23,7 @@
 #include "exec-memory.h"
 
 static ISABus *isabus;
-target_phys_addr_t isa_mem_base = 0;
+Phys isa_mem_base = 0;
 
 static void isabus_dev_print(Monitor *mon, DeviceState *dev, int indent);
 static char *isabus_get_fw_dev_path(DeviceState *dev);
hw/isa.h +3 -3
index b11a0be..61e53f6 100644
@@ -71,10 +71,10 @@ void isa_register_portio_list(ISADevice *dev, uint16_t start,
                               const MemoryRegionPortio *portio,
                               void *opaque, const char *name);
 
-extern target_phys_addr_t isa_mem_base;
+extern Phys isa_mem_base;
 
-void isa_mmio_setup(MemoryRegion *mr, target_phys_addr_t size);
-void isa_mmio_init(target_phys_addr_t base, target_phys_addr_t size);
+void isa_mmio_setup(MemoryRegion *mr, Phys size);
+void isa_mmio_init(Phys base, Phys size);
 
 /* dma.c */
 int DMA_get_channel_mode (int nchan);
hw/isa_mmio.c +8 -8
index fd755ab..9bfc14a 100644
@@ -26,35 +26,35 @@
 #include "isa.h"
 #include "exec-memory.h"
 
-static void isa_mmio_writeb (void *opaque, target_phys_addr_t addr,
+static void isa_mmio_writeb (void *opaque, Phys addr,
                                   uint32_t val)
 {
     cpu_outb(addr & IOPORTS_MASK, val);
 }
 
-static void isa_mmio_writew(void *opaque, target_phys_addr_t addr,
+static void isa_mmio_writew(void *opaque, Phys addr,
                                uint32_t val)
 {
     cpu_outw(addr & IOPORTS_MASK, val);
 }
 
-static void isa_mmio_writel(void *opaque, target_phys_addr_t addr,
+static void isa_mmio_writel(void *opaque, Phys addr,
                                uint32_t val)
 {
     cpu_outl(addr & IOPORTS_MASK, val);
 }
 
-static uint32_t isa_mmio_readb (void *opaque, target_phys_addr_t addr)
+static uint32_t isa_mmio_readb (void *opaque, Phys addr)
 {
     return cpu_inb(addr & IOPORTS_MASK);
 }
 
-static uint32_t isa_mmio_readw(void *opaque, target_phys_addr_t addr)
+static uint32_t isa_mmio_readw(void *opaque, Phys addr)
 {
     return cpu_inw(addr & IOPORTS_MASK);
 }
 
-static uint32_t isa_mmio_readl(void *opaque, target_phys_addr_t addr)
+static uint32_t isa_mmio_readl(void *opaque, Phys addr)
 {
     return cpu_inl(addr & IOPORTS_MASK);
 }
@@ -67,12 +67,12 @@ static uint32_t isa_mmio_readl(void *opaque, target_phys_addr_t addr)
     .endianness = DEVICE_LITTLE_ENDIAN,
 };
 
-void isa_mmio_setup(MemoryRegion *mr, target_phys_addr_t size)
+void isa_mmio_setup(MemoryRegion *mr, Phys size)
 {
     memory_region_init_io(mr, &isa_mmio_ops, NULL, "isa-mmio", size);
 }
 
-void isa_mmio_init(target_phys_addr_t base, target_phys_addr_t size)
+void isa_mmio_init(Phys base, Phys size)
 {
     MemoryRegion *mr = g_malloc(sizeof(*mr));
 
hw/ivshmem.c +2 -2
index 1aa9e3b..ddf7e4e 100644
@@ -160,7 +160,7 @@ static uint32_t ivshmem_IntrStatus_read(IVShmemState *s)
     return ret;
 }
 
-static void ivshmem_io_write(void *opaque, target_phys_addr_t addr,
+static void ivshmem_io_write(void *opaque, Phys addr,
                              uint64_t val, unsigned size)
 {
     IVShmemState *s = opaque;
@@ -204,7 +204,7 @@ static void ivshmem_io_write(void *opaque, target_phys_addr_t addr,
     }
 }
 
-static uint64_t ivshmem_io_read(void *opaque, target_phys_addr_t addr,
+static uint64_t ivshmem_io_read(void *opaque, Phys addr,
                                 unsigned size)
 {
 
hw/jazz_led.c +7 -7
index f8a2182..590464f 100644
@@ -49,7 +49,7 @@
     screen_state_t state;
 } LedState;
 
-static uint32_t led_readb(void *opaque, target_phys_addr_t addr)
+static uint32_t led_readb(void *opaque, Phys addr)
 {
     LedState *s = opaque;
     uint32_t val;
@@ -68,7 +68,7 @@ static uint32_t led_readb(void *opaque, target_phys_addr_t addr)
     return val;
 }
 
-static uint32_t led_readw(void *opaque, target_phys_addr_t addr)
+static uint32_t led_readw(void *opaque, Phys addr)
 {
     uint32_t v;
 #ifdef TARGET_WORDS_BIGENDIAN
@@ -81,7 +81,7 @@ static uint32_t led_readw(void *opaque, target_phys_addr_t addr)
     return v;
 }
 
-static uint32_t led_readl(void *opaque, target_phys_addr_t addr)
+static uint32_t led_readl(void *opaque, Phys addr)
 {
     uint32_t v;
 #ifdef TARGET_WORDS_BIGENDIAN
@@ -98,7 +98,7 @@ static uint32_t led_readl(void *opaque, target_phys_addr_t addr)
     return v;
 }
 
-static void led_writeb(void *opaque, target_phys_addr_t addr, uint32_t val)
+static void led_writeb(void *opaque, Phys addr, uint32_t val)
 {
     LedState *s = opaque;
 
@@ -115,7 +115,7 @@ static void led_writeb(void *opaque, target_phys_addr_t addr, uint32_t val)
     }
 }
 
-static void led_writew(void *opaque, target_phys_addr_t addr, uint32_t val)
+static void led_writew(void *opaque, Phys addr, uint32_t val)
 {
 #ifdef TARGET_WORDS_BIGENDIAN
     led_writeb(opaque, addr, (val >> 8) & 0xff);
@@ -126,7 +126,7 @@ static void led_writew(void *opaque, target_phys_addr_t addr, uint32_t val)
 #endif
 }
 
-static void led_writel(void *opaque, target_phys_addr_t addr, uint32_t val)
+static void led_writel(void *opaque, Phys addr, uint32_t val)
 {
 #ifdef TARGET_WORDS_BIGENDIAN
     led_writeb(opaque, addr, (val >> 24) & 0xff);
@@ -304,7 +304,7 @@ static void jazz_led_text_update(void *opaque, console_ch_t *chardata)
     dpy_update(s->ds, 0, 0, 2, 1);
 }
 
-void jazz_led_init(MemoryRegion *address_space, target_phys_addr_t base)
+void jazz_led_init(MemoryRegion *address_space, Phys base)
 {
     LedState *s;
 
hw/lan9118.c +2 -2
index 7e64c5d..19a1dbc 100644
@@ -895,7 +895,7 @@ static void lan9118_tick(void *opaque)
     lan9118_update(s);
 }
 
[… more lines in the raw message]

Lines of this file are not shown. View the raw message.

hw/lance.c +2 -2
index 7164700..a4608ec 100644

Lines of this file are not shown. View the raw message.

hw/lm32_boards.c +19 -19
index 3cdf120..4ff93f6 100644

Lines of this file are not shown. View the raw message.

hw/lm32_hwsetup.h +1 -1
index 8fc285e..f82b43c 100644

Lines of this file are not shown. View the raw message.

hw/lm32_sys.c +2 -2
index 83974ee..d7336ea 100644

Lines of this file are not shown. View the raw message.

hw/lm32_timer.c +2 -2
index 445847f..3ee6429 100644

Lines of this file are not shown. View the raw message.

hw/lm32_uart.c +2 -2
index d013abd..25f547b 100644

Lines of this file are not shown. View the raw message.

hw/lm4549.c +2 -2
index 80b3ec4..7b613d0 100644

Lines of this file are not shown. View the raw message.

hw/lm4549.h +2 -2
index 5948780..0916024 100644

Lines of this file are not shown. View the raw message.

hw/loader.c +15 -15
index 446b628..5dab890 100644

Lines of this file are not shown. View the raw message.

hw/loader.h +11 -11
index fbcaba9..ded61c4 100644

Lines of this file are not shown. View the raw message.

hw/lsi53c895a.c +6 -6
index 0d3a101..6fda29d 100644

Lines of this file are not shown. View the raw message.

hw/m48t59.c +7 -7
index c043996..b29db26 100644

Lines of this file are not shown. View the raw message.

hw/mac_dbdma.c +2 -2
index 1791ec1..271f312 100644

Lines of this file are not shown. View the raw message.

hw/mac_dbdma.h +1 -1
index 6d1abe6..d050014 100644

Lines of this file are not shown. View the raw message.

hw/mac_nvram.c +4 -4
index ed0a2b7..6e06399 100644

Lines of this file are not shown. View the raw message.

hw/mainstone.c +1 -1
index c914a4e..ecfae96 100644

Lines of this file are not shown. View the raw message.

hw/marvell_88w8618_audio.c +2 -2
index 855b792..768b7eb 100644

Lines of this file are not shown. View the raw message.

hw/mcf.h +5 -5
index baa790b..62949eb 100644

Lines of this file are not shown. View the raw message.

hw/mcf5206.c +10 -10
index 7b6d501..9e87701 100644

Lines of this file are not shown. View the raw message.

hw/mcf5208.c +5 -5
index 3b0636d..463d8c2 100644

Lines of this file are not shown. View the raw message.

hw/mcf_fec.c +3 -3
index ae37bef..2118d44 100644

Lines of this file are not shown. View the raw message.

hw/mcf_intc.c +3 -3
index 0b498dd..1544067 100644

Lines of this file are not shown. View the raw message.

hw/mcf_uart.c +3 -3
index ec6a87f..a9d04e5 100644

Lines of this file are not shown. View the raw message.

hw/milkymist-ac97.c +2 -2
index e824a49..d0c2b5a 100644

Lines of this file are not shown. View the raw message.

hw/milkymist-hpdmc.c +2 -2
index be575c9..63ad57a 100644

Lines of this file are not shown. View the raw message.

hw/milkymist-hw.h +12 -12
index 9f358a7..d2914cd 100644

Lines of this file are not shown. View the raw message.

hw/milkymist-memcard.c +2 -2
index 865a46c..bbb34e2 100644

Lines of this file are not shown. View the raw message.

hw/milkymist-minimac2.c +3 -3
index 7006d29..5bdafa6 100644

Lines of this file are not shown. View the raw message.

hw/milkymist-pfpu.c +4 -4
index dc92eb6..e279953 100644

Lines of this file are not shown. View the raw message.

hw/milkymist-softusb.c +2 -2
index 83bd1c4..9d9028d 100644

Lines of this file are not shown. View the raw message.

hw/milkymist-sysctl.c +2 -2
index 6326b70..13db66e 100644

Lines of this file are not shown. View the raw message.

hw/milkymist-tmu2.c +4 -4
index 20110e5..ecddb84 100644

Lines of this file are not shown. View the raw message.

hw/milkymist-uart.c +2 -2
index eaf1c0d..84bbcbb 100644

Lines of this file are not shown. View the raw message.

hw/milkymist-vgafb.c +2 -2
index 108115e..ed7403f 100644

Lines of this file are not shown. View the raw message.

hw/milkymist.c +8 -8
index eaef0c2..8927876 100644

Lines of this file are not shown. View the raw message.

hw/mips.h +4 -4
index 22156fc..d5adf45 100644

Lines of this file are not shown. View the raw message.

hw/mips_jazz.c +4 -4
index 63165b9..0930dd9 100644

Lines of this file are not shown. View the raw message.

hw/mips_malta.c +3 -3
index 6b72cf2..dff1052 100644

Lines of this file are not shown. View the raw message.

hw/mips_r4k.c +2 -2
index 1c0615c..28087ee 100644

Lines of this file are not shown. View the raw message.

hw/mipsnet.c +2 -2
index b1234b8..c1acccc 100644

Lines of this file are not shown. View the raw message.

hw/mpc8544_guts.c +2 -2
index f01b38c..c853e0c 100644

Lines of this file are not shown. View the raw message.

hw/msix.c +2 -2
index 149eed2..3f7e120 100644

Lines of this file are not shown. View the raw message.

hw/mst_fpga.c +2 -2
index 9324702..e7c5d23 100644

Lines of this file are not shown. View the raw message.

hw/multiboot.c +8 -8
index b4484a3..02675c3 100644

Lines of this file are not shown. View the raw message.

hw/musicpal.c +16 -16
index a01e3d2..a5b100a 100644

Lines of this file are not shown. View the raw message.

hw/ne2000.c +2 -2
index 62e082f..15bcadc 100644

Lines of this file are not shown. View the raw message.

hw/nvram.h +1 -1
index 8924da4..dbd53e9 100644

Lines of this file are not shown. View the raw message.

hw/omap.h +35 -35

70 lines not on this page · raw message

hw/omap1.c +74 -74

148 lines not on this page · raw message

hw/omap2.c +14 -14
index a6851b0..9c416c5 100644

Lines of this file are not shown. View the raw message.

hw/omap_dma.c +12 -12
index 389cb78..677efa5 100644

Lines of this file are not shown. View the raw message.

hw/omap_dss.c +18 -18
index ede640b..d7b3d11 100644

Lines of this file are not shown. View the raw message.

hw/omap_gpio.c +8 -8
index 29147be..f7e30bc 100644

Lines of this file are not shown. View the raw message.

hw/omap_gpmc.c +8 -8
index 2fc4137..2479d03 100644

Lines of this file are not shown. View the raw message.

hw/omap_gptimer.c +4 -4
index 7a14519..3e4055e 100644

Lines of this file are not shown. View the raw message.

hw/omap_i2c.c +4 -4
index 5ec422c..70fecdf 100644

Lines of this file are not shown. View the raw message.

hw/omap_intc.c +4 -4
index fc53ec7..296dc17 100644

Lines of this file are not shown. View the raw message.

hw/omap_l4.c +8 -8
index dbad7f6..22e54b4 100644

Lines of this file are not shown. View the raw message.

hw/omap_lcdc.c +4 -4
index f265306..a7073b9 100644

Lines of this file are not shown. View the raw message.

hw/omap_mmc.c +3 -3
index aec0285..c4b7819 100644

Lines of this file are not shown. View the raw message.

hw/omap_sdrc.c +3 -3
index 784e326..a36b46c 100644

Lines of this file are not shown. View the raw message.

hw/omap_spi.c +2 -2
index 8f2b697..1db524b 100644

Lines of this file are not shown. View the raw message.

hw/omap_sx1.c +2 -2
index 4e8ec4a..a326d48 100644

Lines of this file are not shown. View the raw message.

hw/omap_synctimer.c +3 -3
index 367f26e..fd35a5a 100644

Lines of this file are not shown. View the raw message.

hw/omap_tap.c +2 -2
index 0277c73..eaafaad 100644

Lines of this file are not shown. View the raw message.

hw/omap_uart.c +5 -5
index 167d5c4..96d0655 100644

Lines of this file are not shown. View the raw message.

hw/onenand.c +4 -4
index 33c9718..d829e75 100644

Lines of this file are not shown. View the raw message.

hw/opencores_eth.c +4 -4
index f7cc1b4..89f675a 100644

Lines of this file are not shown. View the raw message.

hw/openpic.c +26 -26

52 lines not on this page · raw message

hw/openpic.h +1 -1
index 715f084..5dad8ca 100644

Lines of this file are not shown. View the raw message.

hw/palm.c +4 -4
index b1252ab..d193530 100644

Lines of this file are not shown. View the raw message.

hw/parallel.c +7 -7
index c4c5dbe..3f68814 100644

Lines of this file are not shown. View the raw message.

hw/pc.c +2 -2
index 85304cf..390e738 100644

Lines of this file are not shown. View the raw message.

hw/pc.h +9 -9
index 13e41f1..ee60ecb 100644

Lines of this file are not shown. View the raw message.

hw/pc_piix.c +1 -1
index b70431f..7b22080 100644

Lines of this file are not shown. View the raw message.

hw/pci.h +1 -1
index 625e717..f5e95e4 100644

Lines of this file are not shown. View the raw message.

hw/pci_host.c +4 -4
index 44c6c20..bb85160 100644

Lines of this file are not shown. View the raw message.

hw/pcie_host.c +5 -5
index 28bbe72..4670ba9 100644

Lines of this file are not shown. View the raw message.

hw/pcie_host.h +4 -4
index 0074508..9bc54c9 100644

Lines of this file are not shown. View the raw message.

hw/pckbd.c +4 -4
index 06b40c5..a3597e3 100644

Lines of this file are not shown. View the raw message.

hw/pcnet-pci.c +10 -10
index 4e164da..662c770 100644

Lines of this file are not shown. View the raw message.

hw/pcnet.c +17 -17
index cba253b..da90320 100644

Lines of this file are not shown. View the raw message.

hw/pcnet.h +2 -2
index edc81c9..dcb124b 100644

Lines of this file are not shown. View the raw message.

hw/petalogix_ml605_mmu.c +5 -5
index 98978f8..10fb5e1 100644

Lines of this file are not shown. View the raw message.

hw/petalogix_s3adsp1800_mmu.c +5 -5
index d448a41..e64a934 100644

Lines of this file are not shown. View the raw message.

hw/pflash_cfi01.c +24 -24

48 lines not on this page · raw message

hw/pflash_cfi02.c +20 -20
index a9e88b9..c63ce63 100644

Lines of this file are not shown. View the raw message.

hw/piix_pci.c +8 -8
index 3652522..f82e50a 100644

Lines of this file are not shown. View the raw message.

hw/pl011.c +2 -2
index 1b05d76..43210d3 100644

Lines of this file are not shown. View the raw message.

hw/pl022.c +2 -2
index d43e4a2..5f41b0e 100644

Lines of this file are not shown. View the raw message.

hw/pl031.c +2 -2
index a007ff0..8262714 100644

Lines of this file are not shown. View the raw message.

hw/pl041.c +3 -3
index 4585ccf..87c55ec 100644

Lines of this file are not shown. View the raw message.

hw/pl050.c +2 -2
index 8182a1c..af8b0aa 100644

Lines of this file are not shown. View the raw message.

hw/pl061.c +2 -2
index f33ae84..9604d4b 100644

Lines of this file are not shown. View the raw message.

hw/pl080.c +2 -2
index e001df9..59f160b 100644

Lines of this file are not shown. View the raw message.

hw/pl110.c +2 -2
index 0e1f415..dedd89f 100644

Lines of this file are not shown. View the raw message.

hw/pl181.c +2 -2
index b79aa41..831948d 100644

Lines of this file are not shown. View the raw message.

hw/pl190.c +2 -2
index 6fc2656..2ad1904 100644

Lines of this file are not shown. View the raw message.

hw/ppc405.h +6 -6
index d8fdf09..32f67de 100644

Lines of this file are not shown. View the raw message.

hw/ppc405_boards.c +14 -14
index 476775d..9f8c0c0 100644

Lines of this file are not shown. View the raw message.

hw/ppc405_uc.c +32 -32

64 lines not on this page · raw message

hw/ppc440.c +2 -2
index cd8a95d..8c72199 100644

Lines of this file are not shown. View the raw message.

hw/ppc440_bamboo.c +5 -5
index b734e3a..4b5a735 100644

Lines of this file are not shown. View the raw message.

hw/ppc4xx.h +8 -8
index f969e44..a5a4177 100644

Lines of this file are not shown. View the raw message.

hw/ppc4xx_devs.c +14 -14
index 26040ac..43617c0 100644

Lines of this file are not shown. View the raw message.

hw/ppc4xx_pci.c +8 -8
index 2c69210..3c72989 100644

Lines of this file are not shown. View the raw message.

hw/ppc_mac.h +2 -2
index af75e45..f2d4a23 100644

Lines of this file are not shown. View the raw message.

hw/ppc_newworld.c +4 -4
index a746c9c..f67b296 100644

Lines of this file are not shown. View the raw message.

hw/ppc_oldworld.c +1 -1
index 9295a34..9f54483 100644

Lines of this file are not shown. View the raw message.

hw/ppc_prep.c +17 -17
index 47dab3f..d6beaea 100644

Lines of this file are not shown. View the raw message.

hw/ppce500_mpc8544ds.c +8 -8
index d69f78c..863273c 100644

Lines of this file are not shown. View the raw message.

hw/ppce500_pci.c +2 -2
index b606206..fe90988 100644

Lines of this file are not shown. View the raw message.

hw/ppce500_spin.c +8 -8
index df74953..45e312e 100644

Lines of this file are not shown. View the raw message.

hw/prep_pci.c +7 -7
index ea9fb69..3d7c079 100644

Lines of this file are not shown. View the raw message.

hw/pxa.h +12 -12
index e778739..e0f2ada 100644

Lines of this file are not shown. View the raw message.

hw/pxa2xx.c +21 -21

42 lines not on this page · raw message

hw/pxa2xx_dma.c +8 -8
index cb28107..20d25c6 100644

Lines of this file are not shown. View the raw message.

hw/pxa2xx_gpio.c +3 -3
index cc58c40..939548d 100644

Lines of this file are not shown. View the raw message.

hw/pxa2xx_keypad.c +3 -3
index f86323f..261aeb2 100644

Lines of this file are not shown. View the raw message.

hw/pxa2xx_lcd.c +13 -13
index 5dd4ef0..20a9f34 100644

Lines of this file are not shown. View the raw message.

hw/pxa2xx_mmci.c +9 -9
index f47c79c..0767692 100644

Lines of this file are not shown. View the raw message.

hw/pxa2xx_pcmcia.c +7 -7
index dc522dc..0a13bd9 100644

Lines of this file are not shown. View the raw message.

hw/pxa2xx_pic.c +5 -5
index 92effbc..c020e7c 100644

Lines of this file are not shown. View the raw message.

hw/pxa2xx_timer.c +2 -2
index 50e2678..9597884 100644

Lines of this file are not shown. View the raw message.

hw/qdev-addr.c +8 -8
index 5ddda2d..39a4e40 100644

Lines of this file are not shown. View the raw message.

hw/qdev-addr.h +2 -2
index a0ddf38..b7b3229 100644

Lines of this file are not shown. View the raw message.

hw/qxl.c +2 -2
index ac81927..ef95679 100644

Lines of this file are not shown. View the raw message.

hw/r2d.c +3 -3
index c80f9e3..bb2751b 100644

Lines of this file are not shown. View the raw message.

hw/rc4030.c +17 -17
index 9f39b30..59fb234 100644

Lines of this file are not shown. View the raw message.

hw/realview.c +2 -2
index d4191e9..5cdaffb 100644

Lines of this file are not shown. View the raw message.

hw/rtl8139.c +8 -8
index 0ae9f57..8d3c07d 100644

Lines of this file are not shown. View the raw message.

hw/s390-virtio-bus.c +1 -1
index c4b9a99..6b12cbb 100644

Lines of this file are not shown. View the raw message.

hw/s390-virtio.c +2 -2
index 2210b8a..74a7644 100644

Lines of this file are not shown. View the raw message.

hw/sbi.c +2 -2
index 8965a71..6dbc303 100644

Lines of this file are not shown. View the raw message.

hw/serial.c +3 -3
index d35c7a9..154583b 100644

Lines of this file are not shown. View the raw message.

hw/sh.h +2 -2
index 6488db2..67f96d0 100644

Lines of this file are not shown. View the raw message.

hw/sh7750.c +12 -12
index 4f4d8e7..bdf0620 100644

Lines of this file are not shown. View the raw message.

hw/sh_intc.c +2 -2
index b24ec77..fbf741b 100644

Lines of this file are not shown. View the raw message.

hw/sh_pci.c +2 -2
index d4d028d..45a5b83 100644

Lines of this file are not shown. View the raw message.

hw/sh_serial.c +3 -3
index 43b0eb1..fd1137a 100644

Lines of this file are not shown. View the raw message.

hw/sh_timer.c +5 -5
index d2c0cec..5bf6f3e 100644

Lines of this file are not shown. View the raw message.

hw/sharpsl.h +1 -1
index 0b3a774..747a04c 100644

Lines of this file are not shown. View the raw message.

hw/slavio_intctl.c +4 -4
index 9925e64..21193ff 100644

Lines of this file are not shown. View the raw message.

hw/slavio_misc.c +16 -16
index 484301c..040fa9c 100644

Lines of this file are not shown. View the raw message.

hw/slavio_timer.c +2 -2
index 2353c43..5332027 100644

Lines of this file are not shown. View the raw message.

hw/sm501.c +9 -9
index 326531c..0a55111 100644

Lines of this file are not shown. View the raw message.

hw/smc91c111.c +6 -6
index 82b8811..f2f4227 100644

Lines of this file are not shown. View the raw message.

hw/soc_dma.c +4 -4
index 03bc846..e70664a 100644

Lines of this file are not shown. View the raw message.

hw/soc_dma.h +5 -5
index 904b26c..568a98b 100644

Lines of this file are not shown. View the raw message.

hw/spapr.c +7 -7
index 161b585..398e7be 100644

Lines of this file are not shown. View the raw message.

hw/spapr.h +4 -4
index d624841..4c27804 100644

Lines of this file are not shown. View the raw message.

hw/spapr_pci.c +2 -2
index 9b6a032..722b27e 100644

Lines of this file are not shown. View the raw message.

hw/spapr_pci.h +1 -1
index 213340c..08a9e85 100644

Lines of this file are not shown. View the raw message.

hw/spapr_rtas.c +2 -2
index d1ac74c..4b7424d 100644

Lines of this file are not shown. View the raw message.

hw/sparc32_dma.c +4 -4
index 035d2e2..80f4975 100644

Lines of this file are not shown. View the raw message.

hw/sparc32_dma.h +2 -2
index 8b72c37..20c8dec 100644

Lines of this file are not shown. View the raw message.

hw/spitz.c +2 -2
index 82a133d..df4345e 100644

Lines of this file are not shown. View the raw message.

hw/stellaris.c +8 -8
index 7a73074..34a5433 100644

Lines of this file are not shown. View the raw message.

hw/stellaris_enet.c +2 -2
index 866c9a2..87e4633 100644

Lines of this file are not shown. View the raw message.

hw/strongarm.c +14 -14
index 69c1179..8e020e9 100644

Lines of this file are not shown. View the raw message.

hw/sun4c_intctl.c +2 -2
index e15b167..6d031b8 100644

Lines of this file are not shown. View the raw message.

hw/sun4m.c +42 -42

84 lines not on this page · raw message

hw/sun4m.h +3 -3
index 504c3af..de20dfb 100644

Lines of this file are not shown. View the raw message.

hw/sun4m_iommu.c +13 -13
index ef7627c..5d27cd6 100644

Lines of this file are not shown. View the raw message.

hw/sun4u.c +3 -3
index 2dc3d04..5e0a6fd 100644

Lines of this file are not shown. View the raw message.

hw/sysbus.c +10 -10
index 2e06fe8..800c2e5 100644

Lines of this file are not shown. View the raw message.

hw/sysbus.h +9 -9
index 899756b..da5957c 100644

Lines of this file are not shown. View the raw message.

hw/tc6393xb.c +8 -8
index b75fa60..6329707 100644

Lines of this file are not shown. View the raw message.

hw/tcx.c +5 -5
index 75a28f2..a85ddcd 100644

Lines of this file are not shown. View the raw message.

hw/tusb6010.c +6 -6
index 276300a..aa7ac33 100644

Lines of this file are not shown. View the raw message.

hw/unin_pci.c +2 -2
index 14d9914..1470561 100644

Lines of this file are not shown. View the raw message.

hw/usb-ehci.c +11 -11
index 7c926c0..829eb91 100644

Lines of this file are not shown. View the raw message.

hw/usb-libhw.c +1 -1
index 162b42b..ec0955a 100644

Lines of this file are not shown. View the raw message.

hw/usb-musb.c +6 -6
index 01e2e7c..6e66ef8 100644

Lines of this file are not shown. View the raw message.

hw/usb-ohci.c +4 -4
index e68be70..9b0cba7 100644

Lines of this file are not shown. View the raw message.

hw/versatile_pci.c +3 -3
index a285f7f..4da3872 100644

Lines of this file are not shown. View the raw message.

hw/versatilepb.c +2 -2
index 0312b75..5f516ee 100644

Lines of this file are not shown. View the raw message.

hw/vga-isa-mm.c +10 -10
index f8984c6..1908e6d 100644

Lines of this file are not shown. View the raw message.

hw/vga.c +5 -5
index 4878fbc..c9823dd 100644

Lines of this file are not shown. View the raw message.

hw/vga_int.h +2 -2
index c1e700f..c4524ca 100644

Lines of this file are not shown. View the raw message.

hw/vhost.c +9 -9
index cd56e75..febe59a 100644

Lines of this file are not shown. View the raw message.

hw/virtex_ml507.c +6 -6
index bd16b97..a77a6b2 100644

Lines of this file are not shown. View the raw message.

hw/virtio-pci.c +2 -2
index 77b75bc..08cb445 100644

Lines of this file are not shown. View the raw message.

hw/virtio.c +38 -38

76 lines not on this page · raw message

hw/virtio.h +14 -14
index 25f5564..5dea5ef 100644

Lines of this file are not shown. View the raw message.

hw/vmware_vga.c +2 -2
index b1885c3..efcffb7 100644

Lines of this file are not shown. View the raw message.

hw/wdt_i6300esb.c +6 -6
index 20d8673..e66f597 100644

Lines of this file are not shown. View the raw message.

hw/xen_platform.c +2 -2
index e62eaef..48456e3 100644

Lines of this file are not shown. View the raw message.

hw/xilinx.h +5 -5
index 35f35bd..26fddf2 100644

Lines of this file are not shown. View the raw message.

hw/xilinx_axidma.c +5 -5
index 596ec0e..499eb13 100644

Lines of this file are not shown. View the raw message.

hw/xilinx_axienet.c +2 -2
index a2eb3e6..67794e7 100644

Lines of this file are not shown. View the raw message.

hw/xilinx_ethlite.c +2 -2
index 6777254..ef3cda1 100644

Lines of this file are not shown. View the raw message.

hw/xilinx_intc.c +2 -2
index c567885..3a218ea 100644

Lines of this file are not shown. View the raw message.

hw/xilinx_timer.c +3 -3
index 0b2f32a..1ead4b4 100644

Lines of this file are not shown. View the raw message.

hw/xilinx_uartlite.c +2 -2
index 6533df9..9c080d1 100644

Lines of this file are not shown. View the raw message.

hw/xtensa_lx60.c +6 -6
index 26112c3..fe3d74d 100644

Lines of this file are not shown. View the raw message.

hw/zaurus.c +3 -3
index c4bcd29..f25da61 100644

Lines of this file are not shown. View the raw message.

kvm-all.c +13 -13
index 3174f42..d7d9399 100644

Lines of this file are not shown. View the raw message.

kvm-stub.c +2 -2
index 06064b9..cab465d 100644

Lines of this file are not shown. View the raw message.

kvm.h +3 -3
index c1de81a..f4fe04e 100644

Lines of this file are not shown. View the raw message.

memory.c +32 -32

64 lines not on this page · raw message

memory.h +22 -22

44 lines not on this page · raw message

monitor.c +15 -15
index 7334401..5d07371 100644

Lines of this file are not shown. View the raw message.

softmmu_template.h +6 -6
index 97020f8..9dc1367 100644

Lines of this file are not shown. View the raw message.

target-alpha/cpu.h +1 -1
index 9d61d45..7f82b80 100644

Lines of this file are not shown. View the raw message.

target-alpha/helper.c +1 -1
index 06d2565..8cc81fa 100644

Lines of this file are not shown. View the raw message.

target-alpha/op_helper.c +1 -1
index cc102db..5432ea7 100644

Lines of this file are not shown. View the raw message.

target-arm/helper.c +1 -1
index 65f4fbf..adbf664 100644

Lines of this file are not shown. View the raw message.

target-cris/helper.c +1 -1
index 5bc6d81..0ac7332 100644

Lines of this file are not shown. View the raw message.

target-i386/helper.c +3 -3
index 2586aff..a760632 100644

Lines of this file are not shown. View the raw message.

target-i386/kvm.c +3 -3
index 04e65c5..bf12a2c 100644

Lines of this file are not shown. View the raw message.

target-i386/op_helper.c +3 -3
index c89e4a4..2beaacd 100644

Lines of this file are not shown. View the raw message.

target-lm32/helper.c +1 -1
index fc0b444..6ff2374 100644

Lines of this file are not shown. View the raw message.

target-m68k/helper.c +1 -1
index 674c8e6..c7be964 100644

Lines of this file are not shown. View the raw message.

target-microblaze/cpu.h +1 -1
index 1a307e3..69c6641 100644

Lines of this file are not shown. View the raw message.

target-microblaze/helper.c +1 -1
index 2cf2802..85a657e 100644

Lines of this file are not shown. View the raw message.

target-microblaze/op_helper.c +1 -1
index 7433cec..d445b10 100644

Lines of this file are not shown. View the raw message.

target-mips/cpu.h +6 -6
index 71cb4e8..7549d96 100644

Lines of this file are not shown. View the raw message.

target-mips/helper.c +9 -9
index 7225616..a0a6ee5 100644

Lines of this file are not shown. View the raw message.

target-mips/op_helper.c +3 -3
index c51b9cb..c84c7a5 100644

Lines of this file are not shown. View the raw message.

target-ppc/cpu.h +12 -12
index 2d67d1f..99a39d0 100644

Lines of this file are not shown. View the raw message.

target-ppc/helper.c +23 -23

46 lines not on this page · raw message

target-ppc/op_helper.c +1 -1
index 6339c95..4dbd770 100644

Lines of this file are not shown. View the raw message.

target-s390x/cpu.h +1 -1
index b8893b3..d7deda8 100644

Lines of this file are not shown. View the raw message.

target-s390x/helper.c +4 -4
index 10cc9dd..a93fdfb 100644

Lines of this file are not shown. View the raw message.

target-s390x/op_helper.c +5 -5
index b8a1a8a..40e586f 100644

Lines of this file are not shown. View the raw message.

target-sh4/cpu.h +8 -8
index 7d7fdde..b59cbc7 100644

Lines of this file are not shown. View the raw message.

target-sh4/helper.c +9 -9
index 006d1a9..046587e 100644

Lines of this file are not shown. View the raw message.

target-sparc/cpu.h +2 -2
index 38a7074..5ee8f68 100644

Lines of this file are not shown. View the raw message.

target-sparc/ldst_helper.c +20 -20
index b59707e..b22998e 100644

Lines of this file are not shown. View the raw message.

target-sparc/mmu_helper.c +19 -19
index bdff1c3..f59413c 100644

Lines of this file are not shown. View the raw message.

target-xtensa/helper.c +1 -1
index 2a0cb1a..cf9c840 100644

Lines of this file are not shown. View the raw message.

targphys.h +4 -4
index 95648d6..4de9a10 100644

Lines of this file are not shown. View the raw message.

xen-all.c +16 -16
index d58d461..6da752b 100644

Lines of this file are not shown. View the raw message.

xen-mapcache.c +16 -16
index 9fecc64..3090a68 100644

Lines of this file are not shown. View the raw message.

xen-mapcache.h +3 -3
index da874ca..9971b9b 100644

Lines of this file are not shown. View the raw message.

xtensa-semi.c +3 -3
index ba0e828..d40bad1 100644

Lines of this file are not shown. View the raw message.

The rest of this diff is not shown. View the raw message.

Signature · 1 line
1.7.7.1

Part of the diff is not shown here. View the raw message.

#1 lore raw
Quoted 11 lines · Avi Kivity

The name 'Phys' conveys exactly the same information as 'target_phys_addr_t':

 - it has to be a physical address (no such thing as physical data)
 - it has to be a target address (qemu doesn't do host physical addresses)
 - the fact that it's a type is implied by the naming convention

As it's 4 characters vs. 18, and C standard compliant to boot, Phys is a clear winner.  Rename all instances of target_phys_addr_t to the new name. All hail Phys!

 323 files changed, 1959 insertions(+), 1959 deletions(-)

Seems like gratuitous churn to me...

-- PMM

author
#2 lore raw
Quoted 7 lines · Peter Maydell
Quoted 6 lines · Avi Kivity

The name 'Phys' conveys exactly the same information as 'target_phys_addr_t':

- it has to be a physical address (no such thing as physical data)
- it has to be a target address (qemu doesn't do host physical addresses)
- the fact that it's a type is implied by the naming convention

Quoted 8 lines
Quoted 5 lines

As it's 4 characters vs. 18, and C standard compliant to boot, Phys is a clear winner. Rename all instances of target_phys_addr_t to the new name. All hail Phys!

 323 files changed, 1959 insertions(+), 1959 deletions(-)

Seems like gratuitous churn to me...

It will generate noise, but improve readability by a little bit.

Signature · 2 lines
I have a truly marvellous patch that fixes the bug which this
signature is too narrow to contain.
#3 lore raw
In reply to Peter Maydell
Quoted 7 lines · Peter Maydell
Quoted 6 lines · Avi Kivity

The name 'Phys' conveys exactly the same information as 'target_phys_addr_t':

- it has to be a physical address (no such thing as physical data)
- it has to be a target address (qemu doesn't do host physical addresses)
- the fact that it's a type is implied by the naming convention

Quoted 7 lines
Quoted 5 lines

As it's 4 characters vs. 18, and C standard compliant to boot, Phys is a clear winner. Rename all instances of target_phys_addr_t to the new name. All hail Phys!

  323 files changed, 1959 insertions(+), 1959 deletions(-)

Seems like gratuitous churn to me...

Agreed. I don't really like using CamelCase for scalar values either.

target_phys_addr_t should exist IMHO in the device model code. I think it would be more useful to introduce a hw_addr, fix it at u64, make the device model and memory API use that, and then make it so we didn't do the silliness around libhw32/libhw64.

I think the only reason we don't fix target_phys_addr_t at u64 is because of sensitivity around the TLB softmmu, right? A hw_addr for hw/*.c should be a reasonable compromise.

Making the build faster (by killing libhw32/libhw64) would be a good justification for this type of change IMHO.

Regards,

Anthony Liguori

Quoted 3 lines

-- PMM

#4 lore raw
Quoted 1 line · Anthony Liguori

target_phys_addr_t should exist IMHO in the device model code.

(I assume "should not" ?)

Quoted 4 lines

 I think it
would be more useful to introduce a hw_addr, fix it at u64, make the device model and memory API use that, and then make it so we didn't do the silliness around libhw32/libhw64.

A lot of the usage of target_phys_addr_t in hw/ is actually not handling addresses at all, but merely offsets into device IO regions (ie as parameters to device read/write functions)...

-- PMM

#5 lore raw
Quoted 4 lines · Peter Maydell
Quoted 1 line · Anthony Liguori

target_phys_addr_t should exist IMHO in the device model code.

(I assume "should not" ?)

Yes, sorry.

Quoted 9 lines
Quoted 5 lines

I think it
would be more useful to introduce a hw_addr, fix it at u64, make the device model and memory API use that, and then make it so we didn't do the silliness around libhw32/libhw64.

A lot of the usage of target_phys_addr_t in hw/ is actually not handling addresses at all, but merely offsets into device IO regions (ie as parameters to device read/write functions)...

Exactly, which is why using target_phys_addr_t (and subsequently building the device twice) doesn't make a lot of sense.

Regards,

Anthony Liguori

Quoted 3 lines

-- PMM

#6 lore raw
Quoted 7 lines · Anthony Liguori
Quoted 3 lines · Peter Maydell

A lot of the usage of target_phys_addr_t in hw/ is actually not handling addresses at all, but merely offsets into device IO regions (ie as parameters to device read/write functions)...

Exactly, which is why using target_phys_addr_t (and subsequently building the device twice) doesn't make a lot of sense.

So should we have a hw_offset type for this? That would cut out a lot of the noise and let us find out how much code in hw/ is actually using physaddrs...

-- PMM

#7 lore raw

Am 05.01.2012 01:24, schrieb Peter Maydell:

Quoted 6 lines · Anthony Liguori
Quoted 5 lines · Peter Maydell
Quoted 3 lines

A lot of the usage of target_phys_addr_t in hw/ is actually not handling addresses at all, but merely offsets into device IO regions (ie as parameters to device read/write functions)...

Quoted 8 lines
Quoted 2 lines

Exactly, which is why using target_phys_addr_t (and subsequently building the device twice) doesn't make a lot of sense.

So should we have a hw_offset type for this? That would cut out a lot of the noise and let us find out how much code in hw/ is actually using physaddrs...

-- PMM

Hardware offsets are hardware: you can count the address lines or get the values from the vendor's manual (you cannot count when serial protocolsare used). A 32 bit PCI card will take 32 bit offsets (or smaller), even when itis used in a 64 bit host.

It should be possible to model that in QEMU, too. uint8_t, uint16_t, uint32_t and uint64_t are good enough to describe the typical offset ranges of any hardware.

Cheers,
Stefan Weil

#8 lore raw
In reply to Anthony Liguori
Quoted 25 lines · Anthony Liguori
Quoted 16 lines · Peter Maydell
Quoted 14 lines · Avi Kivity

The name 'Phys' conveys exactly the same information as 'target_phys_addr_t':

 - it has to be a physical address (no such thing as physical data)
 - it has to be a target address (qemu doesn't do host physical addresses)
 - the fact that it's a type is implied by the naming convention

As it's 4 characters vs. 18, and C standard compliant to boot, Phys is a clear winner.  Rename all instances of target_phys_addr_t to the new name.
All hail Phys!

Quoted 4 lines
Quoted 1 line
 323 files changed, 1959 insertions(+), 1959 deletions(-)

Seems like gratuitous churn to me...

Agreed.  I don't really like using CamelCase for scalar values either.

Quoted 8 lines

target_phys_addr_t should exist IMHO in the device model code.  I think it would be more useful to introduce a hw_addr, fix it at u64, make the device model and memory API use that, and then make it so we didn't do the silliness around libhw32/libhw64.

I think the only reason we don't fix target_phys_addr_t at u64 is because of sensitivity around the TLB softmmu, right?  A hw_addr for hw/*.c should be a reasonable compromise.

IOTLB could be pushed to memory system, that way for example the TLB could be shared between CPUs. Obviously each CPU needs individual mappings.

Quoted 2 lines

Making the build faster (by killing libhw32/libhw64) would be a good justification for this type of change IMHO.

The original reason was to avoid 64 bit arithmetic on 32 bit hosts. Now that 128 bit arithmetic is used for memory API, it probably does not make so much sense.

Quoted 9 lines

Regards,

Anthony Liguori

Quoted 3 lines

-- PMM

author
#9 lore raw
Quoted 6 lines · Blue Swirl
Quoted 2 lines

Making the build faster (by killing libhw32/libhw64) would be a good justification for this type of change IMHO.

The original reason was to avoid 64 bit arithmetic on 32 bit hosts. Now that 128 bit arithmetic is used for memory API, it probably does not make so much sense.

128 bit arithmetic is only used when changing the physical memory map; not during runtime. However I agree that we should move to 64 bit addresses exclusively.

Signature · 1 line
error compiling committee.c: too many arguments to function