Xen: ARM: Improved NXP iMX8 platform support
cover Xen: ARM: Improved NXP iMX8 platform support
The iMX lpuart driver added at 44e17aa60d47 ("xen/arm: Add i.MX lpuart driver") is not enough to boot a Linux based dom0 when certain drivers, such as the watchdog driver, are enabled.
We're also adding iMX8QXP compatibles to allow Xen to use the UART on the QXP variant as well.
John Ernberg (2):
xen/arm: Add imx8q{m,x} platform glue
xen/drivers: imx-lpuart: Add iMX8QXP compatible
xen/arch/arm/platforms/Makefile | 1 + xen/arch/arm/platforms/imx8qm.c | 65 +++++++++++++++++++++++++++++++++ xen/drivers/char/imx-lpuart.c | 1 + 3 files changed, 67 insertions(+) create mode 100644 xen/arch/arm/platforms/imx8qm.c
Signature · 1 line
2.43.0
PATCH 1/2 xen/arm: Add imx8q{m,x} platform glue
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.
Provide a basic platform glue that implements the needed SMC forwarding.
---
NOTE: This is based on code found in NXP Xen tree located here:
https://github.com/nxp-imx/imx-xen/blob/lf-5.10.y_4.13/xen/arch/arm/platforms/imx8qm.c
xen/arch/arm/platforms/Makefile | 1 + xen/arch/arm/platforms/imx8qm.c | 65 +++++++++++++++++++++++++++++++++ 2 files changed, 66 insertions(+) create mode 100644 xen/arch/arm/platforms/imx8qm.c
xen/arch/arm/platforms/Makefile +1 -0
@@ -9,5 +9,6 @@ obj-$(CONFIG_ALL_PLAT) += sunxi.o obj-$(CONFIG_ALL64_PLAT) += thunderx.o obj-$(CONFIG_ALL64_PLAT) += xgene-storm.o obj-$(CONFIG_ALL64_PLAT) += brcm-raspberry-pi.o +obj-$(CONFIG_ALL64_PLAT) += imx8qm.o obj-$(CONFIG_MPSOC_PLATFORM) += xilinx-zynqmp.o obj-$(CONFIG_MPSOC_PLATFORM) += xilinx-zynqmp-eemi.o
xen/arch/arm/platforms/imx8qm.c new file +65 -0
65 lines not on this page · raw message
Signature · 1 line
2.43.0
Re: [PATCH 1/2] xen/arm: Add imx8q{m,x} platform glue
Hi,
Quoted 3 lines · John Ernberg
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?
Quoted 7 lines
Provide a basic platform glue that implements the needed SMC forwarding.
Signed-off-by John Ernberg <[email protected]>---
NOTE: This is based on code found in NXP Xen tree located here:
https://github.com/nxp-imx/imx-xen/blob/lf-5.10.y_4.13/xen/arch/arm/platforms/imx8qm.c
Anything after --- will be removed while applied to the three. I think this NOTE should be written down in the commit message.
You also possibly want a signed-off-by from Peng as this is his code.
Quoted 38 lines
xen/arch/arm/platforms/Makefile | 1 + xen/arch/arm/platforms/imx8qm.c | 65 +++++++++++++++++++++++++++++++++ 2 files changed, 66 insertions(+)create mode 100644
xen/arch/arm/platforms/imx8qm.cxen/arch/arm/platforms/Makefile +1
-0@@ -9,5 +9,6 @@ obj-$(CONFIG_ALL_PLAT) += sunxi.o obj-$(CONFIG_ALL64_PLAT) += thunderx.o obj-$(CONFIG_ALL64_PLAT) += xgene-storm.o obj-$(CONFIG_ALL64_PLAT) += brcm-raspberry-pi.o +obj-$(CONFIG_ALL64_PLAT) += imx8qm.o obj-$(CONFIG_MPSOC_PLATFORM) += xilinx-zynqmp.o obj-$(CONFIG_MPSOC_PLATFORM) += xilinx-zynqmp-eemi.oxen/arch/arm/platforms/imx8qm.c new file +15
-0@@ -0,0 +1,65 @@ +/* SPDX-License-Identifier: GPL-2.0-or-later */ +/* +* xen/arch/arm/platforms/imx8qm.c +* +* i.MX 8QM setup +* +* Copyright (c) 2016 Freescale Inc. +* Copyright 2018-2019 NXP +* +* +* Peng Fan <[email protected]> +*/ + +#include <asm/platform.h> +#include <asm/smccc.h>
xen/arch/arm/platforms/imx8qm.c line 25
Quoted 10 lines
xen/arch/arm/platforms/imx8qm.c new file +10
-0+ +static const char *const imx8qm_dt_compat[]__initconst = +{ +"fsl,imx8qm" , +"fsl,imx8qxp" , +NULL +}; + +static bool imx8qm_smc (struct cpu_user_regs *regs) +{
Your implementation below will not only forward SMC for dom0 but also for any non-trusted domains. Have you investigated that all the SIP calls are safe to be called by anyone?
But even if we restrict to dom0, have you checked that none of the SMCs use buffers?
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.
Cheers,
Signature · 1 line
Julien Grall
Re: [PATCH 1/2] xen/arm: Add imx8q{m,x} platform glue
Hi Julien,
Quoted 9 lines · Julien Grall
Hi,
Quoted 4 lines · John Ernberg
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.
"""
Quoted 11 lines
Quoted 8 lines
Provide a basic platform glue that implements the needed SMC forwarding.
Signed-off-by John Ernberg <[email protected]>---
NOTE: This is based on code found in NXP Xen tree located here:
https://github.com/nxp-imx/imx-xen/blob/lf-5.10.y_4.13/xen/arch/arm/platforms/imx8qm.cAnything after --- will be removed while applied to the three. I think this NOTE should be written down in the commit message.
Ack.
Quoted 2 lines
You also possibly want a signed-off-by from Peng as this is his code.
@Peng: May I add a sign-off from you?
Quoted 47 lines
Quoted 47 lines
xen/arch/arm/platforms/Makefile | 1 +
xen/arch/arm/platforms/imx8qm.c| 65 +++++++++++++++++++++++++++++++++2 files changed, 66 insertions(+)create mode 100644
xen/arch/arm/platforms/imx8qm.cxen/arch/arm/platforms/Makefile +0
-0@@ -9,5 +9,6 @@ obj-$(CONFIG_ALL_PLAT) += sunxi.oobj-$(CONFIG_ALL64_PLAT) += thunderx.o obj-$(CONFIG_ALL64_PLAT) += xgene-storm.o obj-$(CONFIG_ALL64_PLAT) += brcm-raspberry-pi.o +obj-$(CONFIG_ALL64_PLAT) += imx8qm.o obj-$(CONFIG_MPSOC_PLATFORM) += xilinx-zynqmp.o obj-$(CONFIG_MPSOC_PLATFORM) += xilinx-zynqmp-eemi.o
xen/arch/arm/platforms/imx8qm.c new file +21
-0@@ -0,0 +1,65 @@ +/* SPDX-License-Identifier: GPL-2.0-or-later */ +/* +* xen/arch/arm/platforms/imx8qm.c +* +* i.MX 8QM setup +* +* Copyright (c) 2016 Freescale Inc. +* Copyright 2018-2019 NXP +* +* +* Peng Fan <[email protected]> +*/ + +#include <asm/platform.h> +#include <asm/smccc.h> + +static const char *const imx8qm_dt_compat[]__initconst = +{ + "fsl,imx8qm", + "fsl,imx8qxp", + NULL
Quoted 8 lines
xen/arch/arm/platforms/imx8qm.c line 25
Quoted 4 lines
xen/arch/arm/platforms/imx8qm.c new file +4
-0+}; + +static bool imx8qm_smc (struct cpu_user_regs *regs) +{Your implementation below will not only forward SMC for dom0 but also for any non-trusted domains. Have you investigated that all the SIP calls are safe to be called by anyone?
We use pure virtualized domUs, so we do not expect any calls to this SMC interface from the guest. I'll limit it to dom0.
Quoted 3 lines
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.
Quoted 6 lines
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)
Quoted 3 lines
Cheers,
Thanks! // John Ernberg
RE: [PATCH 1/2] xen/arm: Add imx8q{m,x} platform glue
Quoted 56 lines
Cc: Jonas Blixt <[email protected]>; [email protected]
Subject: Re: [PATCH 1/2] xen/arm: Add imx8q{m,x} platform glueHi Julien,
Quoted 8 lines · Julien Grall
Hi,
Quoted 3 lines · John Ernberg
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 - argsIn 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. """Quoted 9 lines
Quoted 9 lines
Provide a basic platform glue that implements the needed SMC forwarding.
Signed-off-by John Ernberg <[email protected]>---
NOTE: This is based on code found in NXP Xen tree located here:
https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgit
hub.com%2Fnxp-imx%2Fimx-xen%2Fblob%2Flf-5.10.y_4.13%2Fxen%2Farch%2Far
Quoted 1 line
Quoted 1 line
m%2Fplatforms%2Fimx8qm.c&data=05%7C02%7Cpeng.fan%40nxp.com%7C
573b599aQuoted 1 line
Quoted 1 line
4b4143ceca1d08dc2271e5be%7C686ea1d3bc2b4c6fa92cd99c5c301635%7C 0%7C0%7
Quoted 1 line
Quoted 1 line
C638423119777601548%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjA wMDAiLCJQI
Quoted 1 line
Quoted 1 line
joiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C0%7C%7C%7C&sdata=ZO 0TXjL6
Quoted 2 lines
Quoted 1 line
g0W7TIZo8x8lTNBXEZW%2BDNcLPndWlEf5D2A%3D&reserved=0
Quoted 8 lines
Quoted 2 lines
Anything after --- will be removed while applied to the three. I think this NOTE should be written down in the commit message.
Ack.
Quoted 2 lines
You also possibly want a signed-off-by from Peng as this is his code.
@Peng: May I add a sign-off from you?
Yeah. You could add my sign off.
Quoted 54 lines
Quoted 10 lines
Quoted 10 lines
xen/arch/arm/platforms/Makefile | 1 +
xen/arch/arm/platforms/imx8qm.c| 65
+++++++++++++++++++++++++++++++++2 files changed, 66 insertions(+)create mode 100644
xen/arch/arm/platforms/imx8qm.c(quoted diff) +0
-0b/xen/arch/arm/platforms/Makefile index
8632f4115f..bec6e55d1f100644
Quoted 10 lines
Quoted 10 lines
xen/arch/arm/platforms/Makefile +0
-0@@ -9,5 +9,6 @@ obj-$(CONFIG_ALL_PLAT) += sunxi.oobj-$(CONFIG_ALL64_PLAT) += thunderx.o obj-$(CONFIG_ALL64_PLAT) += xgene-storm.o obj-$(CONFIG_ALL64_PLAT) += brcm-raspberry-pi.o +obj-$(CONFIG_ALL64_PLAT) += imx8qm.o obj-$(CONFIG_MPSOC_PLATFORM) += xilinx-zynqmp.o obj-$(CONFIG_MPSOC_PLATFORM) += xilinx-zynqmp-eemi.o diff --git
a/xen/arch/arm/platforms/imx8qm.c
b/xen/arch/arm/platforms/imx8qm.cQuoted 23 lines
Quoted 23 lines
new file mode 100644 index 0000000000..a9cd9c3615
xen/arch/arm/platforms/imx8qm.c new file +19
-0@@ -0,0 +1,65 @@ +/* SPDX-License-Identifier: GPL-2.0-or-later */ +/* +* xen/arch/arm/platforms/imx8qm.c +* +* i.MX 8QM setup +* +* Copyright (c) 2016 Freescale Inc. +* Copyright 2018-2019 NXP +* +* +* Peng Fan <[email protected]> +*/ + +#include <asm/platform.h> +#include <asm/smccc.h> + +static const char *const imx8qm_dt_compat[]__initconst = { + "fsl,imx8qm", + "fsl,imx8qxp",Quoted 8 lines
xen/arch/arm/platforms/imx8qm.c
Quoted 4 lines
xen/arch/arm/platforms/imx8qm.c new file +4
-0+ NULL +}; + +static bool imx8qm_smc (struct cpu_user_regs *regs) {Your implementation below will not only forward SMC for dom0 but also for any non-trusted domains. Have you investigated that all the SIP calls are safe to be called by anyone?
Quoted 2 lines
We use pure virtualized domUs, so we do not expect any calls to this SMC interface from the guest. I'll limit it to dom0.
Would you mind to share what features are supported in your DomU?
Pure virtualized, you using xen pv or virtio?
Thanks,
Peng.
Quoted 20 lines
Quoted 3 lines
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.
Quoted 6 lines
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)
Quoted 3 lines
Cheers,
Thanks! // John Ernberg
Re: [PATCH 1/2] xen/arm: Add imx8q{m,x} platform glue
Hi Peng,
Quoted 59 lines · Peng Fan
Quoted 59 lines
Cc: Jonas Blixt <[email protected]>; [email protected]
Subject: Re: [PATCH 1/2] xen/arm: Add imx8q{m,x} platform glueHi Julien,
Quoted 8 lines · Julien Grall
Hi,
Quoted 3 lines · John Ernberg
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 - argsIn 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. """Quoted 9 lines
Quoted 9 lines
Provide a basic platform glue that implements the needed SMC forwarding.
Signed-off-by John Ernberg <[email protected]>---
NOTE: This is based on code found in NXP Xen tree located here:
https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgit
hub.com%2Fnxp-imx%2Fimx-xen%2Fblob%2Flf-5.10.y_4.13%2Fxen%2Farch%2Far
Quoted 1 line
Quoted 1 line
m%2Fplatforms%2Fimx8qm.c&data=05%7C02%7Cpeng.fan%40nxp.com%7C
573b599aQuoted 1 line
Quoted 1 line
4b4143ceca1d08dc2271e5be%7C686ea1d3bc2b4c6fa92cd99c5c301635%7C 0%7C0%7
Quoted 1 line
Quoted 1 line
C638423119777601548%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjA wMDAiLCJQI
Quoted 1 line
Quoted 1 line
joiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C0%7C%7C%7C&sdata=ZO 0TXjL6
Quoted 4 lines
Quoted 1 line
g0W7TIZo8x8lTNBXEZW%2BDNcLPndWlEf5D2A%3D&reserved=0
Anything after --- will be removed while applied to the three. I think this NOTE should be written down in the commit message.
Quoted 7 lines
Quoted 5 lines
Ack.
Quoted 2 lines
You also possibly want a signed-off-by from Peng as this is his code.
@Peng: May I add a sign-off from you?
Yeah. You could add my sign off.
Great, thanks!
Quoted 55 lines
Quoted 55 lines
Quoted 11 lines
Quoted 11 lines
xen/arch/arm/platforms/Makefile | 1 + xen/arch/arm/platforms/imx8qm.c | 65 +++++++++++++++++++++++++++++++++ 2 files changed, 66 insertions(+)create mode 100644
xen/arch/arm/platforms/imx8qm.c(quoted diff) +0
-0b/xen/arch/arm/platforms/Makefile index
8632f4115f..bec6e55d1f100644
Quoted 10 lines
Quoted 10 lines
xen/arch/arm/platforms/Makefile +1
-0@@ -9,5 +9,6 @@ obj-$(CONFIG_ALL_PLAT) += sunxi.o obj-$(CONFIG_ALL64_PLAT) += thunderx.o obj-$(CONFIG_ALL64_PLAT) += xgene-storm.o obj-$(CONFIG_ALL64_PLAT) += brcm-raspberry-pi.o +obj-$(CONFIG_ALL64_PLAT) += imx8qm.o obj-$(CONFIG_MPSOC_PLATFORM) += xilinx-zynqmp.o obj-$(CONFIG_MPSOC_PLATFORM) += xilinx-zynqmp-eemi.o diff --git
a/xen/arch/arm/platforms/imx8qm.c
b/xen/arch/arm/platforms/imx8qm.cQuoted 31 lines
Quoted 17 lines
new file mode 100644 index 0000000000..a9cd9c3615
xen/arch/arm/platforms/imx8qm.c new file +13
-0@@ -0,0 +1,65 @@ +/* SPDX-License-Identifier: GPL-2.0-or-later */ +/* +* xen/arch/arm/platforms/imx8qm.c +* +* i.MX 8QM setup +* +* Copyright (c) 2016 Freescale Inc. +* Copyright 2018-2019 NXP +* +* +* Peng Fan <[email protected]> +*/ +xen/arch/arm/platforms/imx8qm.c line 23
Quoted 10 lines
xen/arch/arm/platforms/imx8qm.c new file +10
-0+#include <asm/platform.h> +#include <asm/smccc.h> + +static const char *const imx8qm_dt_compat[]__initconst = { + "fsl,imx8qm", + "fsl,imx8qxp", + NULL +}; + +static bool imx8qm_smc (struct cpu_user_regs *regs) {Your implementation below will not only forward SMC for dom0 but also for any non-trusted domains. Have you investigated that all the SIP calls are safe to be called by anyone?
Quoted 6 lines
Quoted 2 lines
We use pure virtualized domUs, so we do not expect any calls to this SMC interface from the guest. I'll limit it to dom0.
Would you mind to share what features are supported in your DomU?
Pure virtualized, you using xen pv or virtio?
Not at all. We're forwarding block and networking (and additionally usbip over networking for USB sharing), via the Xen PV drivers.
Quoted 4 lines
Thanks,
Peng.
Thanks! // John Ernberg
Re: [PATCH 1/2] xen/arm: Add imx8q{m,x} platform glue
In reply to John ErnbergQuoted 1 line · John Ernberg
Hi Julien,
Hi John,
Quoted 21 lines · Julien Grall
Quoted 9 lines
Hi,
Quoted 4 lines · John Ernberg
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 - argsIn ATF the handler is declared as a runtime service.
Quoted 7 lines
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.
[...]
Quoted 6 lines
Quoted 2 lines
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.
Quoted 1 line
Quoted 8 lines
Quoted 5 lines
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?
Cheers,
Signature · 1 line
Julien Grall
Re: [PATCH 1/2] xen/arm: Add imx8q{m,x} platform glue
Quoted 57 lines · Julien Grall
Quoted 1 line · John Ernberg
Hi Julien,
Hi John,
Quoted 22 lines · Julien Grall
Quoted 10 lines
Hi,
Quoted 5 lines · John Ernberg
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 - argsIn ATF the handler is declared as a runtime service.
Quoted 8 lines
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.
[...]
Quoted 6 lines
Quoted 2 lines
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.
Quoted 1 line
Quoted 8 lines
Quoted 5 lines
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)
Quoted 8 lines
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.
Quoted 3 lines
Cheers,
Thanks! // John Ernberg
Re: [PATCH 1/2] xen/arm: Add imx8q{m,x} platform glue
Quoted 61 lines · John Ernberg
Quoted 60 lines · Julien Grall
Quoted 1 line · John Ernberg
Hi Julien,
Hi John,
Quoted 22 lines · Julien Grall
Quoted 10 lines
Hi,
Quoted 5 lines · John Ernberg
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 - argsIn ATF the handler is declared as a runtime service.
Quoted 8 lines
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.
[...]
Quoted 6 lines
Quoted 2 lines
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.
Quoted 1 line
Quoted 8 lines
Quoted 5 lines
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.
Quoted 8 lines
Quoted 5 lines
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?
Cheers,
Signature · 1 line
Julien Grall
Re: [PATCH 1/2] xen/arm: Add imx8q{m,x} platform glue
Quoted 67 lines · Julien Grall
Quoted 66 lines · John Ernberg
Quoted 65 lines · Julien Grall
Quoted 1 line · John Ernberg
Hi Julien,
Hi John,
Quoted 23 lines · Julien Grall
Quoted 11 lines
Hi,
Quoted 6 lines · John Ernberg
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 - argsIn ATF the handler is declared as a runtime service.
Quoted 8 lines
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.
[...]
Quoted 7 lines
Quoted 3 lines
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.
Quoted 1 line
Quoted 8 lines
Quoted 5 lines
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.
Quoted 8 lines
Quoted 5 lines
Quoted 2 lines
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?
Just to add some context to make the reason for the question clearer, if we have a specification we could check the patch for correctness. Without it, it is difficult to know if it is doing the right thing.
The other aspect is about expectation of forward and backward compatibility. Can we guarantee that the next version of Xen and the one after it will still work against this interface? If not, can we check for the version of the interface before continuing? If not, can we at least document that the interface is only known-to-work with specific firmware versions?
This is basically just to provide the right expectations to users and ideally to prevent a future version of Xen to break on boot silently without information.
If we don't have a spec and we don't know if the interface is stable, I think we should try to detect the version of the interface and print a warning in Xen if it not a known version.
RE: [PATCH 1/2] xen/arm: Add imx8q{m,x} platform glue
In reply to Julien GrallQuoted 75 lines
-----Original Message-----
From: Julien Grall <[email protected]>
Sent: 2024年2月2日 17:20
To: John Ernberg <[email protected]>; Stefano Stabellini <[email protected]>; Bertrand Marquis <[email protected]>; Michal Orzel <[email protected]>; Volodymyr Babchuk <[email protected]>; Peng Fan <[email protected]>
Cc: Jonas Blixt <[email protected]>; [email protected]
Subject: Re: [PATCH 1/2] xen/arm: Add imx8q{m,x} platform glueQuoted 38 lines · John Ernberg
Quoted 37 lines · Julien Grall
Quoted 1 line · John Ernberg
Hi Julien,
Hi John,
Quoted 20 lines · Julien Grall
Quoted 8 lines
Hi,
Quoted 3 lines · John Ernberg
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 - argsIn ATF the handler is declared as a runtime service.
Quoted 7 lines
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.
Quoted 7 lines
Quoted 7 lines
[...]
Quoted 5 lines
Quoted 2 lines
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.
Quoted 16 lines
Quoted 16 lines
Quoted 9 lines
Quoted 6 lines
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.
Quoted 8 lines
Quoted 5 lines
Quoted 2 lines
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.
Quoted 5 lines
Cheers,
--
Julien Grall
Re: [PATCH 1/2] xen/arm: Add imx8q{m,x} platform glue
Hi,
Quoted 84 lines · Peng Fan
Quoted 75 lines
-----Original Message-----
From: Julien Grall <[email protected]>
Sent: 2024年2月2日 17:20
To: John Ernberg <[email protected]>; Stefano Stabellini <[email protected]>; Bertrand Marquis <[email protected]>; Michal Orzel <[email protected]>; Volodymyr Babchuk <[email protected]>; Peng Fan <[email protected]>
Cc: Jonas Blixt <[email protected]>; [email protected]
Subject: Re: [PATCH 1/2] xen/arm: Add imx8q{m,x} platform glueQuoted 38 lines · John Ernberg
Quoted 37 lines · Julien Grall
Quoted 1 line · John Ernberg
Hi Julien,
Hi John,
Quoted 20 lines · Julien Grall
Quoted 8 lines
Hi,
Quoted 3 lines · John Ernberg
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 - argsIn ATF the handler is declared as a runtime service.
Quoted 7 lines
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.
Quoted 7 lines
Quoted 7 lines
[...]
Quoted 5 lines
Quoted 2 lines
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.
Quoted 16 lines
Quoted 16 lines
Quoted 9 lines
Quoted 6 lines
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.
Quoted 8 lines
Quoted 5 lines
Quoted 2 lines
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?
Quoted 6 lines
No specification, the use is
IMX_SIP_Xin linux kernel source.Such as
IMX_SIP_RTC,IMX_SIP_TIMERIt is stable and no change, we only add new SIP macro if needed and no change the meaning or reuse old SIP.
Thanks for the answer. It is a bit unfortunate there are no specification, but at least they are stable.
I have searched IMX_SIP in Linux, there doesn't seem many so we could allowlist them (see more below). Do you know if there are more necessary that are not yet upstreamed in Linux?
Looking through the list, there are some that probably want a bit more discussion on whether we want to expose them:
* IMX_SIP_CPUFREQ: Right now, dom0 is not aware of the full system.
So it may take wrong decision.
* IMX_SIP_DDR_DVFS: Some operation seems to take the number of online
CPUs. Dom0 doesn't know that
* IMX_SIP_TIMER_*: This seems to be related to the watchdog.
Shouldn't dom0 rely on the watchdog provided by Xen instead? So those call will be used by Xen.
Also, what happen if we don't expose those SMC to dom0?
Cheers,
Signature · 1 line
Julien Grall
Re: [PATCH 1/2] xen/arm: Add imx8q{m,x} platform glue
Hi Julien,
Apologies for the delay, I was pulled away for a bit.
Quoted 28 lines · Julien Grall
Hi,
Quoted 25 lines · Peng Fan
Quoted 25 lines
-----Original Message-----
From: Julien Grall <[email protected]>
Sent: 2024年2月2日 17:20
To: John Ernberg <[email protected]>; Stefano Stabellini <[email protected]>; Bertrand Marquis <[email protected]>; Michal Orzel <[email protected]>; Volodymyr Babchuk <[email protected]>; Peng Fan <[email protected]>
Cc: Jonas Blixt <[email protected]>; [email protected]
Subject: Re: [PATCH 1/2] xen/arm: Add imx8q{m,x} platform glueQuoted 12 lines · John Ernberg
Quoted 11 lines · Julien Grall
Quoted 1 line · John Ernberg
Hi Julien,
Hi John,
Quoted 4 lines · Julien Grall
Quoted 3 lines
Hi,
On 31/01/2024 11:50, John Ernberg wrote:
[ ... ]
Quoted 40 lines
Quoted 33 lines
Quoted 24 lines
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 3 lines
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.
Quoted 17 lines
Quoted 17 lines
Quoted 9 lines
Quoted 6 lines
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.
Quoted 8 lines
Quoted 5 lines
Quoted 2 lines
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?
Quoted 6 lines
No specification, the use is
IMX_SIP_Xin linux kernel source.Such as
IMX_SIP_RTC,IMX_SIP_TIMERIt is stable and no change, we only add new SIP macro if needed and no change the meaning or reuse old SIP.
Quoted 6 lines
Thanks for the answer. It is a bit unfortunate there are no specification, but at least they are stable.
I have searched
IMX_SIPin Linux, there doesn't seem many so we could allowlist them (see more below). Do you know if there are more necessary that are not yet upstreamed in Linux?
I took a dive into both upstream kernel and the vendor tree and found the following list and for which SoCs they are applicable (Please correct me if you can Peng)
0x82000006 IMX_SIP_BUSFREQ_CHANGE [unsure, probably not imx8] 0xC2000000 IMX_SIP_GPC [only imx8m series]0xC2000001 IMX_SIP_CPUFREQ [only imx8q{x,m} series] 0xC2000002 IMX_SIP_SRTC / IMX_SIP_TIMER [only imx8q{x,m} series] 0xC2000004 IMX_SIP_DDR_DVFS [only imx8m series] 0xC2000005 IMX_SIP_RPROC / IMX_SIP_SRC [only imx8m series] 0xC2000006 IMX_SIP_GET_SOC_INFO [only imx8m series] 0xC2000008 IMX_SIP_NOC [only imx8m series]0xC2000009 IMX_SIP_WAKEUP_SRC [only imx8q{x,m} series] 0xC200000B IMX_SIP_OTP_WRITE [only imx8q{x,m} series]
Quoted 6 lines
Looking through the list, there are some that probably want a bit more discussion on whether we want to expose them:
*IMX_SIP_CPUFREQ: Right now, dom0 is not aware of the full system.
So it may take wrong decision.
The cpufreq function operates on the cluster level, it performs no error checking so blocking it will be invisible to Linux. I don't know yet what kind of impact that could have. Looking for hints about cpufreq in Xen for ARM I found [1] and [2].
In our current setup we do not use cpufreq and it is stable enough for our usecase.
From my point of view we can block it for now, and when cpufreq
functionality gets picked up again, we can revisit.
Quoted 2 lines
*
IMX_SIP_DDR_DVFS: Some operation seems to take the number of online
CPUs. Dom0 doesn't know that
The iMX8Q{X,M} series comes with a system controller called the SCU, running in a small M-core. This controller takes care of all the DDR bits, so we do not need to care for these SoCs.
Quoted 3 lines
* IMX_SIP_TIMER_*: This seems to be related to the watchdog.
Shouldn't dom0 rely on the watchdog provided by Xen instead? So those call will be used by Xen.
That is indeed a watchdog SIP, and also for setting the SoC internal RTC if it is being used.
I looked around if there was previous discussion and only really found [3]. Is the xen/xen/include/watchdog.h header meant to be for this kind of watchdog support or is that more for the VM watchdog? Looking at the x86 ACPI NMI watchdog it seems like the former, but I have never worked with x86 nor ACPI.
Currently forwarding it to Dom0 has not caused any watchdog resets with our watchdog timeout settings, our specific Dom0 setup and VM count.
For the remaining bits:
The wakeup src is not in the upstream kernel yet and related to system resume from suspend which isn't supported in Xen on ARM yet - so this we can block safely.
The OTP write is fuse programming in the SoC fuse banks, and should probably be allowed but reserved for Dom0, as this can set fuses that affects the SoC boot.
Quoted 5 lines
Also, what happen if we don't expose those SMC to dom0?
Cheers,
[1]:
https://lore.kernel.org/xen-devel/[email protected]/
[2]:
https://www.slideshare.net/xen_com_mgr/xpdds18-cpufreq-in-xen-on-arm-oleksandr-tyshchenko-epam-systems
[3]: https://xen-users.narkive.com/ISXnlmB0/watchdog-support-in-xen
Thanks! // John Ernberg
Re: [PATCH 1/2] xen/arm: Add imx8q{m,x} platform glue
Hi Julien,
Quoted 99 lines · John Ernberg
Hi Julien,
Apologies for the delay, I was pulled away for a bit.
Quoted 28 lines · Julien Grall
Hi,
Quoted 25 lines · Peng Fan
Quoted 25 lines
-----Original Message-----
From: Julien Grall <[email protected]>
Sent: 2024年2月2日 17:20
To: John Ernberg <[email protected]>; Stefano Stabellini <[email protected]>; Bertrand Marquis <[email protected]>; Michal Orzel <[email protected]>; Volodymyr Babchuk <[email protected]>; Peng Fan <[email protected]>
Cc: Jonas Blixt <[email protected]>; [email protected]
Subject: Re: [PATCH 1/2] xen/arm: Add imx8q{m,x} platform glueQuoted 12 lines · John Ernberg
Quoted 11 lines · Julien Grall
Quoted 1 line · John Ernberg
Hi Julien,
Hi John,
Quoted 4 lines · Julien Grall
Quoted 3 lines
Hi,
On 31/01/2024 11:50, John Ernberg wrote:
[ ... ]
Quoted 42 lines
Quoted 35 lines
Quoted 26 lines
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 3 lines
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.
Quoted 18 lines
Quoted 18 lines
Quoted 10 lines
Quoted 7 lines
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.
Quoted 8 lines
Quoted 5 lines
Quoted 2 lines
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?
Quoted 6 lines
No specification, the use is
IMX_SIP_Xin linux kernel source.Such as
IMX_SIP_RTC,IMX_SIP_TIMERIt is stable and no change, we only add new SIP macro if needed and no change the meaning or reuse old SIP.
Quoted 6 lines
Thanks for the answer. It is a bit unfortunate there are no specification, but at least they are stable.
I have searched
IMX_SIPin Linux, there doesn't seem many so we could allowlist them (see more below). Do you know if there are more necessary that are not yet upstreamed in Linux?I took a dive into both upstream kernel and the vendor tree and found the following list and for which SoCs they are applicable (Please correct me if you can Peng)
0x82000006IMX_SIP_BUSFREQ_CHANGE[unsure, probably not imx8]0xC2000000IMX_SIP_GPC[only imx8m series]0xC2000001IMX_SIP_CPUFREQ[only imx8q{x,m} series]0xC2000002IMX_SIP_SRTC/IMX_SIP_TIMER[only imx8q{x,m} series]0xC2000004IMX_SIP_DDR_DVFS[only imx8m series]0xC2000005IMX_SIP_RPROC/IMX_SIP_SRC[only imx8m series]0xC2000006IMX_SIP_GET_SOC_INFO[only imx8m series]0xC2000008IMX_SIP_NOC[only imx8m series]0xC2000009IMX_SIP_WAKEUP_SRC[only imx8q{x,m} series]0xC200000BIMX_SIP_OTP_WRITE[only imx8q{x,m} series]Quoted 2 lines
[ ... ]
Quoted 33 lines
Quoted 4 lines
* IMX_SIP_TIMER_*: This seems to be related to the watchdog. Shouldn't dom0 rely on the watchdog provided by Xen instead? So those call will be used by Xen.
That is indeed a watchdog SIP, and also for setting the SoC internal RTC if it is being used.
I looked around if there was previous discussion and only really found [3]. Is the
xen/xen/include/watchdog.hheader meant to be for this kind of watchdog support or is that more for the VM watchdog? Looking at the x86 ACPI NMI watchdog it seems like the former, but I have never worked with x86 nor ACPI.Currently forwarding it to Dom0 has not caused any watchdog resets with our watchdog timeout settings, our specific Dom0 setup and VM count.
For the remaining bits:
The wakeup src is not in the upstream kernel yet and related to system resume from suspend which isn't supported in Xen on ARM yet - so this we can block safely.
The OTP write is fuse programming in the SoC fuse banks, and should probably be allowed but reserved for Dom0, as this can set fuses that affects the SoC boot.
Quoted 5 lines
Also, what happen if we don't expose those SMC to dom0?
Cheers,
Quoted 7 lines
[1]:
https://lore.kernel.org/xen-devel/[email protected]/
[2]:
https://www.slideshare.net/xen_com_mgr/xpdds18-cpufreq-in-xen-on-arm-oleksandr-tyshchenko-epam-systems
[3]: https://xen-users.narkive.com/ISXnlmB0/watchdog-support-in-xenThanks! // John Ernberg
Ping on the watchdog discussion bits.
Thanks! // John Ernberg
Re: [PATCH 1/2] xen/arm: Add imx8q{m,x} platform glue
Hi John,
Quoted 1 line
Ping on the watchdog discussion bits.
Sorry for the late reply.
Quoted 6 lines · John Ernberg
Quoted 5 lines · John Ernberg
Quoted 4 lines
* IMX_SIP_TIMER_*: This seems to be related to the watchdog.
Shouldn't dom0 rely on the watchdog provided by Xen instead? So those call will be used by Xen.
Quoted 8 lines
Quoted 8 lines
That is indeed a watchdog SIP, and also for setting the SoC internal RTC if it is being used.
I looked around if there was previous discussion and only really found [3]. Is the
xen/xen/include/watchdog.hheader meant to be for this kind of watchdog support or is that more for the VM watchdog? Looking at the x86 ACPI NMI watchdog it seems like the former, but I have never worked with x86 nor ACPI.
include/watchdog.h contains helper to configure the watchdog for Xen. We also have per-VM watchdog and this is configured by the hypercall SCHEDOP_watchdog.
Quoted 3 lines
Quoted 3 lines
Currently forwarding it to Dom0 has not caused any watchdog resets with our watchdog timeout settings, our specific Dom0 setup and VM count.
IIUC, the SMC API for the watchdog would be similar to the ACPI NMI watchdog. So I think it would make more sense if this is not exposed to dom0 (even if Xen is doing nothing with it).
Can you try to hide the SMCs and check if dom0 still behave properly?
Cheers,
Signature · 1 line
Julien Grall
Re: [PATCH 1/2] xen/arm: Add imx8q{m,x} platform glue
Hi Julien,
Quoted 31 lines · Julien Grall
Hi John,
Quoted 1 line
Ping on the watchdog discussion bits.
Sorry for the late reply.
Quoted 9 lines · John Ernberg
Quoted 8 lines · John Ernberg
Quoted 4 lines
* IMX_SIP_TIMER_*: This seems to be related to the watchdog. Shouldn't dom0 rely on the watchdog provided by Xen instead? So those call will be used by Xen.
That is indeed a watchdog SIP, and also for setting the SoC internal RTC if it is being used.
Quoted 6 lines
Quoted 6 lines
I looked around if there was previous discussion and only really found [3].
Is thexen/xen/include/watchdog.hheader meant to be for this kind of watchdog support or is that more for the VM watchdog? Looking at the x86 ACPI NMI watchdog it seems like the former, but I have never worked with x86 nor ACPI.
include/watchdog.hcontains helper to configure the watchdog for Xen. We also have per-VM watchdog and this is configured by the hypercallSCHEDOP_watchdog.Quoted 3 lines
Quoted 3 lines
Currently forwarding it to Dom0 has not caused any watchdog resets with our watchdog timeout settings, our specific Dom0 setup and VM count.
Quoted 8 lines
IIUC, the SMC API for the watchdog would be similar to the ACPI NMI watchdog. So I think it would make more sense if this is not exposed to dom0 (even if Xen is doing nothing with it).
Can you try to hide the SMCs and check if dom0 still behave properly?
Cheers,
This SMC manages a hardware watchdog, if it's not pinged within a specific interval the entire board resets.
If I block the SMCs the watchdog driver in Dom0 will fail to ping the watchdog, triggering a board reset because the system looks to have become unresponsive. The reason this patch set started is because we couldn't ping the watchdog when running with Xen.
In our specific system the bootloader enables the watchdog as early as possible so that we can get watchdog protection for as much of the boot as we possibly can.
So, if we are to block the SMC from Dom0, then Xen needs to take over the pinging. It could be implemented similarly to the NMI watchdog, except that the system will reset if the ping is missed rather than backtrace.
It would also mean that Xen will get a whole watchdog driver-category due to the watchdog being vendor and sometimes even SoC specific when it comes to Arm.
My understanding of the domain watchdog code is that today the domain needs to call SCHEDOP_watchdog at least once to start the watchdog timer. Since watchdog protection through the whole boot process is desirable we'd need some core changes, such as an option to start the domain watchdog on init.
It's quite a big change to make, while I am not against doing it if it makes sense, I now wonder if Xen should manage hardware watchdogs. Looking at the domain watchdog code it looks like if a domain does not get enough execution time, the watchdog will not be pinged enough and the guest will be reset. So either watchdog approach requires Dom0 to get execution time. Dom0 also needs to service all the PV backends it's responsible for. I'm not sure it's valuable to add another layer of watchdog for this scenario as the end result (checking that the entire system works) is achieved without it as well.
So, before I try to find the time to make a proposal for moving the hardware watchdog bit to Xen, do we really want it?
Thanks! // John Ernberg
Re: [PATCH 1/2] xen/arm: Add imx8q{m,x} platform glue
Hi John,
Thank you for the reply.
Quoted 34 lines · John Ernberg
Quoted 33 lines · Julien Grall
Quoted 1 line
Ping on the watchdog discussion bits.
Sorry for the late reply.
Quoted 9 lines · John Ernberg
Quoted 8 lines · John Ernberg
Quoted 4 lines
* IMX_SIP_TIMER_*: This seems to be related to the watchdog.
Shouldn't dom0 rely on the watchdog provided by Xen instead? So those call will be used by Xen.That is indeed a watchdog SIP, and also for setting the SoC internal RTC if it is being used.
Quoted 6 lines
Quoted 6 lines
I looked around if there was previous discussion and only really found [3].
Is thexen/xen/include/watchdog.hheader meant to be for this kind of watchdog support or is that more for the VM watchdog? Looking at the x86 ACPI NMI watchdog it seems like the former, but I have never worked with x86 nor ACPI.
include/watchdog.hcontains helper to configure the watchdog for Xen. We also have per-VM watchdog and this is configured by the hypercallSCHEDOP_watchdog.Quoted 3 lines
Quoted 3 lines
Currently forwarding it to Dom0 has not caused any watchdog resets with our watchdog timeout settings, our specific Dom0 setup and VM count.
IIUC, the SMC API for the watchdog would be similar to the ACPI NMI watchdog. So I think it would make more sense if this is not exposed to dom0 (even if Xen is doing nothing with it).
Quoted 7 lines
Quoted 4 lines
Can you try to hide the SMCs and check if dom0 still behave properly?
Cheers,
This SMC manages a hardware watchdog, if it's not pinged within a specific interval the entire board resets.
Do you know what's the default interval? Is it large enough so Xen + dom0 can boot (at least up to when the watchdog driver is initialized)?
Quoted 18 lines
If I block the SMCs the watchdog driver in Dom0 will fail to ping the watchdog, triggering a board reset because the system looks to have become unresponsive. The reason this patch set started is because we couldn't ping the watchdog when running with Xen.
In our specific system the bootloader enables the watchdog as early as possible so that we can get watchdog protection for as much of the boot as we possibly can.
So, if we are to block the SMC from Dom0, then Xen needs to take over the pinging. It could be implemented similarly to the NMI watchdog, except that the system will reset if the ping is missed rather than backtrace.
It would also mean that Xen will get a whole watchdog driver-category due to the watchdog being vendor and sometimes even SoC specific when it comes to Arm.
Quoted 6 lines
My understanding of the domain watchdog code is that today the domain needs to call
SCHEDOP_watchdogat least once to start the watchdog timer. Since watchdog protection through the whole boot process is desirable we'd need some core changes, such as an option to start the domain watchdog on init. >
It's quite a big change to make
For clarification, above you seem to mention two changes:
1) Allow Xen to use the HW watchdog
2) Allow the domain to use the watchdog early
I am assuming by big change, you are referring to 2?
, while I am not against doing it if it
Quoted 11 lines
makes sense, I now wonder if Xen should manage hardware watchdogs. Looking at the domain watchdog code it looks like if a domain does not get enough execution time, the watchdog will not be pinged enough and the guest will be reset. So either watchdog approach requires Dom0 to get execution time. Dom0 also needs to service all the PV backends it's responsible for. I'm not sure it's valuable to add another layer of watchdog for this scenario as the end result (checking that the entire system works) is achieved without it as well.
So, before I try to find the time to make a proposal for moving the hardware watchdog bit to Xen, do we really want it?
Thanks for the details. Given that the watchdog is enabled by the bootloader, I think we want Xen to drive the watchdog for two reasons:
1) In true dom0less environment, dom0 would not exist
2) You are relying on Xen + Dom0 to boot (or at least enough to get
the watchdog working) within the watchdog interval.
Let see what the other Arm maintainer thinks.
Signature · 1 line
Julien Grall
Re: [PATCH 1/2] xen/arm: Add imx8q{m,x} platform glue
Hi Julien,
Quoted 79 lines · Julien Grall
Hi John,
Thank you for the reply.
Quoted 38 lines · John Ernberg
Quoted 37 lines · Julien Grall
> Ping on the watchdog discussion bits.
Sorry for the late reply.
Quoted 10 lines · John Ernberg
Quoted 9 lines · John Ernberg
Quoted 4 lines
* IMX_SIP_TIMER_*: This seems to be related to the watchdog. Shouldn't dom0 rely on the watchdog provided by Xen instead? So those call will be used by Xen.
That is indeed a watchdog SIP, and also for setting the SoC internal RTC
if it is being used.Quoted 8 lines
Quoted 8 lines
I looked around if there was previous discussion and only really found [3].
Is thexen/xen/include/watchdog.hheader meant to be for this kind of watchdog support or is that more for the VM watchdog? Looking at the x86
ACPI NMI watchdog it seems like the former, but I have never worked with
x86 nor ACPI.
include/watchdog.hcontains helper to configure the watchdog for Xen. We also have per-VM watchdog and this is configured by the hypercallSCHEDOP_watchdog.Quoted 4 lines
Quoted 4 lines
Currently forwarding it to Dom0 has not caused any watchdog resets with
our watchdog timeout settings, our specific Dom0 setup and VM count.IIUC, the SMC API for the watchdog would be similar to the ACPI NMI watchdog. So I think it would make more sense if this is not exposed to dom0 (even if Xen is doing nothing with it).
Quoted 7 lines
Quoted 4 lines
Can you try to hide the SMCs and check if dom0 still behave properly?
Cheers,
This SMC manages a hardware watchdog, if it's not pinged within a specific interval the entire board resets.
Do you know what's the default interval? Is it large enough so Xen + dom0 can boot (at least up to when the watchdog driver is initialized)?
Quoted 18 lines
If I block the SMCs the watchdog driver in Dom0 will fail to ping the watchdog, triggering a board reset because the system looks to have become unresponsive. The reason this patch set started is because we couldn't ping the watchdog when running with Xen.
In our specific system the bootloader enables the watchdog as early as possible so that we can get watchdog protection for as much of the boot as we possibly can.
So, if we are to block the SMC from Dom0, then Xen needs to take over the pinging. It could be implemented similarly to the NMI watchdog, except that the system will reset if the ping is missed rather than backtrace.
It would also mean that Xen will get a whole watchdog driver-category due to the watchdog being vendor and sometimes even SoC specific when it comes to Arm.Quoted 6 lines
My understanding of the domain watchdog code is that today the domain needs to call
SCHEDOP_watchdogat least once to start the watchdog timer. Since watchdog protection through the whole boot process is desirable we'd need some core changes, such as an option to start the domain watchdog on init. >
It's quite a big change to make
Quoted 6 lines
For clarification, above you seem to mention two changes:
1) Allow Xen to use the HW watchdog
2) Allow the domain to use the watchdog earlyI am assuming by big change, you are referring to 2?
Both of them. I'm expecting the addition of a new driver category (hardware watchdog) to be a decent amount of work as well.
Quoted 14 lines
, while I am not against doing it if it
Quoted 11 lines
makes sense, I now wonder if Xen should manage hardware watchdogs. Looking at the domain watchdog code it looks like if a domain does not get enough execution time, the watchdog will not be pinged enough and the guest will be reset. So either watchdog approach requires Dom0 to get execution time. Dom0 also needs to service all the PV backends it's responsible for. I'm not sure it's valuable to add another layer of watchdog for this scenario as the end result (checking that the entire system works) is achieved without it as well.
So, before I try to find the time to make a proposal for moving the hardware watchdog bit to Xen, do we really want it?
Quoted 8 lines
Thanks for the details. Given that the watchdog is enabled by the bootloader, I think we want Xen to drive the watchdog for two reasons:
1) In true dom0less environment, dom0 would not exist
2) You are relying on Xen + Dom0 to boot (or at least enough to get
the watchdog working) within the watchdog interval.Let see what the other Arm maintainer thinks.
Regards // John Ernberg
Re: [PATCH 1/2] xen/arm: Add imx8q{m,x} platform glue
In reply to Julien GrallHi,
Quoted 90 lines · Julien Grall
Hi John,
Thank you for the reply.
Quoted 34 lines · John Ernberg
Quoted 33 lines · Julien Grall
Quoted 1 line
Ping on the watchdog discussion bits.
Sorry for the late reply.
Quoted 9 lines · John Ernberg
Quoted 8 lines · John Ernberg
Quoted 4 lines
* IMX_SIP_TIMER_*: This seems to be related to the watchdog.
Shouldn't dom0 rely on the watchdog provided by Xen instead? So those call will be used by Xen.That is indeed a watchdog SIP, and also for setting the SoC internal RTC if it is being used.
Quoted 6 lines
Quoted 6 lines
I looked around if there was previous discussion and only really found [3].
Is thexen/xen/include/watchdog.hheader meant to be for this kind of watchdog support or is that more for the VM watchdog? Looking at the x86 ACPI NMI watchdog it seems like the former, but I have never worked with x86 nor ACPI.
include/watchdog.hcontains helper to configure the watchdog for Xen. We also have per-VM watchdog and this is configured by the hypercallSCHEDOP_watchdog.Quoted 3 lines
Quoted 3 lines
Currently forwarding it to Dom0 has not caused any watchdog resets with our watchdog timeout settings, our specific Dom0 setup and VM count.
IIUC, the SMC API for the watchdog would be similar to the ACPI NMI watchdog. So I think it would make more sense if this is not exposed to dom0 (even if Xen is doing nothing with it).
Quoted 6 lines
Quoted 4 lines
Can you try to hide the SMCs and check if dom0 still behave properly?
Cheers,
This SMC manages a hardware watchdog, if it's not pinged within a specific interval the entire board resets.
Do you know what's the default interval? Is it large enough so Xen + dom0 can boot (at least up to when the watchdog driver is initialized)?
Quoted 12 lines
If I block the SMCs the watchdog driver in Dom0 will fail to ping the watchdog, triggering a board reset because the system looks to have become unresponsive. The reason this patch set started is because we couldn't ping the watchdog when running with Xen.
In our specific system the bootloader enables the watchdog as early as possible so that we can get watchdog protection for as much of the boot as we possibly can.
So, if we are to block the SMC from Dom0, then Xen needs to take over the pinging. It could be implemented similarly to the NMI watchdog, except that the system will reset if the ping is missed rather than backtrace.
It would also mean that Xen will get a whole watchdog driver-categoryQuoted 8 lines
due to the watchdog being vendor and sometimes even SoC specific when it comes to Arm.
My understanding of the domain watchdog code is that today the domain needs to callSCHEDOP_watchdogat least once to start the watchdog timer. Since watchdog protection through the whole boot process is desirable we'd need some core changes, such as an option to start the domain watchdog on init. >
It's quite a big change to makeFor clarification, above you seem to mention two changes:
1) Allow Xen to use the HW watchdog
2) Allow the domain to use the watchdog earlyI am assuming by big change, you are referring to 2?
, while I am not against doing it if it
Quoted 10 lines
makes sense, I now wonder if Xen should manage hardware watchdogs. Looking at the domain watchdog code it looks like if a domain does not get enough execution time, the watchdog will not be pinged enough and the guest will be reset. So either watchdog approach requires Dom0 to get execution time. Dom0 also needs to service all the PV backends it's responsible for. I'm not sure it's valuable to add another layer of watchdog for this scenario as the end result (checking that the entire system works) is achieved without it as well.
So, before I try to find the time to make a proposal for moving the hardware watchdog bit to Xen, do we really want it?
Quoted 3 lines
Thanks for the details. Given that the watchdog is enabled by the bootloader, I think we want Xen to drive the watchdog for two reasons:
1) In true dom0less environment, dom0 would not exist
2) You are relying on Xen + Dom0 to boot (or at least enough to get the watchdog working) within the watchdog interval.
Definitely we need to consider the case where there is no Dom0.
I think there are in fact 3 different use cases here:
- watchdog fully driven in a domain (dom0 or another): would work if it is expected that Xen + Domain boot time is under the watchdog initial refresh rate. I think this could make sense on some applications where your system depends on a specific domain to be properly booted to work. This would require an initial refresh time configurable in the boot loader probably.
- watchdog fully driven by Xen. One might want to just make sure the hypervisor is alive.
- hybrid model where the watchdog is driven by Xen until a domain comes up to drive it. This could make sense to relax the stress on boot time but would raise the question of what should be done if the domain dies. This is also kind of complex as Xen should stop refreshing the watchdog when a domain starts doing it (might require a trap and emulate initially that is then mapped directly to a domain). I am not completely sure this makes sense.
Regards
Bertrand
Quoted 5 lines
Let see what the other Arm maintainer thinks.
Signature · 1 line
Julien Grall
Re: [PATCH 1/2] xen/arm: Add imx8q{m,x} platform glue
Hi Bertrand,
Quoted 96 lines · Bertrand Marquis
Hi,
Quoted 90 lines · Julien Grall
Hi John,
Thank you for the reply.
Quoted 34 lines · John Ernberg
Quoted 33 lines · Julien Grall
Quoted 1 line
Ping on the watchdog discussion bits.
Sorry for the late reply.
Quoted 9 lines · John Ernberg
Quoted 8 lines · John Ernberg
Quoted 4 lines
* IMX_SIP_TIMER_*: This seems to be related to the watchdog.
Shouldn't dom0 rely on the watchdog provided by Xen instead? So those call will be used by Xen.That is indeed a watchdog SIP, and also for setting the SoC internal RTC if it is being used.
Quoted 6 lines
Quoted 6 lines
I looked around if there was previous discussion and only really found [3].
Is thexen/xen/include/watchdog.hheader meant to be for this kind of watchdog support or is that more for the VM watchdog? Looking at the x86 ACPI NMI watchdog it seems like the former, but I have never worked with x86 nor ACPI.
include/watchdog.hcontains helper to configure the watchdog for Xen. We also have per-VM watchdog and this is configured by the hypercallSCHEDOP_watchdog.Quoted 3 lines
Quoted 3 lines
Currently forwarding it to Dom0 has not caused any watchdog resets with our watchdog timeout settings, our specific Dom0 setup and VM count.
IIUC, the SMC API for the watchdog would be similar to the ACPI NMI watchdog. So I think it would make more sense if this is not exposed to dom0 (even if Xen is doing nothing with it).
Quoted 6 lines
Quoted 4 lines
Can you try to hide the SMCs and check if dom0 still behave properly?
Cheers,
This SMC manages a hardware watchdog, if it's not pinged within a specific interval the entire board resets.
Do you know what's the default interval? Is it large enough so Xen + dom0 can boot (at least up to when the watchdog driver is initialized)?
Quoted 12 lines
If I block the SMCs the watchdog driver in Dom0 will fail to ping the watchdog, triggering a board reset because the system looks to have become unresponsive. The reason this patch set started is because we couldn't ping the watchdog when running with Xen.
In our specific system the bootloader enables the watchdog as early as possible so that we can get watchdog protection for as much of the boot as we possibly can.
So, if we are to block the SMC from Dom0, then Xen needs to take over the pinging. It could be implemented similarly to the NMI watchdog, except that the system will reset if the ping is missed rather than backtrace.
It would also mean that Xen will get a whole watchdog driver-categoryQuoted 8 lines
due to the watchdog being vendor and sometimes even SoC specific when it comes to Arm.
My understanding of the domain watchdog code is that today the domain needs to callSCHEDOP_watchdogat least once to start the watchdog timer. Since watchdog protection through the whole boot process is desirable we'd need some core changes, such as an option to start the domain watchdog on init. >
It's quite a big change to makeFor clarification, above you seem to mention two changes:
1) Allow Xen to use the HW watchdog
2) Allow the domain to use the watchdog earlyI am assuming by big change, you are referring to 2?
, while I am not against doing it if it
Quoted 10 lines
makes sense, I now wonder if Xen should manage hardware watchdogs. Looking at the domain watchdog code it looks like if a domain does not get enough execution time, the watchdog will not be pinged enough and the guest will be reset. So either watchdog approach requires Dom0 to get execution time. Dom0 also needs to service all the PV backends it's responsible for. I'm not sure it's valuable to add another layer of watchdog for this scenario as the end result (checking that the entire system works) is achieved without it as well.
So, before I try to find the time to make a proposal for moving the hardware watchdog bit to Xen, do we really want it?Quoted 3 lines
Thanks for the details. Given that the watchdog is enabled by the bootloader, I think we want Xen to drive the watchdog for two reasons:
1) In true dom0less environment, dom0 would not exist
2) You are relying on Xen + Dom0 to boot (or at least enough to get the watchdog working) within the watchdog interval.
Quoted 8 lines
Definitely we need to consider the case where there is no Dom0.
I think there are in fact 3 different use cases here:
- watchdog fully driven in a domain (dom0 or another): would work if it is expected that Xen + Domain boot time is under the watchdog initial refresh rate. I think this could make sense on some applications where your system depends on a specific domain to be properly booted to work. This would require an initial refresh time configurable in the boot loader probably.
This is our use-case. ^
Our dom0 is monitoring and managing the other domains in our system. Without dom0 working the system isn't really working as a whole.
@Julien: Would you be ok with the patch set continuing in the direction of the
original proposal, letting another party (or me at a later time) implement the fully driven by Xen option?
Quoted 10 lines
- watchdog fully driven by Xen. One might want to just make sure the hypervisor is alive.
- hybrid model where the watchdog is driven by Xen until a domain comes up to drive it. This could make sense to relax the stress on boot time but would raise the question of what should be done if the domain dies. This is also kind of complex as Xen should stop refreshing the watchdog when a domain starts doing it (might require a trap and emulate initially that is then mapped directly to a domain). I am not completely sure this makes sense.Regards
Bertrand
Thanks and best regards // John Ernberg
Re: [PATCH 1/2] xen/arm: Add imx8q{m,x} platform glue
Hi John,
Quoted 110 lines · John Ernberg
Hi Bertrand,
Quoted 96 lines · Bertrand Marquis
Hi,
Quoted 90 lines · Julien Grall
Hi John,
Thank you for the reply.
Quoted 34 lines · John Ernberg
Quoted 33 lines · Julien Grall
Quoted 1 line
Ping on the watchdog discussion bits.
Sorry for the late reply.
Quoted 9 lines · John Ernberg
Quoted 8 lines · John Ernberg
Quoted 4 lines
* IMX_SIP_TIMER_*: This seems to be related to the watchdog.
Shouldn't dom0 rely on the watchdog provided by Xen instead? So those call will be used by Xen.That is indeed a watchdog SIP, and also for setting the SoC internal RTC if it is being used.
Quoted 6 lines
Quoted 6 lines
I looked around if there was previous discussion and only really found [3].
Is thexen/xen/include/watchdog.hheader meant to be for this kind of watchdog support or is that more for the VM watchdog? Looking at the x86 ACPI NMI watchdog it seems like the former, but I have never worked with x86 nor ACPI.
include/watchdog.hcontains helper to configure the watchdog for Xen. We also have per-VM watchdog and this is configured by the hypercallSCHEDOP_watchdog.Quoted 3 lines
Quoted 3 lines
Currently forwarding it to Dom0 has not caused any watchdog resets with our watchdog timeout settings, our specific Dom0 setup and VM count.
IIUC, the SMC API for the watchdog would be similar to the ACPI NMI watchdog. So I think it would make more sense if this is not exposed to dom0 (even if Xen is doing nothing with it).
Quoted 6 lines
Quoted 4 lines
Can you try to hide the SMCs and check if dom0 still behave properly?
Cheers,
This SMC manages a hardware watchdog, if it's not pinged within a specific interval the entire board resets.
Do you know what's the default interval? Is it large enough so Xen + dom0 can boot (at least up to when the watchdog driver is initialized)?
Quoted 12 lines
If I block the SMCs the watchdog driver in Dom0 will fail to ping the watchdog, triggering a board reset because the system looks to have become unresponsive. The reason this patch set started is because we couldn't ping the watchdog when running with Xen.
In our specific system the bootloader enables the watchdog as early as possible so that we can get watchdog protection for as much of the boot as we possibly can.
So, if we are to block the SMC from Dom0, then Xen needs to take over the pinging. It could be implemented similarly to the NMI watchdog, except that the system will reset if the ping is missed rather than backtrace.
It would also mean that Xen will get a whole watchdog driver-categoryQuoted 8 lines
due to the watchdog being vendor and sometimes even SoC specific when it comes to Arm.
My understanding of the domain watchdog code is that today the domain needs to callSCHEDOP_watchdogat least once to start the watchdog timer. Since watchdog protection through the whole boot process is desirable we'd need some core changes, such as an option to start the domain watchdog on init. >
It's quite a big change to makeFor clarification, above you seem to mention two changes:
1) Allow Xen to use the HW watchdog
2) Allow the domain to use the watchdog earlyI am assuming by big change, you are referring to 2?
, while I am not against doing it if it
Quoted 10 lines
makes sense, I now wonder if Xen should manage hardware watchdogs. Looking at the domain watchdog code it looks like if a domain does not get enough execution time, the watchdog will not be pinged enough and the guest will be reset. So either watchdog approach requires Dom0 to get execution time. Dom0 also needs to service all the PV backends it's responsible for. I'm not sure it's valuable to add another layer of watchdog for this scenario as the end result (checking that the entire system works) is achieved without it as well.
So, before I try to find the time to make a proposal for moving the hardware watchdog bit to Xen, do we really want it?Quoted 3 lines
Thanks for the details. Given that the watchdog is enabled by the bootloader, I think we want Xen to drive the watchdog for two reasons:
1) In true dom0less environment, dom0 would not exist
2) You are relying on Xen + Dom0 to boot (or at least enough to get the watchdog working) within the watchdog interval.Quoted 8 lines
Definitely we need to consider the case where there is no Dom0.
I think there are in fact 3 different use cases here:
- watchdog fully driven in a domain (dom0 or another): would work if it is expected that Xen + Domain boot time is under the watchdog initial refresh rate. I think this could make sense on some applications where your system depends on a specific domain to be properly booted to work. This would require an initial refresh time configurable in the boot loader probably.This is our use-case. ^
Quoted 7 lines
Our dom0 is monitoring and managing the other domains in our system. Without dom0 working the system isn't really working as a whole.
@Julien: Would you be ok with the patch set continuing in the direction of the
original proposal, letting another party (or me at a later time) implement the fully driven by Xen option?
I am concerned about this particular point from Bertrand:
"would work if it is expected that Xen + Domain boot time is under the watchdog initial refresh rate."
How will a user be able to figure out how to initially configure the watchdog? Is this something you can easily configure in the bootloader at runtime?
Overall, I am not for this approach at least in the current status. I would be more inclined if there are some documentations explaining how this is supposed to be configured on NXP, so others can use the code.
Anyway, this is why we have multiple Arm maintainers for this kind of situation. If they other agrees with you, then they can ack the patch and this can be merged.
Cheers,
Signature · 1 line
Julien Grall
Re: [PATCH 1/2] xen/arm: Add imx8q{m,x} platform glue
Quoted 150 lines · Julien Grall
Hi John,
Quoted 131 lines · John Ernberg
Hi Bertrand,
Quoted 115 lines · Bertrand Marquis
Hi,
Quoted 105 lines · Julien Grall
Hi John,
Thank you for the reply.
Quoted 44 lines · John Ernberg
Quoted 43 lines · Julien Grall
Quoted 1 line
Ping on the watchdog discussion bits.
Sorry for the late reply.
Quoted 12 lines · John Ernberg
Quoted 11 lines · John Ernberg
Quoted 6 lines
* IMX_SIP_TIMER_*: This seems to be related to the
watchdog.
Shouldn't dom0 rely on the watchdog provided by Xen instead? So those
call will be used by Xen.That is indeed a watchdog SIP, and also for setting the SoC internal RTC
if it is being used.Quoted 9 lines
Quoted 9 lines
I looked around if there was previous discussion and only really found [3].
Is thexen/xen/include/watchdog.hheader meant to be for this kind of
watchdog support or is that more for the VM watchdog? Looking at the x86
ACPI NMI watchdog it seems like the former, but I have never worked with
x86 nor ACPI.
include/watchdog.hcontains helper to configure the watchdog for Xen. We
also have per-VM watchdog and this is configured by the hypercallSCHEDOP_watchdog.Quoted 5 lines
Quoted 5 lines
Currently forwarding it to Dom0 has not caused any watchdog resets with
our watchdog timeout settings, our specific Dom0 setup and VM count.IIUC, the SMC API for the watchdog would be similar to the ACPI NMI watchdog. So I think it would make more sense if this is not exposed to
dom0 (even if Xen is doing nothing with it).Quoted 7 lines
Quoted 5 lines
Can you try to hide the SMCs and check if dom0 still behave properly?
Cheers,
This SMC manages a hardware watchdog, if it's not pinged within a specific interval the entire board resets.
Do you know what's the default interval? Is it large enough so Xen + dom0 can boot (at least up to when the watchdog driver is initialized)?
Quoted 14 lines
If I block the SMCs the watchdog driver in Dom0 will fail to ping the watchdog, triggering a board reset because the system looks to have become unresponsive. The reason this patch set started is because we couldn't ping the watchdog when running with Xen.
In our specific system the bootloader enables the watchdog as early as possible so that we can get watchdog protection for as much of the boot
as we possibly can.
So, if we are to block the SMC from Dom0, then Xen needs to take over the pinging. It could be implemented similarly to the NMI watchdog, except that the system will reset if the ping is missed rather than backtrace.
It would also mean that Xen will get a whole watchdog driver-category due to the watchdog being vendor and sometimes even SoC specific whenQuoted 8 lines
it
comes to Arm.
My understanding of the domain watchdog code is that today the domain needs to callSCHEDOP_watchdogat least once to start the watchdog timer. Since watchdog protection through the whole boot process is desirable we'd need some core changes, such as an option to start the domain watchdog on init. >
It's quite a big change to makeFor clarification, above you seem to mention two changes:
1) Allow Xen to use the HW watchdog
2) Allow the domain to use the watchdog earlyI am assuming by big change, you are referring to 2?
, while I am not against doing it if it
Quoted 11 lines
makes sense, I now wonder if Xen should manage hardware watchdogs. Looking at the domain watchdog code it looks like if a domain does not get enough execution time, the watchdog will not be pinged enough and the guest will be reset. So either watchdog approach requires Dom0 to get execution time. Dom0 also needs to service all the PV backends it's
responsible for. I'm not sure it's valuable to add another layer of watchdog for this scenario as the end result (checking that the entire system works) is achieved without it as well.
So, before I try to find the time to make a proposal for moving the hardware watchdog bit to Xen, do we really want it?Quoted 5 lines
Thanks for the details. Given that the watchdog is enabled by the bootloader, I think we want Xen to drive the watchdog for two reasons:
1) In true dom0less environment, dom0 would not exist
2) You are relying on Xen + Dom0 to boot (or at least enough to get the watchdog working) within the watchdog interval.Definitely we need to consider the case where there is no Dom0.
Quoted 10 lines
I think there are in fact 3 different use cases here:
- watchdog fully driven in a domain (dom0 or another): would work if it is expected
that Xen + Domain boot time is under the watchdog initial refresh
rate. I think this
could make sense on some applications where your system depends on a
specific
domain to be properly booted to work. This would require an initial
refresh time
configurable in the boot loader probably.This is our use-case. ^
Quoted 7 lines
Our dom0 is monitoring and managing the other domains in our system. Without dom0 working the system isn't really working as a whole.
@Julien: Would you be ok with the patch set continuing in the direction of the
original proposal, letting another party (or me at a later time) implement the fully driven by Xen option?I am concerned about this particular point from Bertrand:
"would work if it is expected that Xen + Domain boot time is under the watchdog initial refresh rate."
How will a user be able to figure out how to initially configure the watchdog? Is this something you can easily configure in the bootloader at runtime?
Quoted 7 lines
Overall, I am not for this approach at least in the current status. I would be more inclined if there are some documentations explaining how this is supposed to be configured on NXP, so others can use the code.
Anyway, this is why we have multiple Arm maintainers for this kind of situation. If they other agrees with you, then they can ack the patch and this can be merged.
The approach here would not be my choice either. However, I think it would be nice to have better support for NXP imx8 boards in upstream Xen. To that end, I would ack these patches but I would ask to add a document under xen.git/docs/ explaining the approach, limitations, and requirements, so that someone else can use the code effectively.
RE: [PATCH 1/2] xen/arm: Add imx8q{m,x} platform glue
Quoted 113 lines
Subject: Re: [PATCH 1/2] xen/arm: Add imx8q{m,x} platform glue
Quoted 26 lines · Julien Grall
Hi John,
Quoted 23 lines · John Ernberg
Hi Bertrand,
Quoted 20 lines · Bertrand Marquis
Hi,
Quoted 18 lines · Julien Grall
Hi John,
Thank you for the reply.
Quoted 11 lines · John Ernberg
Quoted 10 lines · Julien Grall
Quoted 1 line
Ping on the watchdog discussion bits.
Sorry for the late reply.
Quoted 5 lines · John Ernberg
Quoted 4 lines · John Ernberg
Quoted 4 lines
* IMX_SIP_TIMER_*: This seems to be related to
the watchdog.
Shouldn't dom0 rely on the watchdog provided by Xeninstead?
Quoted 36 lines
Quoted 36 lines
Quoted 36 lines
Quoted 36 lines
Quoted 35 lines
Quoted 28 lines
Quoted 6 lines
Quoted 6 lines
Quoted 2 lines
So those
call will be used by Xen.That is indeed a watchdog SIP, and also for setting the SoC internal RTC if it is being used.
Quoted 7 lines
Quoted 7 lines
I looked around if there was previous discussion and only really found [3].
Is thexen/xen/include/watchdog.hheader meant to be for this kind of watchdog support or is that more for the VM watchdog? Looking at the x86 ACPI NMI watchdog it seems like the former, but I have never worked with x86 nor ACPI.
include/watchdog.hcontains helper to configure the watchdog for Xen. We also have per-VM watchdog and this is configured by the hypercallSCHEDOP_watchdog.Quoted 4 lines
Quoted 4 lines
Currently forwarding it to Dom0 has not caused any watchdog resets with our watchdog timeout settings, our specific Dom0 setup and VM count.
IIUC, the SMC API for the watchdog would be similar to the ACPI NMI watchdog. So I think it would make more sense if this is not exposed to
dom0 (even if Xen is doing nothing with it).Quoted 5 lines
Can you try to hide the SMCs and check if dom0 still behave properly?
Cheers,
This SMC manages a hardware watchdog, if it's not pinged within a specific interval the entire board resets.
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Do you know what's the default interval? Is it large enough so Xen +
dom0 can boot (at least up to when the watchdog driver is initialized)?Quoted 4 lines
If I block the SMCs the watchdog driver in Dom0 will fail to ping the watchdog, triggering a board reset because the system looks to have become unresponsive. The reason this patch set started is because we couldn't ping the watchdog when running with
Xen.
Quoted 19 lines
Quoted 19 lines
Quoted 19 lines
Quoted 19 lines
Quoted 8 lines
In our specific system the bootloader enables the watchdog as early as possible so that we can get watchdog protection for as much of the boot as we possibly can.
So, if we are to block the SMC from Dom0, then Xen needs to take over the pinging. It could be implemented similarly to the NMI watchdog, except that the system will reset if the ping is missed rather than backtrace.
It would also mean that Xen will get a whole watchdogQuoted 8 lines
driver-category due to the watchdog being vendor and sometimes even SoC specific when it comes to Arm.
My understanding of the domain watchdog code is that today the domain needs to callSCHEDOP_watchdogat least once to start the watchdog timer. Since watchdog protection through the whole boot process is desirable we'd need some core changes, such as an option to start the domain watchdog on init. > It's quite a big change to makeFor clarification, above you seem to mention two changes:
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
1) Allow Xen to use the HW watchdog
2) Allow the domain to use the watchdog earlyI am assuming by big change, you are referring to 2?
, while I am not against doing it if it
Quoted 1 line
makes sense, I now wonder if Xen should manage hardware
watchdogs.
Quoted 11 lines
Quoted 11 lines
Quoted 11 lines
Quoted 11 lines
Quoted 10 lines
Looking at the domain watchdog code it looks like if a domain does not get enough execution time, the watchdog will not be pinged enough and the guest will be reset. So either watchdog approach requires Dom0 to get execution time. Dom0 also needs to service all the PV backends it's responsible for. I'm not sure it's valuable to add another layer of watchdog for this scenario as the end result (checking that the entire system works) is achieved without it as well.
So, before I try to find the time to make a proposal for moving the hardware watchdog bit to Xen, do we really want it?
Quoted 40 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Thanks for the details. Given that the watchdog is enabled by the bootloader, I think we want Xen to drive the watchdog for two
reasons:
Quoted 37 lines
Quoted 17 lines
Quoted 6 lines
Quoted 3 lines
1) In true dom0less environment, dom0 would not exist
2) You are relying on Xen + Dom0 to boot (or at least enough to get the watchdog working) within the watchdog interval.Definitely we need to consider the case where there is no Dom0.
Quoted 10 lines
I think there are in fact 3 different use cases here:
- watchdog fully driven in a domain (dom0 or another): would work if it is expected
that Xen + Domain boot time is under the watchdog initial
refresh rate. I think this
could make sense on some applications where your system
depends on a specific
domain to be properly booted to work. This would require an
initial refresh time
configurable in the boot loader probably.Quoted 8 lines
This is our use-case. ^
Our dom0 is monitoring and managing the other domains in our system. Without dom0 working the system isn't really working as a whole.
@Julien: Would you be ok with the patch set continuing in the direction of the original proposal, letting another party (or me at a later time) implement the fully driven by Xen option?
I am concerned about this particular point from Bertrand:
"would work if it is expected that Xen + Domain boot time is under the watchdog initial refresh rate."
How will a user be able to figure out how to initially configure the watchdog? Is this something you can easily configure in the bootloader at runtime?
Overall, I am not for this approach at least in the current status. I would be more inclined if there are some documentations explaining how this is supposed to be configured on NXP, so others can use the code.
I will try to push inside NXP to release a documentation on SIP usage. But not expect it will be released soon.
The SIP number is quite stable, and we not change the meaning.
Regards,
Peng.
Quoted 11 lines
Quoted 4 lines
Anyway, this is why we have multiple Arm maintainers for this kind of situation. If they other agrees with you, then they can ack the patch and this can be merged.
The approach here would not be my choice either. However, I think it would be nice to have better support for NXP imx8 boards in upstream Xen. To that end, I would ack these patches but I would ask to add a document under xen.git/docs/ explaining the approach, limitations, and requirements, so that someone else can use the code effectively.
Re: [PATCH 1/2] xen/arm: Add imx8q{m,x} platform glue
In reply to Julien GrallHi,
Quoted 118 lines · Julien Grall
Hi John,
Quoted 106 lines · John Ernberg
Hi Bertrand,
Quoted 96 lines · Bertrand Marquis
Hi,
Quoted 90 lines · Julien Grall
Hi John,
Thank you for the reply.
Quoted 34 lines · John Ernberg
Quoted 33 lines · Julien Grall
Quoted 1 line
Ping on the watchdog discussion bits.
Sorry for the late reply.
Quoted 9 lines · John Ernberg
Quoted 8 lines · John Ernberg
Quoted 4 lines
* IMX_SIP_TIMER_*: This seems to be related to the watchdog.
Shouldn't dom0 rely on the watchdog provided by Xen instead? So those call will be used by Xen.That is indeed a watchdog SIP, and also for setting the SoC internal RTC if it is being used.
Quoted 6 lines
Quoted 6 lines
I looked around if there was previous discussion and only really found [3].
Is thexen/xen/include/watchdog.hheader meant to be for this kind of watchdog support or is that more for the VM watchdog? Looking at the x86 ACPI NMI watchdog it seems like the former, but I have never worked with x86 nor ACPI.
include/watchdog.hcontains helper to configure the watchdog for Xen. We also have per-VM watchdog and this is configured by the hypercallSCHEDOP_watchdog.Quoted 3 lines
Quoted 3 lines
Currently forwarding it to Dom0 has not caused any watchdog resets with our watchdog timeout settings, our specific Dom0 setup and VM count.
IIUC, the SMC API for the watchdog would be similar to the ACPI NMI watchdog. So I think it would make more sense if this is not exposed to dom0 (even if Xen is doing nothing with it).
Quoted 6 lines
Quoted 4 lines
Can you try to hide the SMCs and check if dom0 still behave properly?
Cheers,
This SMC manages a hardware watchdog, if it's not pinged within a specific interval the entire board resets.
Do you know what's the default interval? Is it large enough so Xen + dom0 can boot (at least up to when the watchdog driver is initialized)?
Quoted 12 lines
If I block the SMCs the watchdog driver in Dom0 will fail to ping the watchdog, triggering a board reset because the system looks to have become unresponsive. The reason this patch set started is because we couldn't ping the watchdog when running with Xen.
In our specific system the bootloader enables the watchdog as early as possible so that we can get watchdog protection for as much of the boot as we possibly can.
So, if we are to block the SMC from Dom0, then Xen needs to take over the pinging. It could be implemented similarly to the NMI watchdog, except that the system will reset if the ping is missed rather than backtrace.
It would also mean that Xen will get a whole watchdog driver-categoryQuoted 8 lines
due to the watchdog being vendor and sometimes even SoC specific when it comes to Arm.
My understanding of the domain watchdog code is that today the domain needs to callSCHEDOP_watchdogat least once to start the watchdog timer. Since watchdog protection through the whole boot process is desirable we'd need some core changes, such as an option to start the domain watchdog on init. >
It's quite a big change to makeFor clarification, above you seem to mention two changes:
1) Allow Xen to use the HW watchdog
2) Allow the domain to use the watchdog earlyI am assuming by big change, you are referring to 2?
, while I am not against doing it if it
Quoted 10 lines
makes sense, I now wonder if Xen should manage hardware watchdogs. Looking at the domain watchdog code it looks like if a domain does not get enough execution time, the watchdog will not be pinged enough and the guest will be reset. So either watchdog approach requires Dom0 to get execution time. Dom0 also needs to service all the PV backends it's responsible for. I'm not sure it's valuable to add another layer of watchdog for this scenario as the end result (checking that the entire system works) is achieved without it as well.
So, before I try to find the time to make a proposal for moving the hardware watchdog bit to Xen, do we really want it?Quoted 3 lines
Thanks for the details. Given that the watchdog is enabled by the bootloader, I think we want Xen to drive the watchdog for two reasons:
1) In true dom0less environment, dom0 would not exist
2) You are relying on Xen + Dom0 to boot (or at least enough to get the watchdog working) within the watchdog interval.Quoted 8 lines
Definitely we need to consider the case where there is no Dom0.
I think there are in fact 3 different use cases here:
- watchdog fully driven in a domain (dom0 or another): would work if it is expected that Xen + Domain boot time is under the watchdog initial refresh rate. I think this could make sense on some applications where your system depends on a specific domain to be properly booted to work. This would require an initial refresh time configurable in the boot loader probably.Quoted 7 lines
This is our use-case. ^
Our dom0 is monitoring and managing the other domains in our system. Without dom0 working the system isn't really working as a whole. @Julien: Would you be ok with the patch set continuing in the direction of the
original proposal, letting another party (or me at a later time) implement the fully driven by Xen option?
Quoted 5 lines
I am concerned about this particular point from Bertrand:
"would work if it is expected that Xen + Domain boot time is under the watchdog initial refresh rate."
How will a user be able to figure out how to initially configure the watchdog? Is this something you can easily configure in the bootloader at runtime?
Definitely here it would be better to have the watchdog turned off by default and document how to enable it in the firmware.
Even if a long timeout is configured by default, a user could run into trouble if using a linux without watchdog or not running linux or using dom0less without a linux having access to it. I agree with Julien here that the concern could be that users would come to us instead of NXP if there is system is doing a reset without reasons after some seconds or minutes.
Quoted 5 lines
Overall, I am not for this approach at least in the current status. I would be more inclined if there are some documentations explaining how this is supposed to be configured on NXP, so others can use the code.
Anyway, this is why we have multiple Arm maintainers for this kind of situation. If they other agrees with you, then they can ack the patch and this can be merged.
I agree with Stefano that it would be good to have those board supported.
One thing i could suggest until there is a watchdog driver inside Xen is to have a clear Warning at Xen boot on those boards in the console so that we could at least identify the reason easily if a reset occurs for someone.
Cheers
Bertrand
Quoted 5 lines
Cheers,
Signature · 1 line
Julien Grall
Re: [PATCH 1/2] xen/arm: Add imx8q{m,x} platform glue
Hi Bertrand,
Quoted 125 lines · Bertrand Marquis
Hi,
Quoted 123 lines · Julien Grall
Hi John,
Quoted 106 lines · John Ernberg
Hi Bertrand,
Quoted 96 lines · Bertrand Marquis
Hi,
Quoted 90 lines · Julien Grall
Hi John,
Thank you for the reply.
Quoted 34 lines · John Ernberg
Quoted 33 lines · Julien Grall
Quoted 1 line
Ping on the watchdog discussion bits.
Sorry for the late reply.
Quoted 9 lines · John Ernberg
Quoted 8 lines · John Ernberg
Quoted 4 lines
* IMX_SIP_TIMER_*: This seems to be related to the watchdog.
Shouldn't dom0 rely on the watchdog provided by Xen instead? So those call will be used by Xen.That is indeed a watchdog SIP, and also for setting the SoC internal RTC if it is being used.
Quoted 6 lines
Quoted 6 lines
I looked around if there was previous discussion and only really found [3].
Is thexen/xen/include/watchdog.hheader meant to be for this kind of watchdog support or is that more for the VM watchdog? Looking at the x86 ACPI NMI watchdog it seems like the former, but I have never worked with x86 nor ACPI.
include/watchdog.hcontains helper to configure the watchdog for Xen. We also have per-VM watchdog and this is configured by the hypercallSCHEDOP_watchdog.Quoted 3 lines
Quoted 3 lines
Currently forwarding it to Dom0 has not caused any watchdog resets with our watchdog timeout settings, our specific Dom0 setup and VM count.
IIUC, the SMC API for the watchdog would be similar to the ACPI NMI watchdog. So I think it would make more sense if this is not exposed to dom0 (even if Xen is doing nothing with it).
Quoted 6 lines
Quoted 4 lines
Can you try to hide the SMCs and check if dom0 still behave properly?
Cheers,
This SMC manages a hardware watchdog, if it's not pinged within a specific interval the entire board resets.
Do you know what's the default interval? Is it large enough so Xen + dom0 can boot (at least up to when the watchdog driver is initialized)?
Quoted 12 lines
If I block the SMCs the watchdog driver in Dom0 will fail to ping the watchdog, triggering a board reset because the system looks to have become unresponsive. The reason this patch set started is because we couldn't ping the watchdog when running with Xen.
In our specific system the bootloader enables the watchdog as early as possible so that we can get watchdog protection for as much of the boot as we possibly can.
So, if we are to block the SMC from Dom0, then Xen needs to take over the pinging. It could be implemented similarly to the NMI watchdog, except that the system will reset if the ping is missed rather than backtrace.
It would also mean that Xen will get a whole watchdog driver-categoryQuoted 8 lines
due to the watchdog being vendor and sometimes even SoC specific when it comes to Arm.
My understanding of the domain watchdog code is that today the domain needs to callSCHEDOP_watchdogat least once to start the watchdog timer. Since watchdog protection through the whole boot process is desirable we'd need some core changes, such as an option to start the domain watchdog on init. >
It's quite a big change to makeFor clarification, above you seem to mention two changes:
1) Allow Xen to use the HW watchdog
2) Allow the domain to use the watchdog earlyI am assuming by big change, you are referring to 2?
, while I am not against doing it if it
Quoted 10 lines
makes sense, I now wonder if Xen should manage hardware watchdogs. Looking at the domain watchdog code it looks like if a domain does not get enough execution time, the watchdog will not be pinged enough and the guest will be reset. So either watchdog approach requires Dom0 to get execution time. Dom0 also needs to service all the PV backends it's responsible for. I'm not sure it's valuable to add another layer of watchdog for this scenario as the end result (checking that the entire system works) is achieved without it as well.
So, before I try to find the time to make a proposal for moving the hardware watchdog bit to Xen, do we really want it?Quoted 3 lines
Thanks for the details. Given that the watchdog is enabled by the bootloader, I think we want Xen to drive the watchdog for two reasons:
1) In true dom0less environment, dom0 would not exist
2) You are relying on Xen + Dom0 to boot (or at least enough to get the watchdog working) within the watchdog interval.Quoted 8 lines
Definitely we need to consider the case where there is no Dom0.
I think there are in fact 3 different use cases here:
- watchdog fully driven in a domain (dom0 or another): would work if it is expected that Xen + Domain boot time is under the watchdog initial refresh rate. I think this could make sense on some applications where your system depends on a specific domain to be properly booted to work. This would require an initial refresh time configurable in the boot loader probably.Quoted 7 lines
This is our use-case. ^
Our dom0 is monitoring and managing the other domains in our system. Without dom0 working the system isn't really working as a whole. @Julien: Would you be ok with the patch set continuing in the direction of the
original proposal, letting another party (or me at a later time) implement the fully driven by Xen option?I am concerned about this particular point from Bertrand:
"would work if it is expected that Xen + Domain boot time is under the watchdog initial refresh rate."
How will a user be able to figure out how to initially configure the watchdog? Is this something you can easily configure in the bootloader at runtime?
If you go through the trouble of enabling the watchdog in the bootloader you usually know what you're doing and set the timeout yourself.
Since our systems can be mounted in really annoying locations (both in installations and world-wise) we need as much auto-recovery as possible to avoid people having to travel to collect a unit that just needed a reset due to some unexpected obscure issue at startup.
Quoted 5 lines
Definitely here it would be better to have the watchdog turned off by default and document how to enable it in the firmware.
Even if a long timeout is configured by default, a user could run into trouble if using a linux without watchdog or not running linux or using dom0less without a linux having access to it. I agree with Julien here that the concern could be that users would come to us instead of NXP if there is system is doing a reset without reasons after some seconds or minutes.
I could add myself as a reviewer for the iMX parts if that helps routing such
questions (and future patches) also to me. We have experience with the QXP, and the QM (for the supported parts by this patch set) is identical.
Would that help with the concerns?
Quoted 10 lines
Quoted 6 lines
Overall, I am not for this approach at least in the current status. I would be more inclined if there are some documentations explaining how this is supposed to be configured on NXP, so others can use the code.
Anyway, this is why we have multiple Arm maintainers for this kind of situation. If they other agrees with you, then they can ack the patch and this can be merged.
I agree with Stefano that it would be good to have those board supported.
One thing i could suggest until there is a watchdog driver inside Xen is to have a clear Warning at Xen boot on those boards in the console so that we could at least identify the reason easily if a reset occurs for someone.
How do other SoCs deal with this currently? The iMX SoCs aren't the only ones
with a watchdog, just the first one added to Xen that pings the watchdog over
an SMC. What about the OMAPs, the R-Cars, Xilinx's, Exynos' and so on?
Thanks! // John Ernberg
Re: [PATCH 1/2] xen/arm: Add imx8q{m,x} platform glue
Hi John,
Quoted 131 lines · John Ernberg
Hi Bertrand,
Quoted 125 lines · Bertrand Marquis
Hi,
Quoted 123 lines · Julien Grall
Hi John,
Quoted 106 lines · John Ernberg
Hi Bertrand,
Quoted 96 lines · Bertrand Marquis
Hi,
Quoted 90 lines · Julien Grall
Hi John,
Thank you for the reply.
Quoted 34 lines · John Ernberg
Quoted 33 lines · Julien Grall
Quoted 1 line
Ping on the watchdog discussion bits.
Sorry for the late reply.
Quoted 9 lines · John Ernberg
Quoted 8 lines · John Ernberg
Quoted 4 lines
* IMX_SIP_TIMER_*: This seems to be related to the watchdog.
Shouldn't dom0 rely on the watchdog provided by Xen instead? So those call will be used by Xen.That is indeed a watchdog SIP, and also for setting the SoC internal RTC if it is being used.
Quoted 6 lines
Quoted 6 lines
I looked around if there was previous discussion and only really found [3].
Is thexen/xen/include/watchdog.hheader meant to be for this kind of watchdog support or is that more for the VM watchdog? Looking at the x86 ACPI NMI watchdog it seems like the former, but I have never worked with x86 nor ACPI.
include/watchdog.hcontains helper to configure the watchdog for Xen. We also have per-VM watchdog and this is configured by the hypercallSCHEDOP_watchdog.Quoted 3 lines
Quoted 3 lines
Currently forwarding it to Dom0 has not caused any watchdog resets with our watchdog timeout settings, our specific Dom0 setup and VM count.
IIUC, the SMC API for the watchdog would be similar to the ACPI NMI watchdog. So I think it would make more sense if this is not exposed to dom0 (even if Xen is doing nothing with it).
Quoted 6 lines
Quoted 4 lines
Can you try to hide the SMCs and check if dom0 still behave properly?
Cheers,
This SMC manages a hardware watchdog, if it's not pinged within a specific interval the entire board resets.
Do you know what's the default interval? Is it large enough so Xen + dom0 can boot (at least up to when the watchdog driver is initialized)?
Quoted 12 lines
If I block the SMCs the watchdog driver in Dom0 will fail to ping the watchdog, triggering a board reset because the system looks to have become unresponsive. The reason this patch set started is because we couldn't ping the watchdog when running with Xen.
In our specific system the bootloader enables the watchdog as early as possible so that we can get watchdog protection for as much of the boot as we possibly can.
So, if we are to block the SMC from Dom0, then Xen needs to take over the pinging. It could be implemented similarly to the NMI watchdog, except that the system will reset if the ping is missed rather than backtrace.
It would also mean that Xen will get a whole watchdog driver-categoryQuoted 8 lines
due to the watchdog being vendor and sometimes even SoC specific when it comes to Arm.
My understanding of the domain watchdog code is that today the domain needs to callSCHEDOP_watchdogat least once to start the watchdog timer. Since watchdog protection through the whole boot process is desirable we'd need some core changes, such as an option to start the domain watchdog on init. >
It's quite a big change to makeFor clarification, above you seem to mention two changes:
1) Allow Xen to use the HW watchdog
2) Allow the domain to use the watchdog earlyI am assuming by big change, you are referring to 2?
, while I am not against doing it if it
Quoted 10 lines
makes sense, I now wonder if Xen should manage hardware watchdogs. Looking at the domain watchdog code it looks like if a domain does not get enough execution time, the watchdog will not be pinged enough and the guest will be reset. So either watchdog approach requires Dom0 to get execution time. Dom0 also needs to service all the PV backends it's responsible for. I'm not sure it's valuable to add another layer of watchdog for this scenario as the end result (checking that the entire system works) is achieved without it as well.
So, before I try to find the time to make a proposal for moving the hardware watchdog bit to Xen, do we really want it?Quoted 3 lines
Thanks for the details. Given that the watchdog is enabled by the bootloader, I think we want Xen to drive the watchdog for two reasons:
1) In true dom0less environment, dom0 would not exist
2) You are relying on Xen + Dom0 to boot (or at least enough to get the watchdog working) within the watchdog interval.Quoted 8 lines
Definitely we need to consider the case where there is no Dom0.
I think there are in fact 3 different use cases here:
- watchdog fully driven in a domain (dom0 or another): would work if it is expected that Xen + Domain boot time is under the watchdog initial refresh rate. I think this could make sense on some applications where your system depends on a specific domain to be properly booted to work. This would require an initial refresh time configurable in the boot loader probably.Quoted 7 lines
This is our use-case. ^
Our dom0 is monitoring and managing the other domains in our system. Without dom0 working the system isn't really working as a whole. @Julien: Would you be ok with the patch set continuing in the direction of the
original proposal, letting another party (or me at a later time) implement the fully driven by Xen option?I am concerned about this particular point from Bertrand:
"would work if it is expected that Xen + Domain boot time is under the watchdog initial refresh rate."
How will a user be able to figure out how to initially configure the watchdog? Is this something you can easily configure in the bootloader at runtime?
Quoted 7 lines
If you go through the trouble of enabling the watchdog in the bootloader you usually know what you're doing and set the timeout yourself.
Since our systems can be mounted in really annoying locations (both in installations and world-wise) we need as much auto-recovery as possible to avoid people having to travel to collect a unit that just needed a reset due to some unexpected obscure issue at startup.
I definitely get the need do not get me wrong.
I am just concerned by potential users having target restarting when using Xen because of that and not knowing why.
Quoted 6 lines
Quoted 5 lines
Definitely here it would be better to have the watchdog turned off by default and document how to enable it in the firmware.
Even if a long timeout is configured by default, a user could run into trouble if using a linux without watchdog or not running linux or using dom0less without a linux having access to it. I agree with Julien here that the concern could be that users would come to us instead of NXP if there is system is doing a reset without reasons after some seconds or minutes.
Quoted 6 lines
I could add myself as a reviewer for the iMX parts if that helps routing such
questions (and future patches) also to me. We have experience with the QXP, and the QM (for the supported parts by this patch set) is identical.Would that help with the concerns?
Definitely it could help.
Quoted 10 lines
Quoted 10 lines
Quoted 7 lines
Overall, I am not for this approach at least in the current status. I would be more inclined if there are some documentations explaining how this is supposed to be configured on NXP, so others can use the code.
Anyway, this is why we have multiple Arm maintainers for this kind of situation. If they other agrees with you, then they can ack the patch and this can be merged.
I agree with Stefano that it would be good to have those board supported.
Quoted 7 lines
Quoted 1 line
One thing i could suggest until there is a watchdog driver inside Xen is to have a clear Warning at Xen boot on those boards in the console so that we could at least identify the reason easily if a reset occurs for someone.
How do other SoCs deal with this currently? The iMX SoCs aren't the only ones
with a watchdog, just the first one added to Xen that pings the watchdog over
an SMC. What about the OMAPs, the R-Cars, Xilinx's, Exynos' and so on?
As far as I know the watchdog is usually not active until a driver activates it. Which means that by default it will not fire.
Having it activated by the bootloader by default is not usual.
Now definitely on a lot of use cases the users are activating it in the booloader but their systems are design for it.
Do I understand that the default boot loader configuration is not activating it on your side ?
Regards
Bertrand
Quoted 2 lines
Thanks! // John Ernberg
Re: [PATCH 1/2] xen/arm: Add imx8q{m,x} platform glue
Hi Bertrand,
Quoted 150 lines · Bertrand Marquis
Hi John,
Quoted 131 lines · John Ernberg
Hi Bertrand,
Quoted 125 lines · Bertrand Marquis
Hi,
Quoted 123 lines · Julien Grall
Hi John,
Quoted 106 lines · John Ernberg
Hi Bertrand,
Quoted 96 lines · Bertrand Marquis
Hi,
Quoted 90 lines · Julien Grall
Hi John,
Thank you for the reply.
Quoted 34 lines · John Ernberg
Quoted 33 lines · Julien Grall
Quoted 1 line
Ping on the watchdog discussion bits.
Sorry for the late reply.
Quoted 9 lines · John Ernberg
Quoted 8 lines · John Ernberg
Quoted 4 lines
* IMX_SIP_TIMER_*: This seems to be related to the watchdog.
Shouldn't dom0 rely on the watchdog provided by Xen instead? So those call will be used by Xen.That is indeed a watchdog SIP, and also for setting the SoC internal RTC if it is being used.
Quoted 6 lines
Quoted 6 lines
I looked around if there was previous discussion and only really found [3].
Is thexen/xen/include/watchdog.hheader meant to be for this kind of watchdog support or is that more for the VM watchdog? Looking at the x86 ACPI NMI watchdog it seems like the former, but I have never worked with x86 nor ACPI.
include/watchdog.hcontains helper to configure the watchdog for Xen. We also have per-VM watchdog and this is configured by the hypercallSCHEDOP_watchdog.Quoted 3 lines
Quoted 3 lines
Currently forwarding it to Dom0 has not caused any watchdog resets with our watchdog timeout settings, our specific Dom0 setup and VM count.
IIUC, the SMC API for the watchdog would be similar to the ACPI NMI watchdog. So I think it would make more sense if this is not exposed to dom0 (even if Xen is doing nothing with it).
Quoted 6 lines
Quoted 4 lines
Can you try to hide the SMCs and check if dom0 still behave properly?
Cheers,
This SMC manages a hardware watchdog, if it's not pinged within a specific interval the entire board resets.
Do you know what's the default interval? Is it large enough so Xen + dom0 can boot (at least up to when the watchdog driver is initialized)?
Quoted 12 lines
If I block the SMCs the watchdog driver in Dom0 will fail to ping the watchdog, triggering a board reset because the system looks to have become unresponsive. The reason this patch set started is because we couldn't ping the watchdog when running with Xen.
In our specific system the bootloader enables the watchdog as early as possible so that we can get watchdog protection for as much of the boot as we possibly can.
So, if we are to block the SMC from Dom0, then Xen needs to take over the pinging. It could be implemented similarly to the NMI watchdog, except that the system will reset if the ping is missed rather than backtrace.
It would also mean that Xen will get a whole watchdog driver-categoryQuoted 8 lines
due to the watchdog being vendor and sometimes even SoC specific when it comes to Arm.
My understanding of the domain watchdog code is that today the domain needs to callSCHEDOP_watchdogat least once to start the watchdog timer. Since watchdog protection through the whole boot process is desirable we'd need some core changes, such as an option to start the domain watchdog on init. >
It's quite a big change to makeFor clarification, above you seem to mention two changes:
1) Allow Xen to use the HW watchdog
2) Allow the domain to use the watchdog earlyI am assuming by big change, you are referring to 2?
, while I am not against doing it if it
Quoted 10 lines
makes sense, I now wonder if Xen should manage hardware watchdogs. Looking at the domain watchdog code it looks like if a domain does not get enough execution time, the watchdog will not be pinged enough and the guest will be reset. So either watchdog approach requires Dom0 to get execution time. Dom0 also needs to service all the PV backends it's responsible for. I'm not sure it's valuable to add another layer of watchdog for this scenario as the end result (checking that the entire system works) is achieved without it as well.
So, before I try to find the time to make a proposal for moving the hardware watchdog bit to Xen, do we really want it?Quoted 3 lines
Thanks for the details. Given that the watchdog is enabled by the bootloader, I think we want Xen to drive the watchdog for two reasons:
1) In true dom0less environment, dom0 would not exist
2) You are relying on Xen + Dom0 to boot (or at least enough to get the watchdog working) within the watchdog interval.Quoted 8 lines
Definitely we need to consider the case where there is no Dom0.
I think there are in fact 3 different use cases here:
- watchdog fully driven in a domain (dom0 or another): would work if it is expected that Xen + Domain boot time is under the watchdog initial refresh rate. I think this could make sense on some applications where your system depends on a specific domain to be properly booted to work. This would require an initial refresh time configurable in the boot loader probably.Quoted 7 lines
This is our use-case. ^
Our dom0 is monitoring and managing the other domains in our system. Without dom0 working the system isn't really working as a whole. @Julien: Would you be ok with the patch set continuing in the direction of the
original proposal, letting another party (or me at a later time) implement the fully driven by Xen option?I am concerned about this particular point from Bertrand:
"would work if it is expected that Xen + Domain boot time is under the watchdog initial refresh rate."
How will a user be able to figure out how to initially configure the watchdog? Is this something you can easily configure in the bootloader at runtime?
Quoted 7 lines
If you go through the trouble of enabling the watchdog in the bootloader you usually know what you're doing and set the timeout yourself.
Since our systems can be mounted in really annoying locations (both in installations and world-wise) we need as much auto-recovery as possible to avoid people having to travel to collect a unit that just needed a reset due to some unexpected obscure issue at startup.
I definitely get the need do not get me wrong.
I am just concerned by potential users having target restarting when using Xen because of that and not knowing why.Quoted 6 lines
Quoted 5 lines
Definitely here it would be better to have the watchdog turned off by default and document how to enable it in the firmware.
Even if a long timeout is configured by default, a user could run into trouble if using a linux without watchdog or not running linux or using dom0less without a linux having access to it. I agree with Julien here that the concern could be that users would come to us instead of NXP if there is system is doing a reset without reasons after some seconds or minutes.
Quoted 8 lines
Quoted 6 lines
I could add myself as a reviewer for the iMX parts if that helps routing such
questions (and future patches) also to me. We have experience with the QXP, and the QM (for the supported parts by this patch set) is identical.Would that help with the concerns?
Definitely it could help.
I'll figure out how to include myself in the MAINTAINERS file for the next spin.
Quoted 19 lines
Quoted 11 lines
Quoted 11 lines
Quoted 8 lines
Overall, I am not for this approach at least in the current status. I would be more inclined if there are some documentations explaining how this is supposed to be configured on NXP, so others can use the code.
Anyway, this is why we have multiple Arm maintainers for this kind of situation. If they other agrees with you, then they can ack the patch and this can be merged.
I agree with Stefano that it would be good to have those board supported.
Quoted 7 lines
Quoted 1 line
One thing i could suggest until there is a watchdog driver inside Xen is to have a clear Warning at Xen boot on those boards in the console so that we could at least identify the reason easily if a reset occurs for someone.
How do other SoCs deal with this currently? The iMX SoCs aren't the only ones
with a watchdog, just the first one added to Xen that pings the watchdog over
an SMC. What about the OMAPs, the R-Cars, Xilinx's, Exynos' and so on?
Quoted 7 lines
As far as I know the watchdog is usually not active until a driver activates it. Which means that by default it will not fire.
Having it activated by the bootloader by default is not usual.
Now definitely on a lot of use cases the users are activating it in the booloader but their systems are design for it.Do I understand that the default boot loader configuration is not activating it on your side ?
We are using a bootloader called Punchboot [1] developed by one of our employees. With Punchboot you have to explicitly write the code to enable the watchdog yourself. In u-boot you need to enable the watchdog drivers and configure the watchdog first before it is started. I don't know how the situation is in other bootloaders such as BareBox.
Best regards // John Ernberg
Re: [PATCH 1/2] xen/arm: Add imx8q{m,x} platform glue
Hi John,
Quoted 160 lines · John Ernberg
Hi Bertrand,
Quoted 155 lines · Bertrand Marquis
Hi John,
Quoted 131 lines · John Ernberg
Hi Bertrand,
Quoted 125 lines · Bertrand Marquis
Hi,
Quoted 123 lines · Julien Grall
Hi John,
Quoted 106 lines · John Ernberg
Hi Bertrand,
Quoted 96 lines · Bertrand Marquis
Hi,
Quoted 90 lines · Julien Grall
Hi John,
Thank you for the reply.
Quoted 34 lines · John Ernberg
Quoted 33 lines · Julien Grall
Quoted 1 line
Ping on the watchdog discussion bits.
Sorry for the late reply.
Quoted 9 lines · John Ernberg
Quoted 8 lines · John Ernberg
Quoted 4 lines
* IMX_SIP_TIMER_*: This seems to be related to the watchdog.
Shouldn't dom0 rely on the watchdog provided by Xen instead? So those
call will be used by Xen.That is indeed a watchdog SIP, and also for setting the SoC internal RTC if it is being used.
Quoted 6 lines
Quoted 6 lines
I looked around if there was previous discussion and only really found [3].
Is thexen/xen/include/watchdog.hheader meant to be for this kind of watchdog support or is that more for the VM watchdog? Looking at the x86 ACPI NMI watchdog it seems like the former, but I have never worked with x86 nor ACPI.
include/watchdog.hcontains helper to configure the watchdog for Xen. We also have per-VM watchdog and this is configured by the hypercallSCHEDOP_watchdog.Quoted 3 lines
Quoted 3 lines
Currently forwarding it to Dom0 has not caused any watchdog resets with our watchdog timeout settings, our specific Dom0 setup and VM count.
IIUC, the SMC API for the watchdog would be similar to the ACPI NMI watchdog. So I think it would make more sense if this is not exposed to dom0 (even if Xen is doing nothing with it).
Quoted 6 lines
Quoted 4 lines
Can you try to hide the SMCs and check if dom0 still behave properly?
Cheers,
This SMC manages a hardware watchdog, if it's not pinged within a specific interval the entire board resets.
Do you know what's the default interval? Is it large enough so Xen + dom0 can boot (at least up to when the watchdog driver is initialized)?
Quoted 12 lines
If I block the SMCs the watchdog driver in Dom0 will fail to ping the watchdog, triggering a board reset because the system looks to have become unresponsive. The reason this patch set started is because we couldn't ping the watchdog when running with Xen.
In our specific system the bootloader enables the watchdog as early as possible so that we can get watchdog protection for as much of the boot as we possibly can.
So, if we are to block the SMC from Dom0, then Xen needs to take over the pinging. It could be implemented similarly to the NMI watchdog, except that the system will reset if the ping is missed rather than backtrace.
It would also mean that Xen will get a whole watchdog driver-categoryQuoted 8 lines
due to the watchdog being vendor and sometimes even SoC specific when it comes to Arm.
My understanding of the domain watchdog code is that today the domain needs to callSCHEDOP_watchdogat least once to start the watchdog timer. Since watchdog protection through the whole boot process is desirable we'd need some core changes, such as an option to start the domain watchdog on init. >
It's quite a big change to makeFor clarification, above you seem to mention two changes:
1) Allow Xen to use the HW watchdog
2) Allow the domain to use the watchdog earlyI am assuming by big change, you are referring to 2?
, while I am not against doing it if it
Quoted 10 lines
makes sense, I now wonder if Xen should manage hardware watchdogs. Looking at the domain watchdog code it looks like if a domain does not get enough execution time, the watchdog will not be pinged enough and the guest will be reset. So either watchdog approach requires Dom0 to get execution time. Dom0 also needs to service all the PV backends it's responsible for. I'm not sure it's valuable to add another layer of watchdog for this scenario as the end result (checking that the entire system works) is achieved without it as well.
So, before I try to find the time to make a proposal for moving the hardware watchdog bit to Xen, do we really want it?Quoted 3 lines
Thanks for the details. Given that the watchdog is enabled by the bootloader, I think we want Xen to drive the watchdog for two reasons:
1) In true dom0less environment, dom0 would not exist
2) You are relying on Xen + Dom0 to boot (or at least enough to get the watchdog working) within the watchdog interval.Quoted 8 lines
Definitely we need to consider the case where there is no Dom0.
I think there are in fact 3 different use cases here:
- watchdog fully driven in a domain (dom0 or another): would work if it is expected that Xen + Domain boot time is under the watchdog initial refresh rate. I think this could make sense on some applications where your system depends on a specific domain to be properly booted to work. This would require an initial refresh time configurable in the boot loader probably.Quoted 7 lines
This is our use-case. ^
Our dom0 is monitoring and managing the other domains in our system. Without dom0 working the system isn't really working as a whole. @Julien: Would you be ok with the patch set continuing in the direction of the
original proposal, letting another party (or me at a later time) implement the fully driven by Xen option?I am concerned about this particular point from Bertrand:
"would work if it is expected that Xen + Domain boot time is under the watchdog initial refresh rate."
How will a user be able to figure out how to initially configure the watchdog? Is this something you can easily configure in the bootloader at runtime?
Quoted 7 lines
If you go through the trouble of enabling the watchdog in the bootloader you usually know what you're doing and set the timeout yourself.
Since our systems can be mounted in really annoying locations (both in installations and world-wise) we need as much auto-recovery as possible to avoid people having to travel to collect a unit that just needed a reset due to some unexpected obscure issue at startup.
I definitely get the need do not get me wrong.
I am just concerned by potential users having target restarting when using Xen because of that and not knowing why.Quoted 11 lines
Quoted 5 lines
Definitely here it would be better to have the watchdog turned off by default and document how to enable it in the firmware.
Even if a long timeout is configured by default, a user could run into trouble if using a linux without watchdog or not running linux or using dom0less without a linux having access to it. I agree with Julien here that the concern could be that users would come to us instead of NXP if there is system is doing a reset without reasons after some seconds or minutes.
I could add myself as a reviewer for the iMX parts if that helps routing such
questions (and future patches) also to me. We have experience with the QXP, and the QM (for the supported parts by this patch set) is identical.
Quoted 7 lines
Quoted 3 lines
Quoted 1 line
Would that help with the concerns?
Definitely it could help.
I'll figure out how to include myself in the
MAINTAINERSfile for the next spin.
Thanks.
Quoted 25 lines
Quoted 25 lines
Quoted 11 lines
Quoted 11 lines
Quoted 8 lines
Overall, I am not for this approach at least in the current status. I would be more inclined if there are some documentations explaining how this is supposed to be configured on NXP, so others can use the code.
Anyway, this is why we have multiple Arm maintainers for this kind of situation. If they other agrees with you, then they can ack the patch and this can be merged.
I agree with Stefano that it would be good to have those board supported.
Quoted 7 lines
Quoted 1 line
One thing i could suggest until there is a watchdog driver inside Xen is to have a clear Warning at Xen boot on those boards in the console so that we could at least identify the reason easily if a reset occurs for someone.
How do other SoCs deal with this currently? The iMX SoCs aren't the only ones
with a watchdog, just the first one added to Xen that pings the watchdog over
an SMC. What about the OMAPs, the R-Cars, Xilinx's, Exynos' and so on?As far as I know the watchdog is usually not active until a driver activates it. Which means that by default it will not fire.
Having it activated by the bootloader by default is not usual.
Now definitely on a lot of use cases the users are activating it in the booloader but their systems are design for it.
Quoted 7 lines
Quoted 1 line
Do I understand that the default boot loader configuration is not activating it on your side ?
We are using a bootloader called Punchboot [1] developed by one of our employees. With Punchboot you have to explicitly write the code to enable the watchdog yourself. In u-boot you need to enable the watchdog drivers and configure the watchdog first before it is started. I don't know how the situation is in other bootloaders such as BareBox.
Then a user not knowing will not have it activated and will not encounter issues. So all good from my point of view :-)
Regards
Bertrand
Quoted 4 lines
Best regards // John Ernberg
PATCH 2/2 xen/drivers: imx-lpuart: Add iMX8QXP compatible
In reply to John ErnbergAllow the uart to probe also with iMX8QXP. The ip-block is the same as in the QM, only the compatible is needed.
--- xen/drivers/char/imx-lpuart.c | 1 + 1 file changed, 1 insertion(+)
xen/drivers/char/imx-lpuart.c +1 -0
@@ -257,6 +257,7 @@ static int __init imx_lpuart_init(struct dt_device_node *dev,static const struct dt_device_match imx_lpuart_dt_compat[]__initconst = {DT_MATCH_COMPATIBLE ("fsl,imx8qm-lpuart" ), +DT_MATCH_COMPATIBLE ("fsl,imx8qxp-lpuart" ), {/* sentinel */ }, };
Signature · 1 line
2.43.0
Re: [PATCH 2/2] xen/drivers: imx-lpuart: Add iMX8QXP compatible
Hi John,
Quoted 4 lines · John Ernberg
Allow the uart to probe also with iMX8QXP. The ip-block is the same as in the QM, only the compatible is needed.
Signed-off-by John Ernberg <[email protected]>
With one remark below:
xen/drivers/char/imx-lpuart.c static int __init imx_lpuart_init(struct dt_device_node *dev, · line 260
Quoted 13 lines
--- xen/drivers/char/imx-lpuart.c | 1 + 1 file changed, 1 insertion(+)xen/drivers/char/imx-lpuart.c +1
-0@@ -257,6 +257,7 @@ static int __init imx_lpuart_init(struct dt_device_node *dev,static const struct dt_device_match imx_lpuart_dt_compat[]__initconst = {DT_MATCH_COMPATIBLE ("fsl,imx8qm-lpuart" ), +DT_MATCH_COMPATIBLE ("fsl,imx8qxp-lpuart" ),
IIUC the binding, the Device-Tree node compatible should have both fsl,imx8qm-lpuart and fsl,imx8qxp-lpuart. In fact, the Linux driver doesn't recognize the first compatible.
So maybe we can remove the first one.
Cheers,
Signature · 1 line
Julien Grall
Re: [PATCH 2/2] xen/drivers: imx-lpuart: Add iMX8QXP compatible
Hi Julien,
Quoted 34 lines · Julien Grall
Hi John,
Quoted 5 lines · John Ernberg
Allow the uart to probe also with iMX8QXP. The ip-block is the same as in the QM,
only the compatible is needed.Signed-off-by John Ernberg <[email protected]>With one remark below:
Acked-by Julien Grall <[email protected]>Quoted 11 lines
---
xen/drivers/char/imx-lpuart.c| 1 +1 file changed, 1 insertion(+)xen/drivers/char/imx-lpuart.c +0
-0@@ -257,6 +257,7 @@ static int __init imx_lpuart_init(struct dt_device_node *dev,Quoted 5 lines
static const struct
dt_device_matchimx_lpuart_dt_compat[]__initconst=
{
DT_MATCH_COMPATIBLE("fsl,imx8qm-lpuart"),
+DT_MATCH_COMPATIBLE("fsl,imx8qxp-lpuart"),IIUC the binding, the Device-Tree node compatible should have both fsl,imx8qm-lpuart and fsl,imx8qxp-lpuart. In fact, the Linux driver doesn't recognize the first compatible.
Quoted 1 line
So maybe we can remove the first one.
It's listed in the bindings but the Linux driver indeed never looks for qm, it should be safe to drop. I'll drop this in V2.
Quoted 3 lines
Cheers,
Thanks! // John Ernberg