Skip to contentSkip to conversation

xen/arm: static event channel

PATCH In review Rahul Singh 5 participants 13 messages Sep 23, 2022 – Sep 30, 2022

lore
Share & tools
lore
#0 lore raw

cover xen/arm: static event channel

This patch series fix issues related to static event channel series.

Rahul Singh (2):
xen: Add static event channel in SUPPORT.md on ARM xen/arm: fix booting ACPI based system after static evtchn series

 SUPPORT.md           | 7 +++++++
 xen/arch/arm/setup.c | 5 +++--
 2 files changed, 10 insertions(+), 2 deletions(-)
Signature · 1 line
2.25.1
#1 lore raw

PATCH 1/2 xen: Add static event channel in SUPPORT.md on ARM

Static event channel support is tech preview, which shall be documented in SUPPORT.md

---
 SUPPORT.md | 7 +++++++
 1 file changed, 7 insertions(+)
SUPPORT.md +7 -0
index 8ebd63ad82..29f74ac506 100644
@@ -922,6 +922,13 @@ bootscrub=off are passed as Xen command line parameters. (Memory should
 be scrubbed with bootscrub=idle.) No XSAs will be issues due to
 unscrubbed memory.
 
+## Static Event Channel
+
+Allow to setup the static event channel on dom0less system, enabling domains
+to send/receive notifications.
+
+    Status, ARM: Tech Preview
+
 # Format and definitions
 
 This file contains prose, and machine-readable fragments.
Signature · 1 line
2.25.1
Reviewed-by on v1 1/2
#2 lore raw

Re: [PATCH 1/2] xen: Add static event channel in SUPPORT.md on ARM

Quoted 7 lines · Rahul Singh

CAUTION: This message has originated from an External Source. Please use proper judgment and caution when opening attachments, clicking links, or responding to this email.

Static event channel support is tech preview, which shall be documented in SUPPORT.md

Quoted 26 lines
---
  SUPPORT.md | 7 +++++++
  1 file changed, 7 insertions(+)
SUPPORT.md +7 -1
index 8ebd63ad82..29f74ac506 100644
@@ -922,6 +922,13 @@ bootscrub=off are passed as Xen command line parameters. (Memory should
  be scrubbed with bootscrub=idle.) No XSAs will be issues due to
  unscrubbed memory.
 
+## Static Event Channel
+
+Allow to setup the static event channel on dom0less system, enabling domains
+to send/receive notifications.
+
+    Status, ARM: Tech Preview
+
  # Format and definitions
 
  This file contains prose, and machine-readable fragments.
--

2.25.1

Reviewed-by on v1 1/2
#3 lore raw

Re: [PATCH 1/2] xen: Add static event channel in SUPPORT.md on ARM

In reply to Rahul Singh

Hi Rahul,

Quoted 6 lines · Rahul Singh

Static event channel support is tech preview, which shall be documented in SUPPORT.md

Cheers
Bertrand

Quoted 26 lines

---
SUPPORT.md | 7 +++++++

1 file changed, 7 insertions(+)
SUPPORT.md +0 -0
index 8ebd63ad82..29f74ac506 100644
@@ -922,6 +922,13 @@ bootscrub=off are passed as Xen command line parameters. (Memory should

be scrubbed with bootscrub=idle.) No XSAs will be issues due to unscrubbed memory.

SUPPORT.md +7 -0
+## Static Event Channel
+
+Allow to setup the static event channel on dom0less system, enabling domains
+to send/receive notifications.
+
+    Status, ARM: Tech Preview
+

# Format and definitions

This file contains prose, and machine-readable fragments.

Signature · 1 line
2.25.1
#4 lore raw

PATCH 2/2 xen/arm: fix booting ACPI based system after static evtchn series

In reply to Rahul Singh

When ACPI is enabled and the system booted with ACPI, BUG() is observed after merging the static event channel series. As there is not DT when booted with ACPI there will be no chosen node because of that "BUG_ON(chosen == NULL)" will be hit.

(XEN) Xen BUG at arch/arm/domain_build.c:3578

Move call to alloc_static_evtchn() under acpi_disabled check to fix the issue.

Fixes 1fe16b3ed78a (xen/arm: introduce xen-evtchn dom0less property)
---
 xen/arch/arm/setup.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
