Received: by 2002:a25:c593:0:0:0:0:0 with SMTP id v141csp5949745ybe; Tue, 17 Sep 2019 16:43:09 -0700 (PDT) X-Google-Smtp-Source: APXvYqwa0wM9EIeMmhtS6Zf3dRQYIzM2wT5HFD5TmWEZgrfyLDdfi0yYrFqoG4BTDsI4zf44e5Yh X-Received: by 2002:a50:91d0:: with SMTP id h16mr7742729eda.152.1568763789295; Tue, 17 Sep 2019 16:43:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1568763789; cv=none; d=google.com; s=arc-20160816; b=znSJH2xU3n912yPXK0EOopSu31l+vQnoZqmfQeoKFGBZ8fD9nB/25Si9J48TZ81vgw +isXfnV57fmpIJO8AvexTOvIbx4MX8iEP/1m7buv4iNd4M950YSogls5MWiR1aYRmogr vzmwDsJ2KG98MbbzCK8HtNhas3tiEIuym9DO9CavR2h2Jbqvvp15LtdM+xPoxk+a8q3B L6h0cJKwBTolG5ql8iHTUNnCcKvwdib82tgom/KqUNL3TrBJBbagqwB2QQazJs0oiRJD lVsbP9DT/Qjvg8umM3DLT9OpTWAnWVeMgow38OabCDFCdXPMQarf8cx4e5dBLKNrjrw4 Hclw== 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=GUL7JIP8KvXBVeZGyJprnOGcvY2ScNnDrEmy/dPTq4k=; b=lpPB0r5kiz+VhIvH9wCjoXVNFECTxfV+PegPXsI9WC1EE1TXk1eRlZIctSB3yl7oSc /QiWJHLaV18o2OTa+xV7txsZxWj1pwSBXC2CwNBJVgN/7kFJ7KHLgs0IN/S85ix0zceo 4QpUsl7v1ufKkhMOtMovQwxuI5TVMto/Wd+iCAgC8XkGSJ3juYgBS7e2C168pk7fhsh8 CbCxMus3wPV1hmA71dizF32MANtuxx0KrnDlL7FnRJcAEt09BbuGyT4/IdUYJ6f9u14h nXCcvI98sSm/j8XKVf9vbqpays8LwRuWYQJPWgXrZmNJDMlWBY7sRK1f2EkaizCy90n3 uQfQ== 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 x22si2390496edi.382.2019.09.17.16.42.46; Tue, 17 Sep 2019 16:43:09 -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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729279AbfIQPPa (ORCPT + 99 others); Tue, 17 Sep 2019 11:15:30 -0400 Received: from foss.arm.com ([217.140.110.172]:57340 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727437AbfIQPPa (ORCPT ); Tue, 17 Sep 2019 11:15:30 -0400 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id BE68015A2; Tue, 17 Sep 2019 08:15:29 -0700 (PDT) Received: from e121166-lin.cambridge.arm.com (e121166-lin.cambridge.arm.com [10.1.196.255]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id F0D203F575; Tue, 17 Sep 2019 08:15:28 -0700 (PDT) Date: Tue, 17 Sep 2019 16:15:23 +0100 From: Lorenzo Pieralisi To: "Derrick, Jonathan" Cc: "linux-kernel@vger.kernel.org" , "Busch, Keith" , "linux-pci@vger.kernel.org" , "helgaas@kernel.org" Subject: Re: [PATCH 2/2] PCI: vmd: Fix shadow offsets to reflect spec changes Message-ID: <20190917151523.GA7948@e121166-lin.cambridge.arm.com> References: <20190916135435.5017-1-jonathan.derrick@intel.com> <20190916135435.5017-3-jonathan.derrick@intel.com> <20190917104106.GB32602@e121166-lin.cambridge.arm.com> <87f1f92276becb6f83d040b36697ef8084e63105.camel@intel.com> <20190917140525.GA6377@e121166-lin.cambridge.arm.com> <087e23dc3bb7b94bb96c33b380732ebd1285e467.camel@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <087e23dc3bb7b94bb96c33b380732ebd1285e467.camel@intel.com> User-Agent: Mutt/1.9.4 (2018-02-28) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Sep 17, 2019 at 02:45:03PM +0000, Derrick, Jonathan wrote: > On Tue, 2019-09-17 at 15:05 +0100, Lorenzo Pieralisi wrote: > > On Tue, Sep 17, 2019 at 01:55:59PM +0000, Derrick, Jonathan wrote: > > > On Tue, 2019-09-17 at 11:41 +0100, Lorenzo Pieralisi wrote: > > > > On Mon, Sep 16, 2019 at 07:54:35AM -0600, Jon Derrick wrote: > > > > > The shadow offset scratchpad was moved to 0x2000-0x2010. Update the > > > > > location to get the correct shadow offset. > > > > > > > > Hi Jon, > > > > > > > > what does "was moved" mean ? Would this code still work on previous HW ? > > > > > > > The previous code won't work on (not yet released) hw. Guests using the > > > domain will see the wrong offset and enumerate the domain incorrectly. > > > > That's true also for new kernels on _current_ hardware, isn't it ? > > > > What I am saying is that there must be a way to detect the right > > offset from HW probing or firmware otherwise things will break > > one way of another. > > > I think this is basically that, but the spec changed which register > addresses contained the offset. The offset was still discoverable > either way, but is now within 0x2000-0x2010, with 0x2010-0x2090 as oob > interface. > > > > > > > We must make sure that the address move is managed seamlessly by the > > > > kernel. > > > If we need to avoid changing addressing within stable, then that's > > > fine. But otherwise is there an issue merging with 5.4? > > > > See above. Would 5.4 with this patch applied work on systems where > > the offset is the same as the _current_ one without this patch > > applied ? > I understand your concern, but these systems with wrong addressing > won't exist because the hardware isn't released yet. > > In the future, the hardware will be released and users will inevitably > load some unfixed kernel, and we would like to point to stable for the > fix. I am sorry for being blunt but I need to understand. If we apply this patch, are you telling me that the _current_ HW would fail ? I assume the current HW+kernel set-up is working, maybe that's what I got wrong. Reworded: on existing HW, is this patch fixing anything ? This patch when it hits the mainline will trickle into stable kernel unchanged. > > > > For the time being I have to drop this fix and it is extremely > > > > tight to get it in v5.4, I can't send stable changes that we may > > > > have to revert. > > > Aren't we in the beginning of the merge window? > > > > Yes and that's the problem, patches for v5.4 should have already > > being queued a while ago, I do not know when Bjorn will send the > > PR for v5.4 but that's going to happen shortly, I am making an > > exception to squeeze these patches in since it is vmd only code > > but still it is very very tight. > > > If you feel there's a risk, then I think it can be staged for v5.5. > Hardware will not be available for some time. I do not feel it is risky, I feel it would be much better if the scratchpad address could be detected at runtime through versioning of sorts either HW or firmware based. If we can't probe it inevitably we will have systems where kernels would break and that's something we should avoid. Lorenzo