Pre-Compiled package of igvtg-xen or patches to make it work

Hello.

I would like to pass the integrated gpu from the host os to the windows 10 guest os with xen. This is because xen works great for me,better than qemu-kvm for my specific needs and because I have only two graphic cards. The nvidia rtx 2080 ti that I have already passed to the guest,and the intel UHD 630,that can be duplicated from the host to the guest so that it can be used in both places without interruptions. I’m trying to Build Qemu & Xen for XenGT on Ubuntu 20.04 following this tutorial :

https://github.com/intel/gvt-linux/wiki/GVTg_Setup_Guide#332-build-qemu--xen-for-xengt

because I want to share the integrated GPU with a xen VM.

The main hardware components of my PC are the following :

CPU I9-9900k

Intel Corporation UHD Graphics 630 (Desktop 9 Series) (rev 02)

IVIDIA Corporation TU102 [GeForce RTX 2080 Ti] (rev a1)

The compilation gave no errors until this point :

root@ziomario-z390aoruspro:/etc/xen/igvtg-xen# make xen tools

make -C xenstore install
make[4]: ingresso nella directory «/etc/xen/igvtg-xen/tools/xenstore»
sed “s! $PWD/! !” .xs_tdb_dump.o.d >.xs_tdb_dump.o.d2.tmp && mv -f .xs_tdb_dump.o.d2.tmp .xs_tdb_dump.o.d2
sed “s! $PWD/! !” .xs_lib.o.d >.xs_lib.o.d2.tmp && mv -f .xs_lib.o.d2.tmp .xs_lib.o.d2
sed “s! $PWD/! !” .utils.o.d >.utils.o.d2.tmp && mv -f .utils.o.d2.tmp .utils.o.d2
sed “s! $PWD/! !” .xs.o.d >.xs.o.d2.tmp && mv -f .xs.o.d2.tmp .xs.o.d2
sed “s! $PWD/! !” .xs.opic.d >.xs.opic.d2.tmp && mv -f .xs.opic.d2.tmp .xs.opic.d2
sed “s! $PWD/! !” .xenstore_control.o.d >.xenstore_control.o.d2.tmp && mv -f .xenstore_control.o.d2.tmp .xenstore_control.o.d2
sed “s! $PWD/! !” .xenstore_client.o.d >.xenstore_client.o.d2.tmp && mv -f .xenstore_client.o.d2.tmp .xenstore_client.o.d2
sed “s! $PWD/! !” .talloc.o.d >.talloc.o.d2.tmp && mv -f .talloc.o.d2.tmp .talloc.o.d2
sed “s! $PWD/! !” .xs_lib.opic.d >.xs_lib.opic.d2.tmp && mv -f .xs_lib.opic.d2.tmp .xs_lib.opic.d2
sed “s! $PWD/! !” .tdb.o.d >.tdb.o.d2.tmp && mv -f .tdb.o.d2.tmp .tdb.o.d2
ln -sf libxenstore.so.3.0 libxenstore.so
gcc xs_tdb_dump.o utils.o tdb.o talloc.o -o xs_tdb_dump
/usr/bin/ld: utils.o:(.data.rel.local+0x0): multiple definition of `xprintf’; xs_tdb_dump.o:(.bss+0x0): first defined here
collect2: error: ld returned 1 exit status
make[4]: *** [Makefile:95: xs_tdb_dump] Errore 1
make[4]: uscita dalla directory «/etc/xen/igvtg-xen/tools/xenstore»
make[3]: *** [/etc/xen/igvtg-xen/tools/…/tools/Rules.mk:246: subdir-install-xenstore] Errore 2
make[3]: uscita dalla directory «/etc/xen/igvtg-xen/tools»
make[2]: *** [/etc/xen/igvtg-xen/tools/…/tools/Rules.mk:241: subdirs-install] Errore 2
make[2]: uscita dalla directory «/etc/xen/igvtg-xen/tools»
make[1]: *** [Makefile:74: install] Errore 2
make[1]: uscita dalla directory «/etc/xen/igvtg-xen/tools»
make: *** [Makefile:127: install-tools] Errore 2

So,since I’m stuck here and I’m not able to find someone who is able to fix that error,I would like to know if for suse exists the pre compiled package of igvtg-xen and the proper patches to make it work. if yes,I’m ready to start learning it. thanks.

Hi and welcome to the Forum :slight_smile:
I don’t use Ubuntu, but suggest you check debian packages for patches, else look at upstream for these build errors. If I’m building for SLE (or openSUSE) I use the Build Service which may be a better option to build Ub* packages?
https://build.opensuse.org/

For me I have qemu rocking along with both GPU and SATA (PCIe mini SATA card) passthrough on Tumbleweed on an intel motherboard which works flawlessly with iommu. I have four GPU’s, one intel for host and three Nvidia GT710 for cuda and qemu, but at present only one allocated to qemu (on the fly). I run SLED 15 SP2, SLES 15 SP2, openSUSE Leap 15.2, Tumbleweed and WinX Pro machines.

pinxi -Fxxz
System:    Kernel: 5.8.0-1-default x86_64 bits: 64 compiler: gcc v: 10.2.1 Desktop: GNOME 3.36.5 tk: GTK 3.24.22 
           wm: gnome-shell dm: GDM Distro: openSUSE Tumbleweed 20200823 
Machine:   Type: Desktop System: N/A product: Canyon v: 000 serial: <filter> 
           Mobo: N/A model: N/A serial: <filter> UEFI: Intel v: MKQ7710H.86A.0074.2018.1025.1727 date: 10/25/2018 
CPU:       Topology: Quad Core model: Intel Xeon E3-1245 V2 bits: 64 type: MT MCP arch: Ivy Bridge rev: 9 L2 cache: 8192 KiB 
           flags: avx lm nx pae sse sse2 sse3 sse4_1 sse4_2 ssse3 vmx bogomips: 54276 
           Speed: 1645 MHz min/max: 1600/3800 MHz Core speeds (MHz): 1: 1596 2: 1602 3: 1596 4: 1597 5: 1605 6: 1603 7: 1607 
           8: 1605 
Graphics:  Device-1: Intel Xeon E3-1200 v2/3rd Gen Core processor Graphics driver: i915 v: kernel bus ID: 00:02.0 
           chip ID: 8086:016a 
           Device-2: NVIDIA GK208B [GeForce GT 710] vendor: ZOTAC driver: vfio-pci v: 0.2 bus ID: 02:00.0 chip ID: 10de:128b 
           Device-3: NVIDIA GK208B [GeForce GT 710] vendor: ZOTAC driver: nvidia v: 450.57 bus ID: 05:00.0 chip ID: 10de:128b 
           Device-4: NVIDIA GK208B [GeForce GT 710] vendor: ZOTAC driver: nvidia v: 450.57 bus ID: 06:00.0 chip ID: 10de:128b 
           Display: x11 server: X.Org 1.20.8 compositor: gnome-shell driver: modesetting,nvidia unloaded: fbdev,vesa 
           alternate: intel,nouveau,nv resolution: 1: 1920x1080~60Hz 2: 1920x1080 s-dpi: 96 
           OpenGL: renderer: Mesa DRI Intel HD Graphics P4000 (IVB GT2) v: 4.2 Mesa 20.1.4 compat-v: 3.0 direct render: Yes 
Audio:     Device-1: Intel 7 Series/C216 Family High Definition Audio driver: snd_hda_intel v: kernel bus ID: 00:1b.0 
           chip ID: 8086:1e20 
           Device-2: NVIDIA GK208 HDMI/DP Audio vendor: ZOTAC driver: vfio-pci v: 0.2 bus ID: 02:00.1 chip ID: 10de:0e0f 
           Device-3: NVIDIA GK208 HDMI/DP Audio vendor: ZOTAC driver: snd_hda_intel v: kernel bus ID: 05:00.1 
           chip ID: 10de:0e0f 
           Device-4: NVIDIA GK208 HDMI/DP Audio vendor: ZOTAC driver: snd_hda_intel v: kernel bus ID: 06:00.1 
           chip ID: 10de:0e0f 
           Sound Server: ALSA v: k5.8.0-1-default 
Network:   Device-1: Intel 82579LM Gigabit Network driver: e1000e v: 3.2.6-k port: f080 bus ID: 00:19.0 chip ID: 8086:1502 
           IF: eth0 state: up speed: 1000 Mbps duplex: full mac: <filter> 
           Device-2: Intel 82574L Gigabit Network driver: e1000e v: 3.2.6-k port: d000 bus ID: 07:00.0 chip ID: 8086:10d3 
           IF: eth1 state: up speed: 1000 Mbps duplex: full mac: <filter> 
           IF-ID-1: br0 state: up speed: 1000 Mbps duplex: unknown mac: <filter> 
           IF-ID-2: tap0 state: down mac: <filter> 
Drives:    Local Storage: total: 465.77 GiB used: 180.04 GiB (38.7%) 
           ID-1: /dev/nvme0n1 vendor: Western Digital model: WDS250G1B0C-00S6U0 size: 232.89 GiB speed: 15.8 Gb/s lanes: 2 
           serial: <filter> 
           ID-2: /dev/sda vendor: Western Digital model: WDS250G2B0B-00YS70 size: 232.89 GiB speed: 6.0 Gb/s serial: <filter> 
Partition: ID-1: / size: 40.00 GiB used: 28.62 GiB (71.6%) fs: btrfs dev: /dev/nvme0n1p1 
           ID-2: /boot size: 768.0 MiB used: 96.8 MiB (12.6%) fs: btrfs dev: /dev/sda2 
           ID-3: /home size: 40.00 GiB used: 28.62 GiB (71.6%) fs: btrfs dev: /dev/nvme0n1p1 
           ID-4: /opt size: 40.00 GiB used: 28.62 GiB (71.6%) fs: btrfs dev: /dev/nvme0n1p1 
           ID-5: /var size: 40.00 GiB used: 28.62 GiB (71.6%) fs: btrfs dev: /dev/nvme0n1p1 
Swap:      ID-1: swap-1 type: partition size: 1.88 GiB used: 0 KiB (0.0%) priority: -2 dev: /dev/sda4 
Sensors:   System Temperatures: cpu: 42.0 C mobo: 61.0 C 
           Fan Speeds (RPM): cpu: 646 
           Voltages: 12v: 12.19 5v: 5.24 3.3v: 3.36 vbat: 3.34 
Info:      Processes: 327 Uptime: 18:06:51  up 2 days 16:06,  2 users,  load average: 0.11, 0.22, 0.26 Memory: 23.30 GiB 
           used: 3.32 GiB (14.2%) Init: systemd v: 245 runlevel: 5 target: graphical.target Compilers: gcc: 10.2.1 alt: 10/7/9 
           clang: 10.0.1 Packages: rpm: 3072 Shell: Bash v: 5.0.18 running in: tilda pinxi: 3.1.05-9

I see that u are happy with qemu-kvm and you don’t care about xen. I’m using qemu-kvm also. But for what I’m trying to do now,qemu-kvm does not work well. Infact,I would like to use two kinects 2 at the same time,on the same PC. I created two virtual machines with qemu and kvm and I realized that the kinect 2 always lose the USB 3 connection in one of them. I did the same with xen and I realized that both the USB 3 connections are stable.

Hi
Strange, maybe need more than just via vendor and productid, probably bus references as well?
You might need to go back through and check the make log for the build, something is doubled up in some c code and header files, are flags added during the make and any warnings emmitted?

I’m not so skilled.

since xen-hypervisor works,I’m using it. But unfortunately I have only two graphic cards. I need 3,because the integrated one should be reserved for the host os. For this reason I should use XEN GT for enabling the passthrough of the integrated card. But the repository is full of bugs that I’m not able to fix.

@mariozio do you have spare PCIe X[1,4,8] slots? Two of my GT710’s are PCIe 1x and sit in an extender card :wink:

yes. and I’ve bought the extender card Sedna, PCI Express Adattatore USB 3.0 4 porte (4E) compatibile con supporto a basso profilo (NEC/Renesas UPD720201 chipset). Problem is to buy another graphic card. But why to spend more money if I can use the integrated one with xen GT ?

Hi
In my case I used the GT710’s (US$42ea) because they were cheap PCIeX1, the extender card is powered so the cards work fine in the host or qemu from my tests, not fast but also wanted some cuda cores to use…
I would have thought a lot of that code (since it’s some 6 years old) would be integrated into Xen by now?