Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp31878488rwd; Fri, 7 Jul 2023 05:53:06 -0700 (PDT) X-Google-Smtp-Source: APBJJlH2Fl/7hqjhAuhm2b/LiQvT1HWlw/m1IH3pQs3TnFXKd+iehXcmG+de1Rj3dBFlP/VMa497 X-Received: by 2002:a05:6a20:3951:b0:12f:acc9:286 with SMTP id r17-20020a056a20395100b0012facc90286mr8344885pzg.17.1688734386594; Fri, 07 Jul 2023 05:53:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1688734386; cv=none; d=google.com; s=arc-20160816; b=dtYxT98Fbb8nodzGEbnhuFmang+Zd+WTPKMFrmD1TrVlw3U7oNHy/70nJ10BMMz9YF /l7UNaUWel1UbZ/D9hEMKlOt0tSbNgbO6QCNDlQcBTOIL7yvqWLfyFP4FE0aEVWrU4d5 6/dPddfxzSWoWDY2PE7XGbxipJbd2pKV3d7ktfHPcEPGI5Pd7Htup1gChnhWfjaNLtgy wLs40jePpJ+ENnpMddFxB3e+0OER6UurzUIj8P5al4vhBZNWGNq5BWYJEfSPTcNf9OM5 bR4j75hiweKSeP4VmOsv9WAYD0suNQSeNC/X5HbL1KdWDGw52hikWQUwCFCyl7yGwei1 HSLg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :content-language:references:cc:to:subject:user-agent:mime-version :date:message-id; bh=GSVQ0GGMuhUNLduFET5k337i5wmFJPZjzY/EHpIT8YU=; fh=J7EP0Iv6xHYD+1gj2aSBEr3YQaw8z8KdGLaog7SdDSo=; b=WgbiQcztq3nGtg60HzMHurmr2RQMi1PI08gCpLy+Tsa2hfwMcznMvm6BbDvrDu/N3/ zbB6n9mIG1vT4IAM77U+B0a/VmtBzqCTpU25FVPJJ2wWW/nGqfsGrBVO0n2FY/9ib94s 9BuChLJLNKHpdiaQfLUV65GQ+h6k2bpMx4yMnprJo2kzp9FmA0Fqb+QA7/Dra8R9WddV 5/jHIRep5Ds7s1k+nhpKGrIZj4zmYrBhc0aeFEx19JCUt5w3FkxoTwQXqSbRhWZzbEJJ 6WkII/76nsRLW4pAIjXPqVAjA0dPFSY84NsCPbcBHsB9ZEOnVOe6eaa+I+d0dJ9apAq2 K75g== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id i4-20020a63e444000000b00528d0d8b7bbsi3725070pgk.595.2023.07.07.05.52.54; Fri, 07 Jul 2023 05:53:06 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231565AbjGGMka (ORCPT + 99 others); Fri, 7 Jul 2023 08:40:30 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34240 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229661AbjGGMk2 (ORCPT ); Fri, 7 Jul 2023 08:40:28 -0400 Received: from szxga01-in.huawei.com (szxga01-in.huawei.com [45.249.212.187]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0C38719B2 for ; Fri, 7 Jul 2023 05:40:26 -0700 (PDT) Received: from dggpeml500021.china.huawei.com (unknown [172.30.72.56]) by szxga01-in.huawei.com (SkyGuard) with ESMTP id 4QyCbD44WxztQVn; Fri, 7 Jul 2023 20:37:28 +0800 (CST) Received: from [10.174.177.174] (10.174.177.174) by dggpeml500021.china.huawei.com (7.185.36.21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.27; Fri, 7 Jul 2023 20:40:22 +0800 Message-ID: <60c2ec19-9848-b7f0-f8af-53be0cbaf319@huawei.com> Date: Fri, 7 Jul 2023 20:40:21 +0800 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.1.2 Subject: Re: [BUG REPORT] Triggering a panic in an x86 virtual machine does not wait To: Thomas Gleixner CC: , , , , , , , , , , yangerkun , Baoquan He , , Baokun Li References: <20230615193330.608657211@linutronix.de> <71578392-63ed-02a9-24da-2adf8cce38c7@huawei.com> <87ttui91jo.ffs@tglx> <87lefs81og.ffs@tglx> Content-Language: en-US From: Baokun Li In-Reply-To: <87lefs81og.ffs@tglx> Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 8bit X-Originating-IP: [10.174.177.174] X-ClientProxiedBy: dggems703-chm.china.huawei.com (10.3.19.180) To dggpeml500021.china.huawei.com (7.185.36.21) X-CFilter-Loop: Reflected X-Spam-Status: No, score=-4.3 required=5.0 tests=BAYES_00,NICE_REPLY_A, RCVD_IN_DNSWL_MED,RCVD_IN_MSPIKE_H5,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2023/7/7 18:18, Thomas Gleixner wrote: > On Thu, Jul 06 2023 at 14:44, Baokun Li wrote: >> On 2023/7/5 16:59, Thomas Gleixner wrote: >>> + /* >>> + * If this is a crash stop which does not execute on the boot CPU, >>> + * then this cannot use the INIT mechanism because INIT to the boot >>> + * CPU will reset the machine. >>> + */ >>> + if (this_cpu) >>> + return false; This does solve the problem of x86 VMs not waiting when they panic, so Reported-and-tested-by: Baokun Li >> This patch does fix the problem of rebooting at panic, but the >> exported stack stays at stop_this_cpu() like below, instead of showing >> what the corresponding process is doing as before. >> >> PID: 681      TASK: ffff9ac2429d3080  CPU: 2    COMMAND: "fsstress" >>  #0 [ffffb00200184fd0] stop_this_cpu at ffffffff89a4ffd8 >>  #1 [ffffb00200184fe8] __sysvec_reboot at ffffffff89a94213 >>  #2 [ffffb00200184ff0] sysvec_reboot at ffffffff8aee7491 >> --- --- >>     RIP: 0000000000000010  RSP: 0000000000000018  RFLAGS: ffffb00200f8bd08 >>     RAX: ffff9ac256fda9d8  RBX: 0000000009973a85  RCX: ffff9ac256fda078 >>     RDX: ffff9ac24416e300  RSI: ffff9ac256fda9e0  RDI: ffffffffffffffff >>     RBP: ffff9ac2443a5f88   R8: 0000000000000000   R9: ffff9ac2422eeea0 >>     R10: ffff9ac256fda9d8  R11: 0000000000549921  R12: ffff9ac2422eeea0 >>     R13: ffff9ac251cd23c8  R14: ffff9ac24269a800  R15: ffff9ac251cd2150 >>     ORIG_RAX: ffffffff8a1719e4  CS: 0206  SS: ffffffff8a1719c8 >> bt: WARNING: possibly bogus exception frame >> >> Do you know how this happened? I would be grateful if you could fix it. > No, I don't. But there is clearly a hint: > >> bt: WARNING: possibly bogus exception frame > So the exception frame seems to be corrupted. I have no idea why. > > The question is, whether this goes away when you revert that commit or not. > I can't oracle that out from your report. > > Can you please revert 45e34c8af58f on top of Linus tree and verify that > it makes the issue go away? > > Thanks, > > tglx Yes, the stop_this_cpu() issue persisted after I reverted 45e34c8af58f and it has nothing to do with your patch, I will try to bisect to find out which patch introduced the issue. Thank you very much for helping locate and rectify the problem that the x86 VM panic does not wait! Cheers! -- With Best Regards, Baokun Li .