[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] x86/platform: Protect XENPF_get_dom0_console if CONFIG_VIDEO not set
- To: Michal Orzel <michal.orzel@xxxxxxx>
- From: Jan Beulich <jbeulich@xxxxxxxx>
- Date: Wed, 7 Dec 2022 12:07:35 +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=W4jagkVD4BsT45UU0L9uMOR4TH1D+wYI5al6Tj+wLFY=; b=I9ocOInDlQIl/nRJJ5TqbLho5Gqh692c+vggLKQFdB63UecvaKi3x2QvsOHyPjVliBovhG03i4kzimmr1Q5A3sa4EbHscVC9Yng7NamP3UJtJFx7SWGz4LoCEarITnKEZg+bB7kk1IZck6T1fa2+SVjCxYLv4THL2Brw5hWm+aTsQSXtRgy+v+DPQmHMNl7y+w+dXCkH7GonRddl/XOUbigAsG9dlhUdST61hz8/SkPqprNcpX15w8XqRBwq5JH+W5lLFQtXovL/jyOf9keindoYXKhMOdnj2V3endi0ZfteEkZvZRdIeWkNsRbZFC3oCtKjzexhox+U0d552xEFVg==
- Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=J0noXjTTa81yLokuEEAVSbMLVwBlRw4GnRbsTUsqAuDGmsEUsotfJRPzyIzbPdxjkVIjiiQap9EPpWRCpo371otqOGoXve1hPxcwxSINjdYWFxa7JKwjuIrg/mYtVtVUAZve/Mmv/HzOotrBH09VbNsxF3pzWKcNcqnueJfXRYcl/MYG4EJdqNsVirPn1f0+xGQ7mu9aCfS/2eM7dFU/PS994kQpUuFPiH6Hlz1Qb6e+7JaB4iVyS40t0zNHXCyezIn7cXC40CyCfYPKi9w4JhupFJEdh3MgGkJ6ebY7rVYku4eNO8o6aQHIpRfN2WTM04cWZH6wFay9jX8VtxfsUA==
- Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=suse.com;
- Cc: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, Roger Pau Monné <roger.pau@xxxxxxxxxx>, Wei Liu <wl@xxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxxx
- Delivery-date: Wed, 07 Dec 2022 11:07:50 +0000
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
On 07.12.2022 11:38, Michal Orzel wrote:
> Hi Jan,
>
> On 07/12/2022 11:34, Jan Beulich wrote:
>>
>>
>> On 07.12.2022 11:29, Michal Orzel wrote:
>>> A build failure [1] is observed if CONFIG_VGA (and thus CONFIG_VIDEO) is
>>> not set. This is because XENPF_get_dom0_console cmd of platform hypercall
>>> makes a call to fill_console_start_info, which is defined in video/vga.c
>>> and built only if CONFIG_VGA is set.
>>
>> Which means to use ...
>>
>>> --- a/xen/arch/x86/platform_hypercall.c
>>> +++ b/xen/arch/x86/platform_hypercall.c
>>> @@ -839,6 +839,7 @@ ret_t do_platform_op(
>>> }
>>> break;
>>>
>>> +#ifdef CONFIG_VIDEO
>>
>> ... CONFIG_VGA here, unless fill_console_start_info() was moved to a file
>> that's built dependent upon CONFIG_VIDEO.
> The one and only reason of using CONFIG_VIDEO and not CONFIG_VGA is that all
> the
> calls in existing codebase to fill_console_start_info are protected by
> CONFIG_VIDEO
> and not CONFIG_VGA. That is why I choose to stick to the current behavior.
"All" is interesting as a statement when there's just one. But yes, I
can see that the issue is broader - 2b8a95a2961b ("xen/x86: make VGA
support selectable") didn't really get the #ifdef-s right. I guess the
change then is okay as is:
Acked-by: Jan Beulich <jbeulich@xxxxxxxx>
and we'll need to touch all of that again (or move code around) if some
2nd way of selecting VIDEO appears.
Jan
|