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

xen/x86: obtain upper 32 bits of video frame buffer address for Dom0

The hypervisor has been supplying this information for a couple of major
releases. Make use of it. The need to set a flag in the capabilities
field also points out that the prior setting of that field from the
hypervisor interface's gbl_caps one was wrong, so that code gets deleted
(there's also no equivalent of this in native boot code).

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Reviewed-by: Boris Ostrovsky <boris.ostrovsky@oracle.com>

Link: https://lore.kernel.org/r/a3df8bf3-d044-b7bb-3383-cd5239d6d4af@suse.com
Signed-off-by: Juergen Gross <jgross@suse.com>

authored by

Jan Beulich and committed by
Juergen Gross
335e4dd6 ce2f46f3

+11 -4
+8 -4
arch/x86/xen/vga.c
··· 63 63 } 64 64 65 65 if (size >= offsetof(struct dom0_vga_console_info, 66 - u.vesa_lfb.gbl_caps) 67 - + sizeof(info->u.vesa_lfb.gbl_caps)) 68 - screen_info->capabilities = info->u.vesa_lfb.gbl_caps; 69 - if (size >= offsetof(struct dom0_vga_console_info, 70 66 u.vesa_lfb.mode_attrs) 71 67 + sizeof(info->u.vesa_lfb.mode_attrs)) 72 68 screen_info->vesa_attributes = info->u.vesa_lfb.mode_attrs; 69 + 70 + if (size >= offsetof(struct dom0_vga_console_info, 71 + u.vesa_lfb.ext_lfb_base) 72 + + sizeof(info->u.vesa_lfb.ext_lfb_base) 73 + && info->u.vesa_lfb.ext_lfb_base) { 74 + screen_info->ext_lfb_base = info->u.vesa_lfb.ext_lfb_base; 75 + screen_info->capabilities |= VIDEO_CAPABILITY_64BIT_BASE; 76 + } 73 77 break; 74 78 } 75 79 }
+3
include/xen/interface/xen.h
··· 722 722 uint32_t gbl_caps; 723 723 /* Mode attributes (offset 0x0, VESA command 0x4f01). */ 724 724 uint16_t mode_attrs; 725 + uint16_t pad; 726 + /* high 32 bits of lfb_base */ 727 + uint32_t ext_lfb_base; 725 728 } vesa_lfb; 726 729 } u; 727 730 };