From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:39637) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gEDQb-0004yl-NV for qemu-devel@nongnu.org; Sun, 21 Oct 2018 09:06:00 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gEDHy-0003Ev-Tg for qemu-devel@nongnu.org; Sun, 21 Oct 2018 08:57:06 -0400 Received: from mail-wm1-x32b.google.com ([2a00:1450:4864:20::32b]:37904) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gEDHy-0003Ej-Lc for qemu-devel@nongnu.org; Sun, 21 Oct 2018 08:57:02 -0400 Received: by mail-wm1-x32b.google.com with SMTP id 193-v6so7637982wme.3 for ; Sun, 21 Oct 2018 05:57:02 -0700 (PDT) References: <20181019010625.25294-1-cota@braap.org> <20181019010625.25294-11-cota@braap.org> From: Richard Henderson Message-ID: <5c09eee5-1d26-37ff-f4c7-2262c307c40c@linaro.org> Date: Sun, 21 Oct 2018 13:56:59 +0100 MIME-Version: 1.0 In-Reply-To: <20181019010625.25294-11-cota@braap.org> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [RFC v3 10/56] ppc: convert to cpu_halted List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: "Emilio G. Cota" , qemu-devel@nongnu.org Cc: Paolo Bonzini , qemu-ppc@nongnu.org, Alexander Graf , David Gibson On 10/19/18 2:05 AM, Emilio G. Cota wrote: > @@ -1088,11 +1088,13 @@ static target_ulong h_cede(PowerPCCPU *cpu, sPAPRMachineState *spapr, > > env->msr |= (1ULL << MSR_EE); > hreg_compute_hflags(env); > + cpu_mutex_lock(cs); > if (!cpu_has_work(cs)) { > - cs->halted = 1; > + cpu_halted_set(cs, 1); > cs->exception_index = EXCP_HLT; > cs->exit_request = 1; > } > + cpu_mutex_unlock(cs); > return H_SUCCESS; Why does this one get extra locking? r~