Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp2743148imm; Thu, 9 Aug 2018 19:56:05 -0700 (PDT) X-Google-Smtp-Source: AA+uWPwRtyzR61IB1YMFpa6KV8spQs1R5jUX092umUAQ8EAC6ECJaHwIBDkeV5mxfI6cAhSDsQK0 X-Received: by 2002:a63:5a13:: with SMTP id o19-v6mr4470737pgb.195.1533869765624; Thu, 09 Aug 2018 19:56:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1533869765; cv=none; d=google.com; s=arc-20160816; b=CxZJSjfCW/JfHYnss++i2IAMLhVyQfNo6QmLA4GB/4OVFsNy85rUGz9CFBxEMo9a8l QM6X1TnhJAAo5vc5ezq1SZipD5A2oZY+o2GIZimEp0FnVtuQ9y9+EmV+F+nD2ImkUGkt vAi5lcowh5XO9e3N6hac9gCt9W0Gg4vrOogZ5hkBRScLTGEKI8o0IIrhzs+jpGkk1ial qedBoXsgydK5Y9qht3/jtHPBbMU5pHkasexyWMAqmApFtvjNpMnVtjFSVugAd4g32riK mf8bCewx2oAxkIAOsAuPqqxOb2jLwtwjtVRrktLtBRhLSJCNiGEF6ew6Z+5wGegRNu3Y hZwA== 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=qD4SDO/YMkOc4QtOLgUTnpiconjARpAHdS6vibgQxWU=; b=ItS0doark9b8ZJbLTHT8XvfVNPD5Z+pYBm8c6NftUAY0X+7nWjQBol2rAGGwG1x5Dr jTk9Bmok5iYqSUzfY4hsxQszEwP4H+m/kjk/9QuWPkCjPEEJhIW2SIv5+4DSdAvzOOiM RgfdvBi1ga9OgYfEA+E9ywDFmwDxlhJ3P/sgf/9W1nz5GiPh7fUsRmR+U7cgJRFGdczo 9iySZtD58mWYAq2IqM8I12A8G7r0xATtMogCUO6LWFfnBSOv3+jpQYIJ/iP3vQO63V8/ lhMQ8JwdIkOL/CoS4x/4Cuv5Y1j9lF+emwn3KOTpDw6DFgMgAK864zZm1Ay0iOyVrZjC WImA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=d32i4pw6; 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 s29-v6si9596384pfj.43.2018.08.09.19.55.50; Thu, 09 Aug 2018 19:56:05 -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=d32i4pw6; 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 S1727204AbeHJFWS (ORCPT + 99 others); Fri, 10 Aug 2018 01:22:18 -0400 Received: from mail-pg1-f194.google.com ([209.85.215.194]:33527 "EHLO mail-pg1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725198AbeHJFWR (ORCPT ); Fri, 10 Aug 2018 01:22:17 -0400 Received: by mail-pg1-f194.google.com with SMTP id r5-v6so3691863pgv.0 for ; Thu, 09 Aug 2018 19:54:29 -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=qD4SDO/YMkOc4QtOLgUTnpiconjARpAHdS6vibgQxWU=; b=d32i4pw6FfZ2VbpaTYvdoqgiHkBcpg6gVMgB8unB3FtUwIo70ENXyPmkX59eX2bIat 2KW1UUOlElF9ALDLrrBPctak10wwR0SN9qTozAiFwo7ynO67Nb7j5m1hBijQxbfX+zCa kiO3/uwwrn/RnyVP+bP0d/2l6j2OPg5D16dag= 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=qD4SDO/YMkOc4QtOLgUTnpiconjARpAHdS6vibgQxWU=; b=VjEINq6Kkq64xweOpxByd+macsOPLBnt0RXHFCV6chRRuT4aX96SvhKMMUUTTtTASq BFaNVOWFG4esMubFHx7hTwyltCkUa9cu4G8x06dh0b/FxrYDHJPnRvV2tKD1WlkPJW9E dvZDLWyTkGyBWAQx2ZuctGIZCeDJ1JUYsnoQTmOf+1SFHMN/y2wG8MGSfXml7GXONjXy X/0vb1jklhTp2usB6uR3S7Peiy7p7nJsSodRti3P7l6FSBsloAIWeu0PIQ2/y45UvaRY 4T373znWnhlEoen3fZEoyosrvM64w8d8as/zOjBnOhIBdMU/1WnvQiaYgUsK5WaprWEJ J8rQ== X-Gm-Message-State: AOUpUlEUBBz2NFNDdDAteN1oULQhkrs3SOZmFBqqopyJyNQ5uPAMAfQw ZAPb9ZdYMhlhUUv9dagwlQI59Q== X-Received: by 2002:a65:5284:: with SMTP id y4-v6mr4294224pgp.283.1533869669509; Thu, 09 Aug 2018 19:54:29 -0700 (PDT) Received: from localhost ([2620:15c:202:201:7e28:b9f3:6afc:5326]) by smtp.gmail.com with ESMTPSA id t30-v6sm13635673pgm.81.2018.08.09.19.54.28 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 09 Aug 2018 19:54:28 -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: 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> Message-ID: <153386966793.37448.12640092735399834661@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: Thu, 09 Aug 2018 19:54:27 -0700 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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.