[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v7 14/14] arm/kvm: use fd instead of fdarray[2]
From: |
Cornelia Huck |
Subject: |
[PATCH v7 14/14] arm/kvm: use fd instead of fdarray[2] |
Date: |
Thu, 15 May 2025 17:39:07 +0200 |
We have fd, so might as well neaten things up.
Suggested-by: Eric Auger <eric.auger@redhat.com>
Reviewed-by: Eric Auger <eric.auger@redhat.com>
Signed-off-by: Cornelia Huck <cohuck@redhat.com>
---
target/arm/kvm.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/target/arm/kvm.c b/target/arm/kvm.c
index 6c665334658b..a954a08a0fc3 100644
--- a/target/arm/kvm.c
+++ b/target/arm/kvm.c
@@ -348,11 +348,11 @@ static bool
kvm_arm_get_host_cpu_features(ARMHostCPUFeatures *ahcf)
err |= get_host_cpu_reg(fd, ahcf, ID_ISAR6_EL1_IDX);
err |= get_host_cpu_reg(fd, ahcf, ID_MMFR4_EL1_IDX);
- err |= read_sys_reg32(fdarray[2], &ahcf->isar.mvfr0,
+ err |= read_sys_reg32(fd, &ahcf->isar.mvfr0,
ARM64_SYS_REG(3, 0, 0, 3, 0));
- err |= read_sys_reg32(fdarray[2], &ahcf->isar.mvfr1,
+ err |= read_sys_reg32(fd, &ahcf->isar.mvfr1,
ARM64_SYS_REG(3, 0, 0, 3, 1));
- err |= read_sys_reg32(fdarray[2], &ahcf->isar.mvfr2,
+ err |= read_sys_reg32(fd, &ahcf->isar.mvfr2,
ARM64_SYS_REG(3, 0, 0, 3, 2));
err |= get_host_cpu_reg(fd, ahcf, ID_PFR2_EL1_IDX);
err |= get_host_cpu_reg(fd, ahcf, ID_DFR1_EL1_IDX);
@@ -390,7 +390,7 @@ static bool
kvm_arm_get_host_cpu_features(ARMHostCPUFeatures *ahcf)
if (pmu_supported) {
/* PMCR_EL0 is only accessible if the vCPU has feature PMU_V3 */
- err |= read_sys_reg64(fdarray[2], &ahcf->isar.reset_pmcr_el0,
+ err |= read_sys_reg64(fd, &ahcf->isar.reset_pmcr_el0,
ARM64_SYS_REG(3, 3, 9, 12, 0));
}
--
2.49.0
- [PATCH v7 04/14] arm/cpu: Store aa64pfr0/1 into the idregs array, (continued)
- [PATCH v7 04/14] arm/cpu: Store aa64pfr0/1 into the idregs array, Cornelia Huck, 2025/05/15
- [PATCH v7 05/14] arm/cpu: Store aa64mmfr0-3 into the idregs array, Cornelia Huck, 2025/05/15
- [PATCH v7 06/14] arm/cpu: Store aa64dfr0/1 into the idregs array, Cornelia Huck, 2025/05/15
- [PATCH v7 07/14] arm/cpu: Store aa64smfr0 into the idregs array, Cornelia Huck, 2025/05/15
- [PATCH v7 11/14] arm/cpu: Store id_mmfr0-5 into the idregs array, Cornelia Huck, 2025/05/15
- [PATCH v7 12/14] arm/cpu: Add sysreg generation scripts, Cornelia Huck, 2025/05/15
- [PATCH v7 08/14] arm/cpu: Store id_isar0-7 into the idregs array, Cornelia Huck, 2025/05/15
- [PATCH v7 09/14] arm/cpu: Store id_pfr0/1/2 into the idregs array, Cornelia Huck, 2025/05/15
- [PATCH v7 10/14] arm/cpu: Store id_dfr0/1 into the idregs array, Cornelia Huck, 2025/05/15
- [PATCH v7 13/14] arm/cpu: switch to a generated cpu-sysregs.h.inc, Cornelia Huck, 2025/05/15
- [PATCH v7 14/14] arm/kvm: use fd instead of fdarray[2],
Cornelia Huck <=