qemu-arm
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH 18/21] target/arm/kvm: Init cap_has_inject_serror_esr in kvm_


From: Richard Henderson
Subject: Re: [PATCH 18/21] target/arm/kvm: Init cap_has_inject_serror_esr in kvm_arch_init
Date: Mon, 11 Dec 2023 09:09:23 -0800
User-agent: Mozilla Thunderbird

On 11/24/23 03:54, Philippe Mathieu-Daudé wrote:
On 23/11/23 05:42, Richard Henderson wrote:
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>
---
  target/arm/kvm_arm.h |  8 --------
  target/arm/kvm.c     | 13 ++++---------
  2 files changed, 4 insertions(+), 17 deletions(-)


@@ -562,6 +556,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 "
@@ -1948,9 +1946,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);
  }


Just checking, in a heterogeneous setup we still want to keep
these 2 calls per-vCPU, right?

There is no hetrogeneous kvm -- every vcpu must match the host cpu.


r~


     if (kvm_check_extension(cs->kvm_state, KVM_CAP_ARM_PSCI_0_2)) {
         cpu->psci_version = QEMU_PSCI_VERSION_0_2;
         cpu->kvm_init_features[0] |= 1 << KVM_ARM_VCPU_PSCI_0_2;
     }

     if (!kvm_check_extension(cs->kvm_state, KVM_CAP_ARM_PMU_V3)) {
         cpu->has_pmu = false;
     }






reply via email to

[Prev in Thread] Current Thread [Next in Thread]