Received: by 10.223.164.202 with SMTP id h10csp2599296wrb; Mon, 27 Nov 2017 20:58:26 -0800 (PST) X-Google-Smtp-Source: AGs4zMZ5ctG0mSqVpTdMdiejsZcOEanZzP56PbPTu5YyRkl8ReyIhB4TJjdK4/m3C/SwiZl9l0qe X-Received: by 10.159.230.13 with SMTP id u13mr22348339plq.226.1511845106331; Mon, 27 Nov 2017 20:58:26 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1511845106; cv=none; d=google.com; s=arc-20160816; b=U3qEAct6eMg+oA5J8WKe18QM1v8eC80iEErxkOgTcBvxHpfGP2ZJQck0iBYNwtoGMk 9kmN3aa1TVW609EDs74whst5W+rsG3VyVGK41nA62Bgi9QBkOX4KYBB5vAwKBljc+/do 3ZsRRkYsXE6snfHypxYntqy17OL7wDaU192Lgw5yP+4eyIqUoyTQSxpVi2J6XWFi+uwv AOppGhqu5Tu+JUGdtSZ5nTinK79O4Mr74jTfBOueADAFd2Ib0tS9fa/uhUOoWinNuos1 MhtxNoB5FDX62YYo/5IcKcHnwK7+6UumRpMZLGwKkGG5xw69kml9G7oRmxk2UV+6rdHJ MIIg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:thread-index:thread-topic :content-transfer-encoding:mime-version:subject:references :in-reply-to:message-id:cc:to:reply-to:from:date :arc-authentication-results; bh=8rW+B+phxk/wgXs0nM8GXqBg+S3XrTZyjulJsj80tyI=; b=iBxhNjurTK5OS4UTnfw5zvizcV8pYzfnSdKGuiKU3dxbbk4Fpz47zUmBRGO8qTHNNS VWaW8ob3avS7bj4DOlIEOOFiVTWCJXv2ln6cQGxVJz7sdV8y3ZWU0VtQSOKKWo5mU87y tvKSur24N+SeclXIUC9ywMk3dF4kmJXTvRx+xFWYPqSMQruaM7D4fgxQj1faBL7gw8CE 4lAi/yMxTSjy5hto1Q96C3sWkP1cU6ShjasxtavD994v5T25NGPW7jh33aq6hsUciC7b iqcb9g4zLKr3B05gMjbZeHmeToY75WsKtsFR6wrBwRGYFybvbz6klbxmFyMh5wJpIJHF wzMQ== 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id r17si24243199pgu.439.2017.11.27.20.58.14; Mon, 27 Nov 2017 20:58:26 -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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753603AbdK1E5i (ORCPT + 77 others); Mon, 27 Nov 2017 23:57:38 -0500 Received: from mx1.redhat.com ([209.132.183.28]:50720 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752743AbdK1E5h (ORCPT ); Mon, 27 Nov 2017 23:57:37 -0500 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 30FE85D5EA; Tue, 28 Nov 2017 04:57:37 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 09E125D6B7; Tue, 28 Nov 2017 04:57:37 +0000 (UTC) Received: from zmail23.collab.prod.int.phx2.redhat.com (zmail23.collab.prod.int.phx2.redhat.com [10.5.83.28]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id DBBBA4BB78; Tue, 28 Nov 2017 04:57:36 +0000 (UTC) Date: Mon, 27 Nov 2017 23:57:36 -0500 (EST) From: Chunyu Hu Reply-To: Chunyu Hu To: Andy Lutomirski , Thomas Gleixner Cc: Ingo Molnar , "H. Peter Anvin" , Peter Zijlstra , Borislav Petkov , Steven Rostedt , linux-kernel@vger.kernel.org Message-ID: <736042713.31089814.1511845056722.JavaMail.zimbra@redhat.com> In-Reply-To: References: <1511792499-4073-1-git-send-email-chuhu@redhat.com> Subject: Re: [PATCH] x86/idt: load idt early in start_secondary MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Originating-IP: [10.66.12.107, 10.4.195.27] Thread-Topic: x86/idt: load idt early in start_secondary Thread-Index: +Na7eQDP36RurJGxqmW4IqxCa/w+DA== X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.39]); Tue, 28 Nov 2017 04:57:37 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org ----- Original Message ----- > From: "Andy Lutomirski" > To: "Chunyu Hu" > Cc: "Thomas Gleixner" , "Ingo Molnar" , "H. Peter Anvin" , > "Peter Zijlstra" , "Andrew Lutomirski" , "Borislav Petkov" , > "Steven Rostedt" , linux-kernel@vger.kernel.org > Sent: Tuesday, November 28, 2017 11:41:20 AM > Subject: Re: [PATCH] x86/idt: load idt early in start_secondary > > On Mon, Nov 27, 2017 at 6:21 AM, Chunyu Hu wrote: > > For ap, idt is first loaded in cpu_init() with load_current_idt(), > > that is to say, no exception can be handled before there. And then > > the idt_table has been completed by the bp. > > > > While there are some WARNs which needs the UD exception handling > > in the early boot code might be triggered when something uexpected > > happens during boot. In that case, cpu would fail to boot as the > > exception can't be handled. A WARNing during boot is not usually > > meaning the system could not boot. > > > > One use case is when ftrace=function is setup in kernel cmdline, the > > ftrace callback function will be called for every traced function. > > And in my case, the first traced function is load_ucode_ap. And there > > are WARN()s in function trace callback handling, it failed to reboot > > as one of the WARN()s is triggered before load_current_idt() executed. > > > > To make WARN()s can work earlier to ap, we load the idt_table early > > in start_secondary, and keep the second time idt load in cpu_init, > > as there is a load_ucode_ap() there. > > Reviewed-by: Andy Lutomirski > > Except that this is presumably missing a Cc: stable. Do I need to resend this origin version and Cc stable? > -- Regards, Chunyu Hu From 1585279783484351041@xxx Tue Nov 28 03:43:33 +0000 2017 X-GM-THRID: 1585229408718588005 X-Gmail-Labels: Inbox,Category Forums,HistoricalUnread