Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

x86/PVH: obtain VGA console info in Dom0

A new platform-op was added to Xen to allow obtaining the same VGA
console information PV Dom0 is handed. Invoke the new function and have
the output data processed by xen_init_vga().

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Reviewed-by: Juergen Gross <jgross@suse.com>

Link: https://lore.kernel.org/r/8f315e92-7bda-c124-71cc-478ab9c5e610@suse.com
Signed-off-by: Juergen Gross <jgross@suse.com>

authored by

Jan Beulich and committed by
Juergen Gross
934ef33e 99a7bcaf

+25 -8
+1 -1
arch/x86/xen/Makefile
··· 45 45 46 46 obj-$(CONFIG_XEN_DEBUG_FS) += debugfs.o 47 47 48 - obj-$(CONFIG_XEN_PV_DOM0) += vga.o 48 + obj-$(CONFIG_XEN_DOM0) += vga.o 49 49 50 50 obj-$(CONFIG_XEN_EFI) += efi.o
+2 -1
arch/x86/xen/enlighten_pv.c
··· 1389 1389 1390 1390 x86_platform.set_legacy_features = 1391 1391 xen_dom0_set_legacy_features; 1392 - xen_init_vga(info, xen_start_info->console.dom0.info_size); 1392 + xen_init_vga(info, xen_start_info->console.dom0.info_size, 1393 + &boot_params.screen_info); 1393 1394 xen_start_info->console.domU.mfn = 0; 1394 1395 xen_start_info->console.domU.evtchn = 0; 1395 1396
+13
arch/x86/xen/enlighten_pvh.c
··· 43 43 x86_init.oem.banner = xen_banner; 44 44 45 45 xen_efi_init(boot_params); 46 + 47 + if (xen_initial_domain()) { 48 + struct xen_platform_op op = { 49 + .cmd = XENPF_get_dom0_console, 50 + }; 51 + long ret = HYPERVISOR_platform_op(&op); 52 + 53 + if (ret > 0) 54 + xen_init_vga(&op.u.dom0_console, 55 + min(ret * sizeof(char), 56 + sizeof(op.u.dom0_console)), 57 + &boot_params->screen_info); 58 + } 46 59 } 47 60 48 61 void __init mem_map_via_hcall(struct boot_params *boot_params_p)
+2 -3
arch/x86/xen/vga.c
··· 9 9 10 10 #include "xen-ops.h" 11 11 12 - void __init xen_init_vga(const struct dom0_vga_console_info *info, size_t size) 12 + void __init xen_init_vga(const struct dom0_vga_console_info *info, size_t size, 13 + struct screen_info *screen_info) 13 14 { 14 - struct screen_info *screen_info = &boot_params.screen_info; 15 - 16 15 /* This is drawn from a dump from vgacon:startup in 17 16 * standard Linux. */ 18 17 screen_info->orig_video_mode = 3;
+4 -3
arch/x86/xen/xen-ops.h
··· 108 108 109 109 struct dom0_vga_console_info; 110 110 111 - #ifdef CONFIG_XEN_PV_DOM0 112 - void __init xen_init_vga(const struct dom0_vga_console_info *, size_t size); 111 + #ifdef CONFIG_XEN_DOM0 112 + void __init xen_init_vga(const struct dom0_vga_console_info *, size_t size, 113 + struct screen_info *); 113 114 #else 114 115 static inline void __init xen_init_vga(const struct dom0_vga_console_info *info, 115 - size_t size) 116 + size_t size, struct screen_info *si) 116 117 { 117 118 } 118 119 #endif
+3
include/xen/interface/platform.h
··· 483 483 }; 484 484 DEFINE_GUEST_HANDLE_STRUCT(xenpf_symdata); 485 485 486 + #define XENPF_get_dom0_console 64 487 + 486 488 struct xen_platform_op { 487 489 uint32_t cmd; 488 490 uint32_t interface_version; /* XENPF_INTERFACE_VERSION */ ··· 508 506 struct xenpf_mem_hotadd mem_add; 509 507 struct xenpf_core_parking core_parking; 510 508 struct xenpf_symdata symdata; 509 + struct dom0_vga_console_info dom0_console; 511 510 uint8_t pad[128]; 512 511 } u; 513 512 };