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

Re: [PATCH v5 10/11] arm/libxl: Emulated PCI device tree node in libxl


  • To: Ian Jackson <iwj@xxxxxxxxxxxxxx>
  • From: Bertrand Marquis <Bertrand.Marquis@xxxxxxx>
  • Date: Thu, 14 Oct 2021 17:16:49 +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-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=/PEFSmnXKbM2ASjGXD+a4EcDbofFNB851yvFrkyBjOw=; b=KgyP+4Yluds7/a92yry6HOdsB0tEYlw4ZEqfRMqBChxAA8oeME4CwNwfF0tXC8ceFViWg0CB5xytoxJjsupDH+Rk5vZ/VJKep+soTlp3gWoo4w4H8qfR6r8VArC+GD4ul8Ruf9gOjETRf+xjijy8erKQz17yFPhPtMOsJTBrIE6Jaa9yj5hnC9UrgJ+zjlk/Hzt61cCAKZCTYM3JB/cR1QoTuotUiOotW95Sl2TFi2lgxzj2bM0ndR3IBL6yJg+fxkwi1iSzrOeBel7u0UTSOSty7gaCM3VNvZLLv28Lrzp/AM74xiohax87YJUrHhombor1HxzHRR7/A8X7Pf0Uew==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=XYJKfRX9XqICC5ZNhHHXhL9fNdZOpYEdQN28mSi/tdEqJcWo+A8L3kt6oAjN3RpvtjBHTcEeFx7k6HwBjNxMZ1zpK5AU9psBlKiH5OC6GVjXYQhx3kvKxLx3EG/3AuhhJF9ig+nXb8La2++Tlh0gM03exKjGUDy3nvoFVmZg0xb8IQTSUrDLt5Ov6IaUc33bsqjZUBRsN+T6iyJVmTSPgCK2/MJhRehTC7L3Od+cnMyTUy/apv/0X6CqrR+D5KOjRyZ6tLg58VPGSmitadZaBdNSPhyiQrWlVSbh8cZv+jKt/pQnhreZqHQQnvTbef2LcRGAMpr1o36PXTqx4NDclA==
  • Authentication-results-original: xenproject.org; dkim=none (message not signed) header.d=none;xenproject.org; dmarc=none action=none header.from=arm.com;
  • Cc: Rahul Singh <Rahul.Singh@xxxxxxx>, Julien Grall <julien@xxxxxxx>, xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxxx>, Andre Przywara <Andre.Przywara@xxxxxxx>, Wei Liu <wl@xxxxxxx>, Anthony PERARD <anthony.perard@xxxxxxxxxx>, Juergen Gross <jgross@xxxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Volodymyr Babchuk <Volodymyr_Babchuk@xxxxxxxx>
  • Delivery-date: Thu, 14 Oct 2021 17:17:13 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
  • Nodisclaimer: true
  • Original-authentication-results: xenproject.org; dkim=none (message not signed) header.d=none;xenproject.org; dmarc=none action=none header.from=arm.com;
  • Thread-index: AQHXutl6ulaF6M0fM0eW19BgA1BbHavGQpyAgAEa5QCAAE0egIAAC7yAgAsSfAA=
  • Thread-topic: [PATCH v5 10/11] arm/libxl: Emulated PCI device tree node in libxl

Hi Ian,

> On 7 Oct 2021, at 17:11, Ian Jackson <iwj@xxxxxxxxxxxxxx> wrote:
> 
> Rahul Singh writes ("Re: [PATCH v5 10/11] arm/libxl: Emulated PCI device tree 
> node in libxl"):
>> As Stefano suggested in another email that we can remove the vpci
>> option, if we reach to conclusion that we need vpci option I will
>> move it to internal structure.
> ...
>> Yes I agree with you VPCI is necessary for hot plugged PCI device
>> and once we implement the hotplug in future we will use the
>> passthrough= option to enable VPCI.
> 
> So, to summarise, I think the situation is:
> 
> * VCPI is necessry for passthrough on ARM, whether coldplug or
>   hotplug.  It's part of the way that PCI-PT works on ARM.
> 
> * Hotplug is not yet implemented.
> 
> * VPCI is not necessary on x86 (evidently, since we don't have it
>   there but we do have passthrough).
> 
> So when hotplug is added, vpci will need to be turned on when
> passthrough=yes is selected.  I don't fully understand the other
> possible values for passthrough= but maybe we can defer the question
> of whether they apply to ARM ?
> 
> I think that means that yes, this should be an internal variable.
> Probably in libxl__domain_create_state.  We don't currently arrange to
> elide arch-specific state in there, so perhaps it's fine just to
> invent a member called `arm_vpci`.
> 
> Maybe you could leave a comment somewhere so that if and when PCI PT
> hotplug is implemented for ARM, the implementor remembers to wire this
> up.

Sorry for missing this on the v6 serie.

Now you suggest to add a new field arm_vpci in libxl__domain_create_state.

Once we have done that I will need to access this structure to know if I need
to add the DT part and somehow to give it a value depending something which
for now would the number of pcidevs as there will be no user parameter anymore.

I had quite an understanding of the solution using libxl_domain_config and 
changing
The arguments of libxl__arch_domain_init_hw_description and libxl__prepare_dtb
Suggested by Stefano but I am a bit lost in this solution.

The following might be a stupid question but I did not dig a lot in libxl so:
If we add a parameter in the state structure how should we access it ?

Thank
Bertrand



> 
> Ian.




 


Rackspace

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