qemu/hw/riscv
Daniel Henrique Barboza a51a88fd5d hw/riscv/virt.c: use s->memmap in create_fdt_virtio()
create_fdt_virtio() can use s->memmap instead of having an extra
argument for it.

While we're at it rewrite it a little bit to avoid the clunky line in
'name' and code repetition:

- declare 'virtio_base' out of the loop since it never changes;
- declare a 'size' variable. Use it to calculate the address of the
  virtio device in an 'addr' variable;
- use 'addr' in the 'name' g_strdup_printf();
- use 'addr' and 'size' when creating the 'reg' property.

Signed-off-by: Daniel Henrique Barboza <dbarboza@ventanamicro.com>
Reviewed-by: Alistair Francis <alistair.francis@wdc.com>
Message-ID: <20250429125811.224803-8-dbarboza@ventanamicro.com>
Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
2025-05-19 13:42:56 +10:00
..
boot.c hw: Centralize handling of -machine dumpdtb option 2025-02-24 15:03:42 +00:00
Kconfig hw/riscv: Add Microblaze V generic board 2024-12-20 11:22:47 +10:00
meson.build hw/riscv/riscv-iommu: add riscv-iommu-hpm file 2025-03-04 15:42:54 +10:00
microblaze-v-generic.c include/system: Move exec/address-spaces.h to system/address-spaces.h 2025-04-23 14:08:21 -07:00
microchip_pfsoc.c hw/riscv: Configurable MPFS CLINT timebase freq 2025-05-19 13:30:24 +10:00
numa.c include: Rename sysemu/ -> system/ 2024-12-20 17:44:56 +01:00
opentitan.c qom: Have class_init() take a const data argument 2025-04-25 17:00:41 +02:00
riscv-iommu-bits.h hw/riscv/riscv-iommu: Fix process directory table walk 2025-03-19 16:35:58 +10:00
riscv-iommu-hpm.c hw/riscv: add IOMMU HPM trace events 2025-03-04 15:42:54 +10:00
riscv-iommu-hpm.h hw/riscv/riscv-iommu: add hpm events mmio write 2025-03-04 15:42:54 +10:00
riscv-iommu-pci.c qom: Make InterfaceInfo[] uses const 2025-04-25 17:00:41 +02:00
riscv-iommu-sys.c include: Remove 'exec/exec-all.h' 2025-04-30 12:45:05 -07:00
riscv-iommu.c qom: Have class_init() take a const data argument 2025-04-25 17:00:41 +02:00
riscv-iommu.h hw/riscv/riscv-iommu: add hpm events mmio write 2025-03-04 15:42:54 +10:00
riscv_hart.c target/riscv: Pass ra to riscv_csrrw 2025-05-19 13:39:29 +10:00
shakti_c.c qom: Have class_init() take a const data argument 2025-04-25 17:00:41 +02:00
sifive_e.c qom: Have class_init() take a const data argument 2025-04-25 17:00:41 +02:00
sifive_u.c qom: Have class_init() take a const data argument 2025-04-25 17:00:41 +02:00
spike.c qom: Have class_init() take a const data argument 2025-04-25 17:00:41 +02:00
trace-events hw/riscv: add IOMMU HPM trace events 2025-03-04 15:42:54 +10:00
trace.h hw/riscv: add RISC-V IOMMU base emulation 2024-10-31 13:51:24 +10:00
virt-acpi-build.c hw/riscv/virt-acpi-build: Add support for RIMT 2025-05-19 11:08:34 +10:00
virt.c hw/riscv/virt.c: use s->memmap in create_fdt_virtio() 2025-05-19 13:42:56 +10:00