From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-15.3 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 6B91BC64E7B for ; Tue, 1 Dec 2020 22:15:11 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id C0D652086A for ; Tue, 1 Dec 2020 22:15:10 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org C0D652086A Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=csgraf.de Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:53010 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kkDvR-0000lB-8F for qemu-devel@archiver.kernel.org; Tue, 01 Dec 2020 17:15:09 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:60766) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kkDsO-0007cY-Br; Tue, 01 Dec 2020 17:12:01 -0500 Received: from mail.csgraf.de ([188.138.100.120]:50468 helo=zulu616.server4you.de) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kkDsA-0004jy-DH; Tue, 01 Dec 2020 17:12:00 -0500 Received: from freeip.amazon.com (ec2-3-122-114-9.eu-central-1.compute.amazonaws.com [3.122.114.9]) by csgraf.de (Postfix) with UTF8SMTPSA id 2409F3900313; Tue, 1 Dec 2020 23:11:44 +0100 (CET) Subject: Re: [PATCH v2 2/2] arm/hvf: Stop setting current_cpu To: Peter Collingbourne References: <4a2d15d01087207e2fba1f55ad312727dbfc782e.1606856104.git.pcc@google.com> From: Alexander Graf Message-ID: 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 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Content-Language: en-US Received-SPF: pass client-ip=188.138.100.120; envelope-from=agraf@csgraf.de; helo=zulu616.server4you.de X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, NICE_REPLY_A=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Peter Maydell , Eduardo Habkost , Richard Henderson , qemu-devel , Cameron Esfahani , Roman Bolshakov , qemu-arm@nongnu.org, Claudio Fontana , Frank Yang , Paolo Bonzini Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" 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 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; > }