[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 18/43] target/arm/kvm: Init cap_has_inject_serror_esr in kvm_arch_
From: |
Peter Maydell |
Subject: |
[PULL 18/43] target/arm/kvm: Init cap_has_inject_serror_esr in kvm_arch_init |
Date: |
Tue, 19 Dec 2023 19:12:42 +0000 |
From: Richard Henderson <richard.henderson@linaro.org>
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>
---
target/arm/kvm_arm.h | 8 --------
target/arm/kvm.c | 13 ++++---------
2 files changed, 4 insertions(+), 17 deletions(-)
diff --git a/target/arm/kvm_arm.h b/target/arm/kvm_arm.h
index 350ba6cb967..1ec2476de7b 100644
--- a/target/arm/kvm_arm.h
+++ b/target/arm/kvm_arm.h
@@ -98,14 +98,6 @@ void kvm_arm_cpu_post_load(ARMCPU *cpu);
*/
void kvm_arm_reset_vcpu(ARMCPU *cpu);
-/**
- * kvm_arm_init_serror_injection:
- * @cs: CPUState
- *
- * Check whether KVM can set guest SError syndrome.
- */
-void kvm_arm_init_serror_injection(CPUState *cs);
-
/**
* kvm_get_vcpu_events:
* @cpu: ARMCPU
diff --git a/target/arm/kvm.c b/target/arm/kvm.c
index d87d3e53e02..4a5553864a0 100644
--- a/target/arm/kvm.c
+++ b/target/arm/kvm.c
@@ -98,12 +98,6 @@ static int kvm_arm_vcpu_finalize(CPUState *cs, int feature)
return kvm_vcpu_ioctl(cs, KVM_ARM_VCPU_FINALIZE, &feature);
}
-void kvm_arm_init_serror_injection(CPUState *cs)
-{
- cap_has_inject_serror_esr = kvm_check_extension(cs->kvm_state,
- KVM_CAP_ARM_INJECT_SERROR_ESR);
-}
-
bool kvm_arm_create_scratch_host_vcpu(const uint32_t *cpus_to_try,
int *fdarray,
struct kvm_vcpu_init *init)
@@ -564,6 +558,10 @@ int kvm_arch_init(MachineState *ms, KVMState *s)
cap_has_mp_state = kvm_check_extension(s, KVM_CAP_MP_STATE);
+ /* Check whether user space can specify guest syndrome value */
+ cap_has_inject_serror_esr =
+ kvm_check_extension(s, KVM_CAP_ARM_INJECT_SERROR_ESR);
+
if (ms->smp.cpus > 256 &&
!kvm_check_extension(s, KVM_CAP_ARM_IRQ_LINE_LAYOUT_2)) {
error_report("Using more than 256 vcpus requires a host kernel "
@@ -1946,9 +1944,6 @@ int kvm_arch_init_vcpu(CPUState *cs)
}
cpu->mp_affinity = mpidr & ARM64_AFFINITY_MASK;
- /* Check whether user space can specify guest syndrome value */
- kvm_arm_init_serror_injection(cs);
-
return kvm_arm_init_cpreg_list(cpu);
}
--
2.34.1
- [PULL 13/43] target/arm/kvm: Move kvm_arm_reg_syncs_via_cpreg_list and unexport, (continued)
- [PULL 13/43] target/arm/kvm: Move kvm_arm_reg_syncs_via_cpreg_list and unexport, Peter Maydell, 2023/12/19
- [PULL 15/43] target/arm/kvm: Unexport kvm_arm_vcpu_init, Peter Maydell, 2023/12/19
- [PULL 08/43] target/arm/kvm: Unexport kvm_arm_{get, put}_virtual_time, Peter Maydell, 2023/12/19
- [PULL 07/43] target/arm/kvm: Move kvm_arm_handle_debug and unexport, Peter Maydell, 2023/12/19
- [PULL 12/43] target/arm/kvm: Move kvm_arm_cpreg_level and unexport, Peter Maydell, 2023/12/19
- [PULL 10/43] target/arm/kvm: Move kvm_arm_get_host_cpu_features and unexport, Peter Maydell, 2023/12/19
- [PULL 19/43] target/arm/kvm: Unexport kvm_{get,put}_vcpu_events, Peter Maydell, 2023/12/19
- [PULL 23/43] target/arm/kvm: Remove unused includes, Peter Maydell, 2023/12/19
- [PULL 17/43] target/arm/kvm: Unexport kvm_arm_init_cpreg_list, Peter Maydell, 2023/12/19
- [PULL 20/43] target/arm/kvm: Unexport and tidy kvm_arm_sync_mpstate_to_{kvm, qemu}, Peter Maydell, 2023/12/19
- [PULL 18/43] target/arm/kvm: Init cap_has_inject_serror_esr in kvm_arch_init,
Peter Maydell <=
- [PULL 27/43] target/arm/kvm: Have kvm_arm_set_device_attr take a ARMCPU argument, Peter Maydell, 2023/12/19
- [PULL 16/43] target/arm/kvm: Unexport kvm_arm_vcpu_finalize, Peter Maydell, 2023/12/19
- [PULL 14/43] target/arm/kvm: Merge kvm64.c into kvm.c, Peter Maydell, 2023/12/19
- [PULL 24/43] target/arm/kvm: Have kvm_arm_add_vcpu_properties take a ARMCPU argument, Peter Maydell, 2023/12/19
- [PULL 33/43] target/arm/kvm: Have kvm_arm_[get|put]_virtual_time take ARMCPU argument, Peter Maydell, 2023/12/19
- [PULL 36/43] target/arm/kvm: Have kvm_arm_handle_debug take a ARMCPU argument, Peter Maydell, 2023/12/19
- [PULL 37/43] target/arm/kvm: Have kvm_arm_hw_debug_active take a ARMCPU argument, Peter Maydell, 2023/12/19
- [PULL 21/43] target/arm/kvm: Unexport kvm_arm_vm_state_change, Peter Maydell, 2023/12/19
- [PULL 28/43] target/arm/kvm: Have kvm_arm_pvtime_init take a ARMCPU argument, Peter Maydell, 2023/12/19
- [PULL 31/43] target/arm/kvm: Have kvm_arm_vcpu_init take a ARMCPU argument, Peter Maydell, 2023/12/19