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

Re: [XEN PATCH v1] xen/arm : Add support for SMMUv3 driver


  • To: Julien Grall <julien@xxxxxxx>
  • From: Bertrand Marquis <Bertrand.Marquis@xxxxxxx>
  • Date: Tue, 27 Oct 2020 17:57:02 +0000
  • Accept-language: en-GB, en-US
  • 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=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-SenderADCheck; bh=DqWwbo+0I5dCDOVwwtBJrTZ2XYC/jsTBsx7WLk6ov+4=; b=Zoj6z8wux9j0JbrW3QxEUikQKWq8tjDM3BYn36FWGcdvBlCjZ4TuT/q91FW0AEPTZy3Z3DpONxGLv6zI7bEAJR8Lct/VQn9gKdrqqcVgEcll0HJmY6Oweua/yyiLV3HOF7TTgHtYOy63uyC8P8mgNIO5FEcQ6V45zwAaHO7aMRwuv3ur1bqD7zmZQltvgTj6Y43VWrxrfTmx00scuXL8qw9al6V5VhFUQJCZpAIuQEKsGf3K6GX7bljl7r3C6uydUt9hg8DHImLx7URUuYMR1Td7pXEfkEhSeukSoH4xvWZlj/DtOr82vZwunIFqWlE99XuWEI6257drzw6YijP+BA==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=XfyUj8WzktkOiKbz7kxkX4CUgYMJZ9DIY/ctqdnMffaivQDovhzLc2/yC/tofuAxsWPhut35xVuGv6Ee0HRvluYKaE8qESu+IeF8n7AOzy+GBnSImqLnR+s+DZ5k0VP6Y7ozoRir5s9gd8ap96KJuNGpC7kMoqT4bP+Y8HM6UG9nMbsBwnEVyOS+dSaWDb3cz3cUi/LFAc26pj5qpe9otcTihEsSpeRQP1zJEI9q2BcoMcennAnE8mbS6biTPYPdDan6e+0ekVmk1cI2eaKExVu7C2xcG4DYE+mqKdgtfTuKxfQL+7wMIj+PuqSXCzszfyJZ5fY304HuDfX4SO/LLg==
  • Authentication-results-original: xen.org; dkim=none (message not signed) header.d=none;xen.org; dmarc=none action=none header.from=arm.com;
  • Cc: Ash Wilding <Ash.Wilding@xxxxxxx>, Rahul Singh <Rahul.Singh@xxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>, Jan Beulich <jbeulich@xxxxxxxx>, Paul Durrant <paul@xxxxxxx>, Volodymyr Babchuk <Volodymyr_Babchuk@xxxxxxxx>
  • Delivery-date: Tue, 27 Oct 2020 17:57:41 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
  • Nodisclaimer: true
  • Original-authentication-results: xen.org; dkim=none (message not signed) header.d=none;xen.org; dmarc=none action=none header.from=arm.com;
  • Thread-index: AQHWoVvyGh0jWzCHpk6w/U7XN+08x6mgw0AAgAEzsQCAAWItgIABA+GAgADBXQCAABfAAIAAGI8AgAAORwCABG97AIAAEvKAgABzxQCAAUKcAIAABQSAgAA3qQA=
  • Thread-topic: [XEN PATCH v1] xen/arm : Add support for SMMUv3 driver

Hi Julien,

> On 27 Oct 2020, at 14:37, Julien Grall <julien@xxxxxxx> wrote:
> 
> 
> 
> On 27/10/2020 14:19, Bertrand Marquis wrote:
>> Hi Julien,
> 
> Hi Bertrand,
> 
>>> On 26 Oct 2020, at 19:05, Julien Grall <julien@xxxxxxx> wrote:
>>> 
>>> On 26/10/2020 12:10, Ash Wilding wrote:
>>>> Hi,
>>> 
>>> Hi Ash,
>>> 
>>>>> 1. atomic_set_release
>>>>> 2. atomic_fetch_andnot_relaxed
>>>>> 3. atomic_cond_read_relaxed
>>>>> 4. atomic_long_cond_read_relaxed
>>>>> 5. atomic_long_xor
>>>>> 6. atomic_set_release
>>>>> 7. atomic_cmpxchg_relaxed might be we can use atomic_cmpxchg that is
>>>>>    implemented in XEN need to check.
>>>>> 8. atomic_dec_return_release
>>>>> 9. atomic_fetch_inc_relaxed
>>>> If we're going to pull in Linux's implementations of the above atomics
>>>> helpers for SMMUv3, and given the majority of SMMUv3 systems are v8.1+
>>>> with LSE, perhaps this would be a good time to drop the current
>>>> atomic.h in Xen completely and pull in both Linux's LL/SC and LSE
>>>> helpers,
>>> 
>>> When I originally answered to the thread, I thought about suggesting 
>>> importing LSE. But I felt it was too much to ask in order to merge the 
>>> SMMUv3 code.
>>> 
>>> However, I would love to have support for LSE in Xen as this would solve 
>>> other not yet fully closed security issue with LL/SC (see XSA-295 [2]).
>>> 
>>> Would Arm be willing to add support for LSE before merging the SMMUv3?
>> We are willing to work on LSE but I cannot commit on me and my team to start 
>> working on this subject before the end of the year.
> 
> That's fine. There are other way we can bridge the gap between Xen and Linux 
> in order to get the latest version (see more below).
> 
>> So I think it would be good to integrate this version of SMMUv3 and we can 
>> then update it to the latest Linux one once LSE has been added.
> 
> As I pointed out in my first e-mail on this thread, I am quite concerned that 
> we are going to (re-)introduce bugs that have been fixed in Linux.
> Did you investigate that this is not going to happen?

We will take the action to check changes in Linux in the driver since the 
version we are based on to make sure no critical fixes have been done
that are needed in our code.

> 
> However, I think we can manage to get the latest version without requiring 
> LSE. It should be possible to provide dumb version of most the helpers.

If this is done, there would still be after a big work on switching to the 
newer code from Linux, testing and reviewing it.

Updating the driver after those dumb versions are added would still be possible.

Cheers
Bertrand

> 
>> I think it make sense in the meantime to discuss how this should be designed 
>> but it might be a good idea to make a specific discussion thread for that.
> 
> Make sense. Can you start a new thread?
> 
> Cheers,
> 
> -- 
> Julien Grall




 


Rackspace

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