Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp532595imm; Fri, 10 Aug 2018 16:25:57 -0700 (PDT) X-Google-Smtp-Source: AA+uWPyrkvmTOOKHt/XAXhvtjg6MSEk5qKsQjXK4OlVWWzqozaELEHU1DgJLD5qf+7OeUMtxPE0b X-Received: by 2002:a63:4c21:: with SMTP id z33-v6mr8249790pga.383.1533943557747; Fri, 10 Aug 2018 16:25:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1533943557; cv=none; d=google.com; s=arc-20160816; b=uluF0ayKq9On1T1bK7CehbQWXMbRNGuvHzVFUhuE/EaOVPLFXpq7Casb6eHJ+0nS1u 7I3MEyiZCYI+aKWclviDODkqObe8+QCOodmZtLFJk3FgqzGY2BzSl9fFgcEyIBflaMsP 3b+RQeYIHDZ0LQyZRp8Xuhii0xUzDTDcQcWXTXmGNaNJmc44r95ShAKKl+9Cxh4x/cKG We+GisEBo3SSP+effXoXZ5h1Xl9tgTGE0mVqyyJOwaOQAfa/opSbiyEktdhzmeA9ojPl sI+1FaMkaIntTptNsUDkivQDmTujDOF85Z7IOTEaL5l/MUfTdSwHzjDNiIgosGRxombC lGAg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:date:subject:user-agent:message-id :references:cc:in-reply-to:from:to:content-transfer-encoding :mime-version:dkim-signature:arc-authentication-results; bh=LAyp1To/rzRpokUCCV8Q9E/81SIcUTUb9xypbQ3b0MU=; b=gFI1i0fHtLIUo5LZ/Cl9notYVJigRhyq/wZpNP7KuiXPw+rRnv5IzK4Xyupl6dv68g onP5NgGXNXHQLfkXHk2SPR5Hk9H1slabwq3jvORh+E90zIZUfQvI7IBVMy6vqft/9fBD xqvhW9z5iAl+5OA0Oy4CSlRmZhWneKmirDzkgh7xnbnIyTIMpMtfdMYkBAsBkhQ1vL3G PtONFXLXMqDPt/iYiHg/xcN9ybCYsFb8LhZ4tBZQJ/+fPBz8nwvqbNCsvw8c9enoEeZ9 BrZY5IKNZU1ZdALdd2CH3UpBDYG+8bv7+JH/eO/hH+l8AxdLBmkBqiujqvGNNYU39RaH IUEQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=bTDYrOMj; 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=pass (p=REJECT sp=REJECT dis=NONE) header.from=chromium.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id z4-v6si9440050pge.173.2018.08.10.16.25.40; Fri, 10 Aug 2018 16:25:57 -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; dkim=pass header.i=@chromium.org header.s=google header.b=bTDYrOMj; 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=pass (p=REJECT sp=REJECT dis=NONE) header.from=chromium.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727182AbeHKB4q (ORCPT + 99 others); Fri, 10 Aug 2018 21:56:46 -0400 Received: from mail-pg1-f196.google.com ([209.85.215.196]:34018 "EHLO mail-pg1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726774AbeHKB4q (ORCPT ); Fri, 10 Aug 2018 21:56:46 -0400 Received: by mail-pg1-f196.google.com with SMTP id y5-v6so5055308pgv.1 for ; Fri, 10 Aug 2018 16:24:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=mime-version:content-transfer-encoding:to:from:in-reply-to:cc :references:message-id:user-agent:subject:date; bh=LAyp1To/rzRpokUCCV8Q9E/81SIcUTUb9xypbQ3b0MU=; b=bTDYrOMj3arptqSnqosqKFyEmQ/2xgdm2cN2goPo7W7Zl4g3QJpZ+fJ8Q1csUbtpYM gtoj/UZpTrul7dXh0iUJbG2yk17YPe1Uwu4LhGzifMFzOFUZxkG8JicMtk7bTOLCymA7 bGSk8IWNjroe9OfVLT6o/DRaZboRWUGSxMyrc= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:content-transfer-encoding:to:from :in-reply-to:cc:references:message-id:user-agent:subject:date; bh=LAyp1To/rzRpokUCCV8Q9E/81SIcUTUb9xypbQ3b0MU=; b=M+Xptg26N374gRsMo6+r7Xn590XRN3ZyfjrNPviEccDajSUBKL7Gk/sbnkugKcI/Nu kIJ8kjjAgTU8u7vpU0By9skcmieP0CXDtWVvwYmj/XdJlWLcTCFL6jlt/cl40asDSDK2 3/H9Xrkp+UVVHJ7sakaa3IYrzGkcA5YSg/i0Im5rsQThkFhS8DpwPvDz3r+TgAcg3qSM efD4VaVhIXiIoGQpuoOKYyC2xma3LZpmRCes3BdJG7uhVz8Jes5jusiG1txCsrPPKR6y LYJAQl9IKcHV61mubsaT8kU0yX2DmipqsuLBNTXjSdhaJJ4nKz9XnJRqq1MrOIVOFg1x zA7g== X-Gm-Message-State: AOUpUlGPuxNgZrn7mPCm/nTqbmRbR252hmUXh0Zurv2YJpVwV26d8KGy qztgaFb0c1dPP8diJPPcMQRaEw== X-Received: by 2002:a63:5e45:: with SMTP id s66-v6mr8262152pgb.151.1533943487019; Fri, 10 Aug 2018 16:24:47 -0700 (PDT) Received: from localhost ([2620:15c:202:201:7e28:b9f3:6afc:5326]) by smtp.gmail.com with ESMTPSA id v89-v6sm26288329pfj.22.2018.08.10.16.24.46 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 10 Aug 2018 16:24:46 -0700 (PDT) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable To: Julius Werner From: Stephen Boyd In-Reply-To: <153386966793.37448.12640092735399834661@swboyd.mtv.corp.google.com> Cc: Greg Kroah-Hartman , LKML , Wei-Ning Huang , Brian Norris , samuel@sholland.org References: <20180809171722.144325-1-swboyd@chromium.org> <20180809171722.144325-8-swboyd@chromium.org> <153385579866.220756.16086660810932774163@swboyd.mtv.corp.google.com> <153386966793.37448.12640092735399834661@swboyd.mtv.corp.google.com> Message-ID: <153394348544.37448.7231279350981818561@swboyd.mtv.corp.google.com> User-Agent: alot/0.7 Subject: Re: [PATCH v3 7/7] firmware: coreboot: Request table region for exclusive access Date: Fri, 10 Aug 2018 16:24:45 -0700 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Quoting Stephen Boyd (2018-08-09 19:54:27) > What's with the top posting? ;-) > = > Quoting Julius Werner (2018-08-09 16:44:43) > > Actually, looking at what IO_STRICT_DEVMEM really does, would it > > really prevent userspace accesses to these areas? Because it seems > > that it only prevents accesses to areas marked as IORESOURCE_BUSY, and > > while I can't fully follow how the kernel assigns that, comments > > suggest that this is only set when "Driver has marked this resource > > busy". > = > Requesting the memory region as is done in this patch marks it as busy. > = > > = > > So after you make the change to the other patch where we immediately > > unmap the coreboot table again at the end of the probe() function, > > shouldn't it become available to userspace again even with > > IO_STRICT_DEVMEM set? > = > Yes, if we unmap the region immediately after devices are populated then > this whole point is moot with the assumption that this code isn't > running at the same time as the cbmem utility. I've done this already > and it is working on arm. I still need to build/boot/test on an x86 > platform which I should be able to do tomorrow. > = I tried my latest version of the patches (unplubished so far) and those work on x86 with cbmem. So things look good and we don't need to keep the mapping around.