qemu-devel
[Top][All Lists]
Advanced

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

Re: [PATCH v2 2/2] arm/hvf: Stop setting current_cpu


From: Alexander Graf
Subject: Re: [PATCH v2 2/2] arm/hvf: Stop setting current_cpu
Date: Tue, 1 Dec 2020 23:11:43 +0100
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.16; rv:84.0) Gecko/20100101 Thunderbird/84.0


On 01.12.20 22:00, Peter Collingbourne wrote:
This variable is already being set by the generic HVF code and it's a
thread-local variable so I don't see how it can be overwritten.

Signed-off-by: Peter Collingbourne <pcc@google.com>


Yikes :). Yes, absolutely!

Would you mind if I squash this straight into my patch?


Thanks,

Alex


---
  target/arm/hvf/hvf.c | 8 --------
  1 file changed, 8 deletions(-)

diff --git a/target/arm/hvf/hvf.c b/target/arm/hvf/hvf.c
index 3321d48aa2..40984fcf4d 100644
--- a/target/arm/hvf/hvf.c
+++ b/target/arm/hvf/hvf.c
@@ -364,7 +364,6 @@ int hvf_vcpu_exec(CPUState *cpu)
      do {
          bool advance_pc = false;
- current_cpu = cpu;
          qemu_wait_io_event_common(cpu);
flush_cpu_state(cpu);
@@ -391,7 +390,6 @@ int hvf_vcpu_exec(CPUState *cpu)
              /* This is the main one, handle below. */
              break;
          case HV_EXIT_REASON_VTIMER_ACTIVATED:
-            current_cpu = cpu;
              qemu_set_irq(arm_cpu->gt_timer_outputs[GTIMER_VIRT], 1);
              continue;
          case HV_EXIT_REASON_CANCELED:
@@ -412,8 +410,6 @@ int hvf_vcpu_exec(CPUState *cpu)
              uint32_t srt = (syndrome >> 16) & 0x1f;
              uint64_t val = 0;
- current_cpu = cpu;
-
              DPRINTF("data abort: [pc=0x%llx va=0x%016llx pa=0x%016llx isv=%x "
                      "iswrite=%x s1ptw=%x len=%d srt=%d]\n",
                      env->pc, hvf_exit->exception.virtual_address,
@@ -523,7 +519,6 @@ int hvf_vcpu_exec(CPUState *cpu)
              break;
          case EC_AA64_HVC:
              cpu_synchronize_state(cpu);
-            current_cpu = cpu;
              if (arm_is_psci_call(arm_cpu, EXCP_HVC)) {
                  arm_handle_psci_call(arm_cpu);
              } else {
@@ -533,7 +528,6 @@ int hvf_vcpu_exec(CPUState *cpu)
              break;
          case EC_AA64_SMC:
              cpu_synchronize_state(cpu);
-            current_cpu = cpu;
              if (arm_is_psci_call(arm_cpu, EXCP_SMC)) {
                  arm_handle_psci_call(arm_cpu);
              } else {
@@ -561,7 +555,5 @@ int hvf_vcpu_exec(CPUState *cpu)
          }
      } while (ret == 0);
- current_cpu = cpu;
-
      return ret;
  }



reply via email to

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