summary refs log tree commit diff stats
path: root/hw/arm/virt.c
diff options
context:
space:
mode:
authorPhilippe Mathieu-Daudé <philmd@linaro.org>2023-12-19 17:57:45 +0000
committerPeter Maydell <peter.maydell@linaro.org>2023-12-19 17:57:45 +0000
commit55503372c3454ff0ce86f56866b9dddc2af00d9b (patch)
tree87b88ca8f0054093ec157807f325afadb1820635 /hw/arm/virt.c
parente77034f74bfc6afeb5ae56a8fd27815625999002 (diff)
downloadfocaccia-qemu-55503372c3454ff0ce86f56866b9dddc2af00d9b.tar.gz
focaccia-qemu-55503372c3454ff0ce86f56866b9dddc2af00d9b.zip
target/arm/kvm: Have kvm_arm_pvtime_init take a ARMCPU argument
Unify the "kvm_arm.h" API: All functions related to ARM vCPUs
take a ARMCPU* argument. Use the CPU() QOM cast macro When
calling the generic vCPU API from "sysemu/kvm.h".

Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Reviewed-by: Gavin Shan <gshan@redhat.com>
Message-id: 20231123183518.64569-8-philmd@linaro.org
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'hw/arm/virt.c')
-rw-r--r--hw/arm/virt.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/hw/arm/virt.c b/hw/arm/virt.c
index be2856c018..b6efe9da4d 100644
--- a/hw/arm/virt.c
+++ b/hw/arm/virt.c
@@ -2003,8 +2003,9 @@ static void virt_cpu_post_init(VirtMachineState *vms, MemoryRegion *sysmem)
                 kvm_arm_pmu_init(cpu);
             }
             if (steal_time) {
-                kvm_arm_pvtime_init(cpu, pvtime_reg_base +
-                                         cpu->cpu_index * PVTIME_SIZE_PER_CPU);
+                kvm_arm_pvtime_init(ARM_CPU(cpu), pvtime_reg_base
+                                                  + cpu->cpu_index
+                                                    * PVTIME_SIZE_PER_CPU);
             }
         }
     } else {