efi: avoid error message when booting under Xen
Subsystems (3)
PATCH 1/1 efi: avoid error message when booting under Xen
efifb_probe() will issue an error message in case the kernel is booted as Xen dom0 from UEFI as EFI_MEMMAP won't be set in this case. Avoid that message by calling efi_mem_desc_lookup() only if EFI_PARAVIRT isn't set.
--- drivers/video/fbdev/efifb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/video/fbdev/efifb.c +1 -1
@@ -453,7 +453,7 @@ static int efifb_probe(struct platform_device *dev) info->apertures->ranges[0 ].base = efifb_fix.smem_start; info->apertures->ranges[0 ].size = size_remap; -if (efi_enabled (EFI_BOOT ) && +if (efi_enabled (EFI_BOOT ) && !efi_enabled (EFI_PARAVIRT ) && !efi_mem_desc_lookup (efifb_fix.smem_start, &md)) {if ((efifb_fix.smem_start + efifb_fix.smem_len) > (md.phys_addr + (md.num_pages <<EFI_PAGE_SHIFT ))) {
Signature · 1 line
2.26.2
Ping?
Quoted 25 lines · Juergen Gross
efifb_probe()will issue an error message in case the kernel is booted as Xen dom0 from UEFI asEFI_MEMMAPwon't be set in this case. Avoid that message by callingefi_mem_desc_lookup()only ifEFI_PARAVIRTisn't set.Fixes 38ac0287b7f4 ("fbdev/efifb: Honour UEFI memory map attributes when mapping the FB")Signed-off-by Juergen Gross <[email protected]>--- drivers/video/fbdev/efifb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/video/fbdev/efifb.c +1
-1@@ -453,7 +453,7 @@ static int efifb_probe(struct platform_device *dev) info->apertures->ranges[0 ].base = efifb_fix.smem_start; info->apertures->ranges[0 ].size = size_remap; -if (efi_enabled (EFI_BOOT ) && +if (efi_enabled (EFI_BOOT ) && !efi_enabled (EFI_PARAVIRT ) && !efi_mem_desc_lookup (efifb_fix.smem_start, &md)) {if ((efifb_fix.smem_start + efifb_fix.smem_len) > (md.phys_addr + (md.num_pages <<EFI_PAGE_SHIFT ))) {
Quoted 15 lines · Jürgen Groß
Ping?
Quoted 12 lines · Juergen Gross
efifb_probe()will issue an error message in case the kernel is booted as Xen dom0 from UEFI asEFI_MEMMAPwon't be set in this case. Avoid that message by callingefi_mem_desc_lookup()only ifEFI_PARAVIRTisn't set.Fixes 38ac0287b7f4 ("fbdev/efifb: Honour UEFI memory map attributeswhen mapping the FB")
Signed-off-by Juergen Gross <[email protected]>---
drivers/video/fbdev/efifb.c| 2 +-1 file changed, 1 insertion(+), 1 deletion(-)
Quoted 14 lines
Quoted 10 lines
drivers/video/fbdev/efifb.c +1
-1@@ -453,7 +453,7 @@ static int efifb_probe(struct platform_device *dev) info->apertures->ranges[0].base = efifb_fix.smem_start; info->apertures->ranges[0].size = size_remap; - if (efi_enabled(EFI_BOOT) && + if (efi_enabled(EFI_BOOT) && !efi_enabled(EFI_PARAVIRT) && !efi_mem_desc_lookup(efifb_fix.smem_start, &md)) {Quoted 3 lines
if ((efifb_fix.smem_start + efifb_fix.smem_len) > (md.phys_addr + (md.num_pages <<
EFI_PAGE_SHIFT))) {
In case I see no reaction from the maintainer for another week I'll take this patch through the Xen tree.
Juergen
Bartlomiej Zolnierkiewicz
Acked-by[ added EFI Maintainer & ML to Cc: ]
Hi,
Quoted 30 lines · Jürgen Groß
Quoted 14 lines · Jürgen Groß
Ping?
Quoted 11 lines · Juergen Gross
efifb_probe()will issue an error message in case the kernel is booted as Xen dom0 from UEFI asEFI_MEMMAPwon't be set in this case. Avoid that message by callingefi_mem_desc_lookup()only ifEFI_PARAVIRTisn't set.Fixes 38ac0287b7f4 ("fbdev/efifb: Honour UEFI memory map attributes when mapping the FB")Signed-off-by Juergen Gross <[email protected]>---
drivers/video/fbdev/efifb.c| 2 +-1 file changed, 1 insertion(+), 1 deletion(-)Quoted 14 lines
Quoted 10 lines
drivers/video/fbdev/efifb.c +1
-1@@ -453,7 +453,7 @@ static int efifb_probe(struct platform_device *dev) info->apertures->ranges[0].base = efifb_fix.smem_start; info->apertures->ranges[0].size = size_remap; - if (efi_enabled(EFI_BOOT) && + if (efi_enabled(EFI_BOOT) && !efi_enabled(EFI_PARAVIRT) && !efi_mem_desc_lookup(efifb_fix.smem_start, &md)) {Quoted 3 lines
if ((efifb_fix.smem_start + efifb_fix.smem_len) > (md.phys_addr + (md.num_pages <<
EFI_PAGE_SHIFT))) {
Quoted 2 lines
In case I see no reaction from the maintainer for another week I'll take this patch through the Xen tree.
From fbdev POV this change looks fine to me and I'm OK with merging it through Xen or EFI tree:
Best regards,
--
Bartlomiej Zolnierkiewicz
Samsung R&D Institute Poland
Samsung Electronics
Ard Biesheuvel
maintainerQuoted 16 lines · Bartlomiej Zolnierkiewicz
[ added EFI Maintainer & ML to Cc: ]
Hi,
Quoted 9 lines · Jürgen Groß
Quoted 8 lines · Jürgen Groß
Ping?
Quoted 5 lines · Juergen Gross
efifb_probe()will issue an error message in case the kernel is booted as Xen dom0 from UEFI asEFI_MEMMAPwon't be set in this case. Avoid that message by callingefi_mem_desc_lookup()only ifEFI_PARAVIRTisn't set.
Why not test for EFI_MEMMAP instead of EFI_BOOT?
Quoted 34 lines
Quoted 21 lines
Quoted 6 lines
Quoted 6 lines
Fixes 38ac0287b7f4 ("fbdev/efifb: Honour UEFI memory map attributes when mapping the FB")Signed-off-by Juergen Gross <[email protected]>--- drivers/video/fbdev/efifb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)Quoted 14 lines
drivers/video/fbdev/efifb.c static int efifb_probe(struct platform_device *dev) · line 459
Quoted 13 lines
drivers/video/fbdev/efifb.c +1
-1@@ -453,7 +453,7 @@ static int efifb_probe(struct platform_device *dev) info->apertures->ranges[0 ].base = efifb_fix.smem_start; info->apertures->ranges[0 ].size = size_remap; -if (efi_enabled (EFI_BOOT ) && +if (efi_enabled (EFI_BOOT ) && !efi_enabled (EFI_PARAVIRT ) && !efi_mem_desc_lookup (efifb_fix.smem_start, &md)) {if ((efifb_fix.smem_start + efifb_fix.smem_len) > (md.phys_addr + (md.num_pages <<EFI_PAGE_SHIFT ))) {Quoted 2 lines
In case I see no reaction from the maintainer for another week I'll take this patch through the Xen tree.
From fbdev POV this change looks fine to me and I'm OK with merging it through Xen or EFI tree:
Best regards,
--
Bartlomiej Zolnierkiewicz
Samsung R&D Institute Poland
Samsung Electronics
Quoted 12 lines · Ard Biesheuvel
Quoted 10 lines · Bartlomiej Zolnierkiewicz
[ added EFI Maintainer & ML to Cc: ]
Hi,
Quoted 3 lines · Jürgen Groß
Quoted 2 lines · Jürgen Groß
Ping?
Quoted 8 lines
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines · Juergen Gross
Quoted 5 lines
efifb_probe()will issue an error message in case the kernel is booted as Xen dom0 from UEFI asEFI_MEMMAPwon't be set in this case. Avoid that message by callingefi_mem_desc_lookup()only ifEFI_PARAVIRTisn't set.Why not test for
EFI_MEMMAPinstead ofEFI_BOOT?
Honestly I'm not sure EFI_BOOT is always set in that case. If you tell me it is fine to just replace the test to check for EFI_MEMMAP I'm fine to modify my patch.
Juergen
Ard Biesheuvel
maintainerQuoted 21 lines · Jürgen Groß
Quoted 19 lines · Ard Biesheuvel
Quoted 16 lines · Bartlomiej Zolnierkiewicz
[ added EFI Maintainer & ML to Cc: ]
Hi,
Quoted 9 lines · Jürgen Groß
Quoted 8 lines · Jürgen Groß
Ping?
Quoted 5 lines · Juergen Gross
efifb_probe()will issue an error message in case the kernel is booted as Xen dom0 from UEFI asEFI_MEMMAPwon't be set in this case. Avoid that message by callingefi_mem_desc_lookup()only ifEFI_PARAVIRTisn't set.
Quoted 6 lines
Quoted 1 line
Why not test for
EFI_MEMMAPinstead ofEFI_BOOT?Honestly I'm not sure
EFI_BOOTis always set in that case. If you tell me it is fine to just replace the test to check forEFI_MEMMAPI'm fine to modify my patch.
Yes please