[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH] x86/platform: Protect XENPF_get_dom0_console if CONFIG_VIDEO not set
- To: <xen-devel@xxxxxxxxxxxxxxxxxxxx>
- From: Michal Orzel <michal.orzel@xxxxxxx>
- Date: Wed, 7 Dec 2022 11:29:09 +0100
- Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=lists.xenproject.org smtp.mailfrom=amd.com; dmarc=pass (p=quarantine sp=quarantine pct=100) action=none header.from=amd.com; dkim=none (message not signed); 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=SzCm0T8TgsnX/v1lIUm06IzvzdKhH6rJ3JrNtijnIMQ=; b=bcRtr4rXq0JPMnI+5QgTiJZrmd6XlBPKKHZYQQomUIcqNT6NZwupzAzF7YXS/BUSO3Ndj/BK8ORB2/3Z1w9qGtMwdr0PHFG9ii9gvOqmpB4Y5jG14pK3D930gP6Z77j/sxPZNGvXmdkWzGoFU6fAiTiP2Au1JVlXwmNm0cuqLZ8jLHY2BhFA6FI/5qyNL/pOwGO4w2QCTyia8M9TRKeMts8/eqlHRHPYBbFNow6HnTytskW39IrvJwhS92ljyLIar/QgTrM71iDPq+/86D5eOJQnaOLAwyT4ANlSqMdwg8ZD3e4zDiYbKVL2BNv1f49GRGLylhHP5hdBfio+KofdIw==
- Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=G6ZCS4+xDwZANG+TIYMBVb99bvGGfJHREIJ8NC3PlUfP3s/2tfHpyu5Xmd3BOCTecyFrswQR9gSWGWxfWGSvs4AUtNSkby9Zp1dNYf0VKQV9+czNphg7sxN948OKfI0tFb9FCXGjGNpuERF86rlNDLomELiGMtNvwXIPwTaZ4AKMzq+nAQAa/FtHrR7eBPw6X4I56njI7ZnOssPZA+FhGVtxdK4GMtuMlbj0kta0m6HWYsVFXqFLm0AzkmZ0mFy681sFUPy/Fhwwxo41rcw86XvfiiDLW8MJPW528tWITdKL5ulpzE8pXd6ROHBZYvxHGJpicv/WoSqA3Re7I4JoMQ==
- Cc: Michal Orzel <michal.orzel@xxxxxxx>, Jan Beulich <jbeulich@xxxxxxxx>, Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, Roger Pau Monné <roger.pau@xxxxxxxxxx>, Wei Liu <wl@xxxxxxx>
- Delivery-date: Wed, 07 Dec 2022 10:29:25 +0000
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
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.
To fix this issue, protect XENPF_get_dom0_console with CONFIG_VIDEO
ifdefery.
[1]:
ld: prelink.o: in function `do_platform_op':
(.text.do_platform_op+0x1a7): undefined reference to `fill_console_start_info'
Fixes: 4dd160583c79 ("x86/platform: introduce hypercall to get initial video
console settings")
Signed-off-by: Michal Orzel <michal.orzel@xxxxxxx>
---
CI job failure:
https://gitlab.com/xen-project/xen/-/jobs/3430825994
---
xen/arch/x86/platform_hypercall.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/xen/arch/x86/platform_hypercall.c
b/xen/arch/x86/platform_hypercall.c
index 3f0d0389af44..08ab2fea622c 100644
--- 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
case XENPF_get_dom0_console:
if ( !fill_console_start_info(&op->u.dom0_console) )
{
@@ -849,6 +850,7 @@ ret_t do_platform_op(
if ( copy_field_to_guest(u_xenpf_op, op, u.dom0_console) )
ret = -EFAULT;
break;
+#endif
default:
ret = -ENOSYS;
--
2.25.1
|