Hi SGI & Irixers,
I have played some more with getting L3/L2 working via QEMU / KVM.
I reached the point where I have O350 L1 USB plugged into my QEMU / KVM host, but the L1 is cycling up and down on its connection, which means it is not stable for long enough for me to re-direct the USB Device to the Fedora Core L3/L2 VM.
You can see cycle via the dmesg :
>> $ dmesg | grep usb
>> [ 1777.251564] usb 3-3: USB disconnect, device number 95
>> [ 1779.561037] usb 3-3: new full-speed USB device number 96 using xhci_hcd
>> [ 1779.712779] usb 3-3: New USB device found, idVendor=065e, idProduct=1234, bcdDevice= 1.00
>> [ 1779.712783] usb 3-3: New USB device strings: Mfr=1, Product=2, SerialNumber=3
>> [ 1779.712785] usb 3-3: Product: SN1 L1 System Controller
>> [ 1779.712788] usb 3-3: Manufacturer: Silicon Graphics, Inc.
>> [ 1779.712789] usb 3-3: SerialNumber: 00000000
>> [ 1781.291231] usb 3-3: USB disconnect, device number 96
>> [ 1783.601071] usb 3-3: new full-speed USB device number 97 using xhci_hcd
>> [ 1783.756886] usb 3-3: New USB device found, idVendor=065e, idProduct=1234, bcdDevice= 1.00
>> [ 1783.756890] usb 3-3: New USB device strings: Mfr=1, Product=2, SerialNumber=3
>> [ 1783.756892] usb 3-3: Product: SN1 L1 System Controller
>> [ 1783.756895] usb 3-3: Manufacturer: Silicon Graphics, Inc.
>> [ 1783.756897] usb 3-3: SerialNumber: 00000000
>> [ 1785.331243] usb 3-3: USB disconnect, device number 97
>> [ 1787.645129] usb 3-3: new full-speed USB device number 98 using xhci_hcd
>> [ 1787.796866] usb 3-3: New USB device found, idVendor=065e, idProduct=1234, bcdDevice= 1.00
>> ...
>> ...
>> ...
So thought maybe if I build the sgil1 USB driver (it is included on the IST CD with GPL) and installed it on the QEMU / KVM host then this could take ownership of L1 and then I could re-direct this to the VM.
So to cut a long story short I have hacked the sgil1 code and scripts (see github here:
https://github.com/zebity/sgil1 ) and now have sgil1 driver loading on Ubuntu 20.04 (linux 5.4) host:
>> $ dmesg | grep usb
>> [ 0.440280] usbcore: registered new interface driver usbfs
>> [ 0.440280] usbcore: registered new interface driver hub
>> [ 0.440280] usbcore: registered new device driver usb
>> ...
>> ...
>> ...
>> [47347.049644] usbcore: registered new interface driver sgil1
>> [48846.445478] usbcore: deregistering interface driver sgil1
>> [53621.919319] usbcore: registered new interface driver sgil1
The kernel complains when you do modprobe to load the KLM, due to it being unsigned but otherwise it loads up ok.
I did my initial build and test with Ubuntu 20.04 development VM, but then copied compiled KLM over onto test server and powered up O350 and hence L1.
I can see that that driver loads and connects to the L1 and reports a lot of configuration information, but then L3/L2 VM appears to freeze and then entire machine becomes partially responsive.
I could not get the KLM to unload and could not stop the L3/L3 VM and when I did reboot of machine the reboot never completed, so I had to power it off via the BMC controller (which is Intel server equivalent of L1 controller).
While doing this I had a few other ideas:
1. Could you avoid loading sgil1 altogether by just getting right udev rules for the L1 devices ?
2. Does introduction of virtualisation mean the sgil1 code needs to have some extra "things" put into code to allow it to work /
(I ask as both VM and the host behaviour was affected
3. Maybe just throw away the SGI code and write a very simple dummy plug driver ?
4. Write udev script so that on L1 connect it automatically redirects usb to VM ?
Anyway I am posting this as it currently is, as it might be some SGI'ers who also have much more in-depth knowledge of Linux kernel and USB Driver layer than me so maybe we could collaborate via GitHub code base.
Future thoughts ... if we can get the sgil1 driver going on modern Ubuntu then it opens up an new world of possible ways to more easy manage the SGI's which have L1 (ie O3000, O300, O350, Tezro & Fuel).
Cheers from Oz,
John.