From patchwork Mon Feb 7 07:41:03 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jan Beulich X-Patchwork-Id: 12737003 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 9137FC433EF for ; Mon, 7 Feb 2022 07:41:33 +0000 (UTC) Received: from list by lists.xenproject.org with outflank-mailman.266488.460171 (Exim 4.92) (envelope-from ) id 1nGye6-0004mS-LP; Mon, 07 Feb 2022 07:41:10 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 266488.460171; Mon, 07 Feb 2022 07:41:10 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1nGye6-0004mL-I2; Mon, 07 Feb 2022 07:41:10 +0000 Received: by outflank-mailman (input) for mailman id 266488; Mon, 07 Feb 2022 07:41:09 +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 1nGye5-0004mF-9G for xen-devel@lists.xenproject.org; Mon, 07 Feb 2022 07:41:09 +0000 Received: from de-smtp-delivery-102.mimecast.com (de-smtp-delivery-102.mimecast.com [194.104.111.102]) by se1-gles-sth1.inumbo.com (Halon) with ESMTPS id 4fa3861b-87e9-11ec-8eb8-a37418f5ba1a; Mon, 07 Feb 2022 08:41:07 +0100 (CET) Received: from EUR01-VE1-obe.outbound.protection.outlook.com (mail-ve1eur01lp2054.outbound.protection.outlook.com [104.47.1.54]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id de-mta-24-o1nknDzdPx2swUU95rTgbw-1; Mon, 07 Feb 2022 08:41:06 +0100 Received: from VI1PR04MB5600.eurprd04.prod.outlook.com (2603:10a6:803:e7::16) by DBAPR04MB7272.eurprd04.prod.outlook.com (2603:10a6:10:1ad::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4951.18; Mon, 7 Feb 2022 07:41:02 +0000 Received: from VI1PR04MB5600.eurprd04.prod.outlook.com ([fe80::5160:9fd7:9627:cb11]) by VI1PR04MB5600.eurprd04.prod.outlook.com ([fe80::5160:9fd7:9627:cb11%5]) with mapi id 15.20.4951.018; Mon, 7 Feb 2022 07:41:02 +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: 4fa3861b-87e9-11ec-8eb8-a37418f5ba1a DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=mimecast20200619; t=1644219667; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=1+HZbSM2dItKwztAzlpbiDWHRe2tHjMxRwCxBvZmn8E=; b=WkTUM2D4v/c5H9FDlCdXvlv9WbfzI5VeBIirgxN+NpupyMCcbL6q6/Cr1UlhF+Oehcku4H n1caSys7iem/bH3vuH04TWD5/BKwRXvPLRvHIHCcT2Xij1bzY9cbEziCtVFrJC82BSF5BH R4gAA2ifIpqZn3YqOY1CWdi99BgaduQ= X-MC-Unique: o1nknDzdPx2swUU95rTgbw-1 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== 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-Authentication-Results: i=1; mx.microsoft.com 1; spf=none; dmarc=none; dkim=none; arc=none Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=suse.com; Message-ID: <2501ce9d-40e5-b49d-b0e5-435544d17d4a@suse.com> Date: Mon, 7 Feb 2022 08:41:03 +0100 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101 Thunderbird/91.5.0 Content-Language: en-US To: Juergen Gross , Boris Ostrovsky Cc: "xen-devel@lists.xenproject.org" , lkml From: Jan Beulich Subject: [PATCH] xen/x86: obtain full video frame buffer address for Dom0 also under EFI X-ClientProxiedBy: AM6PR02CA0012.eurprd02.prod.outlook.com (2603:10a6:20b:6e::25) To VI1PR04MB5600.eurprd04.prod.outlook.com (2603:10a6:803:e7::16) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: bae4e898-5a66-4465-c815-08d9ea0d30f2 X-MS-TrafficTypeDiagnostic: DBAPR04MB7272:EE_ X-LD-Processed: f7a17af6-1c5c-4a36-aa8b-f5be247aa4ba,ExtFwd X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:4303; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: KDzK7V5BMfvIo8Q4ZUZ33BLd9FMXwa8iXwDl3suz0KT04KO5GroZynYttX3ymtzb023XoyFrZsUfa/e+k/GbmFiqE3evaDzgM4N9gl4Ep5dl6Rw7D4Zvlh+dtVQfV2VvlyFJCY2vCc8MZ3u8w3sAwmctgt1L9N97I9T5ZvO+2j93bR+vJqYfQah0/hYOhnazIW89dd7c7WTmXLkIC5wUK+kP33kfKBbUnoas+qoqVLG28Z1kumha4T7GKgEDHLUWGgQT01/WJlPorMrNI1B90O3KNTAF8wUVe8IdWek309wBFfKNr89sWbahV6wFk7h12YenXZXZZ/5kqwOg6GbyD/3OYOO9t6+Os8GeiQlkh1mvAg6yQcRMTTLhdwTgKlmDehkztaBVLR7UvkkeWTXksEVTqnoTz9EqhnoQof9WGoaAbHoVbrpRVZer2jpQLqPFFtiqBmOQ5oKOrD664aNito7+pG3VaPO3/Nt2OfhKim1Arb3vuB6yRK5l+DBV/3dMX/HLKeywvclV8JJCQbDaSrncDvglJ9MII2xBHuGBu8d12mkmIYKQg/vzpxHd4P8CQtyWPfVFMy/CiJ/vKzsV+3PHLHidh4+h1asLUrgr5MFKQ5phsZ/yF1RELcHLZ5r3TwhqBE8cBII5cJXQTDIh3VJ7OXl4ZoFK4vwSMdjpblQ6C78SeP+VRaCVHNIcoDgGM/zmRyL+KF4z0TvzGWLkfwQ7CBzvH5s9HHLrdiolYFE= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:VI1PR04MB5600.eurprd04.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230001)(366004)(2906002)(316002)(38100700002)(6486002)(2616005)(4326008)(54906003)(110136005)(86362001)(5660300002)(31696002)(31686004)(36756003)(6512007)(66946007)(8936002)(83380400001)(8676002)(6506007)(26005)(186003)(66556008)(66476007)(508600001)(45980500001)(43740500002);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?xyuok3T03fEUmg8Ds83Um1FqaUSE?= =?utf-8?q?FHSL3M1VB9WstV9hrntuiSVvl5WYCFzi2QsuBSpUQMhDordC8TYwqz7mp1j3HgzSF?= =?utf-8?q?ELRZP6kwamys3lZh4qu4ma0R7czL4YMwFmPb8EWrSy3yY67ufj13xKxInbAh5wf+P?= =?utf-8?q?X4rADQ7zdxoL8CkCb+TMkaAtco2aDFvgUgsNB19xIL2Awnn6Bx77qtYsPIOMnO3sr?= =?utf-8?q?dvfenFDslJo5EKWK7Cu8AhF/h1bglgEtcQjqHFgkiVhtskhwdmya635F2Aqs2hIdx?= =?utf-8?q?U3Jv8uMwFjdQEwK4i5t8SD8qAxz6/sa2XlsNePp1xHpnp1775Rd6BpYjXKUr0VwrJ?= =?utf-8?q?a3RNAZPYMlmbLTh5BBjukB1lom/scmHvibe4Kcr9DlWpaHDnDWX3WXUlnzEJMc8z/?= =?utf-8?q?nk2mIliqUIroIoKNlz0qx14iosciWuW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aONqtwDCD239bQp9R/6ZpkTaEl721eRGSh?= =?utf-8?q?1v+FKd7sPhm5U3SwA9e/0WAx5bmIQxCGX438lV7hdUubo2md7cBNP0PuqAc9mt7Fz?= =?utf-8?q?PoBtRzkDj282T2xkNQ510lzY9VLq+YEKzLQage829BEsBc21sXm7dk+pnHExq7tNz?= =?utf-8?q?Hc42/G7+1uaKeai2RJQyQo/ry4v9shTOuNUiKu0MSsTCFcXOzbcbWB07IejNVLurT?= =?utf-8?q?Mh7WcpX77Qy9/Q92U3jSlEe9+5kAUP/2ikIL2VDe0j2qNe2Dv+Q6JWc=3D?= X-OriginatorOrg: suse.com X-MS-Exchange-CrossTenant-Network-Message-Id: bae4e898-5a66-4465-c815-08d9ea0d30f2 X-MS-Exchange-CrossTenant-AuthSource: VI1PR04MB5600.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 07 Feb 2022 07:41:02.7733 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: f7a17af6-1c5c-4a36-aa8b-f5be247aa4ba X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: SRzZYyJ017p5qHhZ9YPyvR0wFBlqc8KfwWwnUB43f0pbFyi89GmbMxKnlnhy2Box7tr/sG1cwQjth0UvpLtzcg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DBAPR04MB7272 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 Reviewed-by: Juergen Gross --- 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; } }