qemu-devel
[Top][All Lists]
Advanced

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

Re: [PATCH 20/21] target/arm/kvm: Unexport and tidy kvm_arm_sync_mpstate


From: Philippe Mathieu-Daudé
Subject: Re: [PATCH 20/21] target/arm/kvm: Unexport and tidy kvm_arm_sync_mpstate_to_{kvm, qemu}
Date: Fri, 24 Nov 2023 13:05:08 +0100
User-agent: Mozilla Thunderbird

On 23/11/23 05:42, Richard Henderson wrote:
Drop fprintfs and actually use the return values in the callers.

Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
---
  target/arm/kvm_arm.h | 20 --------------------
  target/arm/kvm.c     | 23 ++++++-----------------
  2 files changed, 6 insertions(+), 37 deletions(-)


  /*
   * Sync the KVM MP_STATE into QEMU
   */
-int kvm_arm_sync_mpstate_to_qemu(ARMCPU *cpu)
+static int kvm_arm_sync_mpstate_to_qemu(ARMCPU *cpu)
  {
      if (cap_has_mp_state) {
          struct kvm_mp_state mp_state;
          int ret = kvm_vcpu_ioctl(CPU(cpu), KVM_GET_MP_STATE, &mp_state);
          if (ret) {
-            fprintf(stderr, "%s: failed to get MP_STATE %d/%s\n",
-                    __func__, ret, strerror(-ret));
-            abort();

I suppose if this abort() had fired, we'd have reworked that code...
Maybe mention its removal? Otherwise,

Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>

+            return ret;
          }
          cpu->power_state = (mp_state.mp_state == KVM_MP_STATE_STOPPED) ?
              PSCI_OFF : PSCI_ON;
      }
-
      return 0;
  }



reply via email to

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