[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH v3 03/10] xen/arm: smmuv3: Ensure queue is read after updating prod pointer


  • To: Julien Grall <julien@xxxxxxx>
  • From: Bertrand Marquis <Bertrand.Marquis@xxxxxxx>
  • Date: Tue, 6 Sep 2022 07:19:45 +0000
  • Accept-language: en-GB, en-US
  • Arc-authentication-results: i=2; mx.microsoft.com 1; spf=pass (sender ip is 63.35.35.123) smtp.rcpttodomain=lists.xenproject.org smtp.mailfrom=arm.com; dmarc=pass (p=none sp=none pct=100) action=none header.from=arm.com; dkim=pass (signature was verified) header.d=armh.onmicrosoft.com; arc=pass (0 oda=1 ltdi=1 spf=[1,1,smtp.mailfrom=arm.com] dkim=[1,1,header.d=arm.com] dmarc=[1,1,header.from=arm.com])
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=arm.com; dmarc=pass action=none header.from=arm.com; dkim=pass header.d=arm.com; arc=none
  • Arc-message-signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=7QqqIbKntsO1D9Nj1iz8XQZOoYYfriM9zZHKegE4N9A=; b=OA5sa4RT7EgU5Uf6bDqZ6NvTppMALh8ShtFJQe/Rwio2iBpvM/aLS3Ag9HgBiVGBEDQngBzkd2vBrz0t6b5IKsh4B6Nz9pJ3VqdlAg3ZNUVokPPgsOcuRwBIrQRCyexps6Mc/1IYECh89RmwSStq2pLsOWHgGvFBt1s5OVjUML0c3kchdrB7BHIy9rAdjMF42LiR89q6n0+M5CKw3ffzClX8K8cLoG1VGGMHWd0mocBu+8aktM2F1CpJjyApLgl4dwOmyC6p1e9FqYdcegbVzvKfRmWfY06V1siMJZpZ4Sv0AfJqyIRxC/XOERkdBhbVgxyRMAEOhngfg389t9DIIA==
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=7QqqIbKntsO1D9Nj1iz8XQZOoYYfriM9zZHKegE4N9A=; b=O4GnhACa68xTvMDd5UgiFRAJXUQw6tbHEU3SEvGPphzhTE+fgOH7jHIz4HtXin6izv9ZQ24fLEov3Gddj8zOwW8JYEsI0y3W20zDBbWAwFJ6WR7ZuCG/NQ8IUfc53gk3zKbJSqzCjLgsvFl3z3Nkh12y3tjTrslE6UwHhWXqMpQQgU1DRca40dXzK6Evk1w1q0NAdZYcutyBOcp3L47PENL8bvMG0pckB36/1t3pK/bdOeYlQWk2sa1lRrE9gzwu8GIzG9MYJbd6aoois9Tbg3undWTc5Q14o4e1CnreXAppeWiqiK3nUJTxq5WnQeGzG/FtU7XVJHPElV8DIa65Xw==
  • Arc-seal: i=2; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=pass; b=G4UT95SlIDX3jTJfGPL7AgWXUlgXb9MCBowMm1eoHPAt+9vra6ftnieWu6srh7eU8QHqJKQIkHrjy/kDyvbNNpeJYnXvLZeT78aImh4i5Y7+0q2CkgEARCFYgxnAnr0azYjBhfxJRCX18MGc33KJ6ri4/xI9m6bMEtbNAozELo7ciL4SEUdEe+4FPhsW8DCGaMB+HnIR8bb4yQQM5Y6fOLm0UunfBmEW303nCd8K/2Xb1PfJKVQRTMPbI8RVpld/CldftCTrkuHCSZ4wvtj5EBCWTno7GRtWeRtJh9cRxiRuFR9SZQJyeqZ9H3l45NpDv+JweFUkOnujXSMiRe3K3g==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=DEoKhcxVXa8gOjHLEwuWCZkszg8ao4DtSdKzzWdZ7N1Dbh2MSAB+pEVRvKSxsuqyrh32dsS86W/cYL4AELlaacUJy7uaDCmp7gv4r6vW9mjkj9bF7otEfmKBiESsJnE/VYXraKLKAGo5q9L3+23EViw9RKUcFYzDgRRPKqX5rg15ooUzeBLyDnN4K4poeAYTXQhDlXMaUjT+3ZUUzCKVr6gd6c5ZKDfrsjSfQeCdRXeOUoVOqY7mrttUSuQnunHs2LeXOH6lCGbVopwi3DmD26GxCF0CRIcNO9w+ZIOoydtwzQh+huxYRLfz1xto9mJVfxpPEnXc33E5frlkkrBmXQ==
  • Authentication-results-original: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=arm.com;
  • Cc: Rahul Singh <Rahul.Singh@xxxxxxx>, xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxxx>, Zhou Wang <wangzhou1@xxxxxxxxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Volodymyr Babchuk <Volodymyr_Babchuk@xxxxxxxx>, Will Deacon <will@xxxxxxxxxx>
  • Delivery-date: Tue, 06 Sep 2022 07:20:03 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
  • Nodisclaimer: true
  • Original-authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=arm.com;
  • Thread-index: AQHYwUUWFmEvVlJX+EKYMZGC5n14Aq3RCQUAgAADdwCAAAGWAIAA8XYA
  • Thread-topic: [PATCH v3 03/10] xen/arm: smmuv3: Ensure queue is read after updating prod pointer

