History

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>

Jan Beulich committed 4 years ago

Commit 335e4dd1 parent ce2f46f2 files · +11 −4Browse files

Unified · Split

2 files
  1. arch/x86/xen/vga.c +8 −4
  2. include/xen/interface/xen.h +3 −0
arch/x86/xen/vga.c+8−4
@@ -62,14 +62,18 @@ void __init xen_init_vga(const struct dom0_vga_console_info *info, size_t size) · 61 unmodified lines
6262 break;
6363 }
6464
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;
6965 if (size >= offsetof(struct dom0_vga_console_info,
7066 u.vesa_lfb.mode_attrs)
7167 + sizeof(info->u.vesa_lfb.mode_attrs))
7268 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+ }
7377 break;
7478 }
7579 }
include/xen/interface/xen.h+3−0
@@ -722,6 +722,9 @@ struct dom0_vga_console_info { · 721 unmodified lines
722722 uint32_t gbl_caps;
723723 /* Mode attributes (offset 0x0, VESA command 0x4f01). */
724724 uint16_t mode_attrs;
725+ uint16_t pad;
726+ /* high 32 bits of lfb_base */
727+ uint32_t ext_lfb_base;
725728 } vesa_lfb;
726729 } u;
727730 };