[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH] xen/x86: obtain full video frame buffer address for Dom0 also under EFI


  • To: Juergen Gross <jgross@xxxxxxxx>, Boris Ostrovsky <boris.ostrovsky@xxxxxxxxxx>
  • From: Jan Beulich <jbeulich@xxxxxxxx>
  • Date: Mon, 7 Feb 2022 08:41:03 +0100
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=none; dmarc=none; dkim=none; arc=none
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=1+HZbSM2dItKwztAzlpbiDWHRe2tHjMxRwCxBvZmn8E=; b=ZOlVrvdGzjmBVsGE0ZyoX7odu3oM11wcG2clwxSezbc6cLVW+vQY0Yd5Vj9UfkZaXIEH7uVnu3fGFwb5qUFqSpxvQhcCrWVP1Ob50mnqfPP19d0mEngEoQ6qt1smRyS69IEiYdQSpJAcxa2ExjN1wpsEhpxj2f3qQyAHu+PIK+beOxc+YlpC3LKbOi54pujBcZnHWzx6KGQyzyoeuBHxXCeZC5I/OT8wzVG1iynOc3AHTPJpwkb+B+o3OzD0caYtOkxY2a7sjXPon6qfoWbPCzG150V+jESBu/GTBfdhQeFXbuNfJuiSNPbam7iYM/3FJAiDVMxB5tv6crLu/Y6HHA==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=e5it5mG5GmhPobwXX09dJe38scO/cySnSyBJz1kXP/uUcnrq6w2pJlay9WvSil3+Q/3wZGyeSuYhOQnoo8BF/K/cjHqI/bbzbRwD0i2AP6cICzBJCH/qvMsYeJpKl1W8yTOkaS1U7FcvtLnVG9vyM0shlcuv8rniRT5Tlhcbjpsfu/2LduxGmqZz36wzGLyhu30JumclGCtOKyTx6XVtbMBeLwwHJSx1hlBcc4PX4vyqlCzz4L4si23iTKZPgbt+9ulBgSMIyYgBGr8yERaKu2V4kIrPih9Pic44l1FejAX4xb/PPq8UIyHtiek2dq5MXgBnjXF0BgFjB62Kx31XZQ==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=suse.com;
  • Cc: "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>, lkml <linux-kernel@xxxxxxxxxxxxxxx>
  • Delivery-date: Mon, 07 Feb 2022 07:41:23 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

The initial change would not work when Xen was booted from EFI: There is
an early exit from the case block in that case. Move the necessary code
ahead of that.

Fixes: 335e4dd67b48 ("xen/x86: obtain upper 32 bits of video frame buffer 
address for Dom0")
Signed-off-by: Jan Beulich <jbeulich@xxxxxxxx>

--- a/arch/x86/xen/vga.c
+++ b/arch/x86/xen/vga.c
@@ -57,6 +57,14 @@ void __init xen_init_vga(const struct do
                screen_info->rsvd_size = info->u.vesa_lfb.rsvd_size;
                screen_info->rsvd_pos = info->u.vesa_lfb.rsvd_pos;
 
+               if (size >= offsetof(struct dom0_vga_console_info,
+                                    u.vesa_lfb.ext_lfb_base)
+                   + sizeof(info->u.vesa_lfb.ext_lfb_base)
+                   && info->u.vesa_lfb.ext_lfb_base) {
+                       screen_info->ext_lfb_base = 
info->u.vesa_lfb.ext_lfb_base;
+                       screen_info->capabilities |= 
VIDEO_CAPABILITY_64BIT_BASE;
+               }
+
                if (info->video_type == XEN_VGATYPE_EFI_LFB) {
                        screen_info->orig_video_isVGA = VIDEO_TYPE_EFI;
                        break;
@@ -66,14 +74,6 @@ void __init xen_init_vga(const struct do
                                     u.vesa_lfb.mode_attrs)
                    + sizeof(info->u.vesa_lfb.mode_attrs))
                        screen_info->vesa_attributes = 
info->u.vesa_lfb.mode_attrs;
-
-               if (size >= offsetof(struct dom0_vga_console_info,
-                                    u.vesa_lfb.ext_lfb_base)
-                   + sizeof(info->u.vesa_lfb.ext_lfb_base)
-                   && info->u.vesa_lfb.ext_lfb_base) {
-                       screen_info->ext_lfb_base = 
info->u.vesa_lfb.ext_lfb_base;
-                       screen_info->capabilities |= 
VIDEO_CAPABILITY_64BIT_BASE;
-               }
                break;
        }
 }




 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.