|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [xen staging] x86/platform: adjust CONFIG_VIDEO usage
commit 322c4e8fa27edca0d0e7131a1c0620259346e116
Author: Jan Beulich <jbeulich@xxxxxxxx>
AuthorDate: Wed Jan 14 14:49:39 2026 +0100
Commit: Jan Beulich <jbeulich@xxxxxxxx>
CommitDate: Wed Jan 14 14:49:39 2026 +0100
x86/platform: adjust CONFIG_VIDEO usage
Switch to using IS_ENABLED() in both places, thus in particular making
sure XENPF_get_dom0_console handling doesn't take the "default" path: The
behavior better wouldn't differ between VIDEO=y and there not being VGA vs
VIDEO=n. For this to work, fill_console_start_info() needs to be
unconditionally declared; extend that to vga_console_info as well.
Signed-off-by: Jan Beulich <jbeulich@xxxxxxxx>
Reviewed-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
---
xen/arch/x86/platform_hypercall.c | 21 +++++++++------------
xen/include/xen/vga.h | 3 ++-
2 files changed, 11 insertions(+), 13 deletions(-)
diff --git a/xen/arch/x86/platform_hypercall.c
b/xen/arch/x86/platform_hypercall.c
index 79bb99e0b6..214b130ea8 100644
--- a/xen/arch/x86/platform_hypercall.c
+++ b/xen/arch/x86/platform_hypercall.c
@@ -415,10 +415,9 @@ ret_t do_platform_op(
}
case XEN_FW_VBEDDC_INFO:
ret = -ESRCH;
-#ifdef CONFIG_VIDEO
- if ( op->u.firmware_info.index != 0 )
- break;
- if ( *(u32 *)bootsym(boot_edid_info) == 0x13131313 )
+ if ( !IS_ENABLED(CONFIG_VIDEO) ||
+ op->u.firmware_info.index != 0 ||
+ *(uint32_t *)bootsym(boot_edid_info) == 0x13131313 )
break;
op->u.firmware_info.u.vbeddc_info.capabilities =
@@ -434,7 +433,6 @@ ret_t do_platform_op(
copy_to_compat(op->u.firmware_info.u.vbeddc_info.edid,
bootsym(boot_edid_info), 128) )
ret = -EFAULT;
-#endif
break;
case XEN_FW_EFI_INFO:
ret = efi_get_info(op->u.firmware_info.index,
@@ -905,20 +903,19 @@ ret_t do_platform_op(
break;
}
-#ifdef CONFIG_VIDEO
case XENPF_get_dom0_console:
BUILD_BUG_ON(sizeof(op->u.dom0_console) > sizeof(op->u.pad));
- ret = sizeof(op->u.dom0_console);
- if ( !fill_console_start_info(&op->u.dom0_console) )
- {
- ret = -ENODEV;
+
+ ret = -ENODEV;
+ if ( !IS_ENABLED(CONFIG_VIDEO) ||
+ !fill_console_start_info(&op->u.dom0_console) )
break;
- }
+
+ ret = sizeof(op->u.dom0_console);
if ( copy_field_to_guest(u_xenpf_op, op, u.dom0_console) )
ret = -EFAULT;
break;
-#endif
default:
ret = -ENOSYS;
diff --git a/xen/include/xen/vga.h b/xen/include/xen/vga.h
index ceb8a527ed..43e6961b81 100644
--- a/xen/include/xen/vga.h
+++ b/xen/include/xen/vga.h
@@ -11,9 +11,10 @@
#include <xen/video.h>
-#ifdef CONFIG_VGA
extern struct xen_vga_console_info vga_console_info;
int fill_console_start_info(struct dom0_vga_console_info *ci);
+
+#ifdef CONFIG_VGA
void vesa_init(void);
void vesa_early_init(void);
void vesa_endboot(bool keep);
--
generated by git-patchbot for /home/xen/git/xen.git#staging
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |