target: Rename cpu_get_phys_page_{,attrs_}debug
Rename cpu_phys_page_debug() and cpu_phys_page_attrs_debug() to cpu_phys_addr_debug() and cpu_phys_addr_attrs_debug(). Commit created with: sed -i -e 's/cpu_get_phys_page_debug/cpu_get_phys_addr_debug/g;s/cpu_get_phys_page_attrs_debug/cpu_get_phys_addr_attrs_debug/g' $(git grep -l cpu_get_phys_page) Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Message-id: 20260417173105.1648172-10-peter.maydell@linaro.org Message-ID: <20260430093810.2762539-11-peter.maydell@linaro.org> Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Peter Maydell committed
Apr 30, 2026 at 10:37 UTC
d6aefbc524e4f76548fe96c1437ef58d9b679eac
10 files changed
+18
-18
hw/core/cpu-system.c
+3
-3
@@ -55,7 +55,7 @@ bool cpu_get_memory_mapping(CPUState *cpu, MemoryMappingList *list,
55
return false;
56
}
57
58
-hwaddr cpu_get_phys_page_attrs_debug(CPUState *cpu, vaddr addr,
58
+hwaddr cpu_get_phys_addr_attrs_debug(CPUState *cpu, vaddr addr,
59
MemTxAttrs *attrs)
60
{
61
hwaddr paddr;
@@ -73,11 +73,11 @@ hwaddr cpu_get_phys_page_attrs_debug(CPUState *cpu, vaddr addr,
73
return paddr;
74
}
75
76
-hwaddr cpu_get_phys_page_debug(CPUState *cpu, vaddr addr)
76
+hwaddr cpu_get_phys_addr_debug(CPUState *cpu, vaddr addr)
77
{
78
MemTxAttrs attrs = {};
79
80
- return cpu_get_phys_page_attrs_debug(cpu, addr, &attrs);
80
+ return cpu_get_phys_addr_attrs_debug(cpu, addr, &attrs);
81
}
82
83
int cpu_asidx_from_attrs(CPUState *cpu, MemTxAttrs attrs)
hw/i386/vapic.c
+2
-2
@@ -173,7 +173,7 @@ static int find_real_tpr_addr(VAPICROMState *s, CPUX86State *env)
173
* virtual address space for the APIC mapping.
174
*/
175
for (addr = 0xfffff000; addr >= 0x80000000; addr -= TARGET_PAGE_SIZE) {
176
- paddr = cpu_get_phys_page_debug(cs, addr);
176
+ paddr = cpu_get_phys_addr_debug(cs, addr);
177
if (paddr != APIC_DEFAULT_ADDRESS) {
178
continue;
179
}
@@ -305,7 +305,7 @@ static int update_rom_mapping(VAPICROMState *s, CPUX86State *env, target_ulong i
305
306
/* find out virtual address of the ROM */
307
rom_state_vaddr = s->rom_state_paddr + (ip & 0xf0000000);
308
- paddr = cpu_get_phys_page_debug(cs, rom_state_vaddr);
308
+ paddr = cpu_get_phys_addr_debug(cs, rom_state_vaddr);
309
if (paddr == -1) {
310
return -1;
311
}
hw/xtensa/sim.c
+1
-1
@@ -41,7 +41,7 @@ static uint64_t translate_phys_addr(void *opaque, uint64_t addr)
41
{
42
XtensaCPU *cpu = opaque;
43
44
- return cpu_get_phys_page_debug(CPU(cpu), addr);
44
+ return cpu_get_phys_addr_debug(CPU(cpu), addr);
45
}
46
47
static void sim_reset(void *opaque)
hw/xtensa/xtfpga.c
+1
-1
@@ -192,7 +192,7 @@ static uint64_t translate_phys_addr(void *opaque, uint64_t addr)
192
{
193
XtensaCPU *cpu = opaque;
194
195
- return cpu_get_phys_page_debug(CPU(cpu), addr);
195
+ return cpu_get_phys_addr_debug(CPU(cpu), addr);
196
}
197
198
static void xtfpga_reset(void *opaque)
include/hw/core/cpu.h
+4
-4
@@ -739,7 +739,7 @@ enum CPUDumpFlags {
739
void cpu_dump_state(CPUState *cpu, FILE *f, int flags);
740
741
/**
742
- * cpu_get_phys_page_attrs_debug:
742
+ * cpu_get_phys_addr_attrs_debug:
743
* @cpu: The CPU to obtain the physical page address for.
744
* @addr: The virtual address.
745
* @attrs: Updated on return with the memory transaction attributes to use
@@ -751,11 +751,11 @@ void cpu_dump_state(CPUState *cpu, FILE *f, int flags);
751
*
752
* Returns: Corresponding physical page address or -1 if no page found.
753
*/
754
-hwaddr cpu_get_phys_page_attrs_debug(CPUState *cpu, vaddr addr,
754
+hwaddr cpu_get_phys_addr_attrs_debug(CPUState *cpu, vaddr addr,
755
MemTxAttrs *attrs);
756
757
/**
758
- * cpu_get_phys_page_debug:
758
+ * cpu_get_phys_addr_debug:
759
* @cpu: The CPU to obtain the physical page address for.
760
* @addr: The virtual address.
761
*
@@ -764,7 +764,7 @@ hwaddr cpu_get_phys_page_attrs_debug(CPUState *cpu, vaddr addr,
764
*
765
* Returns: Corresponding physical page address or -1 if no page found.
766
*/
767
-hwaddr cpu_get_phys_page_debug(CPUState *cpu, vaddr addr);
767
+hwaddr cpu_get_phys_addr_debug(CPUState *cpu, vaddr addr);
768
769
/** cpu_asidx_from_attrs:
770
* @cpu: CPU
monitor/hmp-cmds.c
+1
-1
@@ -771,7 +771,7 @@ void hmp_gva2gpa(Monitor *mon, const QDict *qdict)
771
return;
772
}
773
774
- gpa = cpu_get_phys_page_debug(cs, addr & TARGET_PAGE_MASK);
774
+ gpa = cpu_get_phys_addr_debug(cs, addr & TARGET_PAGE_MASK);
775
if (gpa == -1) {
776
monitor_printf(mon, "Unmapped\n");
777
} else {
plugins/api.c
+1
-1
@@ -619,7 +619,7 @@ bool qemu_plugin_translate_vaddr(uint64_t vaddr, uint64_t *hwaddr)
619
#ifdef CONFIG_SOFTMMU
620
g_assert(current_cpu);
621
622
- uint64_t res = cpu_get_phys_page_debug(current_cpu, vaddr);
622
+ uint64_t res = cpu_get_phys_addr_debug(current_cpu, vaddr);
623
624
if (res == (uint64_t)-1) {
625
return false;
system/physmem.c
+1
-1
@@ -4041,7 +4041,7 @@ int cpu_memory_rw_debug(CPUState *cpu, vaddr addr,
4041
MemTxResult res;
4042
4043
page = addr & TARGET_PAGE_MASK;
4044
- phys_addr = cpu_get_phys_page_attrs_debug(cpu, page, &attrs);
4044
+ phys_addr = cpu_get_phys_addr_attrs_debug(cpu, page, &attrs);
4045
asidx = cpu_asidx_from_attrs(cpu, attrs);
4046
/* if no physical page mapped, return an error */
4047
if (phys_addr == -1)
target/sparc/mmu_helper.c
+3
-3
@@ -366,20 +366,20 @@ void dump_mmu(CPUSPARCState *env)
366
for (n = 0, va = 0; n < 256; n++, va += 16 * 1024 * 1024) {
367
pde = mmu_probe(env, va, 2);
368
if (pde) {
369
- pa = cpu_get_phys_page_debug(cs, va);
369
+ pa = cpu_get_phys_addr_debug(cs, va);
370
qemu_printf("VA: " TARGET_FMT_lx ", PA: " HWADDR_FMT_plx
371
" PDE: " TARGET_FMT_lx "\n", va, pa, pde);
372
for (m = 0, va1 = va; m < 64; m++, va1 += 256 * 1024) {
373
pde = mmu_probe(env, va1, 1);
374
if (pde) {
375
- pa = cpu_get_phys_page_debug(cs, va1);
375
+ pa = cpu_get_phys_addr_debug(cs, va1);
376
qemu_printf(" VA: " TARGET_FMT_lx ", PA: "
377
HWADDR_FMT_plx " PDE: " TARGET_FMT_lx "\n",
378
va1, pa, pde);
379
for (o = 0, va2 = va1; o < 64; o++, va2 += 4 * 1024) {
380
pde = mmu_probe(env, va2, 0);
381
if (pde) {
382
- pa = cpu_get_phys_page_debug(cs, va2);
382
+ pa = cpu_get_phys_addr_debug(cs, va2);
383
qemu_printf(" VA: " TARGET_FMT_lx ", PA: "
384
HWADDR_FMT_plx " PTE: "
385
TARGET_FMT_lx "\n",
target/xtensa/xtensa-semi.c
+1
-1
@@ -215,7 +215,7 @@ void HELPER(simcall)(CPUXtensaState *env)
215
uint32_t len_done = 0;
216
217
while (len > 0) {
218
- hwaddr paddr = cpu_get_phys_page_debug(cs, vaddr);
218
+ hwaddr paddr = cpu_get_phys_addr_debug(cs, vaddr);
219
uint32_t page_left =
220
TARGET_PAGE_SIZE - (vaddr & (TARGET_PAGE_SIZE - 1));
221
uint32_t io_sz = page_left < len ? page_left : len;