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

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


  • To: Juergen Gross <jgross@xxxxxxxx>, Boris Ostrovsky <boris.ostrovsky@xxxxxxxxxx>
  • From: Jan Beulich <jbeulich@xxxxxxxx>
  • Date: Tue, 4 Jan 2022 09:46:06 +0100
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=suse.com; dmarc=pass action=none header.from=suse.com; dkim=pass header.d=suse.com; 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=zig29lI0FBli9i07olSYzSOYhKOSKiw65K/bW14c/qA=; b=DfzCodLg3azEFy6mavgpOHRojIX7B0m1PXsleSRpKI826tPzIvT6Jn8hUQaU47p04BEN7tTipW/v5zqCchWe01qHdFNui/or8L7i0WzW1xsGcTMZHvBFbinoOcb6XXvO+0lpPoLUG9eFQkD44pjrhwBJi09YM3MSMf14B4UYSUdSwCryzAZb7dwyeMi3qntJ/aOEGKh7Gy7RPtCozLcPsYE6pO7GewBuNgxdcGqPKzCbKVV9e14161kFgeFbeswKC0NAblDikcGdE7CXr6N7th0cGEO8GZqQLCqz9BN7V+zu3bV31X9g4UFo/TnllGaHPj67vFCjh4yVzZR7RUC1bQ==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=iItbHmjXrUL3FCXQ+Uow5VCtgmP0N8kaRb2bBh3bwXoxtOnAcDQIvc3ga/ev9oCoZ7eTjG56QNuocAmAOJAmTU5LpW6GjrimP8W4Dhf8tTLzaXi9y5ICdH+521jm9uhg5nl2uOr19agBQpcyeL6/6aYK7BCuQhAUJLxcwnYNP9yvrBJE48q4Poei9jC5NYYQLpEVoeozEpVu0h+nj/CPa0vqRuUd4Kaj03jxSERNt6q0zerskP7a4Lfny2bhKiR+d8hk67cSFrswaz1rDllT7StrxDebxIs40884ywDCCrK+xWnwmQlWoZv+Bpql0+zoiA2LSBtj/7YxisaqZcQmUQ==
  • 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: Tue, 04 Jan 2022 08:46:20 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

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@xxxxxxxx>

--- a/arch/x86/xen/vga.c
+++ b/arch/x86/xen/vga.c
@@ -63,13 +63,17 @@ void __init xen_init_vga(const struct do
                }
 
                if (size >= offsetof(struct dom0_vga_console_info,
-                                    u.vesa_lfb.gbl_caps)
-                   + sizeof(info->u.vesa_lfb.gbl_caps))
-                       screen_info->capabilities = info->u.vesa_lfb.gbl_caps;
-               if (size >= offsetof(struct dom0_vga_console_info,
                                     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;
        }
 }
--- a/include/xen/interface/xen.h
+++ b/include/xen/interface/xen.h
@@ -722,6 +722,9 @@ struct dom0_vga_console_info {
                        uint32_t gbl_caps;
                        /* Mode attributes (offset 0x0, VESA command 0x4f01). */
                        uint16_t mode_attrs;
+                       uint16_t pad;
+                       /* high 32 bits of lfb_base */
+                       uint32_t ext_lfb_base;
                } vesa_lfb;
        } u;
 };




 


Rackspace

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