From nobody Sat Apr 27 13:08:40 2024 X-Original-To: freebsd-virtualization@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 4VRVKs04WLz5J54c; Sat, 27 Apr 2024 13:09:20 +0000 (UTC) (envelope-from marietto2008@gmail.com) Received: from mail-pj1-x102f.google.com (mail-pj1-x102f.google.com [IPv6:2607:f8b0:4864:20::102f]) (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 4VRVKr1dtHz4kc4; Sat, 27 Apr 2024 13:09:20 +0000 (UTC) (envelope-from marietto2008@gmail.com) Authentication-Results: mx1.freebsd.org; dkim=pass header.d=gmail.com header.s=20230601 header.b=bDSFMYl3; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (mx1.freebsd.org: domain of marietto2008@gmail.com designates 2607:f8b0:4864:20::102f as permitted sender) smtp.mailfrom=marietto2008@gmail.com Received: by mail-pj1-x102f.google.com with SMTP id 98e67ed59e1d1-2a78c2e253aso2464663a91.3; Sat, 27 Apr 2024 06:09:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1714223357; x=1714828157; darn=freebsd.org; h=to:subject:message-id:date:from:mime-version:from:to:cc:subject :date:message-id:reply-to; bh=fAMeeuH9xTI68X+n0CL+rtcXC18ozA2zytiDh4k8Sd4=; b=bDSFMYl30pQwRTprpzgIgRqGeIJLO4zXFvuhkUPEQ6AV2yGshM9j+Hw6TRi2GchkLV QCHxwMfdpT1egWeCSjfvF62gNQtv658VAsUMJxrMgRETxo41rqjf6MOBLUdiprYPPV8l urlXbS25T5eGUxHQtiSoX+ybSDvixzcgcLzrCMhDmfd4VX5/bMQPXmomR49VkeXls6xI t9VtzYF2pmUyaDGjSvfclUCAZOC76f0JIeZClTZ5VEuW8kwMpf/Seq5K/TQi1JEs0BZ7 XujjzDisGicQz1gB81y7lSjoP24WZ0MbtqKumc/DPIo1K0DfhTM3YVBDV0bP0orvUP6N vCfw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1714223357; x=1714828157; h=to:subject:message-id:date:from:mime-version:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=fAMeeuH9xTI68X+n0CL+rtcXC18ozA2zytiDh4k8Sd4=; b=onnR8Z0Um1Y+atr/6vznxdB7m/BS8LvuchpcFq0ULMD5arOaOK9EbQhB1BoOjrYxMC cjPCyY27/P+A9FbWe/KVVe+09eKpnSrWRByPF6GNsnRhq/MmpbFTFxABXl0Lpp18GkJo j2erAIfxHxvDo0bmss7CSYgIYtKM/bDotrlHx7qrtJYZIjdr5veWuFOcLvzuWmwstGDg xzojxdPigd/Rk5VNT3hpTw8c1bL7q8J1T9aOxpo6rgzxoA8abqB85rM5G2a/d2aMYQDy KayosdUMsV8e5K52ktJD612/AhUhnR3Ce5ooxzTXvh/fmh/7cfTXRnhQIUQC4GFMERSw E4LQ== X-Forwarded-Encrypted: i=1; AJvYcCUstcElrxMv2rIN9SzOcjf1iVRoecwj7tT6+gK9JQM1He3BngWyxGTfgm6NRaolQQtfusulv5IhzZCW8wH6bcP5Ea3F3EH01M2wn4qp4u0NrL/Zi61wHL5+ZvsaBu4HIWldEmtE/1pXtdbewezIeiP1BD2RLTCIczaR/cbHzN0HcGKCKxtnh79DbLXulzFnsymBa2xsx+5DyhyH49KCO1fp7L8WJ0RP8w== X-Gm-Message-State: AOJu0Yw7DqLQJp1/8ZAo07m0HJ/7lT+B7CMa6tn+CgQl3+Q2Ya/Z0J/G uW6+I2nvmTEK4sr+bwz2LzHzSeWDjOFDDBAAmHYeNoEG/ssVHaStsuQWccSoPiHHC9buYUWQa9O K6WuZn2fT5wi2sx5Md1DDLJWV3rNKHHoENOeWfA== X-Google-Smtp-Source: AGHT+IHKIAQqg3sGjnguTJtMWacxARchXVteXjnrfBnmyZO9/76O8Ah60Dz5pJvv4j/dK1kwc7Rtb6aSUeVLfqcKXmA= X-Received: by 2002:a17:90a:654c:b0:2ab:b480:5018 with SMTP id f12-20020a17090a654c00b002abb4805018mr5740421pjs.34.1714223357135; Sat, 27 Apr 2024 06:09:17 -0700 (PDT) List-Id: Discussion List-Archive: https://lists.freebsd.org/archives/freebsd-virtualization List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: freebsd-virtualization@freebsd.org Sender: owner-freebsd-virtualization@FreeBSD.org MIME-Version: 1.0 From: Mario Marietto Date: Sat, 27 Apr 2024 15:08:40 +0200 Message-ID: Subject: How to use Virtio GPU on FreeBSD as guest OS. To: freebsd-drivers@freebsd.org, freebsd-x11@freebsd.org, freebsd-hackers , FreeBSD Mailing List , FreeBSD virtualization Content-Type: multipart/alternative; boundary="000000000000449a38061713baff" X-Spamd-Bar: --- X-Spamd-Result: default: False [-3.98 / 15.00]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; NEURAL_HAM_SHORT(-0.98)[-0.975]; DMARC_POLICY_ALLOW(-0.50)[gmail.com,none]; R_SPF_ALLOW(-0.20)[+ip6:2607:f8b0:4000::/36:c]; R_DKIM_ALLOW(-0.20)[gmail.com:s=20230601]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; FREEMAIL_ENVFROM(0.00)[gmail.com]; RCVD_TLS_LAST(0.00)[]; FREEMAIL_FROM(0.00)[gmail.com]; ARC_NA(0.00)[]; MIME_TRACE(0.00)[0:+,1:+,2:~]; TO_MATCH_ENVRCPT_ALL(0.00)[]; TO_DN_SOME(0.00)[]; RCVD_IN_DNSWL_NONE(0.00)[2607:f8b0:4864:20::102f:from]; MISSING_XM_UA(0.00)[]; DWL_DNSWL_NONE(0.00)[gmail.com:dkim]; FROM_EQ_ENVFROM(0.00)[]; FROM_HAS_DN(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]; RCPT_COUNT_FIVE(0.00)[5] X-Rspamd-Queue-Id: 4VRVKr1dtHz4kc4 --000000000000449a38061713baff Content-Type: text/plain; charset="UTF-8" Hello. I've virtualized FreeBSD 14 on Windows 11 with qemu using the Hyper-V as a hypervisor. The parameters that I've used to launch the vm are the following ones : qemu-system-x86_64w.exe -accel whpx -machine q35 \ -cpu kvm64,hv_relaxed,hv_time,hv_synic -m 8G -vga virtio \ -display gtk,gl=on -audiodev dsound,id=snd0 -device ich9-intel-hda \ -device hda-duplex,audiodev=snd0 \ -hda "I:\Backup\FreeBSD\FreeBSD-140-zfs.img" \ -drive file=\\.\PhysicalDrive8 -rtc base=localtime \ -device usb-ehci,id=usb,bus=pcie.0,addr=0x3 -device usb-tablet \ -device usb-kbd -smbios type=2 -nodefaults \ -netdev tap,id=mynet0,ifname="OpenVPN-TAP-Windows",script=no,downscript=no \ -device e1000,netdev=mynet0,mac=52:55:00:d1:55:01 \ -device ich9-ahci,id=sata \ -bios "I:\OS\qemu\FreeBSD\OSX-KVM-master\OVMF_combined.fd" as you can see as graphic adapter I've added : -vga virtio -display gtk,gl=on That's because I want to use the virtio GPU instead of the VMware SVGA,but I'm not able to make it work. On FreeBSD 14.0 guest os I did : # lspci 00:01.0 : VGA compatible controller : Red Hat Inc. Virtio 1.0 GPU (rev. 01) and then,I've added on /boot/loader.conf the following kernel modules : virtio_load="YES" virtio_pci_load="YES" virtio_blk_load="YES" virtio_balloon_load="YES" I tried to load the virtio kernel modules manually : [root@marietto /home/marietto]==> kldload virtio kldload: can't load virtio: module already loaded or in kernel [root@marietto /home/marietto]==> kldload virtio_pci kldload: can't load virtio_pci: module already loaded or in kernel [root@marietto /home/marietto]==> kldload virtio_blk kldload: can't load virtio_blk: module already loaded or in kernel [root@marietto /home/marietto]==> kldload virtio_balloon kldload: can't load virtio_balloon: module already loaded or in kernel At this point,I've tried to use two different xorg.conf files to see what happened : nano /etc/X11/xorg.conf : Section "Device" Identifier "Card0" Driver "modesetting" BusID "PCI:0:1:0" Xorg.1.log.modesetting : https://pastebin.ubuntu.com/p/JYbks5yNnV/ nano /etc/X11/xorg.conf : Section "Device" Identifier "Card0" Driver "virtio" BusID "PCI:0:1:0" Xorg.1.log.virtio : https://pastebin.ubuntu.com/p/tt9Pnd5Zz4/ None of them worked. Can you give some suggestions ? FULL thread : https://forums.freebsd.org/threads/how-to-virtualize-freebsd-14-release-as-a-vm-on-top-of-windows-11-using-qemu-hyperv.93158/#post-652770 Mario. --000000000000449a38061713baff Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable

Hello.

I've virtualized FreeBSD 14 on Windows 11 with qemu using the Hyper= -V as a hypervisor.

The parameters that I've used to launch the vm are the following on= es :=C2=A0


qemu-system-x86_64w.exe -accel whpx -machine q35 \ -cpu kvm64,hv_relaxed,hv_time,hv_synic -m 8G -vga virtio \
-display gtk,= gl=3Don -audiodev dsound,id=3Dsnd0 -device ich9-intel-hda \
-device hda-= duplex,audiodev=3Dsnd0 \
-hda "I:\Backup\FreeBSD\FreeBSD-140-zfs.im= g" \
-drive file=3D\\.\PhysicalDrive8 -rtc base=3Dlocaltime \
-d= evice usb-ehci,id=3Dusb,bus=3Dpcie.0,addr=3D0x3 -device usb-tablet \ -device usb-kbd -smbios type=3D2 -nodefaults \ -netdev tap,id=3Dmynet0,ifname=3D"OpenVPN-TAP-Windows",script=3Dn= o,downscript=3Dno \ -device e1000,netdev=3Dmynet0,mac=3D52:55:00:d1:55:01 \
-device ich9-ahc= i,id=3Dsata \
-bios "I:\OS\qemu\FreeBSD\OSX-KVM-master\OVMF_combine= d.fd"

=20


as you can see as graphic adapter I've added :


=20

-vga virtio -display gtk,gl=3Don

That's because I want to use the virtio GPU instead of the VMware= =20 SVGA,but I'm not able to make it work. On FreeBSD 14.0 guest os I did :

=20


# lspci=20 00:01.0 : VGA compatible controller : Red Hat Inc. Virtio 1.0 GPU (rev. 01)=

=20


and then,I've added on /boot/loader.conf the following kerne= l modules :


virtio_load=3D"YES"=20 virtio_pci_load=3D"YES"=20 virtio_blk_load=3D"YES"=20 virtio_balloon_load=3D"YES"

=20


I tried to load the virtio kernel modules manually :

=20


[root@marietto /home/marietto]=3D=3D> kldload virtio kldl= oad: can't load virtio: module=20 already loaded or in kernel =20 [root@marietto /home/marietto]=3D=3D> kldload virtio_pci kldload: can= 9;t load virtio_pci:=20 module already loaded or in kernel =20 [root@marietto /home/marietto]=3D=3D> kldload virtio_blk kldload: can= 9;t load virtio_blk:=20 module already loaded or in kernel =20 [root@marietto /home/marietto]=3D=3D> kldload virtio_balloon kldload: ca= n't load=20 virtio_balloon: module already loaded or in kernel


At this point,I've tried to use two different xorg.conf file= s to see what happened :


nano /etc/X11/xorg.conf : =20 Section "Device"=20 Identifier "Card0"=20 Driver "modesetting"=20 BusID "PCI:0:1:0" Xorg.1.log.modesetting : https://pastebin.ubuntu.com/p/JYbks5yNnV/

=20


nano /etc/X11/xorg.conf : =20 Section "Device"=20 Identifier "Card0"=20 Driver "virtio"=20 BusID "PCI:0:1:0" Xorg.1.log.virtio : h= ttps://pastebin.ubuntu.com/p/tt9Pnd5Zz4/

=20


None of them worked. Can you give some suggestions ?


FULL thread :

https://forums.fr= eebsd.org/threads/how-to-virtualize-freebsd-14-release-as-a-vm-on-top-of-wi= ndows-11-using-qemu-hyperv.93158/#post-652770

=C2=A0
Mario.
--000000000000449a38061713baff--