Comment 2 for bug 1891687

Revision history for this message
Marietto (marietto2008) wrote :

lspci -nnk | grep nvidia

root@ziomario-z390aoruspro:/etc/xen# lspci -nnk | grep nvidia

Kernel modules: nvidiafb, nouveau, nvidia\_drm, nvidia

Kernel modules: i2c\_nvidia\_gpu

this is how to I assign the 4 devices of the NVIDIA iommu group to xen :

root@ziomario-z390aoruspro:/etc/xen# ./pciback-0000:01:00.0.sh 0000:01:00.0

root@ziomario-z390aoruspro:/etc/xen# ./pciback-0000:01:00.0.sh 0000:01:00.1

root@ziomario-z390aoruspro:/etc/xen# ./pciback-0000:01:00.0.sh 0000:01:00.2

root@ziomario-z390aoruspro:/etc/xen# ./pciback-0000:01:00.0.sh 0000:01:00.3

this is the script pciback.sh :

#!/bin/bash

if [ $# -eq 0 ]; then

echo "Require PCI devices in format: <domain>:<bus>:<slot>.<function>"

echo "Eg: $(basename $0) 0000:00:1b.0"

exit 1

fi

modprobe xen-pciback

for pcidev in $@; do

if [ -h /sys/bus/pci/devices/"$pcidev"/driver ]; then

echo "Unbinding $pcidev from" $(basename $(readlink /sys/bus/pci/devices/"$pcidev>

echo -n "$pcidev" > /sys/bus/pci/devices/"$pcidev"/driver/unbind

fi

echo "Binding $pcidev to pciback"

echo -n "$pcidev" > /sys/bus/pci/drivers/pciback/new_slot

echo -n "$pcidev" > /sys/bus/pci/drivers/pciback/bind

done

as I said,it works if I don't use libvirt / virt-manager. It means that I can pass also the audio device.