From patchwork Wed Nov 23 15:45:20 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Roger_Pau_Monn=C3=A9?= X-Patchwork-Id: 13053883 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id DCB7CC433FE for ; Wed, 23 Nov 2022 15:46:09 +0000 (UTC) Received: from list by lists.xenproject.org with outflank-mailman.447633.704085 (Exim 4.92) (envelope-from ) id 1oxrwa-0000IH-SQ; Wed, 23 Nov 2022 15:45:48 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 447633.704085; Wed, 23 Nov 2022 15:45:48 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1oxrwa-0000IA-Pl; Wed, 23 Nov 2022 15:45:48 +0000 Received: by outflank-mailman (input) for mailman id 447633; Wed, 23 Nov 2022 15:45:47 +0000 Received: from se1-gles-sth1-in.inumbo.com ([159.253.27.254] helo=se1-gles-sth1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1oxrwZ-0008Tc-2G for xen-devel@lists.xenproject.org; Wed, 23 Nov 2022 15:45:47 +0000 Received: from esa3.hc3370-68.iphmx.com (esa3.hc3370-68.iphmx.com [216.71.145.155]) by se1-gles-sth1.inumbo.com (Halon) with ESMTPS id e3846b7b-6b45-11ed-91b6-6bf2151ebd3b; Wed, 23 Nov 2022 16:45:45 +0100 (CET) Received: from mail-mw2nam04lp2177.outbound.protection.outlook.com (HELO NAM04-MW2-obe.outbound.protection.outlook.com) ([104.47.73.177]) by ob1.hc3370-68.iphmx.com with ESMTP/TLS/ECDHE-RSA-AES128-GCM-SHA256; 23 Nov 2022 10:45:41 -0500 Received: from SJ0PR03MB6360.namprd03.prod.outlook.com (2603:10b6:a03:395::11) by DM4PR03MB6935.namprd03.prod.outlook.com (2603:10b6:8:47::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5834.15; Wed, 23 Nov 2022 15:45:39 +0000 Received: from SJ0PR03MB6360.namprd03.prod.outlook.com ([fe80::740b:4e0a:7de4:5ab1]) by SJ0PR03MB6360.namprd03.prod.outlook.com ([fe80::740b:4e0a:7de4:5ab1%7]) with mapi id 15.20.5834.015; Wed, 23 Nov 2022 15:45:39 +0000 X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" X-Inumbo-ID: e3846b7b-6b45-11ed-91b6-6bf2151ebd3b DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=citrix.com; s=securemail; t=1669218344; h=from:to:cc:subject:date:message-id:in-reply-to: references:content-transfer-encoding:mime-version; bh=IvQbbGWxta8BOU6NuWUtOzHVaS0IfJ/5pqW/Sjjha+0=; b=ZT9Z2ehWaxW/+tnNR+EqLjE2wgqJa7bHpvKDYbpUDgWHmmQGwBruOJh7 MT+6ox1ad0Q/JSxzpsS4hxynOor/srNzQyGpH5X/JATjGZaZ+gYlyHc/C ExeePRAXwDNwPRp+QpH0cBCAPQAdCGq/GinOHMeId9bNhRYr/k+rdvEoH I=; X-IronPort-RemoteIP: 104.47.73.177 X-IronPort-MID: 85425892 X-IronPort-Reputation: None X-IronPort-Listener: OutboundMail X-IronPort-SenderGroup: RELAY_O365 X-IronPort-MailFlowPolicy: $RELAYED IronPort-Data: A9a23:H92EDa1erck4eEgpcfbD5T1wkn2cJEfYwER7XKvMYLTBsI5bp2ME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bnmJE42igYy5LrF4sP+tFKH PQ3LswmxOQPVAsKuirDHgMWObO4/XNiZLdeBYDQzI39QWUijusybjiVzyVxA0XXT9jyaortT GtqX2y2oyT99WAjjPM3W7a6Jpb3PPn19t4HcSJzuQFNzn2jQ6sRYJ5H5mPpio8ru2D4Esj1P PMvxAjFcJu7G65RBD/nTLdny3blBo+4X7rzlGVxVPlvMzCXTo/T+5Mn5hQfBf141cp+IgU6t MC40up875sST/QliX04NbFEzlsi0qPuHIn1coelWZWX4cyYKJY6aYf4ERWOpEdGz+S0vFvLM BeSOXnoNpGe1KTaH7U+kFp3dyXR3w2WiyLR0AT0/blpgR+rTRc9Q811cYflnAP+NYWUJ9f/d nJNaxuifVnUtIWRbgVPpZOfeKHTkj2BT7cOmObJlrqUIsdPWjWlpLx6LIpoMm3ZZ0zyocokp ipaiIWiYcLQTOvNSSy5uwJzviUK1/NHwgFi/suq6SRg4eMBYYCaka4ORUTe8jJmYRsPiSUYY f2BHtsOY6SEYLfI/c24+TAYegiFZBnarxyhj8aYSP7niuZEPycisXrNNDuGZHKLREIHkvCP1 prZkmBGCwH1DHnZkPF X-IronPort-AV: E=Sophos;i="5.96,187,1665460800"; d="scan'208";a="85425892" ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=bJNNP/A1EP399rVzYLncv4RFnxE5LnSEYxAokaCTDBcy6AhGDZeJSThiX9gZEnJh/G55wqsdfnAszO46o+s0qWaCbYlYutPa8PpJpPNZLOxMxpVF11I4qDWf/lVDdB9xY6NZPsOBG+Mx/UnVibihZhR1nkgxAW+VfQHnrSa3VdNHU80CTfI4/nKLC8qonoww2yLaZbrPZ+b7nYH8cLbzRWQMPhiZ8gfiRrMEDJ0R7Ku4UqlPEi0wKrRNwD2LREkMkXV+ZmRdA7nMc1Q4e5OfZR4bojHasMMEqPiDwtPjoYgVDC7Zp5BNlLGO1PRU4IFo4uGuIh9uWKS992G6JPGT1w== 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=ijoTp2u9ZjfF4M3JsrM4RqHyGjKHHh5FQnpmKT5pXL8=; b=WVRIw6Bwn9wABibvjF5Bt1sF9UyvmyoN4s/n+G81aocW9xuKHA4IIwm1kX1qmy7ldX3efpBPkfhcSZbeN5PJNx8v3UdyBQ/8ElrsHDhvwHD83qKvn6qCB3hHpzPHgdzt3JS3Vwk9w516zFhilaVrtc7Ummbr9SfQdHANfOz0SG/TK6DWeDIDiHSDzCwpyMoA0KhMSz9T2nJvsM8vyVEirbGT+XtujJV0CK+0MjjPap5a2UYRzyGeQSk5WyNI1RMESFH/5GjiYsgn5cz6W0h8LLOfUOr+2QjKzABpHJ0K/CuVNrimx7I84TAcUfc7rEd3RNdVa9zDvoGbeyjmYLqIzQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=citrix.com; dmarc=pass action=none header.from=citrix.com; dkim=pass header.d=citrix.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=citrix.onmicrosoft.com; s=selector2-citrix-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=ijoTp2u9ZjfF4M3JsrM4RqHyGjKHHh5FQnpmKT5pXL8=; b=jRxKeSP3Gl+fmWAwE4+FF3vbTY6zG9fDjDC63OXgbAdmMxPopD5jaCNDbeD12NttSrdvtvFSOp2L20tXGM30UhqUrmmUUn6KsXIjfChsJ3+fut7ZN2inTUfpzsxLYHQtgT9hvQZnBEKRr38meqcHhrk6NPGa1PVkDo0zzdLdbzg= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=citrix.com; From: Roger Pau Monne To: xen-devel@lists.xenproject.org Cc: marmarek@invisiblethingslab.com, Roger Pau Monne , Jan Beulich , Andrew Cooper , Wei Liu , George Dunlap , Julien Grall , Stefano Stabellini Subject: [PATCH 1/5] x86/platform: introduce hypercall to get initial video console settings Date: Wed, 23 Nov 2022 16:45:20 +0100 Message-Id: <20221123154525.63068-2-roger.pau@citrix.com> X-Mailer: git-send-email 2.37.3 In-Reply-To: <20221123154525.63068-1-roger.pau@citrix.com> References: <20221123154525.63068-1-roger.pau@citrix.com> X-ClientProxiedBy: LO4P123CA0534.GBRP123.PROD.OUTLOOK.COM (2603:10a6:600:2c5::19) To SJ0PR03MB6360.namprd03.prod.outlook.com (2603:10b6:a03:395::11) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SJ0PR03MB6360:EE_|DM4PR03MB6935:EE_ X-MS-Office365-Filtering-Correlation-Id: 1c6fcbc1-6e5d-4547-8d5e-08dacd69c52c X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: EYHDaoyi020U3R0Vs3XR2TVA7oK3rE2HaB7ZdMmIEbV4D93tVl/nZU69nKdrOd/BVtWyFqlNOQvBfPhNsaj2DZUyh5BTDDUa0NWF8uMpxWtAemDfJWyDteAHphW8/QNaBHDoo/zTI3TUt3MLoDCLy45D4p/cg7grmqD7GQG4PAJ1kasAXX5gy2AERcaz8WwS+xgMUyw1EtjR+mnAnLWmU/7bs+Gd7Ucvds0zh9Zqm63q3LCeaDd0aDiUPJmLea2JlrCChrTtMoH+qFeIpjaUZ59CwjeCesXd1WCQewVccr36bQrHvIpv8KA2RZXcLW2to7sBKMn8u6/oTfkCZV/YmT0kviQ2+BfLrILJcNanuniMwPr8dlPCbjn/E2kYJTPfwK3HLuU+/kPnUZwnynarDn5Stc4wdjmubqoaZrKMSs6CA4GOG3TnimlV5KmhYeuLB/TrIp/rkqxmYuB/l0+2WpfxaGfpRV3MSNGvl4A04ALa5VZAYxXIwpAo197BIzhw7S7qti9dV9oWSyWnslzlLXlfVh0hBLJEJvRmMhX5+NxY7rl12lEMTkTPKdVPqkTuGDchZ8G7lyrpU1ucNMXSMxNROTgau2DMuuo2nnFHPHWnMDhSFfOTKMqWh6BJF87uq5pP2q66RMrCmUqko7Cy7g== X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:SJ0PR03MB6360.namprd03.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230022)(4636009)(136003)(376002)(39860400002)(396003)(346002)(366004)(451199015)(36756003)(86362001)(41300700001)(66556008)(66946007)(316002)(66476007)(4326008)(8676002)(82960400001)(38100700002)(6486002)(83380400001)(54906003)(6916009)(478600001)(186003)(2906002)(5660300002)(8936002)(6506007)(2616005)(1076003)(26005)(6512007)(6666004);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?xacX7CkSOqnKbRCQj00nUdLPqQJ2?= =?utf-8?q?D3C1Ifn13Cio1G+TmtGv5d93iM3I4IASmtEJmhF0GiLSoG2q3iIFUdYRpYhfhoPPz?= =?utf-8?q?Kr0qh3l20IZoA2tZtSVbqaVAWWrSIYTPt9PQ5gA172IREN7c4fRpentrRINLYw5pG?= =?utf-8?q?Ww8zBNwA5xYvNBZHJi6oIecgSIpkckiVIoj8DIG5qXKlER0evbQSi5IGciqVxgcJC?= =?utf-8?q?f/c6eygumYP8xan50fJEkx0aACeijB8B5dFfv/1FsP43DOyCVSQGzAKAOPvgxHhN9?= =?utf-8?q?y1HBsp3h0mVq/3ZarO6WHa82j8OTLHDzCP4bjmnjg8bp3FC1qg14yg/k1ouevgjDC?= =?utf-8?q?2rD5wEvrs3ocW0a4oWzeLqrXG57A2d+qy/OomlLsmQqy4raT27cOuav07oAFC8SMP?= =?utf-8?q?I8RlkV5iMHhWrIxf7jsTUrZpt5ivyIN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55hsHoiS+OCBNucGCX3LQqv?= =?utf-8?q?eDELRBEdQQVjoaiJGyx6xVN6AfRNddHpfN65hMnN7gAfBM3c4Nw2nFIONto+A2oXa?= =?utf-8?q?CnNtq2bDefFzHD+eTTIBvT+rYr7pDwOaLiYDtawneLFTYyK67wmKT9/X9Vt3tlK2Z?= =?utf-8?q?TK/vfz6+RugLNzutKuR3m1FYiwQNKcG3jzawXUpgtj3E7IR7OAGHnjHo4IPcQ1xRq?= =?utf-8?q?Mdxl8muPwlPQ?= X-MS-Exchange-AntiSpam-ExternalHop-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-ExternalHop-MessageData-0: =?utf-8?q?CiWIHElLHMBNysUU?= =?utf-8?q?1VzjBGyub7hm0/i5WRcJIpLputCx7/ki5OAQLU941w+dEGxMSjlBCPo4KefrlIoR9?= =?utf-8?q?C4YhPu6SFZOOaonTmViRqN62HcYU+3aZ/GdXHe4UEexh5nnrXLglPd0DV00oZjxNc?= =?utf-8?q?Cu6dQefEn06XumTgrmVHQ1lZUoyDl+t6KyNNsthiRG3dD7YKYMTwVYD79jET0ExsI?= =?utf-8?q?TcrJgojiIq+rfak3umyWDXype9ieiKYHHtxUp7wYEKh3A74cZahrg94uBp2LER4L1?= =?utf-8?q?MaDmn0FOz2MO2Zm27Up0sGyGTzpvGJDDEaa3HKKw4hS8fFfnmydAYthPQqvtP4UtM?= =?utf-8?q?wggVZjV5dVHC7PEF4fn9a3ff2Vm1fmc9hk8BF6CVL690pef+llyAqYy3xW+dwAbYa?= =?utf-8?q?BkRYmIA56PboXqEwrFyanGndrANRxFwwT3tfl+fnwzHZ1tKFYSBnQ4YOatEBFoTE5?= =?utf-8?q?0nCKuDTCjp9Zqs7Edim3dkGi7nu07iuS6lJZq0kwGKbj179/ljs9xleRsMn38Y/6y?= =?utf-8?q?O+GCMbSWkeZpNH/c3pq9B0vNRTwzC+5TvjbjCTgMgWHnW1Gnu0tHHCrJQhbRJc/1A?= =?utf-8?q?EeGU1KuNK67/XAE/MwrbPr8UtBvxZiqDMBu89jkBsZupKGRiUNx+HjtJDy7hxnWxx?= =?utf-8?q?XGde94CQWCX/Aq6qVLfRTPUpEht+7PnQJfaHucocaG2HnffD9yW7SYr8PhQJVSVNN?= =?utf-8?q?oAXl5BeONfX18FWGeRwUmf8uEOynrGA4e3OosXfApwQi1c8QOaqbUePAFOtIciZlI?= =?utf-8?q?gP6F/3XE+lfXu/CWSaOduMyc73j/koGVMC2/d7rcb5tcOWvNeD1sGnYG335Q5aEGQ?= =?utf-8?q?q7w9jzUpqt/enhSQ8wzcbjkGM5oNPepfbXNjI5xkIkLiOWhC4YrqxVAr+ds5zjXks?= =?utf-8?q?wogKtoqhp2VQn1W81GJq1GOsHwctiPvY+b?= X-OriginatorOrg: citrix.com X-MS-Exchange-CrossTenant-Network-Message-Id: 1c6fcbc1-6e5d-4547-8d5e-08dacd69c52c X-MS-Exchange-CrossTenant-AuthSource: SJ0PR03MB6360.namprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 23 Nov 2022 15:45:39.2137 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 335836de-42ef-43a2-b145-348c2ee9ca5b X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: 6ZrmzDV8EVFYEjS9rROJ+VFh9NztKUJCrrOQ2DyLtgirDyN+gSwDbnbGWGX52HW7zrIrcUNzjndy67GcN5RO0A== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM4PR03MB6935 This is required so PVH dom0 can get the initial video console state as handled by Xen. PV dom0 will get this as part of the start_info, but it doesn't seem necessary to place such information in the HVM start info. Signed-off-by: Roger Pau Monné Reviewed-by: Jan Beulich --- xen/arch/x86/platform_hypercall.c | 11 +++++++++++ xen/drivers/video/vga.c | 2 +- xen/include/public/platform.h | 6 ++++++ 3 files changed, 18 insertions(+), 1 deletion(-) diff --git a/xen/arch/x86/platform_hypercall.c b/xen/arch/x86/platform_hypercall.c index a7341dc3d7..3f0d0389af 100644 --- a/xen/arch/x86/platform_hypercall.c +++ b/xen/arch/x86/platform_hypercall.c @@ -839,6 +839,17 @@ ret_t do_platform_op( } break; + case XENPF_get_dom0_console: + if ( !fill_console_start_info(&op->u.dom0_console) ) + { + ret = -ENODEV; + break; + } + + if ( copy_field_to_guest(u_xenpf_op, op, u.dom0_console) ) + ret = -EFAULT; + break; + default: ret = -ENOSYS; break; diff --git a/xen/drivers/video/vga.c b/xen/drivers/video/vga.c index 29a88e8241..0a03508bee 100644 --- a/xen/drivers/video/vga.c +++ b/xen/drivers/video/vga.c @@ -205,7 +205,7 @@ static void cf_check vga_text_puts(const char *s, size_t nr) } } -int __init fill_console_start_info(struct dom0_vga_console_info *ci) +int fill_console_start_info(struct dom0_vga_console_info *ci) { memcpy(ci, &vga_console_info, sizeof(*ci)); return 1; diff --git a/xen/include/public/platform.h b/xen/include/public/platform.h index 5e1494fe9a..14784dfa77 100644 --- a/xen/include/public/platform.h +++ b/xen/include/public/platform.h @@ -605,6 +605,11 @@ struct xenpf_symdata { typedef struct xenpf_symdata xenpf_symdata_t; DEFINE_XEN_GUEST_HANDLE(xenpf_symdata_t); +/* Fetch the video console information and mode setup by Xen. */ +#define XENPF_get_dom0_console 64 +typedef struct dom0_vga_console_info xenpf_dom0_console_t; +DEFINE_XEN_GUEST_HANDLE(xenpf_dom0_console_t); + /* * ` enum neg_errnoval * ` HYPERVISOR_platform_op(const struct xen_platform_op*); @@ -635,6 +640,7 @@ struct xen_platform_op { xenpf_core_parking_t core_parking; xenpf_resource_op_t resource_op; xenpf_symdata_t symdata; + xenpf_dom0_console_t dom0_console; uint8_t pad[128]; } u; }; From patchwork Wed Nov 23 15:45:21 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Roger_Pau_Monn=C3=A9?= X-Patchwork-Id: 13053881 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 32404C4332F for ; Wed, 23 Nov 2022 15:46:09 +0000 (UTC) Received: from list by lists.xenproject.org with outflank-mailman.447634.704091 (Exim 4.92) (envelope-from ) id 1oxrwb-0000Ly-5t; Wed, 23 Nov 2022 15:45:49 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 447634.704091; Wed, 23 Nov 2022 15:45:49 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1oxrwb-0000LC-1C; Wed, 23 Nov 2022 15:45:49 +0000 Received: by outflank-mailman (input) for mailman id 447634; Wed, 23 Nov 2022 15:45:47 +0000 Received: from se1-gles-sth1-in.inumbo.com ([159.253.27.254] helo=se1-gles-sth1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1oxrwZ-0008Tc-RP for xen-devel@lists.xenproject.org; Wed, 23 Nov 2022 15:45:47 +0000 Received: from esa3.hc3370-68.iphmx.com (esa3.hc3370-68.iphmx.com [216.71.145.155]) by se1-gles-sth1.inumbo.com (Halon) with ESMTPS id e55031f1-6b45-11ed-91b6-6bf2151ebd3b; Wed, 23 Nov 2022 16:45:46 +0100 (CET) Received: from mail-mw2nam04lp2172.outbound.protection.outlook.com (HELO NAM04-MW2-obe.outbound.protection.outlook.com) ([104.47.73.172]) by ob1.hc3370-68.iphmx.com with ESMTP/TLS/ECDHE-RSA-AES128-GCM-SHA256; 23 Nov 2022 10:45:45 -0500 Received: from SJ0PR03MB6360.namprd03.prod.outlook.com (2603:10b6:a03:395::11) by DM4PR03MB6935.namprd03.prod.outlook.com (2603:10b6:8:47::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5834.15; Wed, 23 Nov 2022 15:45:44 +0000 Received: from SJ0PR03MB6360.namprd03.prod.outlook.com ([fe80::740b:4e0a:7de4:5ab1]) by SJ0PR03MB6360.namprd03.prod.outlook.com ([fe80::740b:4e0a:7de4:5ab1%7]) with mapi id 15.20.5834.015; Wed, 23 Nov 2022 15:45:44 +0000 X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" X-Inumbo-ID: e55031f1-6b45-11ed-91b6-6bf2151ebd3b DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=citrix.com; s=securemail; t=1669218346; h=from:to:cc:subject:date:message-id:in-reply-to: references:content-transfer-encoding:mime-version; bh=j0eqFRB2p2CzTLiPH9LllAVmtry5VuOqjlnAIGu853k=; b=T0zjxfqfPnY3WYRtRk0p8R0U9d60vJq73sdEMpKSRwadpIEjheviZmyz 3aO65y7+DBvEOB6VNXi3Ss7sUXXDq9HzdceGS2n8digoLiC0Evo5RKF98 PXDQw7JSvuI4eNL3lT06BJ+qBTwAnVQ7KFRbgv6RWNBnfFEqyhcs0NaH7 M=; X-IronPort-RemoteIP: 104.47.73.172 X-IronPort-MID: 85425901 X-IronPort-Reputation: None X-IronPort-Listener: OutboundMail X-IronPort-SenderGroup: RELAY_O365 X-IronPort-MailFlowPolicy: $RELAYED IronPort-Data: A9a23:5SFEIKPAZ0FZstLvrR2XlsFynXyQoLVcMsEvi/4bfWQNrUoihmNSy mZMW2uDOPzZMTb1Ldwlbdmy/RgFsZHRmtEyTwto+SlhQUwRpJueD7x1DKtS0wC6dZSfER09v 63yTvGacajYm1eF/k/F3oDJ9CU6jufQA+KmU4YoAwgpLSd8UiA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5ej0XigzBcZtjZ9QNkKx0TtpgPhMlI Zwm06JvZteCh3N2Az7+tjzThlv0m65u2Arn+I/h2FWFaEedLhSh4oC+149KuZIIAvKrKQcVM V+BsDV4/hbNXuccnDip2FqhOehW3widy32N3Qqi4iw6Xx7jXp5x0wXyIg0hXEb7q8wTJFC+q DtLrlovKsmdL5ZUYtNQMM6BeenAG3ERhzBdEiIJ078Ka0BM3XR77bq/bQO4v2wcpBg9up8pH 34aiIZiYcOQTOsNSXXt6c7sCwlAV/NEQgF8/supqSQ4dbHNf/W2S7qciFdryLvmYRaPiThYY fCBHtnOY6cEYLQI/c54+SHYeg1FZA/arxghj9pYSP4nuv7bqvXi8f8TNH/YJLQLBdMYBKNPp JEZkm/GPl9 X-IronPort-AV: E=Sophos;i="5.96,187,1665460800"; d="scan'208";a="85425901" ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=ZJ4a0y/tFxin3qYVu+bKWAq0oq4wM9wPjnLpNNYZjR6YzIz5+LCiL9Wi4fU8fdjco40x2U0F4CZ20MfWynzvNbHYsC7ECHnE2CnNkeSU0D4yMjCH3s7e0Jf5KaWKVJ9pHSCwqito5mCDkbTw9AipoiSFDXtZXmFMQHe0fviAUxwQZrmsva+WgWs9J/lsJ+4LPHp3vGLhPwRxLQZHphwcEjb43235/ehhqsn1rIgdB6+WZ8U1jeV6tv7Ngwi66CQThcTpgdta0ozDsi+dtjCaIBGaUeDfwhe6eEc4lO0CxANPpqj0kh/bldYaCq/9DuF8XiJ0JvjREvTudUNb5dCvxg== 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=OdFMrPR8EW2lv0Zu+hrAeX4u8IAlUd+YRN8dsbbLR0w=; b=hrVq7CLn6q281VG5Nl1ocisnoL4RR+HqREpD9w2QJjPfy7y3jQAbsnI/C69yshHd5Xc7sOSmmUwzdlzwoRh+e8j6PybGG/q3XBV1ZRvZU73W7+P6rRJ2BhLW4z8pzUwieX7uOGJeuef9jFN5pc5knhpw+Ifv6H5hNnNeU+JHxIr/rr3k5/G2O1P7g8EIj8pOtQ4sIOLpqr7ek4hXjlRz0UaB+UuwYcm2SC8VDoHarMTXkVE+4AUo8e88B95ULZ19oeXg6Wy0PPfa0GrOuHizPk40ln6fzxX8lddIlEBf5KtekqV5n2UByyAawdqFld7JVnDEJs9nOQVl5eK9X1wpdQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=citrix.com; dmarc=pass action=none header.from=citrix.com; dkim=pass header.d=citrix.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=citrix.onmicrosoft.com; s=selector2-citrix-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=OdFMrPR8EW2lv0Zu+hrAeX4u8IAlUd+YRN8dsbbLR0w=; b=SmM12KcP/rDrmP4RRsaN168xiBbB87PoP4LKnN2eYmoNQoe26oItG9feFA01p3lUZlabWhIxSNWrHX2brarVUx9zRG+qGXXyLD/xgZ4IsQ7FkW58BJYRBawmaCWmyQo8lu6GgMFBKitZNAY6Aupe5OaTriLY+9vZHqMyZ7jJrWI= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=citrix.com; From: Roger Pau Monne To: xen-devel@lists.xenproject.org Cc: marmarek@invisiblethingslab.com, Roger Pau Monne , Jan Beulich Subject: [PATCH 2/5] efi: only set a console mode if the current one is invalid Date: Wed, 23 Nov 2022 16:45:21 +0100 Message-Id: <20221123154525.63068-3-roger.pau@citrix.com> X-Mailer: git-send-email 2.37.3 In-Reply-To: <20221123154525.63068-1-roger.pau@citrix.com> References: <20221123154525.63068-1-roger.pau@citrix.com> X-ClientProxiedBy: LO4P123CA0643.GBRP123.PROD.OUTLOOK.COM (2603:10a6:600:296::10) To SJ0PR03MB6360.namprd03.prod.outlook.com (2603:10b6:a03:395::11) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SJ0PR03MB6360:EE_|DM4PR03MB6935:EE_ X-MS-Office365-Filtering-Correlation-Id: 11e88ea3-9595-4c58-4c31-08dacd69c82f X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: W1dpZhMnbvcp/o4BJH1sG9USCrFn8I6r6HZlSiRvjqc/2JsNlCqWM1MYBIWlTy6X6at1qRGQC+cvzJcL7g2E1Ik7c0yQdWLvC5Aa2qele5CDjWXg64pmrwjpViMk0P5w8Si1EJRSdkP57bVNKj8nxuhvSBxW/J0eYpegm0XKELXlSSHTnQkbE1oaItVO1ezdYYDNum3FbXY0KInc/i/ENeCidR+PKRHDX7efef/9J3r42Of24Q6LN3oDwTTY9F01wKiM61ZxIttaAMYSxXoyacoVySoo0PrE1c0T2y2+BV1FMxlahtfFnT5rPnmljEVDj4isZe4fdaslkHyn8VSxSO1ngO+gV0FfgN5bmKpCVTD10JVUPrabEnDgYhd4GrL1HYlaQTCGGbrsiEJHqi+iaSMh/jX78qmH+3M7fg1GmO8B7t+09wdXF1dYIUY9UVl5BeE1OhQkPnR3iIYozWCMUVB19Dwy5eS2Cmf1IV7kLSUvUYbzK5Vm5p/bXpHE9Q1DYEYd5ESg9Anz9sYRSgjL+WPqRsj/qRD/me3O7HM108t5qghiZqKFKSYFrTsN9+Z7MABgJHYMQeDwb6rgiYN8iSinXW6ZIvD7b3qoC6UYHc7kQRkqDEj5b1E6oc0zIU3TSKB3oqUbJPfH3retIQzQGw== X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:SJ0PR03MB6360.namprd03.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230022)(4636009)(136003)(376002)(39860400002)(396003)(346002)(366004)(451199015)(36756003)(86362001)(41300700001)(66556008)(66946007)(316002)(66476007)(4326008)(8676002)(82960400001)(38100700002)(6486002)(54906003)(6916009)(478600001)(4744005)(186003)(2906002)(5660300002)(8936002)(6506007)(2616005)(1076003)(26005)(6512007)(6666004);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?G5RYba8HsrtxI6QIKNa/qHxVJHKy?= =?utf-8?q?eZBhyFvEepfDXaZJChm4qIbzBnKpozAsyf2FdTRz04Xux7u60/zvWTegogBrt3lc8?= =?utf-8?q?AvenCwUTyHnl/0eDvkPIiQIwdQax8NfoyWAYsXUrCJeTv85iY9fclpRQ6Q8+RUKFB?= =?utf-8?q?fbHgWQrzRcSnhmM6u3mzq5LatL6jDn1mrF50dex6JLnkzwMMp+hrWzxYMxugrQOzX?= =?utf-8?q?R6EsTncSD+VtcQs+61ZGpJHBU0IBa2vd/5KVVbj5LSuwf6Nd5khi+OOHXFsnVrtP9?= =?utf-8?q?qHadKoZkIL4xWdddLNrgoDaHvMXZxDd0RAlaJlobZY+MyNw4L7Ek+AxfTtT8e9JER?= =?utf-8?q?sKwOnL0vuXiio3MpXrs9uWN1naou6eMemw+zqDDKlPuBjGHPFG5SvLaDcVjtfC+CX?= =?utf-8?q?DezXTMr2pKkxyIfFiudPDPuu0VDrqRl8FyDAQbAbBak9gbQL025dGQ1Nie3kHyKc7?= =?utf-8?q?nlCfMnWIBR3NytRpOdCpFApiEpuSaIhj83D09eODWV/KSADYRBJeeZN3Y41ZxdsC2?= =?utf-8?q?NI31yW9ZXeDibUJhRmkC6NG7xNOGWMgFlZ1R5ELHt3jQYcKnABFcFuEeyrYAByVuG?= =?utf-8?q?GKRwl7gdqC7P5WzhjqKJ47ab1Xy+x2LOrwCwigJcE1/z1ZU8m2uFobzpZONhrd6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=?utf-8?q?fiLHCJdIgST4?= X-MS-Exchange-AntiSpam-ExternalHop-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-ExternalHop-MessageData-0: sQw0d2R/4kXK8gFxVrllvMenlohL903dxhsTBiwYgw54d5bBlCa0woxdhW0O9uFbnIdW2lHImtUW/Gw1GDCrChxZZNPybG+ZH79lgJzutmO3AcS0lHdwtibcz1hEbIcuIKMuEhxnnZ6abJtbRMqiAwpVdVLT6nrtbiJsVeM2AhU1NGMOamTTcOxS+LjEDbGYKA8O8erp3Cr/gU+DXbQL+HtUoxVAgt2sTmzj10+bM8HkaubyH+DGLvNZfqrdSJCJqCRwRFqGZWtuRxXGgQjF8td95R04CtzBtoyynjNnxcTQQt70EHGJItVXXTfZmJqECCjZfZLdoQGA2yMv0khnUs19SEYp81GX9KQvrH/dg2EPJFgeZH7uh8qfgAtONdAlrhj4RKNSLx8v0jUnMIf33Eveu4l5XG0FBePqqZNi6UshVfX8LLzRppYtpEs4A+WoatdCsrAhsEE2PwgpLCmebah5ZkY5xSt3VZaojPqIlq9YHdbYYPLQpz0wIfAqO4kwUayw4VSkXJGfNysJk8D7AGMHEAV7IqeSbvaj5UzIcM9r0OQnlNkCHQ9Adeq7pauNuto2ViMe5EXs/4fmdTZDvjCVL0GZ+FA8CzyJNNfRzmyaZ4JzFdGOYSifV4sERrSZJQl3EXJpTNTHJEOrbVPPFJ4Am7dz3Wj/lh9CWMQ7zOqwYC6DmunWChXhFh3fAWFQ4DzJVuMEtbSlECmfLVk/yVWR78WmAXYcvtuWdxC3P6qLZefUOuqWTxp00YzuMUG3dxfZp4WJ/SwCkHGLVoX1bRQ2abHlu9SoxMtJo6ETCQRcoz7pXgMGGQIPYsLWKGUq1yg+3rT0JFRPoV/9jENqFV0AB4ffZYuLrQyzNLIJWuo= X-OriginatorOrg: citrix.com X-MS-Exchange-CrossTenant-Network-Message-Id: 11e88ea3-9595-4c58-4c31-08dacd69c82f X-MS-Exchange-CrossTenant-AuthSource: SJ0PR03MB6360.namprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 23 Nov 2022 15:45:44.1711 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 335836de-42ef-43a2-b145-348c2ee9ca5b X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: 3GJU/zOriBRiTh0AE8G8o3GOpcn2XGN3AdFx4Ht8iBP1f9mSJUaoOi2SaGnjlmevoIcs6XOOAKc8yABYEYCC6A== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM4PR03MB6935 Do not unconditionally set a mode in efi_console_set_mode(), do so only if the currently set mode is not valid. Signed-off-by: Roger Pau Monné --- xen/common/efi/boot.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/xen/common/efi/boot.c b/xen/common/efi/boot.c index db0340c8e2..7e8a8b7857 100644 --- a/xen/common/efi/boot.c +++ b/xen/common/efi/boot.c @@ -799,6 +799,11 @@ static void __init efi_console_set_mode(void) UINTN cols, rows, size; unsigned int best, i; + /* Only set a mode if the current one is not valid. */ + if ( StdOut->QueryMode(StdOut, StdOut->Mode->Mode, &cols, &rows) == + EFI_SUCCESS ) + return; + for ( i = 0, size = 0, best = StdOut->Mode->Mode; i < StdOut->Mode->MaxMode; ++i ) { From patchwork Wed Nov 23 15:45:22 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Roger_Pau_Monn=C3=A9?= X-Patchwork-Id: 13053884 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id B3039C46467 for ; Wed, 23 Nov 2022 15:46:09 +0000 (UTC) Received: from list by lists.xenproject.org with outflank-mailman.447635.704107 (Exim 4.92) (envelope-from ) id 1oxrwk-0000uJ-GY; Wed, 23 Nov 2022 15:45:58 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 447635.704107; Wed, 23 Nov 2022 15:45:58 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1oxrwk-0000uA-De; Wed, 23 Nov 2022 15:45:58 +0000 Received: by outflank-mailman (input) for mailman id 447635; Wed, 23 Nov 2022 15:45:56 +0000 Received: from se1-gles-flk1-in.inumbo.com ([94.247.172.50] helo=se1-gles-flk1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1oxrwi-0008Tb-Lx for xen-devel@lists.xenproject.org; Wed, 23 Nov 2022 15:45:56 +0000 Received: from esa5.hc3370-68.iphmx.com (esa5.hc3370-68.iphmx.com [216.71.155.168]) by se1-gles-flk1.inumbo.com (Halon) with ESMTPS id e9ed70bc-6b45-11ed-8fd2-01056ac49cbb; Wed, 23 Nov 2022 16:45:55 +0100 (CET) Received: from mail-mw2nam04lp2171.outbound.protection.outlook.com (HELO NAM04-MW2-obe.outbound.protection.outlook.com) ([104.47.73.171]) by ob1.hc3370-68.iphmx.com with ESMTP/TLS/ECDHE-RSA-AES128-GCM-SHA256; 23 Nov 2022 10:45:51 -0500 Received: from SJ0PR03MB6360.namprd03.prod.outlook.com (2603:10b6:a03:395::11) by DM4PR03MB6935.namprd03.prod.outlook.com (2603:10b6:8:47::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5834.15; Wed, 23 Nov 2022 15:45:49 +0000 Received: from SJ0PR03MB6360.namprd03.prod.outlook.com ([fe80::740b:4e0a:7de4:5ab1]) by SJ0PR03MB6360.namprd03.prod.outlook.com ([fe80::740b:4e0a:7de4:5ab1%7]) with mapi id 15.20.5834.015; Wed, 23 Nov 2022 15:45:49 +0000 X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" X-Inumbo-ID: e9ed70bc-6b45-11ed-8fd2-01056ac49cbb DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=citrix.com; s=securemail; t=1669218355; h=from:to:cc:subject:date:message-id:in-reply-to: references:content-transfer-encoding:mime-version; bh=rqDCpw9PYZ99mLkHO7aHSTRqrOOU9gk4oyTNsde8Epo=; b=ZNeNv0R9T/kpR86d9SLdYq0zjYYwiMfr8/OmLYS3v1hOJbf+/26oa+rJ B0UOkX7p9ML0xOGIY1JsMXuXIyFWjOCpPJxhx1Wn84VnsHqAr5+drOiWE HaLB7oftY/qYO/BLmpXFad+kau2jtDDJ7raGVL+6EWNo9dMfLvzxXT9l8 Y=; X-IronPort-RemoteIP: 104.47.73.171 X-IronPort-MID: 84481923 X-IronPort-Reputation: None X-IronPort-Listener: OutboundMail X-IronPort-SenderGroup: RELAY_O365 X-IronPort-MailFlowPolicy: $RELAYED IronPort-Data: A9a23:9CFyeKBLddc5aBVW/xviw5YqxClBgxIJ4kV8jS/XYbTApDsqhWQDx mcXXGrUP63fajHwfNh1ady+/EkAsZ6BmoNiQQY4rX1jcSlH+JHPbTi7wuUcHAvJd5GeExg3h yk6QoOdRCzhZiaE/n9BCpC48T8nk/nNHuCnYAL9EngZbRd+Tys8gg5Ulec8g4p56fC0GArIs t7pyyHlEAbNNwVcbyRFtcpvlDs15K6o4WpC5QRkDRx2lAS2e0c9Xcp3yZ6ZdxMUcqEMdsamS uDKyq2O/2+x13/B3fv8z94X2mVTKlLjFVDmZkh+AsBOsTAbzsAG6Y4pNeJ0VKtio27hc+ada jl6ncfYpQ8BZsUgkQmGOvVSO3k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cNBJgNStspcI+SMCjgUBjMOGWdLRDMD6ccIU/ArJbx/fEc+PyqQpoV15E/8a 6xH2+wjVRCO34GNPf+n6Giqnv2MSeAtHXWu41jDqFCy/zBrOGBC1zHdLgs+/HQ0cn3TPerH8 pbA6gmc8MLHVGeZ7qh4DeOKqW6UUNuNvH9muxLL25m8fi7XbHCh6j8TMv5AobLPHINZl7fa0 FzLwQbYv8wo3yWZg== X-IronPort-AV: E=Sophos;i="5.96,187,1665460800"; d="scan'208";a="84481923" ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=X0/xB+/uEDWZFZmVvl0mwnarpo3o/1LX15ESmMhGMFPchr2FGOW7c12Qj6DADANkt6pjAD+34GOy5LNeKuUuLqyKW3tzjvnamJKWxGqAf3hc7R2ArMCOYlRf55H7Aki+wexvTsSy5eApMQSvg4WiMfQiqcJHnki0OdzIDFj/9Yz7LSrs8FVuo3arun6O5kHsINmz+OOHXBMeEW42GdRawBe1yKNt4dSps0FfYVpxJY9rYNjAV5AGAH2l2OhBXcwKqynO/j/cg53323+9VlNBmZ3Z4fOkC3l/Lxy6VQvk3aJ7xnoW/RhfdxLEKWAXRJ+/AQdrxBTmtTyX0Qca+c3/LA== 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=I67lgI11eTbs3SxHKjPkzA3VPvUoeQg5Ok/IMGaO6DU=; b=jY+2C0hXbmg4mlAiJpM9IpIXnTPOzFu218yQ3FRtvHFAF+C6mL/GRjTey3N6Xr6GNqKs/KcbfiqCrXbhhTzp7JviIGGCrL0yXduHPF31KaLe/BdEOXj9WbEgG7yALLP2N8A8ivlewGoeqmW31dpxslHcWnnk6K1kGhuBIrvF3WJsslotGKliBLCxB8QmMevkFn/ujmNJHftmmqKxo4S6pJoCFlnAyz9kAdgfC1ZDVMMt6UwKLl0BMUvkr8LvtP9HUp8afEiHHmsoC+T0FttWgKMYLFROwfGcCEpouLaPdO2cvaCVELBh5nU+s4ER4fe4x4H+MAVmzSA0PUfZJ35l7w== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=citrix.com; dmarc=pass action=none header.from=citrix.com; dkim=pass header.d=citrix.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=citrix.onmicrosoft.com; s=selector2-citrix-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=I67lgI11eTbs3SxHKjPkzA3VPvUoeQg5Ok/IMGaO6DU=; b=OWlXlKEmNaZzKHd5UpiaC4nxvLLNrhcpZUTgF6kMU8pRXDiV30KuIoOQFV8kXYZAJz6FP6zO7IQ/VUZti1mw1s+jMDmqK79Dt3+hdHFC9PbBP4mvMebwlLG7xzubGon7nQUR1Br8yNwCHGjseTzcAr3kHcpqqUY819ss/Zi7wdU= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=citrix.com; From: Roger Pau Monne To: xen-devel@lists.xenproject.org Cc: marmarek@invisiblethingslab.com, Roger Pau Monne , Jan Beulich Subject: [PATCH 3/5] efi: try to use the currently set GOP mode Date: Wed, 23 Nov 2022 16:45:22 +0100 Message-Id: <20221123154525.63068-4-roger.pau@citrix.com> X-Mailer: git-send-email 2.37.3 In-Reply-To: <20221123154525.63068-1-roger.pau@citrix.com> References: <20221123154525.63068-1-roger.pau@citrix.com> X-ClientProxiedBy: LO2P265CA0089.GBRP265.PROD.OUTLOOK.COM (2603:10a6:600:8::29) To SJ0PR03MB6360.namprd03.prod.outlook.com (2603:10b6:a03:395::11) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SJ0PR03MB6360:EE_|DM4PR03MB6935:EE_ X-MS-Office365-Filtering-Correlation-Id: 64e3f350-ee96-4275-53c7-08dacd69cb36 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: wKA6FqDO0O3m02ihKx/TH6DMrrisytEv4oqdRV+M4hjwrvjqJ7KkDXOHdipKFrHa+vpzSGbTMJ9J2S3VPp3gguauu8fvyQmhg2TosuPNU3xwd1/0L9RPpRMCtsx6YqwEKijdDBwxLtyK11M20vnlJXDcyzXmSlRcffSMb8W/4uXfR66RVq+kgrazSwZz7UPuXTibKwJEFtZviHzJ8l/X8fcJmCEps9GEDCFKvuGkTHDC6HVyhU+gNG72IKEf+qZY5TYjDYfCuFjTQ+b5jvqdDaPAXB8qNg5Yp1tJpDQDBo7lxurKjzunlo0kqIxE0X6J0Fa5Nctxp9kw1eeRDRw1eQTSk/fhLG1Rw3I04xoz15mJVZyyKu/BuXKCeZ44lgbcDX0PoHTqIqf/vi1/C0X1vOCKl39+yBc0NLwbARBMkKpqksraLoatFN8sJKOqjU9EeZgDNul9Z/O5mniwgrmxxtRo3m1qD+L/Mu4EH4Pyij14Z5fyFEEXzeCsF5jcd0PyAym+O5D3S9aThQ7yRJqCcLeunhK2rUchrX4Q4HuoCps98jQVFtzxPacoC8q3z7qK0Py9x2K0pITMGYXU/F7vgPiqtRvACWobahEcwPHabcmERYxPoP+aM1CfCYygYVxCHhTwGHVbysuYaBirGGbcvw== X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:SJ0PR03MB6360.namprd03.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230022)(4636009)(136003)(376002)(39860400002)(396003)(346002)(366004)(451199015)(36756003)(86362001)(41300700001)(66556008)(66946007)(316002)(66476007)(4326008)(8676002)(82960400001)(38100700002)(6486002)(83380400001)(54906003)(6916009)(478600001)(186003)(2906002)(5660300002)(8936002)(6506007)(2616005)(1076003)(26005)(6512007)(6666004);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?mbVls04iteEJ1wBp1DaWibFVe+H6?= =?utf-8?q?Kym9oUQ+w6OZR+g8JxZfR33zwttuUD+g7IDcC4h4R8aDqK98hPNFWh/8zz0dJ0a11?= =?utf-8?q?SnV0JVp23wAt0K42BADAe2wMRyzTzUx7+JqnMvmpOl7gh5raZZb2qJ3k4rsT/iTY/?= =?utf-8?q?WB6Q5hsQPnqLjEHDPaI6GxQRHgYZbmXlhSj/DJfQ2Q0Csyn2mOCLUTmklETXUJ+aw?= =?utf-8?q?+oTnC7XM8dMPQu5rUvtZmngVMBDOo6lbVD11eG4bqCUkBuWxf/ZnQXihaxGkPb4Hs?= =?utf-8?q?3Z8HuBkMjiY1+EzDBT7SZIQRnzDzdFKToCoCrkLGpkW5aALKIIJHBf7vfZH/4c57z?= =?utf-8?q?YSEtibMHjTRXzvObsBxrGDCSdj5AjydrKgftiLdeIoNpMysy62nYB5uAOSPdbhS8C?= =?utf-8?q?lwkIT3c9OLCxbtgyD8UpUFJ4eMPfJxlUMl3stNj1LNeiwEGvdVMT65qeXAixvzgaA?= =?utf-8?q?FEgX578SZ60ShYYYV6wtcHR6vRGo3c9MTN8pAKZhIMEJNhKVAspcPwZAL8lhRR5bB?= =?utf-8?q?dGyqxyyiuOBAPg3jZslecSI8zNG39A+lgj4znRW0Odsb22UQDMfoTBU8JOHVHHBgU?= =?utf-8?q?6yoXbxFboai+i98jnZwuFApvGwaSkJpCMfKCgt6QCvW7dxKUKL85Pjp8gC06nixUj?= =?utf-8?q?covIoTEAoh2mF9GXy/M3LYFyIpj0MI1OapGXPK0Mj1RYSgRoEr5isD+cCmF1ORB9W?= =?utf-8?q?EMcBBbidJQ9sYADXMpai/C34jHL5beu3Imsmj5J5x66rSAYNohQGz6n+g+f0nhnWj?= =?utf-8?q?LZFiYAOUQtWqDRQgBzN0kwR78T4rb2mqAZCzmrqbKBxgS9Tqc/dbTVN0v0cQbTXmK?= =?utf-8?q?ys4btQ2vhdANBMvazmNM+3ZwZ6QUtbkVQmAtlSdUqn577sCGkGCObzAxO7BZJvHC/?= =?utf-8?q?JMG15quuQGa8AOowo7FhPSp7PU185cULdLuAlMZ1t1G5ONBdFtPPSAiv/6SzyGQo2?= =?utf-8?q?M1NkAlRMRqDWvFfhHABzFl16M8ktR6GvtGV7GiJmMa0n0noLTnrOs5Q+pIb1rKFOB?= =?utf-8?q?55yfkfS/UAxHvsD0JFBZSNsnk3LuUiUI8Ini7/Fx6nCbYznvnp9I05OKcXKe29vyO?= =?utf-8?q?9j3YHNPj0ugJBuBRZDg1mtize/znO3SROow6g1/Tr35Ujv6xg6yRUxsNnHVfU/Otf?= =?utf-8?q?ygZ1A3LXTxsRK2bEVazBle7owV0Fzbywdni8DkE4sS6ESWLjnzAL87hllO7nAlj1/?= =?utf-8?q?oOiC9IaKLuat4BTBYlO23tLWkYo3atXYEtZ0gJXT95Wm+8L2/d8yn03xu/nTW5XfE?= =?utf-8?q?qQ/9TVOgmztq2tWoy1aXMrV4EZuc75rhQ6EFLTco7SjvdT6xiJeUMWP54Tn33qfEM?= =?utf-8?q?IBTE9EUBW/8w99SVgG2cUWNZnT8l8G5XxN9bc3E8Vil/rmt347/emHSDL07wm7rWd?= =?utf-8?q?UYvR+AQmPk1+ga+Wj3x0Ueo9Tsg9D85rxCIuLm/ZLaliu7TagOVKxpuBjYa+LjYp9?= =?utf-8?q?v4srAvoDZtLLTBWnaHMLGagILEO2GUjsxgLBUBYz1H0j07YHvBovqDJcLXqmILfIT?= =?utf-8?q?qbHssDvzhBP9?= X-MS-Exchange-AntiSpam-ExternalHop-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-ExternalHop-MessageData-0: 7GksLdGfk58sBZE6LAz7wMUOGiKsFnqhkcOfSDtL4spcNlQ5MB7Pv0SRhieBGlYRYj9kdq8nnMXlrqtdHvxvOIP9TgdUXyK+tJ/q6RfQ9g+dvVB9dKYGGDvudaF7yF4xO8kwPtvA4wLzfmUK6FceXWGVFgImTI51tS3MmmMfv/lX0Bc10J9MvyaQiq+42YGB4tlceo5pYM8tSDWMZavd65yNO4iPx/eRDYWAPqehdo6Fn0LYC2qB+FSwKOhP1XbxtjGvpaCez2epgY/ico2l9SQ+XPnA+4U7agyb+5YJeNRom1qq3lDFoM70WLTIppE1OjaQ1nvzyMPGeXUNzH9qJZMB3gT5awfKOSyHXOI3Nr6tfdjM1egrgz7gqyVd6BtPRNT58UKWmGezkURVFZdRwwBHs09gCwLVj4/waAMCqnMRAt/ScIEVE1ReXVoQ/US8jgl2xOfkJQbYLu6O4P0YdFKevGuEpBpDBh6zUDP9Sk6zYB5ri5oHR9Kp2hE2JRZtF2FwmgFVRwIl/Uych5xgZxJcKl0zBL6GXDJAfjrkIMZMaOMCCrb1ktSivApYt4qExTXD8BIRu3stL8l84wVXG9/g9RFdbOnuIy46gl5Ep2jvZkpDsCtvzLMwUfhMvAIh2RSUWjcbE74QWj58KxlGDMT9CWF4uUlS5jKA6pH9VwYiuMH+3aOtKnar4X8mwAgWaq56QroVIpXuojTAJFqDaoXBm0WuYJwKF3XSH+d3soEC6iAJFoduothZd6Ay6ifeIiOcCXUNhLeDpbG5F0SK0K8gCQBLAyVlbRO4V79vInBWatW7F0XITU/p3i/CiUvQAKaazVvPvCIIrfWaoqE8bzPlzuuYHOv/4WYqiiZaF6g= X-OriginatorOrg: citrix.com X-MS-Exchange-CrossTenant-Network-Message-Id: 64e3f350-ee96-4275-53c7-08dacd69cb36 X-MS-Exchange-CrossTenant-AuthSource: SJ0PR03MB6360.namprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 23 Nov 2022 15:45:49.3767 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 335836de-42ef-43a2-b145-348c2ee9ca5b X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: egmCyMRRPyGKtezAP6wHPlO5nQWEluohaAGje5nYe050li5BJURyP070BVR0eMpA2/crBjCH0dX8FfWC9cmXxw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM4PR03MB6935 Modify efi_find_gop_mode() so that passing cols or rows as 0 is interpreted as a request to attempt to keep the currently set mode, and do so if the mode query for information is successful and the depth is supported. Signed-off-by: Roger Pau Monné --- xen/common/efi/boot.c | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/xen/common/efi/boot.c b/xen/common/efi/boot.c index 7e8a8b7857..b91a7179a9 100644 --- a/xen/common/efi/boot.c +++ b/xen/common/efi/boot.c @@ -864,6 +864,26 @@ static UINTN __init efi_find_gop_mode(EFI_GRAPHICS_OUTPUT_PROTOCOL *gop, UINTN gop_mode = ~0, info_size, size; unsigned int i; + if ( (!cols || !rows) && gop->Mode->Mode < gop->Mode->MaxMode ) + { + /* If no (valid) resolution suggested, try to use the current mode. */ + status = gop->QueryMode(gop, gop->Mode->Mode, &info_size, &mode_info); + if ( EFI_ERROR(status) ) + PrintErr(L"Invalid current graphics mode\r\n"); + else if ( mode_info->PixelFormat < PixelBltOnly ) + return gop->Mode->Mode; + else + { + /* + * Try to find a mode with the same resolution and a valid pixel + * format. + */ + cols = mode_info->HorizontalResolution; + rows = mode_info->VerticalResolution; + depth = 0; + } + } + for ( i = size = 0; i < gop->Mode->MaxMode; ++i ) { unsigned int bpp = 0; From patchwork Wed Nov 23 15:45:23 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Roger_Pau_Monn=C3=A9?= X-Patchwork-Id: 13053885 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 0F30AC4332F for ; Wed, 23 Nov 2022 15:46:12 +0000 (UTC) Received: from list by lists.xenproject.org with outflank-mailman.447636.704119 (Exim 4.92) (envelope-from ) id 1oxrwo-0001F9-R3; Wed, 23 Nov 2022 15:46:02 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 447636.704119; Wed, 23 Nov 2022 15:46:02 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1oxrwo-0001Ew-N9; Wed, 23 Nov 2022 15:46:02 +0000 Received: by outflank-mailman (input) for mailman id 447636; Wed, 23 Nov 2022 15:46:01 +0000 Received: from se1-gles-flk1-in.inumbo.com ([94.247.172.50] helo=se1-gles-flk1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1oxrwn-0008Tb-7d for xen-devel@lists.xenproject.org; Wed, 23 Nov 2022 15:46:01 +0000 Received: from esa2.hc3370-68.iphmx.com (esa2.hc3370-68.iphmx.com [216.71.145.153]) by se1-gles-flk1.inumbo.com (Halon) with ESMTPS id ec1a544e-6b45-11ed-8fd2-01056ac49cbb; Wed, 23 Nov 2022 16:45:59 +0100 (CET) Received: from mail-mw2nam04lp2168.outbound.protection.outlook.com (HELO NAM04-MW2-obe.outbound.protection.outlook.com) ([104.47.73.168]) by ob1.hc3370-68.iphmx.com with ESMTP/TLS/ECDHE-RSA-AES128-GCM-SHA256; 23 Nov 2022 10:45:56 -0500 Received: from SJ0PR03MB6360.namprd03.prod.outlook.com (2603:10b6:a03:395::11) by DM4PR03MB6935.namprd03.prod.outlook.com (2603:10b6:8:47::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5834.15; Wed, 23 Nov 2022 15:45:54 +0000 Received: from SJ0PR03MB6360.namprd03.prod.outlook.com ([fe80::740b:4e0a:7de4:5ab1]) by SJ0PR03MB6360.namprd03.prod.outlook.com ([fe80::740b:4e0a:7de4:5ab1%7]) with mapi id 15.20.5834.015; Wed, 23 Nov 2022 15:45:54 +0000 X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" X-Inumbo-ID: ec1a544e-6b45-11ed-8fd2-01056ac49cbb DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=citrix.com; s=securemail; t=1669218359; h=from:to:cc:subject:date:message-id:in-reply-to: references:content-transfer-encoding:mime-version; bh=UrpvtpZaeWpkhTDTGxJ8y1lv9LpWbxzT4fLSQ71R7qo=; b=dfpAgKsqAdVSrmoHu6XQFg1DfI1Uk9Gj33/LjIe0PFz1FLkJnkvL1PUN d4Onv2ZVRIq99vJNMuE6JDQuP//IWN+vHVywOG8zKOZOEJOMJJGgrPzBN BADnvsu1WZfl7RMfKCdQRDyNph+1scfyKip7yySCZMgBuzaXCRp2mJiX1 Q=; X-IronPort-RemoteIP: 104.47.73.168 X-IronPort-MID: 85444277 X-IronPort-Reputation: None X-IronPort-Listener: OutboundMail X-IronPort-SenderGroup: RELAY_O365 X-IronPort-MailFlowPolicy: $RELAYED IronPort-Data: A9a23:jQqrQa46PrhZyfr1gISE9AxRtP7GchMFZxGqfqrLsTDasY5as4F+v mtND22FOK3fMDTwf4xxatmwoBtQuJLTm4NgSlBsqik0Hi5G8cbLO4+Ufxz6V8+wwm8vb2o8t plDNYOQRCwQZiWBzvt4GuG59RGQ7YnRGvynTraBYnoqLeNdYH9JoQp5nOIkiZJfj9G8Agec0 fv/uMSaM1K+s9JOGjt8B5mr9VU+4pwehBtC5gZkPKkR5weE/5UoJMl3yZ+ZfiOQrrZ8RoZWd 86bpJml82XQ+QsaC9/Nut4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49NRO/zLpiPP hlDcna6voTWVSGb0rBtm0q+9CoVmRbJGbyfmEy/uiulxRGlnFwyEUVgOYFmG0byZ47Q55Yo8 zZL6VBjth1P4ErRJM4IN1Ebdq8C2TLTx6JGnmVO07bGKYOPG+Ig4Lr4Y8y+PqhdPUzvdQPca z6IRNlXFMJCgHT4ZXk5uwIzvmNehTwYd3V8LAe23Aj0YeMAYYCMkW4OSITeoWb0rEi6/bgKo aO0aJtcoHexFTVaPd0NnXFKv9vwFklIbkoU4UAKiWzi/OODLHWncrmV9uWDIbRMF8fKxDC6z 04LXXOGPk= X-IronPort-AV: E=Sophos;i="5.96,187,1665460800"; d="scan'208";a="85444277" ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=L/KeZbFRiSnLUe9BC3VTc4e3xSQQZ7b+SScNopmXXn9wYsyvVNcyhNHMEOzHpKl+QpA9sVjbzTt42jYI5+t6iPPkGHbcjxZx7M1iPpGKanj10SElI2zGAyOSS0fWCKabbKL655BEYuj8RXWKiXVibHQe4vuUOEP14w2GcCvoLb7Tcoln94DGduT/Vq+wZLiyMp19C/MgaCf3X9VziAw1xX9vNSht9DCJdArRvHun6iELfYSr4hmTYKnuEEzjgZM8MIq90I8dE/BxPs13G1brWWh9BvtP/3fDWSMIXjQWBf36D3enCrgmiZm6UEKKPDG1DntRV8SKoTlfSz2wQBDfhQ== 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=aga1YY/munjCHPbgajSJWWRT0kc52lET3HS0iDBN2nM=; b=BSCR+YFCYZJuoLaJPJB/nARdNDbWJQIedkq1UCRU1JkjlzAqdbNTt4Bmm1nsAWVsP+CpetyIAHN2yZwl7y0hsE8AkKiH2eeJbEDI3pKg/vFc0gjYpVK7pS6czK0EqlPU+fc/FWB/oueZ7SrYtoE2OvQJEVbGm/VjsBJdTEbNJNnJF9qaXcDUM6NyqrK9mYgb5oiQqWICs80AYkmI6SikqSLADiRJX3v19pVQSRZAaLjfWMFA4pRSr9euon992pdwITRkoDzLAIEUC7hFz1CEn/6ZeJ8gkTABuzeXW9l3XolVJNyJmfyW+zyAaF4dwsooF1Y0mCpV7DEha5Jt+yHBfA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=citrix.com; dmarc=pass action=none header.from=citrix.com; dkim=pass header.d=citrix.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=citrix.onmicrosoft.com; s=selector2-citrix-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=aga1YY/munjCHPbgajSJWWRT0kc52lET3HS0iDBN2nM=; b=Vz2pWkqEdIRaRUxNk7MknTJ9LFBteycWuRAkMN/qROtElL+9WyXm8z2Z+PcvY9mUkDHwAyqq4CwZtSHw/8PtpTRbfsrFV+A9fS3Y0XpuieBhn76EmZDIgUmzc7MAwvPbnYAmv/AWuzSuhUQRqenhGOPNyYe6cA4Nh5QQ3cVYYR8= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=citrix.com; From: Roger Pau Monne To: xen-devel@lists.xenproject.org Cc: marmarek@invisiblethingslab.com, Roger Pau Monne , Jan Beulich , Andrew Cooper , Wei Liu Subject: [PATCH 4/5] multiboot2: parse console= option when setting GOP mode Date: Wed, 23 Nov 2022 16:45:23 +0100 Message-Id: <20221123154525.63068-5-roger.pau@citrix.com> X-Mailer: git-send-email 2.37.3 In-Reply-To: <20221123154525.63068-1-roger.pau@citrix.com> References: <20221123154525.63068-1-roger.pau@citrix.com> X-ClientProxiedBy: LO6P123CA0043.GBRP123.PROD.OUTLOOK.COM (2603:10a6:600:2fe::17) To SJ0PR03MB6360.namprd03.prod.outlook.com (2603:10b6:a03:395::11) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SJ0PR03MB6360:EE_|DM4PR03MB6935:EE_ X-MS-Office365-Filtering-Correlation-Id: 57a06453-8767-4139-bfb7-08dacd69ce55 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: xFxqpbXkR9wGVTnTAAI7qL6lhGQX363BxkHt3GDRUDGiUD5e/x/A9DRVTu1ZHYHaFBOk3zTZkPLcYxwfuyksBsLrJznjeQUE3cD027LCnP6mp87FkHNcPvhRaDlWT4ct+izb8GTTqQjbyNfjpwa4VhiQFkjZZOUP3Ar/AbVterjaU0ciEmdDAZeEp3V+pAJOuMlhB1Bc7/rWMnszGDQw3XdBEryqriRt0dgOuvYMwkbkx4HFRd7a0suY136yxBniik+en7XGVXCN2WwV3v0gtIJ59bwunbbIdC1FgrD5vqsMeLFBtD6aUszZ8PqqVNLjBxlqBAQnhgKKdoZIGB2up967pQ3BVBGX4KAW/ZUTpTQgg+xPccbLLmMc030NY45BQkyMG1THm4LOJ6waOmWnmXXqP3QvweR0fbQK19c9D31qrhgMjeMD5e8HkBtzQoVxJkoOGF/yjkPsCdUaTRtP20VBWxHQ+JYxBRInLQnEtYLUIIl7SqAg9WRPQIy3BOGdkEX8Z25eWc8Xh98GAXXsxbpavNFhAOa8grAXz0GzrfejAYWi0EmdZ+sP5CdZlUe/jlo24ee5F+xTp97b67OkRnWB/dDBUlcseFhcbaPlws73VFMM14k+reorUnLljjRDB2kTKe+8In0kYVx6PbJ5Gw== X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:SJ0PR03MB6360.namprd03.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230022)(4636009)(136003)(376002)(39860400002)(396003)(346002)(366004)(451199015)(36756003)(86362001)(41300700001)(66556008)(66946007)(316002)(66476007)(4326008)(8676002)(82960400001)(38100700002)(6486002)(83380400001)(54906003)(6916009)(478600001)(186003)(2906002)(5660300002)(8936002)(6506007)(2616005)(1076003)(26005)(6512007)(6666004);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?z9Yig/sq2dlRrnh1UrVpSjpgcuKw?= =?utf-8?q?1JTYtcyQVzDjMjbkZVwq3v7t+oCfjjXDJpEMfFLq1tMr8bIBqwtqBjoM+kF8LGNPh?= =?utf-8?q?eIN2I9wnEPwrqGR51qjvcs33CCHfn2AT1qPemj5G0t3R4kUR8yfRSEkzEe7lCaOi0?= =?utf-8?q?lcNBZvhZs/xcoJh2J8OlEbIZtKmNgAxEiMpQK5GTPRtEtVe0ieCnpwPAA/eqsmH6/?= =?utf-8?q?x/bKfsE0NRIyA2ZzUT3wy/pWo+z3SIHbPXhUGIiGQ8H2AzRGhu9kEfW6I5rMpSsU1?= =?utf-8?q?fWzSDik3z8gOBvBSxkri+Uu6UbL6Udg0cJnvAHbygZ+jfHq5mCZxGAcQPQV3Er/kE?= =?utf-8?q?CoMkYoxnFOQJLyRu+9ugDm50KsfH7q/tD9Ptc+ufOL/BjlMu0LxKolVDQaWApCbp0?= =?utf-8?q?CnhMeZU/7iSXlxo5jTzEX1o9dpJ6uHnIfwffjs8Mn1KVNuhAS9Nt6/Ufas66pXn8d?= =?utf-8?q?ByD9tgvEOAk9+ExkBD5Kx5iNEc+bGtNpOdNX5Az1L8Kkv+7uZygwcTyewX0O2D4w0?= =?utf-8?q?6uZWAQiv3XFQQB3ebEC4cEDgVvyl7uEtQQ4knvyNOGd/4aCXIa8fAU33H/KNhatfT?= =?utf-8?q?kAkMieLUnLpY6EOO6cYqi6zQ6Q+jB1N73Uma47SrokNfr8zBDz0tO8xpx4p5ZyFbC?= =?utf-8?q?J6vfpV+QFOEyaraP6d4N3ctR2lzpG/+WMnsC9d0IF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ternalHop-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-ExternalHop-MessageData-0: gb5MDNE+BbBNrfzJy6US4OeW10Cl6oxvbFkfOC12Ye8Rd7rsF3wqgeMrgDhDQqD3OxMHoiW6GhObBcjWGzeQ7krf83n8rmlPqdjzc1bdWkOUtrx9T19/INO7ZS2Ovv0JLeyitdm7OvNmWxu/IuR5uln9SISkEQWwK1AlRP8V2ohod4H5hDkP7zqqokm8/zuaQc9iZL1s59Up7vWiw+CCSqN2Y64MMwD8TIbGbI64HHIUY5vu/HU6nvxKQ4s2tBysqQqvxNyBvXOVsa/ZGvrfAA2yc18rvMvrfo8uQi/JkspH5ldnX05GwEkqGhlb8QvmOuYn2Bqm2b4IWSxU+IWTY7IyjOuWeP0ceFRLSozdBetY5AFHSUN1IFMFqdhBANT4/ybmxnzjXBNt0/NE+3gfaMxeIbxCUoLZUzAOb1BWD63RHsZH2gpaIkZm0sbSREwVC459D2BoNDWiJQbqqZ/W+OIakStHCWy4dXW2NtP/0rrqKx7zrGRzwa8TrVojYp+VsZM8BMMSmmFCXY9O1wF3bhJaBGKevqlT815NM3e+B32obuXJHmbInpzx8Z9/KwawwUIP2U05ca4X+mpBS3pkGDiGIRu8UjsnzwiF6DyNv1KpPVtIxhnFhH+Uzy9W/K+IOmdoAmRri3PqHEChPHn5r9pWz9BQ8D3qvEsUgvC+4TI55pVN/WgEXg6HGOkLyt3PVtPIE7ne03HshR/ayOP2d1Nxc8+V3+YwU/3XyZgsyqIy2dEH2vkuBqmQA4YACtfTMRB7ssVdUweXl+KTGaryj4WkW3OXFPNYhcJvfLUhGD7iNVR6igycD5310hHuaDfjRLkmKD45GVsQzn+J5/5YzbL8N7Qr0flLbSioFzMLr6NQuazt0uM/B7XU8Sz7rLe9 X-OriginatorOrg: citrix.com X-MS-Exchange-CrossTenant-Network-Message-Id: 57a06453-8767-4139-bfb7-08dacd69ce55 X-MS-Exchange-CrossTenant-AuthSource: SJ0PR03MB6360.namprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 23 Nov 2022 15:45:54.5988 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 335836de-42ef-43a2-b145-348c2ee9ca5b X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: 451QL4Jm0CowGmfOUnJRFhJRT1H84J+IRBNyWDzWiHtBv78TewFAytn6w26r8ssT5khRwZT4G5VkcPGGSsZqCA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM4PR03MB6935 Only set the GOP mode if vga is selected in the console option, otherwise just fetch the information from the current mode in order to make it available to dom0. Introduce support for passing the command line to the efi_multiboot2() helper, and parse the console= option if present. Signed-off-by: Roger Pau Monné --- I'm unsure why the parsing of the multiboot2 tags is done in assembly, it could very well be done in efi_multiboot2() in C, but I don't want to switch that code now. --- xen/arch/x86/boot/head.S | 15 ++++++++++++-- xen/arch/x86/efi/efi-boot.h | 33 +++++++++++++++++++++++++++++-- xen/arch/x86/x86_64/asm-offsets.c | 1 + 3 files changed, 45 insertions(+), 4 deletions(-) diff --git a/xen/arch/x86/boot/head.S b/xen/arch/x86/boot/head.S index 0fb7dd3029..6920ad08d1 100644 --- a/xen/arch/x86/boot/head.S +++ b/xen/arch/x86/boot/head.S @@ -221,9 +221,10 @@ __efi64_mb2_start: jmp x86_32_switch .Lefi_multiboot2_proto: - /* Zero EFI SystemTable and EFI ImageHandle addresses. */ + /* Zero EFI SystemTable, EFI ImageHandle addresses and cmdline. */ xor %esi,%esi xor %edi,%edi + xor %edx,%edx /* Skip Multiboot2 information fixed part. */ lea (MB2_fixed_sizeof+MULTIBOOT2_TAG_ALIGN-1)(%rbx),%ecx @@ -265,6 +266,15 @@ __efi64_mb2_start: cmpl $MULTIBOOT2_TAG_TYPE_END,MB2_tag_type(%rcx) je .Lrun_bs + /* + * Get command line from Multiboot2 information. + * Must be last parsed tag. + */ + cmpl $MULTIBOOT2_TAG_TYPE_CMDLINE,MB2_tag_type(%rcx) + jne .Lefi_mb2_next_tag + mov %rcx,%rdx + add $(MB2_tag_string),%rdx + .Lefi_mb2_next_tag: /* Go to next Multiboot2 information tag. */ add MB2_tag_size(%rcx),%ecx @@ -324,7 +334,8 @@ __efi64_mb2_start: /* * efi_multiboot2() is called according to System V AMD64 ABI: - * - IN: %rdi - EFI ImageHandle, %rsi - EFI SystemTable. + * - IN: %rdi - EFI ImageHandle, %rsi - EFI SystemTable, + * %rdx - MB2 cmdline */ call efi_multiboot2 diff --git a/xen/arch/x86/efi/efi-boot.h b/xen/arch/x86/efi/efi-boot.h index 27f928ed3c..695491a5b7 100644 --- a/xen/arch/x86/efi/efi-boot.h +++ b/xen/arch/x86/efi/efi-boot.h @@ -786,7 +786,22 @@ static bool __init efi_arch_use_config_file(EFI_SYSTEM_TABLE *SystemTable) static void __init efi_arch_flush_dcache_area(const void *vaddr, UINTN size) { } -void __init efi_multiboot2(EFI_HANDLE ImageHandle, EFI_SYSTEM_TABLE *SystemTable) +/* Return the last occurrence of opt in cmd. */ +static const char __init *get_option(const char *cmd, const char *opt) +{ + const char *s = cmd, *o = NULL; + + while ( (s = strstr(s, opt)) != NULL ) + { + s += strlen(opt); + o = s; + } + + return o; +} + +void __init efi_multiboot2(EFI_HANDLE ImageHandle, EFI_SYSTEM_TABLE *SystemTable, + const char *cmdline) { EFI_GRAPHICS_OUTPUT_PROTOCOL *gop; EFI_HANDLE gop_handle; @@ -807,7 +822,21 @@ void __init efi_multiboot2(EFI_HANDLE ImageHandle, EFI_SYSTEM_TABLE *SystemTable if ( gop ) { - gop_mode = efi_find_gop_mode(gop, 0, 0, 0); + const char *opt = get_option(cmdline, "console="); + bool vga = false; + + if ( opt ) + { + const char *s = strstr(opt, "vga"); + + if ( s && s < strpbrk(opt, " \0")) + vga = true; + } + + if ( vga ) + { + gop_mode = efi_find_gop_mode(gop, 0, 0, 0); + } efi_arch_edid(gop_handle); } diff --git a/xen/arch/x86/x86_64/asm-offsets.c b/xen/arch/x86/x86_64/asm-offsets.c index 287dac101a..fbd6c54188 100644 --- a/xen/arch/x86/x86_64/asm-offsets.c +++ b/xen/arch/x86/x86_64/asm-offsets.c @@ -175,6 +175,7 @@ void __dummy__(void) OFFSET(MB2_mem_lower, multiboot2_tag_basic_meminfo_t, mem_lower); OFFSET(MB2_efi64_st, multiboot2_tag_efi64_t, pointer); OFFSET(MB2_efi64_ih, multiboot2_tag_efi64_ih_t, pointer); + OFFSET(MB2_tag_string, multiboot2_tag_string_t, string); BLANK(); OFFSET(DOMAIN_vm_assist, struct domain, vm_assist); From patchwork Wed Nov 23 15:45:24 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Roger_Pau_Monn=C3=A9?= X-Patchwork-Id: 13053886 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 31FF0C433FE for ; Wed, 23 Nov 2022 15:46:14 +0000 (UTC) Received: from list by lists.xenproject.org with outflank-mailman.447637.704130 (Exim 4.92) (envelope-from ) id 1oxrws-0001gI-Ai; Wed, 23 Nov 2022 15:46:06 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 447637.704130; Wed, 23 Nov 2022 15:46:06 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1oxrws-0001fw-6k; Wed, 23 Nov 2022 15:46:06 +0000 Received: by outflank-mailman (input) for mailman id 447637; Wed, 23 Nov 2022 15:46:05 +0000 Received: from se1-gles-sth1-in.inumbo.com ([159.253.27.254] helo=se1-gles-sth1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1oxrwq-0008Tc-NP for xen-devel@lists.xenproject.org; Wed, 23 Nov 2022 15:46:04 +0000 Received: from esa3.hc3370-68.iphmx.com (esa3.hc3370-68.iphmx.com [216.71.145.155]) by se1-gles-sth1.inumbo.com (Halon) with ESMTPS id eebdf757-6b45-11ed-91b6-6bf2151ebd3b; Wed, 23 Nov 2022 16:46:03 +0100 (CET) Received: from mail-mw2nam04lp2169.outbound.protection.outlook.com (HELO NAM04-MW2-obe.outbound.protection.outlook.com) ([104.47.73.169]) by ob1.hc3370-68.iphmx.com with ESMTP/TLS/ECDHE-RSA-AES128-GCM-SHA256; 23 Nov 2022 10:46:01 -0500 Received: from SJ0PR03MB6360.namprd03.prod.outlook.com (2603:10b6:a03:395::11) by DM4PR03MB6935.namprd03.prod.outlook.com (2603:10b6:8:47::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5834.15; Wed, 23 Nov 2022 15:45:59 +0000 Received: from SJ0PR03MB6360.namprd03.prod.outlook.com ([fe80::740b:4e0a:7de4:5ab1]) by SJ0PR03MB6360.namprd03.prod.outlook.com ([fe80::740b:4e0a:7de4:5ab1%7]) with mapi id 15.20.5834.015; Wed, 23 Nov 2022 15:45:59 +0000 X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" X-Inumbo-ID: eebdf757-6b45-11ed-91b6-6bf2151ebd3b DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=citrix.com; s=securemail; t=1669218363; h=from:to:cc:subject:date:message-id:in-reply-to: references:content-transfer-encoding:mime-version; bh=3IEGhNz5bpGOjKYHnrL7h9RWohXg8ACWsyu0F4mMgf0=; b=IyhSSVruvP/cmQVjwwIZpmzg5A8dSEzUo+YrnrVCok9RYYXYsVkH17XE 2wsRDQ5h/HAUjMf+Y87AT0Gt1WtKGhYL1Zqv3kcrSBVPVLyvY823tRkXh 2/MyLiJIqluCnqz992vcJyC+Nt/M7JACIp35bpTZVVkXuEJDaxmU2e7No E=; X-IronPort-RemoteIP: 104.47.73.169 X-IronPort-MID: 85425922 X-IronPort-Reputation: None X-IronPort-Listener: OutboundMail X-IronPort-SenderGroup: RELAY_O365 X-IronPort-MailFlowPolicy: $RELAYED IronPort-Data: A9a23:JdHIzq80Ok4JnDvsyf2uDrUDRn+TJUtcMsCJ2f8bNWPcYEJGY0x3x jQbWDuPOayDM2SheoolOtu390gFv5CBnIdqQAI6/308E34SpcT7XtnIdU2Y0wF+jCHgZBk+s 5hBMImowOQcFCK0SsKFa+C5xZVE/fjUAOG6UKucYHsZqTZMEE8JkQhkl/MynrlmiN24BxLlk d7pqojUNUTNNwRcawr40Ire7kIx1BjOkGlA5AZnPKoQ5AW2e0Q9V/rzG4ngdxMUfaEMdgKKb 76r5K20+Grf4yAsBruN+losWhRXKlJ6FVHmZkt+A8BOsDAbzsAB+v9T2M4nQVVWk120c+VZk 72hg3ASpTABZcUgkMxFO/VR/roX0aduoNcrKlDn2SCfItGvn9IBDJyCAWlvVbD09NqbDkly8 8w3ExUGcCqpvO2V7qLqc8dcvsUKeZyD0IM34hmMzBn/JNN+HdXmfP+P4tVVmjAtmspJAPDSI dIDbiZiZwjBZBsJPUoLDJU5n6GjgXyXnz9w8QrJ4/ZopTeIilUvgdABM/KMEjCObd9SkUuC4 HrP4kzyAw0ANczZwj2Amp6prr+SwXmmCdhIfFG+3uRFnACW5Gs9MjoHalKArb7mu2y4UPsKf iT4/QJr98De7neDXtT7GhG1vnOAlhodQMZLVf037hmXzajZ6BrfAXILJhZEYcYjvdU7RhQr0 EGIhNLjATFzsLyTRmmZ/73SpjS3UQAXJ2IfYS4PTSMe/sLu5oo0i3rnUdJLAKOzyNrvFlnNL yuiqSE/g/AWkpQN3qDjoVTf2Wvy997OUxI/4RjRUiS99ARlaYW5Zouur1/G8fJHK4XfRV6E1 JQZp/WjACk1JcnlvESwrC8lRdlFO97t3OXgvGNS IronPort-HdrOrdr: A9a23:24ZmTaon2uJ4EcdT7KsYgqgaV5tLLNV00zEX/kB9WHVpm5Oj+v xGzc5w6farsl0ssREb9uxo9pPwI080kqQFm7X5XI3SJzUO3VHFEGgM1/qH/9SNIU3DH6tmpN 5dmstFeaLN5CZB/KHHCWCDer5PoeVvsprY/ds2p00dMT2CAJsQijuRZDzrcXGfE2J9dOcE/d enl7x6jgvlXU5SQtWwB3EDUeSGj9rXlKj+aRpDKw875BKIhTaI7qe/NxSDxB8RXx5G3L9nqA H+4kbEz5Tml8v+5g7X1mfV4ZgTsNz9yuFbDMjJptkJJi7qggOIYp0kf7GZpjg6rMym9V5vut jRpBULOdh19hrqDyqIiCqo/zOl/Ccl6nfkx1PdqXz/ofbhTDZ/L8Zan4pWfjbQ9kJl5bhHoe p29lPck6ASIQLLnSz76dSNfxZ2lnCsqX5nteIIlXRQXaYXdbcUh40C+0F+FosGAUvBmckaOd grKPuZyOddcFucYXyclm5zwOa0VnB2JRuCSlhqgL3h7xFm2FRCi2cIzs0WmXkNsLgnTYNf2u jCOqN00JlTU84/d8tGdak8aPryLlaIbQPHMWqUL1iiProAIWjxp5n+56hwzP22eaYP0IA5lP 36IRxlXFYJCgLT4PC1rd52GkinehT+Yd2t8LAT23FBgMy8eFKxWhfzDWzHkKOb0oci64PgKr KO0altco/exFvVaPh0NjLFKuhvwAElIasoU/YAKiazS5HwW/rXn92eVsrvD5zQNhthcl/DIx I4LUvOzYN7nw2WZkM= X-IronPort-AV: E=Sophos;i="5.96,187,1665460800"; d="scan'208";a="85425922" ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=lKIpnEm50ROSlVG1uvI1R6yYmCbxqTGKv9wMFaqDoQXQUMPAjTi1JJCmD4KpSWOhWNL2TOceCcZLCInOgIpOXdYfwArAWEsbTBc+aHsOlgYkdwlm3/kfLcYuHNmAYJYYlVB3o02Dn/+WLsNKtcVqhm1Aq1uC8NCYeT2tnrJ7o92OiGn/SnCirZlUt04r4qPjO95EHpyFeUROTObpjIvyiIr5Anx0AOvUyFMSOOh/twQ5twwWcDSSwoYnLbxZXf9C8GE4+Yii6dOroANZo48mC599G0zGWae9OeY2ZM8uUO2TT47LNINF6I3Y0PhMV4GSnWGsbyz8q+EQiAI5CDAURg== 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=zf502VoX9A12guSHyYKYXI0C23cUCFbnzBqkpMCisdc=; b=h6+imtFpwGnKWpECzLSNgYAxzU2uj4RU9Qb9z6u/WQjpyquQGn4oEdX4XsKuGkO2JsGIvOzhhAT6pd1sWzhkiqOsBnfPvUcP579Ggh/O1AJEFHfU1wg48PMa5jeZuGO43kWab+Brz0jZhyfQRmJZ+8IviV7HPRtGd28rcXNbOsb0q421ooIWR6Kff56WF4fV86ZBRO/zzbcbDmMjT1FokRoI64OyEG2GevAFTsTbzIQTl0kKspspfX6ZyNzSNE5zMG4FMgDfmlS2RdDNVrT81XtmyTWl0xhavSAa9+1R+uCLxAtplT+d3dypD+Mp/qFv328gbM9/LUJ33bdt0opuKQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=citrix.com; dmarc=pass action=none header.from=citrix.com; dkim=pass header.d=citrix.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=citrix.onmicrosoft.com; s=selector2-citrix-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=zf502VoX9A12guSHyYKYXI0C23cUCFbnzBqkpMCisdc=; b=nff6HDhegQ1LG3mE6aisggn0FX8/1VLBsHanuIvPozrBqBZifNftqYA8AswJpEZNR9E1G2JMZ7abE/AN7+ryf/S7gsu1fv8xZVt/f6sSgupHkq3fdn6PtJNGtSMxPODG7eng6OR5qcBKX8q618n3lGztnBRI1Ojfnezrko2olrQ= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=citrix.com; From: Roger Pau Monne To: xen-devel@lists.xenproject.org Cc: marmarek@invisiblethingslab.com, Roger Pau Monne , Jan Beulich , Andrew Cooper , Wei Liu Subject: [PATCH 5/5] multiboot2: parse vga= option when setting GOP mode Date: Wed, 23 Nov 2022 16:45:24 +0100 Message-Id: <20221123154525.63068-6-roger.pau@citrix.com> X-Mailer: git-send-email 2.37.3 In-Reply-To: <20221123154525.63068-1-roger.pau@citrix.com> References: <20221123154525.63068-1-roger.pau@citrix.com> X-ClientProxiedBy: LO4P265CA0111.GBRP265.PROD.OUTLOOK.COM (2603:10a6:600:2c3::11) To SJ0PR03MB6360.namprd03.prod.outlook.com (2603:10b6:a03:395::11) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SJ0PR03MB6360:EE_|DM4PR03MB6935:EE_ X-MS-Office365-Filtering-Correlation-Id: 2f55f998-2f0c-4c8c-549d-08dacd69d16b X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: pc/m6AVaAeLOVtlPo+XXo6PnlyorZPyRwKgMys9jx3iwT+5NkTh3FcX0bgYo5wyZ67lBPiFkZbmmmKQaZjGmmmuXlEhVXM82zIBIjpxS+dGgjbTLrfbbIUEIc93FfXtNHRsLj9FQ3cVKf+X/ktudvhyqgZjdyvQRiMqnvqgGs6eOextFXVxdZ15XTeq9shZpTcboZB8UFEMpFn+WXQs3zXzxaDcPyNEsXgqo8vl44k6a0ohzrO8qPBXKCG6GdEINfeqAfQbFe9PrmvLbQNMzpC9ZvTRCz+pnznu+OSZXy95nrD81aOy/Dd1Q0DIeQlTPyDty9fdflWRUlIvzTR+uUeppS4DgUJFJ66HJ6RflzRk2G0MZdwxV8CPKSyJvj7nBkhRY5Zb7ShfAI4ZJEqD2c9MzhhJskbGLdwJIouwAViM5dSl2HDNikmI/ghv1JV/MhfsmEOejzIJWJEYFugXi2xBMLYP9ECGu25Ak29duVlaFcaf1sjyUMkd/8NOtmpbDb96/txnLDXAkKN/6Jtp/+U8V4nQu8rnufoUO8If7KJ9yHWmbg2OZpeSjhZOgdZYtbMKrBmc+xb2JNuA2BWv59XIcJ5SeCiy8M+4AbE9N66YaFD2Ikl8os6+sbC6MkiZ/oDHhHoCmkLLm6+FlfXP9EA== X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:SJ0PR03MB6360.namprd03.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230022)(4636009)(136003)(376002)(39860400002)(396003)(346002)(366004)(451199015)(36756003)(86362001)(41300700001)(66556008)(66946007)(316002)(66476007)(4326008)(8676002)(82960400001)(38100700002)(6486002)(83380400001)(54906003)(6916009)(478600001)(186003)(2906002)(5660300002)(8936002)(6506007)(2616005)(1076003)(26005)(6512007)(6666004);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?ZKWx3elICFlhfj/fMfjtEhFWLJSw?= =?utf-8?q?jK/uy1nuCfPWiKvDDddUQMKYNs0mrtIpUQzCX3E09IAyL1EtuUNthR50+GtE5y63l?= =?utf-8?q?x/FuH1bZcXhwG6h5kQ7cFJSYxZ9mnVfkFAUCMRH+PUxLiPhZDUVcMuaeLJvSd2xVs?= =?utf-8?q?2+6pV8YZia6JqFQ0Y9WM0KGgb5Ab5K62R2tf05GFfNK+aGb3Tv9EVR+e+yCWTfCE0?= =?utf-8?q?5S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ezqxpFnGGj3ogQU0bPaRNmegngUuzscML+B+Ab4M8fEmcQdYODoaYtIFkbA?= =?utf-8?q?g9UymDs1h27TYREeks9M3eIvuYDwRccsYz/U3DNXbx3qS3nafLtyZ+fRavBrGAqic?= =?utf-8?q?aKRetI/2hm6/sFBc9GblMkCFUGdJT3BWz957ipfY9Sx9De8UOicmre3coUO629vw6?= =?utf-8?q?r9A4ZyOqmqu59qFw6UaygsMNPiePc2QfsaDEQVmm2pU61LCvhZOXxRdyRraFSzlpE?= =?utf-8?q?MHOTXly0wXxktBoScatm3otY9+FtYKQA5tkO+RR4cnWrFEVus9SXqtt3TfyQkjt7H?= =?utf-8?q?PdrjIm4M61BN1AKO+gxNqs1hbZV8fAJn1x0R+VRB3EdsrpndoniECq2DQCmdhQYxE?= =?utf-8?q?AIWYCmwvgtEQgo3b7juiQnQVAIeMkLDuAt6aOlPTZQNBm+X7D/Z7XFu84tIjbeQTT?= =?utf-8?q?Qi3foOSGNUMS?= X-MS-Exchange-AntiSpam-ExternalHop-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-ExternalHop-MessageData-0: TvjOtGy14rGVM4fR29dJUdJeO7FT4bSPa3MegItj5/K9Nih5T2pbvFY0viMdjqkt1EkBQ7zMwV2S1FsHn1sM0UcRlQHBWrod+pFbPhht4UoyA4X78qQ4twPVFZrsx2CkzSb/l1tycY0zl9KN3tpBqS76EityR9ZHnaqrxjarG5wOQSCbCHMXv7zdKlCdEG+nC07uv5EJ2MQ1MiByRxBempIxtBHsltTgT3Yk6ie7kP5H+aR6r5LvZiWeo7Schx0CcmoIpfwHVvEeX44NHE1eo47Pco2bNTKCdloLf6YeSoK7bDOgWG7s827HaJZochue9eqWrGFOhTHQ/ggvnjdZG0mO9vUM5BGeLEDI4GLdzacWNyj7XEOeDRQa4+BAfc9A7HCmJ4Yh8hd8OqQEfGpXkDJcBCXTIh+zYZCRqkRhJikBuI8I5Bh6yHmjNofOoT9lfPVXXdWL7DoYPiez4PTDpn3E/nZ0xTPrE9oOuLFzW6ygp89qykXN62ArUS9hCk1xGez2kGqvl0ZO3YBAdJ6YUrM/5k6JBiqAEyAoHkffXy4J02p5+EpcC4oLDUypzFEb40HLLs4olNkvR9YFBGWq5DZOye5waaQcU8LL4/iXPx8RsmDi7ebwVdRuhRS4YiB/MJtT1+HaNR5r9z3vkClvN3q4tsv+KwRnLB5t/yGhlQzzYkY+cS8VUQAHLLuxYCwTPuspSLqZVzYwXXJUbfKDQIeggzu/s/3LmZxjtUUBdGAPbtDl8+dgYTUQrvUN07Nn2O3cMxYwQ/gQwe15rJa3U9gBu8eQYtUaO/nEYmDxnDEIf0nYoMDF5HmmK9F89IXylZK3PLPUzJHvNlVWGKabC6RCtFLSfl+ShGeya/gPTKd7Oq7Y1H9gJq9M9Vp0btSv X-OriginatorOrg: citrix.com X-MS-Exchange-CrossTenant-Network-Message-Id: 2f55f998-2f0c-4c8c-549d-08dacd69d16b X-MS-Exchange-CrossTenant-AuthSource: SJ0PR03MB6360.namprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 23 Nov 2022 15:45:59.7578 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 335836de-42ef-43a2-b145-348c2ee9ca5b X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: R6JO6RirB05AEEtXe1ZZPPuK8ZycnEVdTbZfHdhPBXhh5JwSWk3G6Sz8CPHv9lresc0JqpRb6Y4d+oZqVtiwaw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM4PR03MB6935 Currently the vga command line gfx- option is ignored when booted using multboot2 and EFI, as the setting of the GOP mode is done way before the command line is processed. Add support for parsing the vga gfx- selection if present in order to set the selected GOP mode. Signed-off-by: Roger Pau Monné Reviewed-by: Jan Beulich --- xen/arch/x86/efi/efi-boot.h | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/xen/arch/x86/efi/efi-boot.h b/xen/arch/x86/efi/efi-boot.h index 695491a5b7..e791d65213 100644 --- a/xen/arch/x86/efi/efi-boot.h +++ b/xen/arch/x86/efi/efi-boot.h @@ -835,7 +835,22 @@ void __init efi_multiboot2(EFI_HANDLE ImageHandle, EFI_SYSTEM_TABLE *SystemTable if ( vga ) { - gop_mode = efi_find_gop_mode(gop, 0, 0, 0); + unsigned int width = 0, height = 0, depth = 0; + + opt = get_option(cmdline, "vga=gfx-"); + if ( opt ) + { + width = simple_strtoul(opt, &opt, 10); + if ( *opt == 'x' ) + height = simple_strtoul(opt + 1, &opt, 10); + if ( *opt == 'x' ) + depth = simple_strtoul(opt + 1, &opt, 10); + /* Allow depth to be 0 or unset. */ + if ( !width || !height ) + width = height = depth = 0; + } + + gop_mode = efi_find_gop_mode(gop, width, height, depth); } efi_arch_edid(gop_handle);