From nobody Thu May 2 08:13:56 2024 X-Original-To: freebsd-x11@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VVRYR3fZ7z5JY7y; Thu, 2 May 2024 08:14:35 +0000 (UTC) (envelope-from marietto2008@gmail.com) Received: from mail-pj1-x102c.google.com (mail-pj1-x102c.google.com [IPv6:2607:f8b0:4864:20::102c]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1D4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VVRYQ53LBz4YK0; Thu, 2 May 2024 08:14:34 +0000 (UTC) (envelope-from marietto2008@gmail.com) Authentication-Results: mx1.freebsd.org; dkim=pass header.d=gmail.com header.s=20230601 header.b=HrZwOD9D; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (mx1.freebsd.org: domain of marietto2008@gmail.com designates 2607:f8b0:4864:20::102c as permitted sender) smtp.mailfrom=marietto2008@gmail.com Received: by mail-pj1-x102c.google.com with SMTP id 98e67ed59e1d1-2b3374e08cfso870631a91.2; Thu, 02 May 2024 01:14:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1714637673; x=1715242473; darn=freebsd.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=ZD8A6fWL1kBPGPCaQrxJsjZxlU+dEyIeItOEFk2lHBw=; b=HrZwOD9D5XWhqd79WvuSeF6AuOsV+iys4BqlNzPX5vKBYZDTdmEKDZimi4GbNqcv8p FvfR4Qcb1guZm4hfSyFaRzkAXUv/4oq5x/MjYt3IRliTC0FoG/2ioZgJaBgqN33Yow4f 0JVhsAYvcYlDnL3hRvjVBjIgBBOeG+yVs2tlNjcW+xL1TxfNRmVncnAYDezf5rl9Ad8X 64pmh9JaGKBmm5CgyCMoqaJ1Rpr+Q3DoqKXHYg6P2udivasWMq8wIaYvRRI8TboBCb0s qymSEI8tWvMSpMVv0a3u0jd1LCsQuyuP57HywaOqQMpQO563nvh8BFJy8K36UlEgEH5p zrTA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1714637673; x=1715242473; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=ZD8A6fWL1kBPGPCaQrxJsjZxlU+dEyIeItOEFk2lHBw=; b=bb3FsuA5KxqZcKTG4a9wZ6QRa+AuP4221hKcPU/E+PlrBgM0OWxPCLZ239dHHoQmI3 WImHfa5PcjiJckfJnnTvgCzLrGBjs1Ew+ZloRAy+9zEYrL6f4HXiJEPHu7B34Le0KAPL etBJZAyKNW93nANZSwBm5DQ6Jts8BKCycy0CfLnb/NQSEhaTSfGgcEYasukYfUHAFruq E2+EBPtz2blsiWDskTh2x2QPrIfr14wC7TAYD7FDghmosvQ+ls+1wPcDcTeN6hU/Et+u Z5LYkt4cxiXaZpQyD5I9G+6ER0qMVod/jBCHVyhIpDJQLKQ4e4gbErxhBN093Jwu5Tbh JVHg== X-Forwarded-Encrypted: i=1; AJvYcCXKAeEoHhNJZnxNAu8UynutXbBHVjRxY0LM0L51bEvvb8oY8jilBZaPKekR/4cyCTQBvjepiFaAFSsBGR+Q/Y9m6fPqzZtXRjzhAZgFSD2Xxd3Z5YzJuLA+IIGBsccxqKHTx7vDLGIXMX6k+pHX1gBtHJ0g7HY5VfBe7fWtdl3TAGqXynTP5EFvYOtK8U34u0mBUmkqaPvECRetqGnQYuoVLTPqV+IZYQ== X-Gm-Message-State: AOJu0YzTYPoC1vG+5Q83vPCtTPTkKZxrcWgXh5Be+xAimWN72y9sNFhQ c7FHBLei3msIT24u9i2QHhMTA24nhgr2jeFQf/1ruzyVgqlU110D7vqrTA+TAHi6u2wql+dL+hD Oe4uuwsKYZVyD1smxvSEJL5EcHCLSVeMFv/Alog== X-Google-Smtp-Source: AGHT+IF71bsubqvkmbYg2dhtTKk6iYUomrtDuoKJIHwNZS9oKLenUnMVZ7aI57BJih4puCPXqQCaPsBcuuCzzXv+sZE= X-Received: by 2002:a17:90b:4c4c:b0:2ac:f010:b1c0 with SMTP id np12-20020a17090b4c4c00b002acf010b1c0mr5189757pjb.22.1714637673241; Thu, 02 May 2024 01:14:33 -0700 (PDT) List-Id: X11 List-Archive: https://lists.freebsd.org/archives/freebsd-x11 List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: freebsd-x11@freebsd.org Sender: owner-freebsd-x11@FreeBSD.org MIME-Version: 1.0 References: In-Reply-To: From: Mario Marietto Date: Thu, 2 May 2024 10:13:56 +0200 Message-ID: Subject: Re: How to use Virtio GPU on FreeBSD as guest OS. To: Yusuf Khan Cc: freebsd-drivers@freebsd.org, freebsd-x11@freebsd.org, freebsd-hackers , FreeBSD Mailing List , FreeBSD virtualization Content-Type: multipart/alternative; boundary="0000000000006ea444061774319f" X-Spamd-Bar: --- X-Spamd-Result: default: False [-4.00 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_SHORT(-1.00)[-1.000]; DMARC_POLICY_ALLOW(-0.50)[gmail.com,none]; R_DKIM_ALLOW(-0.20)[gmail.com:s=20230601]; R_SPF_ALLOW(-0.20)[+ip6:2607:f8b0:4000::/36:c]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; FREEMAIL_TO(0.00)[gmail.com]; ARC_NA(0.00)[]; MIME_TRACE(0.00)[0:+,1:+,2:~]; FROM_HAS_DN(0.00)[]; FREEMAIL_FROM(0.00)[gmail.com]; TO_DN_SOME(0.00)[]; RCVD_IN_DNSWL_NONE(0.00)[2607:f8b0:4864:20::102c:from]; DWL_DNSWL_NONE(0.00)[gmail.com:dkim]; RCVD_TLS_LAST(0.00)[]; MISSING_XM_UA(0.00)[]; RCPT_COUNT_FIVE(0.00)[6]; TO_MATCH_ENVRCPT_SOME(0.00)[]; FROM_EQ_ENVFROM(0.00)[]; DKIM_TRACE(0.00)[gmail.com:+]; MID_RHS_MATCH_FROMTLD(0.00)[]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US]; MLMMJ_DEST(0.00)[freebsd-drivers@freebsd.org,freebsd-x11@freebsd.org,freebsd-hackers@freebsd.org,freebsd-questions@freebsd.org,freebsd-virtualization@freebsd.org]; RCVD_COUNT_ONE(0.00)[1]; FREEMAIL_ENVFROM(0.00)[gmail.com] X-Rspamd-Queue-Id: 4VVRYQ53LBz4YK0 --0000000000006ea444061774319f Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable What I find strange is that this configuration works on Windows 11 to virtualize FreeBSD using -device vmware-svga : I:\OS\vms\qemu\qemu-system-x86_64w.exe -accel whpx -machine q35 -cpu kvm64,hv_relaxed,hv_time,hv_synic -m 8G -device vmware-svga,id=3Dvideo0,vgamem_mb=3D16,bus=3Dpcie.0,addr=3D0x1 -audiodev dsound,id=3Dsnd0 -device ich9-intel-hda -device hda-duplex,audiodev=3Dsnd0 = -hda "I:\Backup\FreeBSD\FreeBSD-140-zfs.img" -device hda-duplex,audiodev=3Dsnd0 -drive file=3D\\.\PhysicalDrive4 -drive file=3D\\.\PhysicalDrive5 -drive file=3D\\.\PhysicalDrive6 -drive file=3D\\.\PhysicalDrive8 -drive file=3D\\.\PhysicalDrive12 -rtc base=3Dlocaltime -device usb-ehci,id=3Dusb,bus=3Dpcie.0,addr=3D0x3 -device usb-tablet -device usb-kb= d -smbios type=3D2 -nodefaults -netdev tap,id=3Dmynet0,ifname=3D"OpenVPN-TAP-Windows",script=3Dno,downscript=3Dno = -device e1000,netdev=3Dmynet0,mac=3D52:55:00:d1:55:01 -device ich9-ahci,id=3Dsata -= bios "I:\OS\vms\qemu\OVMF_combined.fd" One can think that it will work even on Linux for the same setup (qemu + hyper-V on Windows 11),but it does not. I'm experiencing a lot of problems when I add -accel whpx on a Debian VM. These problems go away if I remove it. Adding " -device vmware-svga,id=3Dvideo0,vgamem_mb=3D16,bus=3Dpcie.0,addr= =3D0x1" to the qemu / Debian parameters will cause it won't boot. So,this : I:\OS\vms>I:\OS\vms\qemu\qemu-system-x86_64.exe -machine q35 -cpu kvm64,hv_relaxed,hv_time,hv_synic -m 8G -device vmware-svga,id=3Dvideo0,vgamem_mb=3D16,bus=3Dpcie.0,addr=3D0x1 -audiodev dsound,id=3Dsnd0 -device ich9-intel-hda -device hda-duplex,audiodev=3Dsnd0 = -hda "I:\Backup\Linux\Debian.img" -drive file=3D\\.\PhysicalDrive5 -drive file=3D\\.\PhysicalDrive6 -drive file=3D\\.\PhysicalDrive8 -rtc base=3Dloca= ltime -device usb-ehci,id=3Dusb,bus=3Dpcie.0,addr=3D0x3 -device usb-tablet -devic= e usb-kbd -smbios type=3D2 -nodefaults -netdev user,id=3Dnet0 -device e1000,netdev=3Dnet0,id=3Dnet0,mac=3D52:54:00:11:22:33 -device ich9-ahci,id= =3Dsata -bios "I:\OS\vms\qemu\OVMF_combined.fd" will cause the Debian VM to freeze before reaching the login prompt. I don't know if Linux has the proper vmware-svga driver,I didn't find it. Regarding virtualizing Windows 7 on Windows 11 using the same setup,I can't add -accel whpx and most importantly,what I care more, the -device vmware-svga does not work. So,in this kind of setup, *FreeBSD is the winner because it supports everything (hyper-V and the vmware-svga 3D accelerated device.* On Sat, Apr 27, 2024 at 9:41=E2=80=AFPM Yusuf Khan wrote: > So your issue is that the performance is worse than Linux? > > There is no 3d graphics driver for virtio in mainline drm-kmod but > https://github.com/freebsd/drm-kmod/pull/119 has > experimental support, although that PR exists it seems to be > non-functional with a crash. > --=20 Mario. --0000000000006ea444061774319f Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
What I find strange is that this configuration works on Windo= ws 11 to virtualize FreeBSD using=20 -device vmware-svga :

I:\OS\vms\qemu\qemu-syst= em-x86_64w.exe -accel whpx -machine q35 -cpu kvm64,hv_relaxed,hv_time,hv_sy= nic -m 8G -device vmware-svga,id=3Dvideo0,vgamem_mb=3D16,bus=3Dpcie.0,addr= =3D0x1 -audiodev dsound,id=3Dsnd0 -device ich9-intel-hda -device=20 hda-duplex,audiodev=3Dsnd0 -hda "I:\Backup\FreeBSD\FreeBSD-140-zfs.img= " -device hda-duplex,audiodev=3Dsnd0 -drive file=3D\\.\PhysicalDrive4 -drive= =20 file=3D\\.\PhysicalDrive5 -drive file=3D\\.\PhysicalDrive6 -drive=20 file=3D\\.\PhysicalDrive8 -drive file=3D\\.\PhysicalDrive12 -rtc=20 base=3Dlocaltime -device usb-ehci,id=3Dusb,bus=3Dpcie.0,addr=3D0x3 -device = usb-tablet -device usb-kbd -smbios type=3D2 -nodefaults -netdev tap,id=3Dmy= net0,ifname=3D"OpenVPN-TAP-Windows",script=3Dno,downscript=3Dno -= device e1000,netdev=3Dmynet0,mac=3D52:55:00:d1:55:01 -device ich9-ahci,id= =3Dsata -bios "I:\OS\vms\qemu\OVMF_combined.fd"

One can think that it will work even on Linux for the same setup (qemu +=20 hyper-V on Windows 11),but it does not. I'm experiencing a lot of=20 problems when I add -accel whpx on a Debian VM. These problems go away=20 if I remove it.

Adding " -device vmware-svga,id=3Dvideo0,vgamem_mb=3D16,bus=3Dpcie.0,addr=3D0x1&quo= t; to the qemu / Debian parameters will cause it won't boot. So,this :<= /div>


I:\OS\vms>I:\OS\vms\qemu\qemu-sy= stem-x86_64.exe -machine q35 -cpu kvm64,hv_relaxed,hv_time,hv_synic -m 8G -= device vmware-svga,id=3Dvideo0,vgamem_mb=3D16,bus=3Dpcie.0,addr=3D0x1 -audiodev dsound,id=3Dsnd0 -device ich9-intel-hda -device=20 hda-duplex,audiodev=3Dsnd0 -hda "I:\Backup\Linux\Debian.img" -dri= ve=20 file=3D\\.\PhysicalDrive5 -drive file=3D\\.\PhysicalDrive6 -drive=20 file=3D\\.\PhysicalDrive8 -rtc base=3Dlocaltime -device=20 usb-ehci,id=3Dusb,bus=3Dpcie.0,addr=3D0x3 -device usb-tablet -device=20 usb-kbd -smbios type=3D2 -nodefaults -netdev user,id=3Dnet0 -device=20 e1000,netdev=3Dnet0,id=3Dnet0,mac=3D52:54:00:11:22:33 -device ich9-ahci,id= =3Dsata -bios "I:\OS\vms\qemu\OVMF_combined.fd"


will cause the Debian VM to freeze before reaching the login prompt. I=C2=A0=20 don't know if Linux has the proper vmware-svga driver,I didn't find= it.

Regarding virtualizing Windows 7 on Windows 11 using the same setup,I can't add -accel whpx and most= =20 importantly,what I care more, the=20 -device vmware-svga does not work. So,in this kind of setup,FreeBSD is= =20 the winner because it supports everything (hyper-V and the vmware-svga 3D a= ccelerated device.
<= /div>


On Sat, Apr 27, 2024 at 9:41=E2=80=AFPM Yusuf= Khan <yusisamerican@gmail.co= m> wrote:
So your issue is that the performance is worse than Linux?

There is no 3d graphics driver for virtio in mainline drm-kmod but
https://github.com/freebsd/drm-kmod/pull/119 has
experimental support, although that PR exists it seems to be
non-functional with a crash.


--
Mario.
--0000000000006ea444061774319f--