From nobody Thu Oct 30 22:53:25 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; dkim=pass header.i=teddy.astie@vates.tech; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass(p=reject dis=none) header.from=vates.tech ARC-Seal: i=1; a=rsa-sha256; t=1755088972; cv=none; d=zohomail.com; s=zohoarc; b=RMO5V6KDFwMj1fAvaE1Xcoxykr5+B498bx3ThQfNbXOXgPk8Fx5BTF1f8EXuPKPW4g8NRicmOI/yNLKZFtdmodjNGUEKUHNuur38oFyhL98BOf2jcSpoaFlBhSAfnlaIIrXXX3W9o1VWhX+5X5zC1R9sZ2WiSBj67XSHVOHbJ4w= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1755088972; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=IEtpRl8bINQORp9a9aA+RHl0fhkvpOHNK0UFdgc2xjw=; b=hzX2MJGags+kX0R/+St+0pC1HbWGxULlvdhZiTaj3njRWuYz6FyLycFyN6M0/t7MEeDFvO8G2d0cozbYDXdT/JeiownFWIFO48pZKz41e02/Nh3JJXBhruUflzi6txRb5ZbaomEb3HAFYcB50nYHDfdlAFO3Eceg14lfKqTaBGg= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass header.i=teddy.astie@vates.tech; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass header.from= (p=reject dis=none) Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1755088972524372.35651818695464; Wed, 13 Aug 2025 05:42:52 -0700 (PDT) Received: from list by lists.xenproject.org with outflank-mailman.1079871.1440551 (Exim 4.92) (envelope-from ) id 1umAoN-0005V5-OX; Wed, 13 Aug 2025 12:42:35 +0000 Received: by outflank-mailman (output) from mailman id 1079871.1440551; Wed, 13 Aug 2025 12:42:35 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1umAoN-0005Uy-K7; Wed, 13 Aug 2025 12:42:35 +0000 Received: by outflank-mailman (input) for mailman id 1079871; Wed, 13 Aug 2025 12:42:34 +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 1umAoM-0005UN-9f for xen-devel@lists.xenproject.org; Wed, 13 Aug 2025 12:42:34 +0000 Received: from mail145-23.atl61.mandrillapp.com (mail145-23.atl61.mandrillapp.com [198.2.145.23]) by se1-gles-flk1.inumbo.com (Halon) with ESMTPS id f8b04216-7842-11f0-b898-0df219b8e170; Wed, 13 Aug 2025 14:42:29 +0200 (CEST) Received: from pmta06.mandrill.prod.atl01.rsglab.com (localhost [127.0.0.1]) by mail145-23.atl61.mandrillapp.com (Mailchimp) with ESMTP id 4c27LW3xBzz1XLF5j for ; Wed, 13 Aug 2025 12:42:27 +0000 (GMT) Received: from [37.26.189.201] by mandrillapp.com id 55b4d820cc2b4db4851404e9de6bfbb6; Wed, 13 Aug 2025 12:42:27 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version 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: f8b04216-7842-11f0-b898-0df219b8e170 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mandrillapp.com; s=mte1; t=1755088947; x=1755358947; bh=IEtpRl8bINQORp9a9aA+RHl0fhkvpOHNK0UFdgc2xjw=; h=From:Subject:To:Cc:Message-Id:Feedback-ID:Date:MIME-Version: Content-Type:Content-Transfer-Encoding:CC:Date:Subject:From; b=ymK08R3waAjDw6ob0/G3sTASazOCqCla0G0gKlmO4tw+Lqac9DU0osvo+ITZ53Inx A/swQgbHbyCSuW3SdNcZcAL8jY17c+YhrxjoGJTrEzNuan9L/+d5CNcwv5jmLA9NLv pfjthpPiAunkV4xvNoTkviEekl88MPKJ3QBBbxI0uPWtQliSYj0UXOD1usV+lTBcGm L3VgFHKLoFq/PmkJhSN95tekN2DXDmR3ItmMzPZbQKIxGuUF+sHH8HuDw1wTG5TPTI ik8OFrKmm7Jfxye+ZA3ZLFKwSrvgTmljYiU1iEY69btCUmPol3aoIxRTszJXYNCEA7 q+e/LbAvJ0QkQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=vates.tech; s=mte1; t=1755088947; x=1755349447; i=teddy.astie@vates.tech; bh=IEtpRl8bINQORp9a9aA+RHl0fhkvpOHNK0UFdgc2xjw=; h=From:Subject:To:Cc:Message-Id:Feedback-ID:Date:MIME-Version: Content-Type:Content-Transfer-Encoding:CC:Date:Subject:From; b=n21Gt+9FbkAn48e7dmkHVPUrd5wZz8CNG8Tas3gEffJ6OoNXd86Wh1MlFoKavQP1C QDh+NbZgBVit6mFMThNzdLDTtBObRyJaY7oef/Acbqke+/qopWIhTN/s8OZ5fYJuuE KiK98u1Lyn79TaozEa36W6Nn/KOoPuKmnYlQ+RwDek5ksMulk+8XXIvfl+mLtYeJ/A yPGGvuZJCUca3K8ciMiO8EuzVLl9LojjilrTdIY3GApG9m9qnTRjzbBUyQknFJqkaA x3OWmJUllBUgLAHk9D0oxibcIz3XR6NdHfAAoKf97dQzpkyDqffB6UgwesL7SRdk8X RF/e+o0niGF2g== From: "Teddy Astie" Subject: =?utf-8?Q?[PATCH]=20libxl:=20Add=20virtio=20(virtio-vga)=20display=20support?= X-Mailer: git-send-email 2.50.1 X-Bm-Disclaimer: Yes X-Bm-Milter-Handled: 4ffbd6c1-ee69-4e1b-aabd-f977039bd3e2 X-Bm-Transport-Timestamp: 1755088946657 To: xen-devel@lists.xenproject.org Cc: "Teddy Astie" , "Oleksii Kurochko" , "Community Manager" , "Anthony PERARD" , "Juergen Gross" Message-Id: <95a54f6c4296b03db5265da50a98f03c53858677.1755088831.git.teddy.astie@vates.tech> X-Native-Encoded: 1 X-Report-Abuse: =?UTF-8?Q?Please=20forward=20a=20copy=20of=20this=20message,=20including=20all=20headers,=20to=20abuse@mandrill.com.=20You=20can=20also=20report=20abuse=20here:=20https://mandrillapp.com/contact/abuse=3Fid=3D30504962.55b4d820cc2b4db4851404e9de6bfbb6?= X-Mandrill-User: md_30504962 Feedback-ID: 30504962:30504962.20250813:md Date: Wed, 13 Aug 2025 12:42:27 +0000 MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @mandrillapp.com) (identity teddy.astie@vates.tech) X-ZM-MESSAGEID: 1755088975070124100 Content-Type: text/plain; charset="utf-8" Add "virtio" vga which uses the virtio-vga device provided by upstream QEMU. It is VGA compatible and can be enlightened with virtio-gpu drivers which a= re available since Linux 4.4 and as a part of KVM Windows drivers. Signed-off-by: Teddy Astie --- CHANGELOG.md | 1 + docs/man/xl.cfg.5.pod.in | 6 +++++- tools/libs/light/libxl_dm.c | 3 +++ tools/libs/light/libxl_types.idl | 1 + tools/xl/xl_parse.c | 2 ++ 5 files changed, 12 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5f31ca08fe..88ff5b9a77 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -26,6 +26,7 @@ The format is based on [Keep a Changelog](https://keepach= angelog.com/en/1.0.0/) - Support PCI passthrough for HVM domUs when dom0 is PVH (note SR-IOV capability usage is not yet supported on PVH dom0). - Smoke tests for the FreeBSD Xen builds in Cirrus CI. + - Virtio-VGA display support for HVM guests =20 - On Arm: - Ability to enable stack protector diff --git a/docs/man/xl.cfg.5.pod.in b/docs/man/xl.cfg.5.pod.in index f0c920b39d..445064ff6e 100644 --- a/docs/man/xl.cfg.5.pod.in +++ b/docs/man/xl.cfg.5.pod.in @@ -2566,6 +2566,8 @@ default and minimum is 8 MB. For QXL vga, both the default and minimal are 128MB. If B is set less than 128MB, an error will be triggered. =20 +When using virtio, this parameter is ignored. + =3Ditem B =20 Specifies a standard VGA card with VBE (VESA BIOS Extensions) as the @@ -2579,7 +2581,7 @@ B. =3Ditem B =20 Selects the emulated video card. -Options are: B, B, B and B. +Options are: B, B, B, B and B. The default is B. =20 In general, QXL should work with the Spice remote display protocol @@ -2587,6 +2589,8 @@ for acceleration, and a QXL driver is necessary in th= e guest in that case. QXL can also work with the VNC protocol, but it will be like a standard VGA card without acceleration. =20 +virtio uses the VGA compatible variant of virtio-gpu. + =3Ditem B =20 Allow access to the display via the VNC protocol. This enables the diff --git a/tools/libs/light/libxl_dm.c b/tools/libs/light/libxl_dm.c index 511ec76a65..a561ba695a 100644 --- a/tools/libs/light/libxl_dm.c +++ b/tools/libs/light/libxl_dm.c @@ -1210,6 +1210,9 @@ static int libxl__build_device_model_args_new(libxl__= gc *gc, GCSPRINTF("qxl-vga,vram_size_mb=3D%"PRIu64",ram_size_mb=3D= %"PRIu64, (b_info->video_memkb/2/1024), (b_info->video_memkb/2/1024)= ) ); break; + case LIBXL_VGA_INTERFACE_TYPE_VIRTIO: + flexarray_append_pair(dm_args, "-device", "virtio-vga"); + break; default: LOGD(ERROR, guest_domid, "Invalid emulated video card specifie= d"); return ERROR_INVAL; diff --git a/tools/libs/light/libxl_types.idl b/tools/libs/light/libxl_type= s.idl index a6030a2dbd..577fd6d90d 100644 --- a/tools/libs/light/libxl_types.idl +++ b/tools/libs/light/libxl_types.idl @@ -238,6 +238,7 @@ libxl_vga_interface_type =3D Enumeration("vga_interface= _type", [ (2, "STD"), (3, "NONE"), (4, "QXL"), + (5, "VIRTIO"), ], init_val =3D "LIBXL_VGA_INTERFACE_TYPE_UNKNOWN") =20 libxl_vendor_device =3D Enumeration("vendor_device", [ diff --git a/tools/xl/xl_parse.c b/tools/xl/xl_parse.c index 90c9386f5b..cc68d42dca 100644 --- a/tools/xl/xl_parse.c +++ b/tools/xl/xl_parse.c @@ -2833,6 +2833,8 @@ skip_usbdev: b_info->u.hvm.vga.kind =3D LIBXL_VGA_INTERFACE_TYPE_NONE; } else if (!strcmp(buf, "qxl")) { b_info->u.hvm.vga.kind =3D LIBXL_VGA_INTERFACE_TYPE_QXL; + } else if (!strcmp(buf, "virtio")) { + b_info->u.hvm.vga.kind =3D LIBXL_VGA_INTERFACE_TYPE_VIRTIO; } else { fprintf(stderr, "Unknown vga \"%s\" specified\n", buf); exit(1); --=20 2.50.1 Teddy Astie | Vates XCP-ng Developer XCP-ng & Xen Orchestra - Vates solutions web: https://vates.tech