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

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


  • To: Oleksandr Andrushchenko <andr2000@xxxxxxxxx>
  • From: Bertrand Marquis <Bertrand.Marquis@xxxxxxx>
  • Date: Mon, 2 Nov 2020 09:55:28 +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=G0gDik8R7PSzlglryaKEUqXXKkBxBVwE4A9c2jEMqk0=; b=aSgGdjFZOmyk4BL/+ujOJKNDakmu9qaGG/gy3gMoeP7sq/QIQXCigiX5oX4Hifk/Y/gGfZcxJdZXf9AQhscSBWkoKMZF8+ihtdVU+WqLqA+6kY501U+N4SPbhx/9zyhHaNmh76XhncvHUvT8SwkrGo6+ZZVo3TX3as/4ra4zTetfch2xzLQ9YZARv807v6nGEgqet+jU1hk0VTlSKkxeTresvzSd8Vp+Ehm6VnXxYHJYhHAFVxWS5lwiKzRkttZeOa6beuiJGeOR+dFQS58gogIHw9zzjRbQJMjaT+MruoC4DrDbEcohjWNCSEAIVWzeQ5un0CQfwNmh5bfJ3NIFfQ==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=DWVB0dYJtJ4JA60s1Fu9TGrXGJUIt+io6YOoGzkIkd3w8lLUVvZx58njiPstBHm6vWitUzchyvfYPIFuP+GpMYZtSVEWwf8uJ3gzwht5rhtRFxClvOK/zL4zNjiAEAZPCsv9qVaXqyLXNTpuGwPz6/kUHDeyryZI+zl+xTuvaIin9e9LxDlGHyXimmxxF/LuOo1BkRMuSWUBfwhseIUwCQFnmzWhLpTZ32GCDBqfxZ7oM537dZyKtR/wzRb1JshYx9dAGISts/gUlhmKEi29VZYHWHzUw3b0cPqA1besxJqqstEtP/7w2wsm0BdoiJSlaRBOeKzX98dBPfOEhURxDw==
  • Authentication-results-original: gmail.com; dkim=none (message not signed) header.d=none;gmail.com; dmarc=none action=none header.from=arm.com;
  • Cc: Julien Grall <julien@xxxxxxx>, Oleksandr Andrushchenko <Oleksandr_Andrushchenko@xxxxxxxx>, Rahul Singh <Rahul.Singh@xxxxxxx>, "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>, Jan Beulich <jbeulich@xxxxxxxx>, Paul Durrant <paul@xxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Volodymyr Babchuk <Volodymyr_Babchuk@xxxxxxxx>
  • Delivery-date: Mon, 02 Nov 2020 09:56:04 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
  • Nodisclaimer: true
  • Original-authentication-results: gmail.com; dkim=none (message not signed) header.d=none;gmail.com; dmarc=none action=none header.from=arm.com;
  • Thread-index: AQHWoVvyGh0jWzCHpk6w/U7XN+08x6mwEIWAgABuPwCAA/gngIAAQvMA
  • Thread-topic: [XEN PATCH v1] xen/arm : Add support for SMMUv3 driver

Hi,

> On 2 Nov 2020, at 05:55, Oleksandr Andrushchenko <andr2000@xxxxxxxxx> wrote:
> 
> Hi, Julien!
> 
> On 10/30/20 7:18 PM, Julien Grall wrote:
>> Hi Oleksandr,
>> 
>> On 30/10/2020 10:44, Oleksandr Andrushchenko wrote:
>>> On 10/20/20 6:25 PM, Rahul Singh wrote:
>>>> Add support for ARM architected SMMUv3 implementations. It is based on
>>>> the Linux SMMUv3 driver.
>>>> 
>>>> Major differences between the Linux driver are as follows:
>>>> 1. Only Stage-2 translation is supported as compared to the Linux driver
>>>>      that supports both Stage-1 and Stage-2 translations.
>>> 
>>> First of all thank you for the efforts!
>>> 
>>> I tried the patch with QEMU and would like to know if my understanding 
>>> correct
>>> 
>>> that this combination will not work as of now:
>>> 
>>> (XEN) SMMUv3: /smmuv3@9050000: SMMUv3: DT value = eventq
>>> (XEN) Data Abort Trap. Syndrome=0x1940010
>>> (XEN) Walking Hypervisor VA 0x40031000 on CPU0 via TTBR 0x00000000b8469000
>>> (XEN) 0TH[0x0] = 0x00000000b8468f7f
>>> 
>>> [snip]
>>> 
>>> If this is expected then is there any plan to make QEMU work as well?
>>> 
>>> I see [1] says that "Only stage 1 and AArch64 PTW are supported." on QEMU 
>>> side.
>> 
>> Just for clarication, you are trying to boot Xen on QEMU, right?
> Exactly
>> 
>> You might be able to use the stage-1 page-tables to isolate each device in 
>> Xen. However, I don't think you will be able to share the P2M because the 
>> page-tables layout between stage-1 and stage-2 is different.
> So, it is even more work then

Overall it would make more sense to spend some time adding proper support in 
Qemu then trying to modify the driver to support Qemu right now.

>> 
>>> 
>>> 
>>> We are interested in QEMU/SMMUv3 as a flexible platform for PCI passthrough
>>> 
>>> implementation, so it could allow testing different setups and 
>>> configurations with QEMU.
>> 
>> I would recommend to get the SMMU supporting supporting stage-2 page-tables.
> You mean in QEMU?

See before.

>> 
>> Regardless that, I think Xen should be able to say the SMMU is not supported 
>> rather than crashing.
> Yes, that would be nice

Fully agree and we will look into that.

Anything you could share so that we could quickly reproduce your setup would be 
more then great.

Regards
Bertrand

>> 
>> Cheers,
>> 
> Thank you,
> 
> Oleksandr




 


Rackspace

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