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

RE: [PATCH 1/2] xen/arm: Add imx8q{m,x} platform glue


  • To: Julien Grall <julien@xxxxxxx>, John Ernberg <john.ernberg@xxxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Bertrand Marquis <bertrand.marquis@xxxxxxx>, Michal Orzel <michal.orzel@xxxxxxx>, Volodymyr Babchuk <Volodymyr_Babchuk@xxxxxxxx>
  • From: Peng Fan <peng.fan@xxxxxxx>
  • Date: Sun, 4 Feb 2024 09:40:28 +0000
  • Accept-language: en-US
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nxp.com; dmarc=pass action=none header.from=nxp.com; dkim=pass header.d=nxp.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=55rW2s57Br8Fac3uaZ9y6xYDTKErO+HNI1Kc8z05vEs=; b=mehypZW/yq40QIT+Hwz8F4szy/3xmZzlFG2SbcZl0KYOhsZY6Zw2IOI1WCBHG04uaAMWUPW+zpH3oUUBwEr5xuKjqMPNiG32pLX6/XaKxmI3ovqS7BgFMml5E1h7P+MzcpM1OkXL4Ap0EmgkH0EHrso46SdriA7//4Axr0YaWOc4vJiKsQWSAKAkkhwJa2H4TWbIDmazEB1QxzqKLQWpnbwRKwrLMxURmiSS3OdvdkhuNvWpqP1td94yd0Bg3HV4K2dV86rz6PmoCpcrwRzYINZDGhVQOtBi52eUsmqPrM/mTphtfOnwTkKC1qVvyTIbsxx8jd3Nd3FzH+Dt2OXRSw==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=KKs2ETrvV5WPzJExL7tKmM/Rq3dW5HIoJIZj0bZYhJi5W/PU63y4UC92/GFCgNvI79AvtTaFvtxzzOarymqqHn0yOW+Wus539N4MVwL/znNb7hmJni/kEpMm7NktosOKz8kqQZEPsj6w5x1b+mUuuaodl6V866sLdwFmaxd3yV1darUSPKa184b5fhtYoJTsorL+q0VzFE1z9Xem5+F74lEZLyguZKhbScEilQsQDCbnlzGS+lyOQVH01k6Qe7jcIEk8kD6isoFRFv5bmWLlocyPxU20ODg8MiHY0VSuLdeHCkfq6Gd1yqQSOgr1Q4y5ANJpEOn8u39o3fADIg0qnA==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=nxp.com;
  • Cc: Jonas Blixt <jonas.blixt@xxxxxxxx>, "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • Delivery-date: Sun, 04 Feb 2024 09:40:48 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
  • Thread-index: AQHaVDuqVQ/kgxLZgUK/m8/hE0ez5bDz198AgAA1LICAAVx4AIAAQjaAgAEdtQCAAynKwA==
  • Thread-topic: [PATCH 1/2] xen/arm: Add imx8q{m,x} platform glue


> -----Original Message-----
> From: Julien Grall <julien@xxxxxxx>
> Sent: 2024年2月2日 17:20
> To: John Ernberg <john.ernberg@xxxxxxxx>; Stefano Stabellini
> <sstabellini@xxxxxxxxxx>; Bertrand Marquis <bertrand.marquis@xxxxxxx>;
> Michal Orzel <michal.orzel@xxxxxxx>; Volodymyr Babchuk
> <Volodymyr_Babchuk@xxxxxxxx>; Peng Fan <peng.fan@xxxxxxx>
> Cc: Jonas Blixt <jonas.blixt@xxxxxxxx>; xen-devel@xxxxxxxxxxxxxxxxxxxx
> Subject: Re: [PATCH 1/2] xen/arm: Add imx8q{m,x} platform glue
> 
> On 01/02/2024 16:17, John Ernberg wrote:
> > On 2/1/24 13:20, Julien Grall wrote:
> >>
> >>
> >> On 31/01/2024 15:32, John Ernberg wrote:
> >>> Hi Julien,
> >>
> >> Hi John,
> >>
> >>> On 1/31/24 13:22, Julien Grall wrote:
> >>>> Hi,
> >>>>
> >>>> On 31/01/2024 11:50, John Ernberg wrote:
> >>>>> When using Linux for dom0 there are a bunch of drivers that need
> >>>>> to do SMC SIP calls into the PSCI provider to enable certain
> >>>>> hardware bits like the watchdog.
> >>>>
> >>>> Do you know which protocol this is under the hood. Is this SCMI?
> >>>
> >>> I think I confused myself here when I wrote the commit log.
> >>>
> >>> The EL3 code in our case is ATF, and it does not appear to be SCMI,
> >>> nor PSCI. The register usage of these SMC SIP calls are as follows:
> >>> a0 - service
> >>> a1 - function
> >>> a2-a7 - args
> >>>
> >>> In ATF the handler is declared as a runtime service.
> >>>
> >>> Would the appropriate commmit message here be something along the
> >>> lines of below?
> >>> """
> >>> When using Linux for dom0 there are a bunch of drivers that need to
> >>> do   SMC SIP calls into the firmware to enable certain hardware bits
> >>> like the watchdog.
> >>> """
> >>
> >> It reads better thanks.
> >>
> >> [...]
> >>
> >>>> But even if we restrict to dom0, have you checked that none of the
> >>>> SMCs use buffers?
> >>> I haven't found any such instances in the Linux kernel where a
> >>> buffer is used. Adding a call filtering like suggested below
> >>> additions of such functions can be discovered and adapted for if they
> would show up later.
> >>>>
> >>>> Rather than providing a blanket forward, to me it sounds more like
> >>>> you want to provide an allowlist of the SMCs. This is more
> >>>> futureproof and avoid the risk to expose unsafe SMCs to any domain.
> >>>>
> >>>> For an example, you can have a look at the EEMI mediator for Xilinx.
> >>>
> >>> Ack. Do you prefer to see only on SMCCC service level or also on
> >>> function level? (a1 register, per description earlier)
> >>
> >> I am not sure. It will depend on whether it is correct to expose
> >> *all* the functions within a service level and they have the same format.
> >>
> >> If you can't guarantee that, then you will most likely need to
> >> allowlist at the function level.
> >>
> >> Also, do you have a spec in hand that would help to understand which
> >> service/function is implemented via those SMCs?
> >
> > I don't have the spec unfortunately, but I will add a filter on both
> > service and function for V2 and we'll take it from there.
> 
> @Peng, do you have any specification you could share? How stable is the
> interface?

No specification, the use is IMX_SIP_X in linux kernel source.

Such as IMX_SIP_RTC, IMX_SIP_TIMER

It is stable and no change, we only add new SIP macro if needed
and no change the meaning or reuse old SIP.

Regards,
Peng.

> 
> Cheers,
> 
> --
> Julien Grall

 


Rackspace

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