From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:48845) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WEhOn-0006hH-LK for qemu-devel@nongnu.org; Sat, 15 Feb 2014 10:43:30 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WEhOg-0004sq-Cj for qemu-devel@nongnu.org; Sat, 15 Feb 2014 10:43:25 -0500 Received: from mail-lb0-f169.google.com ([209.85.217.169]:52973) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WEhOg-0004si-5G for qemu-devel@nongnu.org; Sat, 15 Feb 2014 10:43:18 -0500 Received: by mail-lb0-f169.google.com with SMTP id q8so10151537lbi.14 for ; Sat, 15 Feb 2014 07:43:17 -0800 (PST) MIME-Version: 1.0 In-Reply-To: <1392268034-6220-1-git-send-email-edgar.iglesias@gmail.com> References: <1392268034-6220-1-git-send-email-edgar.iglesias@gmail.com> From: Peter Maydell Date: Sat, 15 Feb 2014 15:42:56 +0000 Message-ID: Content-Type: text/plain; charset=UTF-8 Subject: Re: [Qemu-devel] [PATCH] qom/cpu: Remove cpu->exit_request from reset state List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: "Edgar E. Iglesias" Cc: QEMU Developers , =?UTF-8?Q?Andreas_F=C3=A4rber?= , pcrost@xilinx.com On 13 February 2014 05:07, wrote: > From: "Edgar E. Iglesias" > > cpu->exit_request is part of the execution environment and should > not be cleared when a CPU resets. > > Otherwise, we might deadlock QEMU if a CPU resets while there is > I/O going on. > > Signed-off-by: Edgar E. Iglesias > --- > qom/cpu.c | 1 - > 1 file changed, 1 deletion(-) > > diff --git a/qom/cpu.c b/qom/cpu.c > index 9d62479..40d82dd 100644 > --- a/qom/cpu.c > +++ b/qom/cpu.c > @@ -195,7 +195,6 @@ static void cpu_common_reset(CPUState *cpu) > log_cpu_state(cpu, cc->reset_dump_flags); > } > > - cpu->exit_request = 0; > cpu->interrupt_request = 0; > cpu->current_tb = NULL; > cpu->halted = 0; This looks kind of odd to me. What's the situation you see where this matters -- is the CPU resetting itself, or is some other device in another thread triggering the CPU reset? TCG or KVM? thanks -- PMM