Hi Julien,

> On 5 Sep 2022, at 17:55, Julien Grall <julien@xxxxxxx> wrote:
> 
> 
> 
> On 05/09/2022 17:49, Rahul Singh wrote:
>> Hi Julien,
> 
> Hi Rahul,
> 
>>> On 5 Sep 2022, at 5:37 pm, Julien Grall <julien@xxxxxxx> wrote:
>>> 
>>> 
>>> 
>>> On 05/09/2022 17:30, Rahul Singh wrote:
>>>> From: Zhou Wang <wangzhou1@xxxxxxxxxxxxx>
>>>> Backport Linux commit a76a37777f2c. Rename __iomb to iomb() while
>>>> merging to get in sync with other Xen definitions.
>>>> Reading the 'prod' MMIO register in order to determine whether or
>>>> not there is valid data beyond 'cons' for a given queue does not
>>>> provide sufficient dependency ordering, as the resulting access is
>>>> address dependent only on 'cons' and can therefore be speculated
>>>> ahead of time, potentially allowing stale data to be read by the
>>>> CPU.
>>>> Use readl() instead of readl_relaxed() when updating the shadow copy
>>>> of the 'prod' pointer, so that all speculated memory reads from the
>>>> corresponding queue can occur only from valid slots.
>>>> Signed-off-by: Zhou Wang <wangzhou1@xxxxxxxxxxxxx>
>>>> Link: 
>>>> https://lore.kernel.org/r/1601281922-117296-1-git-send-email-wangzhou1@xxxxxxxxxxxxx
>>>> [will: Use readl() instead of explicit barrier. Update 'cons' side to 
>>>> match.]
>>>> Signed-off-by: Will Deacon <will@xxxxxxxxxx>
>>>> Origin: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git 
>>>> a76a37777f2c
>>>> Signed-off-by: Rahul Singh <rahul.singh@xxxxxxx>
>>>> ---
>>>> Changes in v3:
>>>>  - rename __iomb() to iomb() and also move it from common file to
>>>>    smmu-v3.c file
>>> 
>>> Hmmm... Quoting Bertrand:
>>> 
>>> "We need the __iomb as “linux compatibility” in fact so I would suggest for 
>>> now to only introduce it at the beginning of smmu-v3.c with other linux 
>>> compatibility stuff to prevent adding this to Xen overall."
>>> 
>>> Which I also agreed. I couldn't a more recent conversation explaining your 
>>> approach. Can you outline why you didn't follow the approached discussed?
>>>   
>> I am really sorry that I missed the naming and when I made the patch in my 
>> mind there was a comment from Stefano to
>> rename the __iomb() to iomb(). I will send only this patch after fixing or 
>> do you want me to send the whole series?
> 
> I would be fine if you only resend this patch.
> 
> Also, looking at the other patches, you added the Acked-by before your 
> Signed-off-by. In general, the tags are ordered chronologically, so this 
> should be inverted. I can deal with that on commit once Bertrand confirmed he 
> is happy with the series.

With the acked-by needing to be moved and the iomb part, it will make your life 
easier if Rahul just resend the serie so Rahul please send a v4.

Cheers
Bertrand

> 
> Cheers,
> 
> -- 
> Julien Grall


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.