From nobody Fri Nov 7 11:25:32 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1548252328091288.43294013119896; Wed, 23 Jan 2019 06:05:28 -0800 (PST) Received: from localhost ([127.0.0.1]:35277 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gmJ9g-0001gG-2h for importer@patchew.org; Wed, 23 Jan 2019 09:05:24 -0500 Received: from eggs.gnu.org ([209.51.188.92]:41520) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gmD39-0005YX-91 for qemu-devel@nongnu.org; Wed, 23 Jan 2019 02:34:15 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gmD38-0001pK-Io for qemu-devel@nongnu.org; Wed, 23 Jan 2019 02:34:15 -0500 Received: from mail-oi1-x241.google.com ([2607:f8b0:4864:20::241]:44969) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gmD38-0001od-7P for qemu-devel@nongnu.org; Wed, 23 Jan 2019 02:34:14 -0500 Received: by mail-oi1-x241.google.com with SMTP id m6so1005736oig.11 for ; Tue, 22 Jan 2019 23:34:12 -0800 (PST) Received: from hev-pc.hz.ali.com ([47.89.83.32]) by smtp.gmail.com with ESMTPSA id s12sm596434otk.70.2019.01.22.23.34.07 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 22 Jan 2019 23:34:10 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=hev-cc.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=4v9IzOTgOa1A9yyron90GD2PI0XOmenMCXDaFFoTI6E=; b=gWpJQtmLw0P3J/hNQWPIX1j7MGnbvU+tK/oG472ntp6gi9iatPX8tgkUiIJARJtm/3 wGgtm5/c2ss+R+xIkdp77u7pGP5dzQ7MjR59yHoFWyfiBsRVuh8pY1xywHonLBU39BcG 14jkeJJdyvNnyFo3kuOYeWuSblh+ij9AhfI2+d3fbF3hJnNudoBZikJeZWgWLCJeZaps ucaCMgRzmkNXcTX/vCD4d/wWxu6pUH790SuUW8sGU91/iZlN/UpkKhRSOTeKH5zc8gw+ nwrW9JNnK6pbLdp9sPx/BS3tsqrdtd/ZN0IOlShQ+8+lis6tUxYVvZdkgRbS49PMlsdJ WNCQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=4v9IzOTgOa1A9yyron90GD2PI0XOmenMCXDaFFoTI6E=; b=BOttzGHaMmHZmwgxHgT1a50Vtk5pLnt3ye6F3c8p/5+EcJA9ZIYBKZLvPk57hxaYCz FkE6mXm5kJNJBxFVfUi6o9aQW8/uCdRQ5cDa8++Qej+K5p6QbNvI6KR15qgYJ5oaCClC 7fxYTi9giDpreOzghmOOUfQhM9QZNmSo4dkP8IfCB/eptGssD1Qn9YM2Cwwbu97GzJaj 1dZUn5ew60vCsBRL9oYVK+FeMKE7VqvFU4tGmYh2BPo5taBqEj7GCwcDJWpMaYA2xV4L p4DALogzP2pfU+uvKl0ua5F0x1/HUOOeSbAMyD5K5u1lRPSGkRBK5XcU+pX4jpFVBBiO FgSw== X-Gm-Message-State: AJcUukdGd/7RlWTgGYOSuzwOduZ0lYa7e5Pwa34crgJ6WU5Mrhj3LaUe zqDPrkNwNq7Qa+4CdLFUouDo3g== X-Google-Smtp-Source: ALg8bN52BeHOU7J2VUU/qv6yiX2MXk6vJdh70TZ06/MsQDMjFANZAr9Tf4E2SMVzTrnmG2/66tHaiQ== X-Received: by 2002:aca:5058:: with SMTP id e85mr706297oib.111.1548228851557; Tue, 22 Jan 2019 23:34:11 -0800 (PST) From: Heiher To: Paolo Bonzini , Richard Henderson , Eduardo Habkost Date: Wed, 23 Jan 2019 15:34:02 +0800 Message-Id: <20190123073402.28465-1-r@hev.cc> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:4864:20::241 X-Mailman-Approved-At: Wed, 23 Jan 2019 09:01:46 -0500 Subject: [Qemu-devel] [PATCH RFC v1] 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: qemu-devel@nongnu.org, Heiher Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" 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 --- 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 e193022c03..0921fcba45 100644 --- a/target/i386/hvf/hvf.c +++ b/target/i386/hvf/hvf.c @@ -499,7 +499,6 @@ void hvf_reset_vcpu(CPUState *cpu) { } =20 hv_vm_sync_tsc(0); - cpu->halted =3D 0; hv_vcpu_invalidate_tlb(cpu->hvf_fd); hv_vcpu_flush(cpu->hvf_fd); } @@ -582,8 +581,6 @@ int hvf_init_vcpu(CPUState *cpu) =20 wvmcs(cpu->hvf_fd, VMCS_TPR_THRESHOLD, 0); =20 - hvf_reset_vcpu(cpu); - x86cpu =3D X86_CPU(cpu); x86cpu->env.xsave_buf =3D qemu_memalign(4096, 4096); =20 @@ -659,8 +656,6 @@ int hvf_vcpu_exec(CPUState *cpu) int ret =3D 0; uint64_t rip =3D 0; =20 - cpu->halted =3D 0; - if (hvf_process_events(cpu)) { return EXCP_HLT; } --=20 2.20.1