Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp6333964yba; Tue, 14 May 2019 06:01:30 -0700 (PDT) X-Google-Smtp-Source: APXvYqwtC3mVX6dwAT4QuMTMwzucbCUUbAI0wfMHRU8TpbnGFVFa//uJMN3nLM83mA6mLB7eWEjN X-Received: by 2002:a17:902:8214:: with SMTP id x20mr15383455pln.308.1557838890394; Tue, 14 May 2019 06:01:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1557838890; cv=none; d=google.com; s=arc-20160816; b=bMmPej32+LLYqSNV00pnkypgm1MOcB8fdZ1t3E4isg8QiLhgBeLFH54us+oDCvY5sK z76VlmhzEmPddGMB66zSD62/YIAk1fmALFDaZ6GZH883S3SsuY6IxqBplajo6XdRNoeY c9kl3SDVEhjvtKiq3r/5cEA+J58YFVO7q2kMMlM1qIkCiH+YF4dWz9nu8SJNCiW/9je9 xt/fYHJD5pPNukroFJdzX/xp96xzN/cJMTJAT4YGkuzOAgacFazM7WcuU6igsGEm3fQB /cw2k4LLzCn2SbjU8c9yFVM2ZiKgHcXOaNi9rvvJrnFVbciKfSzJdBlddeoiF7Pf9zEV QZNw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=nzKFPmdqstQSquVNZF81opp9kuS207VBZWvEAgJpgaA=; b=tKxI0YS17jkXRDNQR4rSPOg5NGpWDquf3NVQd0wZ9qy2HzHsFOFRlNJUDzR0AY6KDf dLfEY3s56gAW7sCPplrh5qfwMBWhbBbJpeeQiZK1Q6uXUe4NzVjx/OE9DlrsiKfwXvHG 6FBaImfSAmasTg5lCoAGRM2rQJ8zS91a1w9ZzWIDsh2JeQG3nNUAgfvMnZPFA1/AxRo+ r+8Ai29ohDsWJIZeQsMkHi4tWawU+PqGG1E9GFqe/zXKYiJSQfDWKVpPwt81JLm9kJq6 9lRJIo4XtwfNGq1HVPX6oihsL3QrGyic+GxD4x5nGbYcBA8zDmcbIkskH4Mqd6V1rUT2 dtUA== 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 e37si6491828plb.10.2019.05.14.06.01.14; Tue, 14 May 2019 06:01:30 -0700 (PDT) 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 S1726148AbfENM6p (ORCPT + 99 others); Tue, 14 May 2019 08:58:45 -0400 Received: from mx1.redhat.com ([209.132.183.28]:40180 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725562AbfENM6p (ORCPT ); Tue, 14 May 2019 08:58:45 -0400 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 1B17F5945C; Tue, 14 May 2019 12:58:45 +0000 (UTC) Received: from dhcp-128-65.nay.redhat.com (ovpn-12-95.pek2.redhat.com [10.72.12.95]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 25D1660BCF; Tue, 14 May 2019 12:58:39 +0000 (UTC) Date: Tue, 14 May 2019 20:58:35 +0800 From: Dave Young To: Peter Zijlstra Cc: Baoquan He , Borislav Petkov , j-nomura@ce.jp.nec.com, kasong@redhat.com, fanc.fnst@cn.fujitsu.com, x86@kernel.org, kexec@lists.infradead.org, linux-kernel@vger.kernel.org, hpa@zytor.com, tglx@linutronix.de Subject: Re: [PATCH v6 1/2] x86/kexec: Build identity mapping for EFI systab and ACPI tables Message-ID: <20190514125835.GA29045@dhcp-128-65.nay.redhat.com> References: <20190429002318.GA25400@MiWiFi-R3L-srv> <20190429135536.GC2324@zn.tnic> <20190513014248.GA16774@MiWiFi-R3L-srv> <20190513070725.GA20105@zn.tnic> <20190513073254.GB16774@MiWiFi-R3L-srv> <20190513075006.GB20105@zn.tnic> <20190513080653.GD16774@MiWiFi-R3L-srv> <20190514032208.GA25875@dhcp-128-65.nay.redhat.com> <20190514084841.GA27876@dhcp-128-65.nay.redhat.com> <20190514113826.GM2589@hirez.programming.kicks-ass.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190514113826.GM2589@hirez.programming.kicks-ass.net> User-Agent: Mutt/1.11.3 (2019-02-01) X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.39]); Tue, 14 May 2019 12:58:45 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 05/14/19 at 01:38pm, Peter Zijlstra wrote: > On Tue, May 14, 2019 at 04:48:41PM +0800, Dave Young wrote: > > > > I did some tests on the laptop, thing is: > > > 1. apply the 3 patches (two you posted + Boris's revert commit 52b922c3d49c) > > > on latest Linus master branch, everything works fine. > > > > > > 2. build and test the tip/next-merge-window branch, kernel hangs early > > > without output, (both 1st boot and kexec boot) > > > > Update about 2. It should be not early rsdp related, I got the boot log > > Since can not reproduce with Linus master branch it may have been fixed. > > Nothing was changed here since PTI. > > > [ 0.685374][ T1] rcu: Hierarchical SRCU implementation. > > [ 0.686414][ T1] general protection fault: 0000 [#1] SMP PTI > > [ 0.687328][ T1] CPU: 0 PID: 1 Comm: swapper/0 Not tainted 5.1.0-rc6+ #877 > > [ 0.687328][ T1] Hardware name: LENOVO 4236NUC/4236NUC, BIOS 83ET82WW (1.52 ) 06/04/2018 > > [ 0.687328][ T1] RIP: 0010:reserve_ds_buffers+0x34e/0x450 > > > [ 0.687328][ T1] Call Trace: > > [ 0.687328][ T1] ? hardlockup_detector_event_create+0x50/0x50 > > [ 0.687328][ T1] x86_reserve_hardware+0x173/0x180 > > [ 0.687328][ T1] x86_pmu_event_init+0x39/0x220 > > The DS buffers are special in that they're part of cpu_entrt_area. If > this comes apart it might mean your pagetables are dodgy. Hmm, it seems caused by some WIP branch patches, I suspect below: commit 124d6af5a5f559e516ed2c6ea857e889ed293b43 x86/paravirt: Standardize 'insn_buff' variable names The suspicious line is "per_cpu(insn_buff, cpu) = insn_buff;" I can help to test if need to try anything, eg. debug patch. I do not know anything of the pti and ds buffer logic, but below chunk make the next-merge-window branch booting fine on the laptop. --- diff --git a/arch/x86/events/intel/ds.c b/arch/x86/events/intel/ds.c index ad47f6415b17..fa254c576032 100644 --- a/arch/x86/events/intel/ds.c +++ b/arch/x86/events/intel/ds.c @@ -337,7 +337,7 @@ static int alloc_pebs_buffer(int cpu) struct debug_store *ds = hwev->ds; size_t bsiz = x86_pmu.pebs_buffer_size; int max, node = cpu_to_node(cpu); - void *buffer, *insn_buff, *cea; + void *buffer, *ibuff, *cea; if (!x86_pmu.pebs) return 0; @@ -351,12 +351,12 @@ static int alloc_pebs_buffer(int cpu) * buffer then. */ if (x86_pmu.intel_cap.pebs_format < 2) { - insn_buff = kzalloc_node(PEBS_FIXUP_SIZE, GFP_KERNEL, node); - if (!insn_buff) { + ibuff = kzalloc_node(PEBS_FIXUP_SIZE, GFP_KERNEL, node); + if (!ibuff) { dsfree_pages(buffer, bsiz); return -ENOMEM; } - per_cpu(insn_buff, cpu) = insn_buff; + per_cpu(insn_buff, cpu) = ibuff; } hwev->ds_pebs_vaddr = buffer; /* Update the cpu entry area mapping */