Received: by 10.223.164.202 with SMTP id h10csp276998wrb; Tue, 7 Nov 2017 06:16:33 -0800 (PST) X-Google-Smtp-Source: ABhQp+QAdu6IvfLY7Z/FT8X1ScSZJQjUbBj1To41qaDFDsIxJxqB+wODOI0b906dmidJD546h/yp X-Received: by 10.101.97.81 with SMTP id o17mr18488546pgv.363.1510064193649; Tue, 07 Nov 2017 06:16:33 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1510064193; cv=none; d=google.com; s=arc-20160816; b=K45mgMrT6YWJM/MLiYS09ufoga3jficaqvWnqeFmeXXcfc8PfdT9N8vbyQxm0WA1l5 BnHLKKVzeoeWR+n6oVujRFWM5SWSo9qLtvmsH3aBws1g3qoW8QAQz4hYLh8jAK56eDli l1L2+u3ov7qXsjoZ7BYtys37LGeqiRXPUpWskHluvjH6Ki1rC4wC647PnByVAYJj7rAA 6qnpvuuMnOYSwlPAk/5xxNDnuDXgVZKq7sUImKqWIci0qJKqykda4WoWUIm8NBQnnZaJ vXEiNsF3M1QwlVOW0w5x0RF/AoeyH1dWaGS0c3AeP/BujIDJPvoQ+c9U3ivxh0O216a0 5xTg== 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:arc-authentication-results; bh=N6xusp40el+FUAi7YWfItDhoZITlgBGC8mRSpEBTAd8=; b=FxQcwvqT8eePliqde2uBpdvkmRXUUq//Pg30tnb6S9OA7GXTn6gapPu2aukIQ4jePh lNT5wiTnlhTnXhFmkCx4sEVNtthtqml1hbXqGnpkVMlAzrBKuNGB0df/bL5KWMX0Jcw5 le/e0PaKulySuapRZxUSFi7sXliBr1Zud0a/FEcILUeIyX652cvDSUiu9GdEM8th6t9C i1UonFA3Onuytl2jXNLYMC3R9u2utozSNd/L86yEIaaK24gyjRqmep/QPuOpiyUCZRCG zhhdt62CrDf9VXnev+Y+D/W1uP3sFTA2uICgUSh4QcTNq+J1b0K4DQeYfnPFa3o8/pnU zViA== 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 u191si1285175pgc.764.2017.11.07.06.16.20; Tue, 07 Nov 2017 06:16:33 -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 S964810AbdKGNmQ (ORCPT + 91 others); Tue, 7 Nov 2017 08:42:16 -0500 Received: from mx2.suse.de ([195.135.220.15]:52040 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932631AbdKGNmP (ORCPT ); Tue, 7 Nov 2017 08:42:15 -0500 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (charybdis-ext.suse.de [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id 86BD6AD6A; Tue, 7 Nov 2017 13:42:13 +0000 (UTC) Date: Tue, 7 Nov 2017 14:42:12 +0100 From: Jiri Bohac To: Baoquan He Cc: David Airlie , Dave Young , Vivek Goyal , Bjorn Helgaas , Toshi Kani , Thomas Gleixner , Ingo Molnar , "H. Peter Anvin" , linux-kernel@vger.kernel.org, kexec@lists.infradead.org, Borislav Petkov Subject: Re: [PATCH] x86/kexec: Exclude GART aperture from vmcore Message-ID: <20171107134212.tmjdt7rdailtbosa@dwarf.suse.cz> References: <20171103172822.4ty6yjhewroe4z4j@dwarf.suse.cz> <20171106024143.GA3669@x1> <20171106090155.p7jhe2m57whfxma3@dwarf.suse.cz> <20171106092729.GB3669@x1> <20171106095638.7iwlyjmlom3tqelt@dwarf.suse.cz> <20171107113956.GC3669@x1> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20171107113956.GC3669@x1> User-Agent: NeoMutt/20170609 (1.8.3) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Nov 07, 2017 at 07:39:56PM +0800, Baoquan He wrote: > I saw you defined the variable as xx_stolen_xx, does it mean that the > memory region where aperture located will be stolen from memory domain? > I am wondering if it will cause error when access this region from direct > mapping since allocate_aperture() is called in pci_iommu_alloc(), while > in setup_arch() we have built the direct mapping for all system > ram. Did I miss anything? yes, I believe accessing it through the direct mapping would cause the error; but the range is allocated by the memblock allocator and never given back, which effectively steals it from any other use; The memory will never be given to any user by any subsequent allocation, so nothing will access it. > Anyway, if it should be excluded from crash memory region, can we dig it > away from /proc/iomem so that it's a hole in /proc/vmcore? Like this, we Not sure this would work. In bko#72201, marking the range as used caused pci_claim_resource() to error out with -EBUSY after request_resource_conflict() (the error message has changed in 29003be but the logic remains). My (possibly wrong?) reading of pci_claim_resource() tells me that leaving the range out of the map would cause it to error out a little earlier with -EINVAL just after pci_find_parent_resource(). I'd rather avoid such experiments in fear of causing regressions similar to bko#72201. This particular one remained unnoticed for 8 years. I can't possibly test all AGP drivers :/ (So much for my justification of passing this to crash independently of the iomem_resource/e820 infrastructure.) > don't worry about the user space kexec utility either. What's the problem with the userspace kexec? The bug is in reading /proc/vmcore by makedumpfile. kexec would only operate within the preallocated crashkernel area, right? Regards, -- Jiri Bohac SUSE Labs, Prague, Czechia From 1583310270128704241@xxx Mon Nov 06 09:58:59 +0000 2017 X-GM-THRID: 1583066928846548446 X-Gmail-Labels: Inbox,Category Forums,HistoricalUnread