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

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


  • To: Jan Beulich <jbeulich@xxxxxxxx>, Juergen Gross <jgross@xxxxxxxx>
  • From: Boris Ostrovsky <boris.ostrovsky@xxxxxxxxxx>
  • Date: Tue, 4 Jan 2022 11:50:21 -0500
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=oracle.com; dmarc=pass action=none header.from=oracle.com; dkim=pass header.d=oracle.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=LSm8/DUPSG8upHzgbhLPCuOe8t9rjy9hqhLqxbvM8hE=; b=VIMH7CnayEX9who4WX8IKm+Nv84hJc9v0P0vOM8umly6p4UthEvZJA/YWUKz6TwJo3rCRtoAq7i8eWA2V8jlEpfUIxtijWiILyoDkBaKl4hpvoEPAuqUCqthhqVj4gqrxPLY5ohAuZVKO2Bl1ypI2D4AdtF5xR+1imM98BoJZ0L3/WxtXaMaN8xErzZaAmHCnxEDylez6MI686nT72D0qIM/nCLiQcHkSGjYTVBqC1TL429Nxg0wBJUiroHpdcIB3h7kkDifbUiwNgUMl4/F2naQFWLS61FgTelQEFQPp+hZhjrpLoPcGB/XW+Ea0bw5o49cnUwUF9Fox2LJ1JN9yA==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=C30dSZPZMeuLPPMW+DSY98kQVJ+Got8zA48PXEi/5ZDffalFmy7RVhbSj77BHv3ecdG4g6QBvEkgYph8LKGLgociTWDE5FyRWDEFMlXYnNu204BmNwFfmad82m582Ry1P8KDctovzyLRp1nZPlz3vKY3wHJsZpSX3+ZT4MaM+2PON57VUjfEVW6XW4iz6IdtbE7VVu24CYObAHmc3Mv+x99j8WCa8i1NQgKNicL0Gur7mEF2PkPp8k9OStdJeTTAnpTg7Fs4LeuuD/1TQtTv/CoylISovJ38pG+JD7Cl7Xi2aGH/uHoSvMO7VYI2PAk4j6lsEAPYeVuNQLMgabMuIw==
  • Cc: "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>, lkml <linux-kernel@xxxxxxxxxxxxxxx>
  • Delivery-date: Tue, 04 Jan 2022 16:51:03 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>


On 1/4/22 3:46 AM, Jan Beulich wrote:
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))


Do we still need this test? All 4.0+ hypervisors will have mode_attrs.


-boris



                        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®.