From nobody Fri Dec 12 19:22:01 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=1765371152; cv=none; d=zohomail.com; s=zohoarc; b=cnA73RZBeyAFQRhSnTT8cIM1p59u4/oRP1cm0cuUtMNOJFSCntSv97oYYZAyFeWRoRk/iNehvItFcT2eL68rsY1vSEuZcSh0gNb/HzTCvXz+N6nHLIAC7D87P8lZI6iJOW86ZG5RJ4DpvHDoPG5xcG0dZUNUEuEca+MsxXLH178= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1765371152; 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=8CytmQ/FbULeAYYu18F/ME3HWA3RoSA27CBhy1ssuhs=; b=chGs8lFs1xEmJSoxT+XZoOes6KI2XeP7bitD6ub0zu4JbqtnVIZfDNacp/P/49fY9Wu5RL012OCD59DA4xZaI/ppxaxoqXfAwZnoK6vPOqzHUe6LRTUIT18NEmycW4ZkDRYnyxv7/oGLKU5JdLQrzC4fcJoQ8FeGrZhLDAjE4AE= 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 17653711528881018.8519383536691; Wed, 10 Dec 2025 04:52:32 -0800 (PST) Received: from list by lists.xenproject.org with outflank-mailman.1182923.1505731 (Exim 4.92) (envelope-from ) id 1vTJfr-00058H-3u; Wed, 10 Dec 2025 12:52:07 +0000 Received: by outflank-mailman (output) from mailman id 1182923.1505731; Wed, 10 Dec 2025 12:52:07 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1vTJfr-00058A-1P; Wed, 10 Dec 2025 12:52:07 +0000 Received: by outflank-mailman (input) for mailman id 1182923; Wed, 10 Dec 2025 12:52: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 1vTJfp-000584-84 for xen-devel@lists.xenproject.org; Wed, 10 Dec 2025 12:52:05 +0000 Received: from mail132-20.atl131.mandrillapp.com (mail132-20.atl131.mandrillapp.com [198.2.132.20]) by se1-gles-sth1.inumbo.com (Halon) with ESMTPS id 061dad58-d5c7-11f0-b15b-2bf370ae4941; Wed, 10 Dec 2025 13:52:03 +0100 (CET) Received: from pmta09.mandrill.prod.atl01.rsglab.com (localhost [127.0.0.1]) by mail132-20.atl131.mandrillapp.com (Mailchimp) with ESMTP id 4dRFwd4dCwzFCWYyl for ; Wed, 10 Dec 2025 12:52:01 +0000 (GMT) Received: from [37.26.189.201] by mandrillapp.com id 245b427f5e91429eb116c3e7049f174d; Wed, 10 Dec 2025 12:52:01 +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: 061dad58-d5c7-11f0-b15b-2bf370ae4941 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mandrillapp.com; s=mte1; t=1765371121; x=1765641121; bh=8CytmQ/FbULeAYYu18F/ME3HWA3RoSA27CBhy1ssuhs=; h=From:Subject:To:Cc:Message-Id:Feedback-ID:Date:MIME-Version: Content-Type:Content-Transfer-Encoding:CC:Date:Subject:From; b=FBFmrdHHyvNEZTZn6E9O1kAGLBnCXAFk9qXwvU9lT1QWH07bMzIndmoszQilfuyS/ 6+9eAUK/fTBidp6+GRLtU4qCngGkolNUzHrm5qOXF+Hnqg6mGB2UtxWqozt5xVobNx lnA8ioAJz7HQVwIjARwI1wczIc3XDPSSGYFngLEvKTPClwRnD9FMAx4qQxjTl7RII3 WbiheFTa40zmm7hWsApuI5OmmaKCkWvOMKZraSOZ1zUxo/n3KLUaIHQrpCD9zwHrT7 7BCBn2B9tUIpf51GnMcU/rgbYYjaq5PuH2utBL9HG/wUyMdfk7AST7G+jxrE4uP5gN UySAuel8dD5Xg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=vates.tech; s=mte1; t=1765371121; x=1765631621; i=teddy.astie@vates.tech; bh=8CytmQ/FbULeAYYu18F/ME3HWA3RoSA27CBhy1ssuhs=; h=From:Subject:To:Cc:Message-Id:Feedback-ID:Date:MIME-Version: Content-Type:Content-Transfer-Encoding:CC:Date:Subject:From; b=eTb6vlOacSGpXwaRIR5sAPG22/kACXSGrPzNYgsW4v/5T97hTcAuV/Mr3H633MPqU bg8z/fWoW/CZ5BlcUpRAEah2wkivBsgi6BPuytBOq4Rx+50zH1nJFh14BQLDTB2hYR BR6Gg1l+fhsCWIpmE14W5uU7C/RBYXgPQ4XCdAnzEPinzlBTtDbYw1/m4Ybwx8wD1t dPCmKXpM/RvCPyVgLYVDz6pv9GMuEMO7Hg3ADLKurgnfw46rPJG5bdtC3oSTzFGYkD k808djrypQmw4yjcRQ82jDhwrd/sSldq3pU75cn0Yel2GcWzYr3uSJ+nNZ660OhqMz f6se5bl0EJrQA== From: "Teddy Astie" Subject: =?utf-8?Q?[PATCH=20v2]=20libxl:=20Add=20virtio=20(virtio-vga)=20display=20support?= X-Mailer: git-send-email 2.51.2 X-Bm-Disclaimer: Yes X-Bm-Milter-Handled: 4ffbd6c1-ee69-4e1b-aabd-f977039bd3e2 X-Bm-Transport-Timestamp: 1765371120650 To: xen-devel@lists.xenproject.org Cc: "Teddy Astie" , "Oleksii Kurochko" , "Community Manager" , "Anthony PERARD" , "Juergen Gross" Message-Id: <812ef472d775cf69b7ed4bab317df174c03e9ab2.1765371000.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.245b427f5e91429eb116c3e7049f174d?= X-Mandrill-User: md_30504962 Feedback-ID: 30504962:30504962.20251210:md Date: Wed, 10 Dec 2025 12:52:01 +0000 MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity teddy.astie@vates.tech) (identity @mandrillapp.com) X-ZM-MESSAGEID: 1765371153819158500 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 --- v2: - rebased CHANGELOG.md CHANGELOG.md | 2 ++ 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, 13 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3aaf598623..ed1ad61b0f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,8 @@ The format is based on [Keep a Changelog](https://keepachan= gelog.com/en/1.0.0/) ### Changed =20 ### Added +- On x86: + - Virtio-VGA display support for HVM guests =20 ### Removed - On x86: diff --git a/docs/man/xl.cfg.5.pod.in b/docs/man/xl.cfg.5.pod.in index 27c455210b..5952c36886 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 d64a573ff3..5e704ba25a 100644 --- a/tools/libs/light/libxl_types.idl +++ b/tools/libs/light/libxl_types.idl @@ -239,6 +239,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 af86d3186d..927adbd457 100644 --- a/tools/xl/xl_parse.c +++ b/tools/xl/xl_parse.c @@ -2863,6 +2863,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.51.2 -- Teddy Astie | Vates XCP-ng Developer XCP-ng & Xen Orchestra - Vates solutions web: https://vates.tech