1eb31f13b2
vfio/container: Implement attach/detach_device
...
No functional change intended.
Signed-off-by: Eric Auger <eric.auger@redhat.com >
Signed-off-by: Yi Liu <yi.l.liu@intel.com >
Signed-off-by: Yi Sun <yi.y.sun@linux.intel.com >
Signed-off-by: Zhenzhong Duan <zhenzhong.duan@intel.com >
Reviewed-by: Cédric Le Goater <clg@redhat.com >
Signed-off-by: Cédric Le Goater <clg@redhat.com >
2023-12-19 19:03:38 +01:00
f79baf8c95
vfio/container: Move iova_ranges to base container
...
Meanwhile remove the helper function vfio_free_container as it
only calls g_free now.
No functional change intended.
Signed-off-by: Zhenzhong Duan <zhenzhong.duan@intel.com >
Reviewed-by: Cédric Le Goater <clg@redhat.com >
Signed-off-by: Cédric Le Goater <clg@redhat.com >
2023-12-19 19:03:38 +01:00
4d6b95010c
vfio/container: Move dirty_pgsizes and max_dirty_bitmap_size to base container
...
No functional change intended.
Signed-off-by: Eric Auger <eric.auger@redhat.com >
Signed-off-by: Yi Liu <yi.l.liu@intel.com >
Signed-off-by: Yi Sun <yi.y.sun@linux.intel.com >
Signed-off-by: Zhenzhong Duan <zhenzhong.duan@intel.com >
Reviewed-by: Cédric Le Goater <clg@redhat.com >
Signed-off-by: Cédric Le Goater <clg@redhat.com >
2023-12-19 19:03:38 +01:00
c7b313d300
vfio/container: Move listener to base container
...
Move listener to base container. Also error and initialized fields
are moved at the same time.
No functional change intended.
Signed-off-by: Eric Auger <eric.auger@redhat.com >
Signed-off-by: Yi Liu <yi.l.liu@intel.com >
Signed-off-by: Yi Sun <yi.y.sun@linux.intel.com >
Signed-off-by: Zhenzhong Duan <zhenzhong.duan@intel.com >
Reviewed-by: Cédric Le Goater <clg@redhat.com >
Signed-off-by: Cédric Le Goater <clg@redhat.com >
2023-12-19 19:03:38 +01:00
dc74a4b005
vfio/container: Move vrdl_list to base container
...
No functional change intended.
Signed-off-by: Zhenzhong Duan <zhenzhong.duan@intel.com >
Reviewed-by: Cédric Le Goater <clg@redhat.com >
Signed-off-by: Cédric Le Goater <clg@redhat.com >
2023-12-19 19:03:38 +01:00
7ab1cb74ff
vfio/container: Move pgsizes and dma_max_mappings to base container
...
No functional change intended.
Signed-off-by: Eric Auger <eric.auger@redhat.com >
Signed-off-by: Yi Liu <yi.l.liu@intel.com >
Signed-off-by: Yi Sun <yi.y.sun@linux.intel.com >
Signed-off-by: Zhenzhong Duan <zhenzhong.duan@intel.com >
Reviewed-by: Cédric Le Goater <clg@redhat.com >
Signed-off-by: Cédric Le Goater <clg@redhat.com >
2023-12-19 19:03:38 +01:00
e1cac6b203
vfio/container: Convert functions to base container
...
In the prospect to get rid of VFIOContainer refs
in common.c lets convert misc functions to use the base
container object instead:
vfio_devices_all_dirty_tracking
vfio_devices_all_device_dirty_tracking
vfio_devices_all_running_and_mig_active
vfio_devices_query_dirty_bitmap
vfio_get_dirty_bitmap
Signed-off-by: Eric Auger <eric.auger@redhat.com >
Signed-off-by: Zhenzhong Duan <zhenzhong.duan@intel.com >
Reviewed-by: Cédric Le Goater <clg@redhat.com >
Signed-off-by: Cédric Le Goater <clg@redhat.com >
2023-12-19 19:03:38 +01:00
3e6015d111
vfio/container: Move per container device list in base container
...
VFIO Device is also changed to point to base container instead of
legacy container.
No functional change intended.
Signed-off-by: Zhenzhong Duan <zhenzhong.duan@intel.com >
Reviewed-by: Cédric Le Goater <clg@redhat.com >
Signed-off-by: Cédric Le Goater <clg@redhat.com >
2023-12-19 19:03:38 +01:00
bb424490ed
vfio/container: Switch to IOMMU BE set_dirty_page_tracking/query_dirty_bitmap API
...
dirty_pages_supported field is also moved to the base container
No functional change intended.
Signed-off-by: Eric Auger <eric.auger@redhat.com >
Signed-off-by: Yi Liu <yi.l.liu@intel.com >
Signed-off-by: Yi Sun <yi.y.sun@linux.intel.com >
Signed-off-by: Zhenzhong Duan <zhenzhong.duan@intel.com >
Reviewed-by: Cédric Le Goater <clg@redhat.com >
Signed-off-by: Cédric Le Goater <clg@redhat.com >
2023-12-19 19:03:38 +01:00
e559706338
vfio/container: Move space field to base container
...
Move the space field to the base object. Also the VFIOAddressSpace
now contains a list of base containers.
No functional change intended.
Signed-off-by: Eric Auger <eric.auger@redhat.com >
Signed-off-by: Yi Liu <yi.l.liu@intel.com >
Signed-off-by: Yi Sun <yi.y.sun@linux.intel.com >
Signed-off-by: Zhenzhong Duan <zhenzhong.duan@intel.com >
Reviewed-by: Cédric Le Goater <clg@redhat.com >
Signed-off-by: Cédric Le Goater <clg@redhat.com >
2023-12-19 19:03:38 +01:00
dddf83ab99
vfio/common: Move giommu_list in base container
...
Move the giommu_list field in the base container and store
the base container in the VFIOGuestIOMMU.
No functional change intended.
Signed-off-by: Eric Auger <eric.auger@redhat.com >
Signed-off-by: Yi Liu <yi.l.liu@intel.com >
Signed-off-by: Yi Sun <yi.y.sun@linux.intel.com >
Signed-off-by: Zhenzhong Duan <zhenzhong.duan@intel.com >
Reviewed-by: Cédric Le Goater <clg@redhat.com >
Signed-off-by: Cédric Le Goater <clg@redhat.com >
2023-12-19 19:03:38 +01:00
ed2f7f8017
vfio/common: Introduce vfio_container_init/destroy helper
...
This adds two helper functions vfio_container_init/destroy which will be
used by both legacy and iommufd containers to do base container specific
initialization and release.
No functional change intended.
Suggested-by: Cédric Le Goater <clg@redhat.com >
Signed-off-by: Zhenzhong Duan <zhenzhong.duan@intel.com >
Reviewed-by: Cédric Le Goater <clg@redhat.com >
Signed-off-by: Cédric Le Goater <clg@redhat.com >
2023-12-19 19:03:38 +01:00
b08501a999
vfio/container: Switch to dma_map|unmap API
...
No functional change intended.
Signed-off-by: Eric Auger <eric.auger@redhat.com >
Signed-off-by: Yi Liu <yi.l.liu@intel.com >
Signed-off-by: Yi Sun <yi.y.sun@linux.intel.com >
Signed-off-by: Zhenzhong Duan <zhenzhong.duan@intel.com >
Reviewed-by: Cédric Le Goater <clg@redhat.com >
Signed-off-by: Cédric Le Goater <clg@redhat.com >
2023-12-19 19:03:38 +01:00
d246685791
vfio/container: Introduce a empty VFIOIOMMUOps
...
This empty VFIOIOMMUOps named vfio_legacy_ops will hold all general
IOMMU ops of legacy container.
Signed-off-by: Zhenzhong Duan <zhenzhong.duan@intel.com >
Reviewed-by: Cédric Le Goater <clg@redhat.com >
Signed-off-by: Cédric Le Goater <clg@redhat.com >
2023-12-19 19:03:38 +01:00
f61dddd732
vfio: Introduce base object for VFIOContainer and targeted interface
...
Introduce a dumb VFIOContainerBase object and its targeted interface.
This is willingly not a QOM object because we don't want it to be
visible from the user interface. The VFIOContainerBase will be
smoothly populated in subsequent patches as well as interfaces.
No functional change intended.
Signed-off-by: Eric Auger <eric.auger@redhat.com >
Signed-off-by: Yi Liu <yi.l.liu@intel.com >
Signed-off-by: Yi Sun <yi.y.sun@linux.intel.com >
Signed-off-by: Zhenzhong Duan <zhenzhong.duan@intel.com >
Reviewed-by: Cédric Le Goater <clg@redhat.com >
Signed-off-by: Cédric Le Goater <clg@redhat.com >
2023-12-19 19:03:38 +01:00
6f9c3aaa34
fsl-imx: add simple RTC emulation for i.MX6 and i.MX7 boards
...
Signed-off-by: Nikita Ostrenkov <n.ostrenkov@gmail.com >
Message-id: 20231216133408.2884-1-n.ostrenkov@gmail.com
Reviewed-by: Peter Maydell <peter.maydell@linaro.org >
Signed-off-by: Peter Maydell <peter.maydell@linaro.org >
2023-12-19 18:03:32 +00:00
6980c31dec
target/arm/helper: Propagate MDCR_EL2.HPMN into PMCR_EL0.N
...
MDCR_EL2.HPMN allows an hypervisor to limit the number of PMU counters
available to EL1 and EL0 (to keep the others to itself). QEMU already
implements this split correctly, except for PMCR_EL0.N reads: the number
of counters read by EL1 or EL0 should be the one configured in
MDCR_EL2.HPMN.
Cc: qemu-stable@nongnu.org
Signed-off-by: Jean-Philippe Brucker <jean-philippe@linaro.org >
Message-id: 20231215144652.4193815-2-jean-philippe@linaro.org
Reviewed-by: Peter Maydell <peter.maydell@linaro.org >
Signed-off-by: Peter Maydell <peter.maydell@linaro.org >
2023-12-19 18:03:32 +00:00
47eac5d423
target/arm/tcg: Including missing 'exec/exec-all.h' header
...
translate_insn() ends up calling probe_access_full(), itself
declared in "exec/exec-all.h":
TranslatorOps::translate_insn
-> aarch64_tr_translate_insn()
-> is_guarded_page()
-> probe_access_full()
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org >
Reviewed-by: Richard Henderson <richard.henderson@linaro.org >
Message-id: 20231130142519.28417-4-philmd@linaro.org
Signed-off-by: Peter Maydell <peter.maydell@linaro.org >
2023-12-19 17:57:49 +00:00
7a3014a9a2
target/arm: Restrict DC CVAP & DC CVADP instructions to TCG accel
...
Hardware accelerators handle that in *hardware*.
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org >
Reviewed-by: Richard Henderson <richard.henderson@linaro.org >
Message-id: 20231130142519.28417-3-philmd@linaro.org
Signed-off-by: Peter Maydell <peter.maydell@linaro.org >
2023-12-19 17:57:49 +00:00
d1d119bbd7
target/arm: Restrict TCG specific helpers
...
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org >
Reviewed-by: Richard Henderson <richard.henderson@linaro.org >
Message-id: 20231130142519.28417-2-philmd@linaro.org
Signed-off-by: Peter Maydell <peter.maydell@linaro.org >
2023-12-19 17:57:48 +00:00
c36a0d577b
target/arm: Don't implement *32_EL2 registers when EL1 is AArch64 only
...
The system registers DBGVCR32_EL2, FPEXC32_EL2, DACR32_EL2 and
IFSR32_EL2 are present only to allow an AArch64 EL2 or EL3 to read
and write the contents of an AArch32-only system register. The
architecture requires that they are present only when EL1 can be
AArch32, but we implement them unconditionally. This was OK when all
our CPUs supported AArch32 EL1, but we have quite a lot of CPU models
now which only support AArch64 at EL1:
a64fx
cortex-a76
cortex-a710
neoverse-n1
neoverse-n2
neoverse-v1
Only define these registers for CPUs which allow AArch32 EL1.
Signed-off-by: Peter Maydell <peter.maydell@linaro.org >
Reviewed-by: Richard Henderson <richard.henderson@linaro.org >
Message-id: 20231121144605.3980419-1-peter.maydell@linaro.org
2023-12-19 17:57:48 +00:00
366bf10e11
target/arm/kvm: Have kvm_arm_hw_debug_active 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-17-philmd@linaro.org
Signed-off-by: Peter Maydell <peter.maydell@linaro.org >
2023-12-19 17:57:48 +00:00
39639275a1
target/arm/kvm: Have kvm_arm_handle_debug 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-16-philmd@linaro.org
Signed-off-by: Peter Maydell <peter.maydell@linaro.org >
2023-12-19 17:57:47 +00:00
3187e06a82
target/arm/kvm: Have kvm_arm_handle_dabt_nisv 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-15-philmd@linaro.org
Signed-off-by: Peter Maydell <peter.maydell@linaro.org >
2023-12-19 17:57:47 +00:00
ca0d1b7ca4
target/arm/kvm: Have kvm_arm_verify_ext_dabt_pending take a ARMCPU arg
...
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-14-philmd@linaro.org
Signed-off-by: Peter Maydell <peter.maydell@linaro.org >
2023-12-19 17:57:47 +00:00
76acc98799
target/arm/kvm: Have kvm_arm_[get|put]_virtual_time take 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-13-philmd@linaro.org
Signed-off-by: Peter Maydell <peter.maydell@linaro.org >
2023-12-19 17:57:47 +00:00
0d31a63186
target/arm/kvm: Have kvm_arm_vcpu_finalize 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-12-philmd@linaro.org
Signed-off-by: Peter Maydell <peter.maydell@linaro.org >
2023-12-19 17:57:46 +00:00
bbb22d5865
target/arm/kvm: Have kvm_arm_vcpu_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-11-philmd@linaro.org
Signed-off-by: Peter Maydell <peter.maydell@linaro.org >
2023-12-19 17:57:46 +00:00
5ed84f3bf7
target/arm/kvm: Have kvm_arm_pmu_set_irq 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-10-philmd@linaro.org
Signed-off-by: Peter Maydell <peter.maydell@linaro.org >
2023-12-19 17:57:46 +00:00
d344f5ba87
target/arm/kvm: Have kvm_arm_pmu_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-9-philmd@linaro.org
Signed-off-by: Peter Maydell <peter.maydell@linaro.org >
2023-12-19 17:57:46 +00:00
55503372c3
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 >
2023-12-19 17:57:45 +00:00
e77034f74b
target/arm/kvm: Have kvm_arm_set_device_attr 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-7-philmd@linaro.org
Signed-off-by: Peter Maydell <peter.maydell@linaro.org >
2023-12-19 17:57:45 +00:00
d63392820b
target/arm/kvm: Have kvm_arm_sve_get_vls 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-6-philmd@linaro.org
Signed-off-by: Peter Maydell <peter.maydell@linaro.org >
2023-12-19 17:57:45 +00:00
bc1b09b3db
target/arm/kvm: Have kvm_arm_sve_set_vls 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-5-philmd@linaro.org
Signed-off-by: Peter Maydell <peter.maydell@linaro.org >
2023-12-19 17:57:45 +00:00
cac675b54e
target/arm/kvm: Have kvm_arm_add_vcpu_properties 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-4-philmd@linaro.org
[PMM: fix parameter name in doc comment too]
Signed-off-by: Peter Maydell <peter.maydell@linaro.org >
2023-12-19 17:57:44 +00:00
600f070e93
target/arm/kvm: Remove unused includes
...
Both MemoryRegion and Error types are forward declared
in "qemu/typedefs.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-3-philmd@linaro.org
Signed-off-by: Peter Maydell <peter.maydell@linaro.org >
2023-12-19 17:57:44 +00:00
5db30bcd7d
hw/intc/arm_gicv3: Include missing 'qemu/error-report.h' header
...
kvm_arm_its_reset_hold() calls warn_report(), itself declared
in "qemu/error-report.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-2-philmd@linaro.org
Signed-off-by: Peter Maydell <peter.maydell@linaro.org >
2023-12-19 17:57:44 +00:00
396b6c50c3
target/arm/kvm: Unexport kvm_arm_vm_state_change
...
Signed-off-by: Richard Henderson <richard.henderson@linaro.org >
Reviewed-by: Gavin Shan <gshan@redhat.com >
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org >
Tested-by: Philippe Mathieu-Daudé <philmd@linaro.org >
Signed-off-by: Peter Maydell <peter.maydell@linaro.org >
2023-12-19 17:57:43 +00:00
71c34911c1
target/arm/kvm: Unexport and tidy kvm_arm_sync_mpstate_to_{kvm, qemu}
...
Drop fprintfs and actually use the return values in the callers.
This is OK to do since commit 7191f24c7f which added the
error-check to the generic accel/kvm functions that eventually
call into these ones.
Signed-off-by: Richard Henderson <richard.henderson@linaro.org >
Reviewed-by: Gavin Shan <gshan@redhat.com >
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org >
Tested-by: Philippe Mathieu-Daudé <philmd@linaro.org >
[PMM: tweak commit message]
Signed-off-by: Peter Maydell <peter.maydell@linaro.org >
2023-12-19 17:57:43 +00:00
353e03cd45
target/arm/kvm: Unexport kvm_{get,put}_vcpu_events
...
Signed-off-by: Richard Henderson <richard.henderson@linaro.org >
Reviewed-by: Gavin Shan <gshan@redhat.com >
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org >
Tested-by: Philippe Mathieu-Daudé <philmd@linaro.org >
Signed-off-by: Peter Maydell <peter.maydell@linaro.org >
2023-12-19 17:57:43 +00:00
51641de468
target/arm/kvm: Init cap_has_inject_serror_esr in kvm_arch_init
...
There is no need to do this in kvm_arch_init_vcpu per vcpu.
Inline kvm_arm_init_serror_injection rather than keep separate.
Signed-off-by: Richard Henderson <richard.henderson@linaro.org >
Reviewed-by: Gavin Shan <gshan@redhat.com >
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org >
Tested-by: Philippe Mathieu-Daudé <philmd@linaro.org >
Signed-off-by: Peter Maydell <peter.maydell@linaro.org >
2023-12-19 17:57:43 +00:00
09ddc01216
target/arm/kvm: Unexport kvm_arm_init_cpreg_list
...
Signed-off-by: Richard Henderson <richard.henderson@linaro.org >
Reviewed-by: Gavin Shan <gshan@redhat.com >
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org >
Tested-by: Philippe Mathieu-Daudé <philmd@linaro.org >
Signed-off-by: Peter Maydell <peter.maydell@linaro.org >
2023-12-19 17:57:42 +00:00
c223c67aaa
target/arm/kvm: Unexport kvm_arm_vcpu_finalize
...
Signed-off-by: Richard Henderson <richard.henderson@linaro.org >
Reviewed-by: Gavin Shan <gshan@redhat.com >
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org >
Tested-by: Philippe Mathieu-Daudé <philmd@linaro.org >
Signed-off-by: Peter Maydell <peter.maydell@linaro.org >
2023-12-19 17:57:42 +00:00
5a8a6013ea
target/arm/kvm: Unexport kvm_arm_vcpu_init
...
Signed-off-by: Richard Henderson <richard.henderson@linaro.org >
Reviewed-by: Gavin Shan <gshan@redhat.com >
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org >
Tested-by: Philippe Mathieu-Daudé <philmd@linaro.org >
Signed-off-by: Peter Maydell <peter.maydell@linaro.org >
2023-12-19 17:57:42 +00:00
de3c96017f
target/arm/kvm: Merge kvm64.c into kvm.c
...
Since kvm32.c was removed, there is no need to keep them separate.
This will allow more symbols to be unexported.
Signed-off-by: Richard Henderson <richard.henderson@linaro.org >
Reviewed-by: Gavin Shan <gshan@redhat.com >
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org >
Tested-by: Philippe Mathieu-Daudé <philmd@linaro.org >
[PMM: retain copyright lines from kvm64.c in kvm.c]
Signed-off-by: Peter Maydell <peter.maydell@linaro.org >
2023-12-19 17:57:42 +00:00
f38ce925eb
target/arm/kvm: Move kvm_arm_reg_syncs_via_cpreg_list and unexport
...
Signed-off-by: Richard Henderson <richard.henderson@linaro.org >
Reviewed-by: Gavin Shan <gshan@redhat.com >
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org >
Tested-by: Philippe Mathieu-Daudé <philmd@linaro.org >
[PMM: merged two duplicate comments, as suggested by Gavin]
Signed-off-by: Peter Maydell <peter.maydell@linaro.org >
2023-12-19 17:57:41 +00:00
676fe6846f
target/arm/kvm: Move kvm_arm_cpreg_level and unexport
...
Signed-off-by: Richard Henderson <richard.henderson@linaro.org >
Reviewed-by: Gavin Shan <gshan@redhat.com >
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org >
Tested-by: Philippe Mathieu-Daudé <philmd@linaro.org >
Signed-off-by: Peter Maydell <peter.maydell@linaro.org >
2023-12-19 17:57:41 +00:00
d213f5adf5
target/arm/kvm: Use a switch for kvm_arm_cpreg_level
...
Use a switch instead of a linear search through data.
Signed-off-by: Richard Henderson <richard.henderson@linaro.org >
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org >
Tested-by: Philippe Mathieu-Daudé <philmd@linaro.org >
Signed-off-by: Peter Maydell <peter.maydell@linaro.org >
2023-12-19 17:57:41 +00:00
dc40d45ebd
target/arm/kvm: Move kvm_arm_get_host_cpu_features and unexport
...
Signed-off-by: Richard Henderson <richard.henderson@linaro.org >
Reviewed-by: Gavin Shan <gshan@redhat.com >
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org >
Tested-by: Philippe Mathieu-Daudé <philmd@linaro.org >
Signed-off-by: Peter Maydell <peter.maydell@linaro.org >
2023-12-19 17:57:41 +00:00
21beccd384
target/arm/kvm: Inline kvm_arm_steal_time_supported
...
This function is only used once, and is quite simple.
Signed-off-by: Richard Henderson <richard.henderson@linaro.org >
Reviewed-by: Gavin Shan <gshan@redhat.com >
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org >
Tested-by: Philippe Mathieu-Daudé <philmd@linaro.org >
Signed-off-by: Peter Maydell <peter.maydell@linaro.org >
2023-12-19 17:57:40 +00:00