xen/arch/arm/setup.c +3 -2
index 61b4f258a0..4395640019 100644
@@ -1166,9 +1166,10 @@ void __init start_xen(unsigned long boot_phys_offset,
         printk(XENLOG_INFO "Xen dom0less mode detected\n");
 
     if ( acpi_disabled )
+    {
         create_domUs();
-
-    alloc_static_evtchn();
+        alloc_static_evtchn();
+    }
 
     /*
      * This needs to be called **before** heap_init_late() so modules
Signature · 1 line
2.25.1
#5 lore raw

Re: [PATCH 2/2] xen/arm: fix booting ACPI based system after static evtchn series

Hi Rahul,

Quoted 5 lines · Rahul Singh

CAUTION: This message has originated from an External Source. Please use proper judgment and caution when opening attachments, clicking links, or responding to this email.

When ACPI is enabled and the system booted with ACPI, BUG() is observed after merging the static event channel series. As there is not DT when

[NIT] : s/not/no

Quoted 4 lines

booted with ACPI there will be no chosen node because of that "BUG_ON(chosen == NULL)" will be hit.

(XEN) Xen BUG at arch/arm/domain_build.c:3578

Is the bug seen on the gitlab ci ?

Quoted 15 lines

Move call to alloc_static_evtchn() under acpi_disabled check to fix the issue.

Fixes 1fe16b3ed78a (xen/arm: introduce xen-evtchn dom0less property)
---
  xen/arch/arm/setup.c | 5 +++--
  1 file changed, 3 insertions(+), 2 deletions(-)
xen/arch/arm/setup.c +0 -0
index 61b4f258a0..4395640019 100644

xen/arch/arm/setup.c void __init start_xen(unsigned long boot_phys_offset, · line 1171

Quoted 8 lines
xen/arch/arm/setup.c +2 -2
@@ -1166,9 +1166,10 @@ void __init start_xen(unsigned long boot_phys_offset,
          printk(XENLOG_INFO "Xen dom0less mode detected\n");
 
      if ( acpi_disabled )
+    {
          create_domUs();
-
-    alloc_static_evtchn();
+        alloc_static_evtchn();

Can the code in alloc_static_evtchn() be guarded with "#ifndef CONFIG_ACPI ... endif" ?

- Ayan

Quoted 8 lines
xen/arch/arm/setup.c +1 -1
+    }
 
      /*
       * This needs to be called **before** heap_init_late() so modules
--

2.25.1

#6 lore raw

Re: [PATCH 2/2] xen/arm: fix booting ACPI based system after static evtchn series

Hi Ayan,

Quoted 11 lines · Ayan Kumar Halder

Hi Rahul,

Quoted 5 lines · Rahul Singh

CAUTION: This message has originated from an External Source. Please use proper judgment and caution when opening attachments, clicking links, or responding to this email.

When ACPI is enabled and the system booted with ACPI, BUG() is observed after merging the static event channel series. As there is not DT when

[NIT] : s/not/no

Ack.

Quoted 5 lines
Quoted 4 lines

booted with ACPI there will be no chosen node because of that "BUG_ON(chosen == NULL)" will be hit.

(XEN) Xen BUG at arch/arm/domain_build.c:3578

Is the bug seen on the gitlab ci ?

No, I found the issue while testing the ACPI boot. But going forward we will add this in our internal ci.

Quoted 17 lines
Quoted 17 lines

Move call to alloc_static_evtchn() under acpi_disabled check to fix the issue.

Fixes 1fe16b3ed78a (xen/arm: introduce xen-evtchn dom0less property)
---
 xen/arch/arm/setup.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
xen/arch/arm/setup.c +0 -0
index 61b4f258a0..4395640019 100644
@@ -1166,9 +1166,10 @@ void __init start_xen(unsigned long boot_phys_offset,
         printk(XENLOG_INFO "Xen dom0less mode detected\n");
 
Quoted 8 lines

xen/arch/arm/setup.c void __init start_xen(unsigned long boot_phys_offset, · line 1171

Quoted 6 lines
xen/arch/arm/setup.c +2 -2
     if ( acpi_disabled )
+    {
         create_domUs();
-
-    alloc_static_evtchn();
+        alloc_static_evtchn();

Can the code in alloc_static_evtchn() be guarded with "#ifndef CONFIG_ACPI ... endif" ?

Not required as acpi_disabled will take care of that. acpi_disabled variable is used to avoid the CONFIG_ACPI.

Regards,
Rahul

#7 lore raw

Re: [PATCH 2/2] xen/arm: fix booting ACPI based system after static evtchn series

In reply to Ayan Kumar Halder
Quoted 6 lines · Ayan Kumar Halder
Quoted 5 lines · Rahul Singh
xen/arch/arm/setup.c +0 -0
@@ -1166,9 +1166,10 @@ void __init start_xen(unsigned long boot_phys_offset,
          printk(XENLOG_INFO "Xen dom0less mode detected\n");
 
Quoted 9 lines

xen/arch/arm/setup.c void __init start_xen(unsigned long boot_phys_offset, · line 1171

Quoted 6 lines
xen/arch/arm/setup.c +2 -2
      if ( acpi_disabled )
+    {
          create_domUs();
-
-    alloc_static_evtchn();
+        alloc_static_evtchn();

Can the code in alloc_static_evtchn() be guarded with "#ifndef CONFIG_ACPI ... endif" ?

This wouldn't help the issue, but at best code size when !CONFIG_ACPI. When CONFIG_ACPI=y, acpi_disabled might still be true, and hence the function may still need skipping. Apart from this I'd also consider it odd to have a non-ACPI function have such an #ifdef ...

Jan

Reviewed-by
#8 lore raw

Re: [PATCH 2/2] xen/arm: fix booting ACPI based system after static evtchn series

Quoted 15 lines · Jan Beulich
Quoted 6 lines · Ayan Kumar Halder
Quoted 5 lines · Rahul Singh
xen/arch/arm/setup.c +0 -0
@@ -1166,9 +1166,10 @@ void __init start_xen(unsigned long boot_phys_offset,
           printk(XENLOG_INFO "Xen dom0less mode detected\n");
 
Quoted 8 lines

xen/arch/arm/setup.c void __init start_xen(unsigned long boot_phys_offset, · line 1171

Quoted 6 lines
xen/arch/arm/setup.c +2 -2
       if ( acpi_disabled )
+    {
           create_domUs();
-
-    alloc_static_evtchn();
+        alloc_static_evtchn();

Can the code in alloc_static_evtchn() be guarded with "#ifndef CONFIG_ACPI ... endif" ?

Quoted 4 lines

This wouldn't help the issue, but at best code size when !CONFIG_ACPI. When CONFIG_ACPI=y, acpi_disabled might still be true, and hence the function may still need skipping. Apart from this I'd also consider it odd to have a non-ACPI function have such an #ifdef ...

I think this makes sense. Also Rahul's previous comments looks reasonable to me.

Quoted 2 lines

Jan

Reviewed-by on v1 2/2
#9 lore raw

Re: [PATCH 2/2] xen/arm: fix booting ACPI based system after static evtchn series

In reply to Rahul Singh

Hi,

Quoted 7 lines · Rahul Singh

When ACPI is enabled and the system booted with ACPI, BUG() is observed after merging the static event channel series. As there is not DT when booted with ACPI there will be no chosen node because of that "BUG_ON(chosen == NULL)" will be hit.

Quoted 7 lines

(XEN) Xen BUG at arch/arm/domain_build.c:3578

Move call to alloc_static_evtchn() under acpi_disabled check to fix the issue.

Fixes 1fe16b3ed78a (xen/arm: introduce xen-evtchn dom0less property)

This is needed to fix ACPI build issues and was release-acked already.

Cheers
Bertrand

Quoted 24 lines

---
xen/arch/arm/setup.c | 5 +++--

1 file changed, 3 insertions(+), 2 deletions(-)
xen/arch/arm/setup.c +3 -2
index 61b4f258a0..4395640019 100644
@@ -1166,9 +1166,10 @@ void __init start_xen(unsigned long boot_phys_offset,
        printk(XENLOG_INFO "Xen dom0less mode detected\n");
 
    if ( acpi_disabled )
+    {
        create_domUs();
-
-    alloc_static_evtchn();
+        alloc_static_evtchn();
+    }
 
    /*
     * This needs to be called **before** heap_init_late() so modules
Signature · 1 line
2.25.1
#10 lore raw
In reply to Rahul Singh

Hi Rahul,

Please give the necessary justification for inclusion in 4.17:
- severity of the bug fixed
- probability and impact of potential issues that the patch could add.

thanks
Bertrand

Quoted 15 lines · Rahul Singh

This patch series fix issues related to static event channel series.

Rahul Singh (2):
xen: Add static event channel in SUPPORT.md on ARM xen/arm: fix booting ACPI based system after static evtchn series

SUPPORT.md | 7 +++++++
xen/arch/arm/setup.c | 5 +++--

2 files changed, 10 insertions(+), 2 deletions(-)
Signature · 1 line
2.25.1
#11 lore raw

Hi All,

Quoted 6 lines · Bertrand Marquis

Hi Rahul,

Please give the necessary justification for inclusion in 4.17:
- severity of the bug fixed

The severity of the bug is high as without this fixed system with ACPI support will fail to boot.

Quoted 1 line

- probability and impact of potential issues that the patch could add.

As we are not supporting the static event channel for ACPI, it is okay to move alloc_static_evtchn() under acpi_disabled check.

Regards,
Rahul

#12 lore raw

Hi Rahul and all,

Quoted 5 lines

-----Original Message-----
From: Rahul Singh <[email protected]>
Subject: Re: [PATCH 0/2] xen/arm: static event channel

Hi All,

Quoted 8 lines
Quoted 1 line

On 26 Sep 2022, at 1:12 pm, Bertrand Marquis

Quoted 4 lines · <[email protected]> wrote:

Hi Rahul,

Please give the necessary justification for inclusion in 4.17:
- severity of the bug fixed

The severity of the bug is high as without this fixed system with ACPI support will fail to boot.

I agree on that, dom0 boot from ACPI on Arm is what we currently supported. So I think we need to fix the current issue for 4.17.

Besides the bugfix patch, the other patch in this series is a pure doc change so it should be safe.

I think we still need Arm maintainers' R-b or ack for this series, and as long as This series is properly reviewed:

Quoted 5 lines
Quoted 2 lines

- probability and impact of potential issues that the patch could add.

As we are not supporting the static event channel for ACPI, it is okay to move alloc_static_evtchn() under acpi_disabled check.

Agreed.

Kind regards,
Henry

Quoted 4 lines

Regards,
Rahul