[PATCH v2 2/3] x86/acpi: Clarify BGRT invalidation behavior with preservation

Soumyajyotii Ssarkar posted 3 patches 1 month, 1 week ago
There is a newer version of this series
[PATCH v2 2/3] x86/acpi: Clarify BGRT invalidation behavior with preservation
Posted by Soumyajyotii Ssarkar 1 month, 1 week ago
Now that BGRT images are preserved during EFI boot (via
EfiACPIReclaimMemory allocation), the invalidation code in
acpi_parse_bgrt() is no longer needed.
However, The original invalidation code acts as a safety net for when
preservation fails or is disabled via "efi=no-bgrt".

Thus, Add comments to clarify this behavior for future reference.

Signed-off-by: Soumyajyotii Ssarkar <soumyajyotisarkar23@gmail.com>
---
 xen/arch/x86/acpi/boot.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/xen/arch/x86/acpi/boot.c b/xen/arch/x86/acpi/boot.c
index 1ca2360e00..9462cc6195 100644
--- a/xen/arch/x86/acpi/boot.c
+++ b/xen/arch/x86/acpi/boot.c
@@ -327,6 +327,11 @@ static int __init cf_check acpi_parse_hpet(struct acpi_table_header *table)
 	return 0;
 }

+/*
+ * Invalidate BGRT if image is in conventional RAM (preservation failed).
+ * If preservation succeeded, image is in EfiACPIReclaimMemory, which
+ * won't match RAM_TYPE_CONVENTIONAL check, so table remains valid.
+ */
 static int __init cf_check acpi_invalidate_bgrt(struct acpi_table_header *table)
 {
 	struct acpi_table_bgrt *bgrt_tbl =
--
2.53.0
Re: [PATCH v2 2/3] x86/acpi: Clarify BGRT invalidation behavior with preservation
Posted by Jan Beulich 1 month ago
On 06.03.2026 14:29, Soumyajyotii Ssarkar wrote:
> Now that BGRT images are preserved during EFI boot (via
> EfiACPIReclaimMemory allocation), the invalidation code in
> acpi_parse_bgrt() is no longer needed.
> However, The original invalidation code acts as a safety net for when
> preservation fails or is disabled via "efi=no-bgrt".
> 
> Thus, Add comments to clarify this behavior for future reference.
> 
> Signed-off-by: Soumyajyotii Ssarkar <soumyajyotisarkar23@gmail.com>

Acked-by: Jan Beulich <jbeulich@suse.com>

I wonder though if this wasn't better folded into the earlier patch.

Jan