Received: by 10.223.185.116 with SMTP id b49csp1777510wrg; Sun, 11 Feb 2018 21:11:45 -0800 (PST) X-Google-Smtp-Source: AH8x227HQVszaUwO8nP8kgfk6mZTU2v4w9hD8LVT+VAbivVe5UAkGyxjiNo6CG7Nmfy+6CO7gOu5 X-Received: by 2002:a17:902:b28b:: with SMTP id u11-v6mr3166121plr.146.1518412305043; Sun, 11 Feb 2018 21:11:45 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1518412305; cv=none; d=google.com; s=arc-20160816; b=LfiCe0CAarWuwvidKFO06y5hEVtZSACnzEfPciSQ8eEj0ZH2sXuI4Tf9a2Rxmusx2c tUFaooonuXoqmiwfTtVRuYwIMStuZnAqwxlepbwcfq0Xt5PumoKIGBSLRiroyK9Ve+/Z sWbp4GBMs28BU1AkKtOuEaaVWGoidDPSWFAq3uOxBnrTJL7SEqjrZWLO38l3D3xeP/Yj aOjXMbJLhBU+BoWxemjWq4v8yoW7mufudCUu6ZJ/n7TLKhXT+JFeEhYgOmLMUI1WRygw JWbVU49o4LsgAVuxOq/LyWGE4KoebjBkyljTwEU8ie3suZAjkF6STduTMG/+AzpIo5yj sRrg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:arc-authentication-results; bh=fkiTgkSRAEBPXKc2bbZhMwpRf1WjIpowd1AtR3sMplM=; b=bBBR6O10YZunhi0PPfT4mvgxjQUogfbBsjBdmbFWfz82EK8aMnzfdv5IcK1DhAz8Rf rxIUxNZ+lWqC8gzgKUY8FI+7r+iUvnvfH9v5tnLXTFymtdiUen0zTRwt3UHlJvybUS3a PZ09oOK+ipdLUZ+mhHSQY92kMoz76CfJ29jioIc38RVd2A3XlQja8/1lGO20OTOeAycy hQOZowdqjr2lsHOzGczoCZYApRZBF9+EGIkf1UOJEo8XejbTzkJ+A10tmhXxRrJRP4sI Wy75ShqTbzaPX93344YIwKu+UIrn5KvS3FZLuIxse1VeJri/23lNpLLqQYsGpdEhqpY7 fOdw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id j75si239119pgc.156.2018.02.11.21.11.31; Sun, 11 Feb 2018 21:11:45 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932723AbeBLEGP (ORCPT + 99 others); Sun, 11 Feb 2018 23:06:15 -0500 Received: from mail.cn.fujitsu.com ([183.91.158.132]:32776 "EHLO heian.cn.fujitsu.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S932477AbeBLEGO (ORCPT ); Sun, 11 Feb 2018 23:06:14 -0500 X-IronPort-AV: E=Sophos;i="5.43,368,1503331200"; d="scan'208";a="36994962" Received: from bogon (HELO cn.fujitsu.com) ([10.167.33.5]) by heian.cn.fujitsu.com with ESMTP; 12 Feb 2018 12:06:12 +0800 Received: from G08CNEXCHPEKD02.g08.fujitsu.local (unknown [10.167.33.83]) by cn.fujitsu.com (Postfix) with ESMTP id 2BDF248AE763; Mon, 12 Feb 2018 12:06:13 +0800 (CST) Received: from localhost.localdomain (10.167.226.106) by G08CNEXCHPEKD02.g08.fujitsu.local (10.167.33.89) with Microsoft SMTP Server (TLS) id 14.3.361.1; Mon, 12 Feb 2018 12:06:13 +0800 Subject: Re: [PATCH v3 0/5] x86/apic: Fix restoring boot irq mode in reboot and kexec/kdump To: Baoquan He , , CC: , , , , , References: <20180209121008.28980-1-bhe@redhat.com> From: Dou Liyang Message-ID: Date: Mon, 12 Feb 2018 12:06:10 +0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.5.2 MIME-Version: 1.0 In-Reply-To: <20180209121008.28980-1-bhe@redhat.com> Content-Type: text/plain; charset="gbk"; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Originating-IP: [10.167.226.106] X-yoursite-MailScanner-ID: 2BDF248AE763.AD285 X-yoursite-MailScanner: Found to be clean X-yoursite-MailScanner-From: douly.fnst@cn.fujitsu.com X-Spam-Status: No Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi all, One thing confused me. The disconnect_bsp_APIC() may restore the interrupt delivery mode into virtual wire mode. it uses the vector F as the spurious interrput, But, IMO, using the vector 0xFF(SPURIOUS_APIC_VECTOR) may more suitable and will give us more detail. Why the disconnect_bsp_APIC() use vector F here? diff --git a/arch/x86/kernel/apic/apic.c b/arch/x86/kernel/apic/apic.c index 25ddf02598d2..550deaad6a9a 100644 --- a/arch/x86/kernel/apic/apic.c +++ b/arch/x86/kernel/apic/apic.c @@ -2130,7 +2130,7 @@ void disconnect_bsp_APIC(int virt_wire_setup) value = apic_read(APIC_SPIV); value &= ~APIC_VECTOR_MASK; value |= APIC_SPIV_APIC_ENABLED; - value |= 0xf; + value |= SPURIOUS_APIC_VECTOR; apic_write(APIC_SPIV, value); if (!virt_wire_setup) { Thanks, dou At 02/09/2018 08:10 PM, Baoquan He wrote: > A regression bug was introduced in below commit. > commit 522e66464467 ("x86/apic: Disable I/O APIC before shutdown of the local APIC") > > It caused the action to fail which we try to restore boot irq mode > in reboot and kexec/kdump. Details can be seen in patch 0002. > > Warning can always be seen during kdump kernel boot on qemu/kvm > platform. Our customer even saw casual kdump kernel hang once in > ~30 attempts during stress testing of kdump on KVM machine. > > This is v3 post, patches are rearranged and changed according to > Eric's suggestions. > > Baoquan He (5): > x86/apic: Split out restore_boot_irq_mode from disable_IO_APIC > x86/apic: Fix restoring boot irq mode in reboot and kexec/kdump > x86/apic: Remove useless disable_IO_APIC > x86/apic: Rename variable/function related to x86_io_apic_ops > x86/apic: Set up through-local-APIC on boot CPU if 'noapic' specified > > arch/x86/include/asm/io_apic.h | 9 +++++---- > arch/x86/include/asm/x86_init.h | 8 ++++---- > arch/x86/kernel/apic/apic.c | 2 +- > arch/x86/kernel/apic/io_apic.c | 16 ++++------------ > arch/x86/kernel/crash.c | 3 ++- > arch/x86/kernel/machine_kexec_32.c | 7 +++---- > arch/x86/kernel/machine_kexec_64.c | 7 +++---- > arch/x86/kernel/reboot.c | 3 ++- > arch/x86/kernel/x86_init.c | 6 +++--- > arch/x86/xen/apic.c | 2 +- > drivers/iommu/irq_remapping.c | 4 ++-- > 11 files changed, 30 insertions(+), 37 deletions(-) >