From patchwork Tue Feb 5 18:15:22 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paolo Bonzini X-Patchwork-Id: 1037134 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="OiV6wiQt"; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 43vFD05ybyz9s7T for ; Wed, 6 Feb 2019 06:35:28 +1100 (AEDT) Received: from localhost ([127.0.0.1]:38813 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gr6VC-0007tj-RE for incoming@patchwork.ozlabs.org; Tue, 05 Feb 2019 14:35:26 -0500 Received: from eggs.gnu.org ([209.51.188.92]:36975) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gr5HA-0003Bb-Cx for qemu-devel@nongnu.org; Tue, 05 Feb 2019 13:16:53 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gr5H8-0004XQ-Lx for qemu-devel@nongnu.org; Tue, 05 Feb 2019 13:16:52 -0500 Received: from mail-wm1-x330.google.com ([2a00:1450:4864:20::330]:39707) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gr5H8-0004QB-8L for qemu-devel@nongnu.org; Tue, 05 Feb 2019 13:16:50 -0500 Received: by mail-wm1-x330.google.com with SMTP id y8so4741050wmi.4 for ; Tue, 05 Feb 2019 10:16:42 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references; bh=JIvXHd4mlCTqxSS0fOCfFJEGAwzmeOAzTua89tVyfKQ=; b=OiV6wiQt4Ed7EWB9GoElzgyOpCXNDLOMdUskqsQeq0cNhS04mqfBlVqggU1nr056KK Z/IrybqVGCEsMHN1hBc0GBjWQIJLQBs5Gqw1PT2RAgOdH3NZdtoUq9EGxsPbQHtdG6A4 SK+FptQWCKpiNn6EvHcqeNH+XyYv+S0b3mDSvgcugiIG2OTDeepvIk3mrlskWx6wYIDL yo/FqXF6L3x35sSrnAJl5Ecid9A65byUx4IqoQV+6u+q3dKnB0eTt0zW7OesKX9r4qMa bpI2ZB4gRNHE5rWYrrpl8X1Bm5ehg7NQWAFIora5wTYBPuFnsaQjuq/f71Lg+a4rjaNv KFqA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references; bh=JIvXHd4mlCTqxSS0fOCfFJEGAwzmeOAzTua89tVyfKQ=; b=b+c/JJcbK23acsU0vOIDPBtAR7TdgCqbVfsEucd5Hd4arv3tQDV4XoFCo+yGGd/fWh L/48wDjRth220iBjnHN866jS55LE6sY9fsAUK2sTspBakIDx+abC25moucSZYkhV6/yp xLB0+XF9On7l+CJLW/kr16RwGK5v/ZXYZqMgncbe+W8QrGD7y5WF44lPSfCr99f9xt8N bHzDDuoDKvGomcUXqQ5C73wLgShfr6tQ+gQeLvxJmh65e3DDx3/cigtoygBuNERicqxj Wx77jbaFmAc3gJaSejmvdBWBxrbwlzfORwK3y05lEGmMbFpH4YWXgr7a9ysNlhYrSD6u N9wA== X-Gm-Message-State: AHQUAuZ0ocUh14FvcOQ3jteE2kTv/qcH7tVp+D3J+O5mDeCXuJjpEn6X LdUg8J19yoes5Ng0NHEvLLus6tea X-Google-Smtp-Source: AHgI3IbpXtbgBnW5DoljmdpIPRceip+WNda9nSkowumD/7jGnf6VqWm3yVwzdz3QsAeitoWYF+DdbQ== X-Received: by 2002:a1c:f707:: with SMTP id v7mr40358wmh.18.1549390601550; Tue, 05 Feb 2019 10:16:41 -0800 (PST) Received: from 640k.lan ([93.56.166.5]) by smtp.gmail.com with ESMTPSA id p5sm8931665wmh.16.2019.02.05.10.16.40 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 05 Feb 2019 10:16:40 -0800 (PST) From: Paolo Bonzini To: qemu-devel@nongnu.org Date: Tue, 5 Feb 2019 19:15:22 +0100 Message-Id: <1549390526-24246-73-git-send-email-pbonzini@redhat.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1549390526-24246-1-git-send-email-pbonzini@redhat.com> References: <1549390526-24246-1-git-send-email-pbonzini@redhat.com> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4864:20::330 Subject: [Qemu-devel] [PULL 72/76] i386: hvf: Fix smp boot hangs X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Heiher Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" From: Heiher The machine that with hvf accelerator and smp sometimes boot hangs because all processors are executing instructions at startup, including early I/O emulations. We should just allow the bootstrap processor to initialize the machine and then to wake up slave processors by interrupt. Signed-off-by: Heiher Message-Id: <20190123073402.28465-1-r@hev.cc> Signed-off-by: Paolo Bonzini --- target/i386/hvf/hvf.c | 5 ----- 1 file changed, 5 deletions(-) diff --git a/target/i386/hvf/hvf.c b/target/i386/hvf/hvf.c index 689b585..42f9447 100644 --- a/target/i386/hvf/hvf.c +++ b/target/i386/hvf/hvf.c @@ -499,7 +499,6 @@ void hvf_reset_vcpu(CPUState *cpu) { } hv_vm_sync_tsc(0); - cpu->halted = 0; hv_vcpu_invalidate_tlb(cpu->hvf_fd); hv_vcpu_flush(cpu->hvf_fd); } @@ -582,8 +581,6 @@ int hvf_init_vcpu(CPUState *cpu) wvmcs(cpu->hvf_fd, VMCS_TPR_THRESHOLD, 0); - hvf_reset_vcpu(cpu); - x86cpu = X86_CPU(cpu); x86cpu->env.xsave_buf = qemu_memalign(4096, 4096); @@ -659,8 +656,6 @@ int hvf_vcpu_exec(CPUState *cpu) int ret = 0; uint64_t rip = 0; - cpu->halted = 0; - if (hvf_process_events(cpu)) { return EXCP_HLT; }