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

Re: [XEN][RFC PATCH v2 10/12] tools/libs/ctrl: Implement new xc interfaces for dt overlay


  • To: Anthony PERARD <anthony.perard@xxxxxxxxxx>
  • From: Vikram Garhwal <fnu.vikram@xxxxxxxxxx>
  • Date: Thu, 11 Nov 2021 11:46:36 -0800
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 149.199.62.198) smtp.rcpttodomain=citrix.com smtp.mailfrom=xilinx.com; dmarc=pass (p=none sp=none pct=100) action=none header.from=xilinx.com; dkim=none (message not signed); 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=oanxJCqxuD8biqDND0jkyeBJtkq1ZVjdDJ9JTMfrVXE=; b=IPQBZYWfs8kDuhXznEiTbq8LVwUAJAp/zHygzR9IKG3XYgHn9aIuRYwpQg9WvrMPoDj1fCKirJYfGL1q4AAqgmyoOmuKhx+22j4HIyN3XRSP3R3i3QpUga1txdwhn9ZaEiaHOvJhHbmgpBnrCSTC9h+ZDupY68Rh40ThzefTIGamg5NUjy7vHU9uhwDmzH/As0PTbCfm6ReFFszSoLVlGjtDanpWWCbfqdyf1At834aPd3XBkBNNlSy1ez20kLNZurNkFlmJOh96hFPDpwXk+E7Xb2ta/h/8M9twrLJEqxHfij7A5T8MxvtHfiDSI4dzb5HHmoWxiOmhWAVtMPnWyw==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=J2bN6kijWWMPZRXWWjT5DPALTF/VHXJKXCSo/UXr5MhkXKSrWioIHhKRC1+OVx4m0/9SbYr9px7vvgPWywtinbacYBlr+jn+C4N8gys0jPT3HEsuESLJP2jTEzUOJMW7AC8Ar7MB4ZIzRZmMJnG/9of6qKCAIoSnGqb5M78N1t7QGlBAdtU9TCJreS1IN/ACwxQcLqmWfAryzveby9NAxSygu5f4CGTTrv5EWCshsmiBTv5l0RqMHqtT1dE/mm7AGnkyielkPjqENtZQw+mHRVMTCorMtnV9tn0ikvW81PxM+8k5aeM04FnjdpuhLR21GYn2qM6ICFzxuDgbvmp7Fg==
  • Cc: <xen-devel@xxxxxxxxxxxxxxxxxxxx>, <sstabellini@xxxxxxxxxx>, <julien@xxxxxxx>, <bertrand.marquis@xxxxxxx>, <volodymyr_babchuk@xxxxxxxx>, Ian Jackson <iwj@xxxxxxxxxxxxxx>, Wei Liu <wl@xxxxxxx>, Juergen Gross <jgross@xxxxxxxx>
  • Delivery-date: Thu, 11 Nov 2021 19:46:58 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On Thu, Nov 11, 2021 at 04:54:25PM +0000, Anthony PERARD wrote:
Hi Anthony,
> On Mon, Nov 08, 2021 at 11:02:25PM -0800, Vikram Garhwal wrote:
> > xc_dt_overlay() sends the device tree binary overlay, size of .dtbo and 
> > overlay
> > operation type i.e. add or remove to xen.
> > 
> > Signed-off-by: Vikram Garhwal <fnu.vikram@xxxxxxxxxx>
> > ---
> >  tools/include/xenctrl.h      |  5 +++++
> >  tools/libs/ctrl/Makefile     |  1 +
> >  tools/libs/ctrl/xc_overlay.c | 51 
> > ++++++++++++++++++++++++++++++++++++++++++++
> >  3 files changed, 57 insertions(+)
> >  create mode 100644 tools/libs/ctrl/xc_overlay.c
> > 
> > diff --git a/tools/include/xenctrl.h b/tools/include/xenctrl.h
> > index 07b96e6..cfd7c5c 100644
> > --- a/tools/include/xenctrl.h
> > +++ b/tools/include/xenctrl.h
> > @@ -2684,6 +2684,11 @@ int xc_livepatch_replace(xc_interface *xch, char 
> > *name, uint32_t timeout, uint32
> >  int xc_domain_cacheflush(xc_interface *xch, uint32_t domid,
> >                           xen_pfn_t start_pfn, xen_pfn_t nr_pfns);
> >  
> > +#if defined (CONFIG_OVERLAY_DTB)
> > +int xc_dt_overlay(xc_interface *xch, void *overlay_fdt, int 
> > overlay_fdt_size,
> > +                  uint8_t overlayop);
> > +#endif
> > +
> >  /* Compat shims */
> >  #include "xenctrl_compat.h"
> >  
> > diff --git a/tools/libs/ctrl/Makefile b/tools/libs/ctrl/Makefile
> > index 519246b..a21a949 100644
> > --- a/tools/libs/ctrl/Makefile
> > +++ b/tools/libs/ctrl/Makefile
> > @@ -3,6 +3,7 @@ include $(XEN_ROOT)/tools/Rules.mk
> >  
> >  SRCS-y       += xc_altp2m.c
> >  SRCS-y       += xc_cpupool.c
> > +SRCS-$(CONFIG_OVERLAY_DTB) += xc_overlay.c
> 
> So, this patch seems to introduce the use of CONFIG_OVERLAY_DTB, is
> there a reason why the new functionality can't be always builtin?
> 
Above, if you meant removing "CONFIG_OEVRLAY_DTB" then here is my answer:
This feature is supported by ARM based FPGA devices only so there were a few
comments on v1 series to keep the code inside a config only. Now, for the tool
side also I kept the CONFIG_OVERLAY_DTB to align the xen-tools with Xen.

Although, now i saw your comments on patch 10 regarding  "always provide
libxl_dt_overlay() but which would return ENOSYS when libxl is built without
CONFIG_OVERLAY_DTB". That seems better approach here for all three xen-tool
patches.

Initially, i was not sure what to do here that's why i wrote a question in the
cover letter about this.

Also, do you know how to enable this config via menuconfig when building the Xen
tools? I know how to enable for Xen but not sure about tools.

Thanks for reviewing this.

Regards,
Vikram Garhwal

> Thanks,
> 
> -- 
> Anthony PERARD



 


Rackspace

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