!KEJUbONnoBpiYKGWEq:nixos.org

NixOS Gaming

688 Members
Gaming things, my hands are typing words.178 Servers

Load older messages


SenderMessageTime
31 Oct 2023
@rikudou:lemmings.world@rikudou:lemmings.world Anyone knowledgeable about virt-manager, GPU passthrough and all that stuff? I'm trying to setup a Windows VM, I've successfully made the GPU passthrough, now I'm trying to setup looking glass, but as soon as I add the looking glass shared memory, it crashes with qemu: hardware error: vfio: DMA mapping failed, unable to continue 13:16:46
@k900:0upti.meK900There should be more logs around that13:17:29
@rikudou:lemmings.world@rikudou:lemmings.world
2023-10-31 13:10:11.327+0000: Domain id=18 is tainted: high-privileges
char device redirected to /dev/pts/4 (label charserial0)
2023-10-31T13:10:17.898532Z qemu-system-x86_64: VFIO_MAP_DMA failed: Invalid argument
2023-10-31T13:10:17.898596Z qemu-system-x86_64: vfio_dma_map(0x564a7fb7c4a0, 0x383800000000, 0x100000000, 0x7fbae0000000) = -2 (No such file or directory)
2023-10-31T13:10:17.902474Z qemu-system-x86_64: VFIO_MAP_DMA failed: Invalid argument
2023-10-31T13:10:17.902493Z qemu-system-x86_64: vfio_dma_map(0x564a7fb7c4a0, 0x383900000000, 0x2000000, 0x7fbbe5000000) = -22 (Invalid argument)
2023-10-31T13:10:18.062247Z qemu-system-x86_64: VFIO_MAP_DMA failed: Invalid argument
2023-10-31T13:10:18.062272Z qemu-system-x86_64: vfio_dma_map(0x564a7fb7c4a0, 0x383800000000, 0x100000000, 0x7fbae0000000) = -22 (Invalid argument)
2023-10-31T13:10:18.064794Z qemu-system-x86_64: VFIO_MAP_DMA failed: Invalid argument
2023-10-31T13:10:18.064803Z qemu-system-x86_64: vfio_dma_map(0x564a7fb7c4a0, 0x383900000000, 0x2000000, 0x7fbbe5000000) = -22 (Invalid argument)
2023-10-31T13:10:18.068928Z qemu-system-x86_64: VFIO_MAP_DMA failed: Invalid argument
2023-10-31T13:10:18.068942Z qemu-system-x86_64: vfio_dma_map(0x564a7fb7c4a0, 0x383902000000, 0x2000000, 0x7fbc0dffe000) = -22 (Invalid argument)
qemu: hardware error: vfio: DMA mapping failed, unable to continue
13:18:40
@rikudou:lemmings.world@rikudou:lemmings.world

Then something like this for every CPU:

CPU #0:
RAX=0000000000000000 RBX=0000000000000003 RCX=0000000000708004 RDX=0000000000000000
RSI=00000000b0708004 RDI=0000000000708004 RBP=000000007fef66df RSP=000000007fef64b0
R8 =0000000000000000 R9 =000000007fef65ff R10=0000000000000001 R11=0000000000000001
R12=0000000000708004 R13=0000000000000003 R14=0000000000000002 R15=0000000000708004
RIP=000000007f230f8b RFL=00000246 [---Z-P-] CPL=0 II=0 A20=1 SMM=0 HLT=0
ES =0030 0000000000000000 ffffffff 00c09300 DPL=0 DS   [-WA]
CS =0038 0000000000000000 ffffffff 00a09b00 DPL=0 CS64 [-RA]
SS =0030 0000000000000000 ffffffff 00c09300 DPL=0 DS   [-WA]
DS =0030 0000000000000000 ffffffff 00c09300 DPL=0 DS   [-WA]
FS =0030 0000000000000000 ffffffff 00c09300 DPL=0 DS   [-WA]
GS =0030 0000000000000000 ffffffff 00c09300 DPL=0 DS   [-WA]
LDT=0000 0000000000000000 0000ffff 00008200 DPL=0 LDT
TR =0000 0000000000000000 0000ffff 00008b00 DPL=0 TSS64-busy
GDT=     000000007f9dc000 00000047
IDT=     000000007f269018 00000fff
CR0=80010033 CR2=0000000000000000 CR3=000000007fc01000 CR4=00000668
DR0=0000000000000000 DR1=0000000000000000 DR2=0000000000000000 DR3=0000000000000000 
DR6=00000000ffff0ff0 DR7=0000000000000400
EFER=0000000000000d00
FCW=037f FSW=0000 [ST=0] FTW=00 MXCSR=00001f80
FPR0=0000000000000000 0000 FPR1=0000000000000000 0000
FPR2=0000000000000000 0000 FPR3=0000000000000000 0000
FPR4=0000000000000000 0000 FPR5=0000000000000000 0000
FPR6=0000000000000000 0000 FPR7=0000000000000000 0000
XMM00=0000000000000000 0000000000000000 XMM01=0000000000000000 0000000000000000
XMM02=0000000000000000 0000000000000000 XMM03=0000000000000000 0000000000000000
XMM04=0000000000000000 0000000000000000 XMM05=0000000000000000 0000000000000000
XMM06=0000000000000000 0000000000000000 XMM07=0000000000000000 0000000000000000
XMM08=0000000000000000 0000000000000000 XMM09=0000000000000000 0000000000000000
XMM10=0000000000000000 0000000000000000 XMM11=0000000000000000 0000000000000000
XMM12=0000000000000000 0000000000000000 XMM13=0000000000000000 0000000000000000
XMM14=0000000000000000 0000000000000000 XMM15=0000000000000000 0000000000000000
13:18:59
@rikudou:lemmings.world@rikudou:lemmings.world
In reply to @rikudou:lemmings.world
2023-10-31 13:10:11.327+0000: Domain id=18 is tainted: high-privileges
char device redirected to /dev/pts/4 (label charserial0)
2023-10-31T13:10:17.898532Z qemu-system-x86_64: VFIO_MAP_DMA failed: Invalid argument
2023-10-31T13:10:17.898596Z qemu-system-x86_64: vfio_dma_map(0x564a7fb7c4a0, 0x383800000000, 0x100000000, 0x7fbae0000000) = -2 (No such file or directory)
2023-10-31T13:10:17.902474Z qemu-system-x86_64: VFIO_MAP_DMA failed: Invalid argument
2023-10-31T13:10:17.902493Z qemu-system-x86_64: vfio_dma_map(0x564a7fb7c4a0, 0x383900000000, 0x2000000, 0x7fbbe5000000) = -22 (Invalid argument)
2023-10-31T13:10:18.062247Z qemu-system-x86_64: VFIO_MAP_DMA failed: Invalid argument
2023-10-31T13:10:18.062272Z qemu-system-x86_64: vfio_dma_map(0x564a7fb7c4a0, 0x383800000000, 0x100000000, 0x7fbae0000000) = -22 (Invalid argument)
2023-10-31T13:10:18.064794Z qemu-system-x86_64: VFIO_MAP_DMA failed: Invalid argument
2023-10-31T13:10:18.064803Z qemu-system-x86_64: vfio_dma_map(0x564a7fb7c4a0, 0x383900000000, 0x2000000, 0x7fbbe5000000) = -22 (Invalid argument)
2023-10-31T13:10:18.068928Z qemu-system-x86_64: VFIO_MAP_DMA failed: Invalid argument
2023-10-31T13:10:18.068942Z qemu-system-x86_64: vfio_dma_map(0x564a7fb7c4a0, 0x383902000000, 0x2000000, 0x7fbc0dffe000) = -22 (Invalid argument)
qemu: hardware error: vfio: DMA mapping failed, unable to continue

I get these even without the shared memory block and the VM starts well, it's only when I add the shmem block that it crashes:

    <shmem name="looking-glass">
      <model type="ivshmem-plain"/>
      <size unit="M">32</size>
      <address type="pci" domain="0x0000" bus="0x10" slot="0x01" function="0x0"/>
    </shmem>
13:21:25
@k900:0upti.meK900Might be some IOMMU nonsense13:21:51
@rikudou:lemmings.world@rikudou:lemmings.world

This is the related config:

  specialisation.GPU_PASSTHROUGH.configuration = {
    boot.kernelParams = [ "intel_iommu=on" ];
    boot.blacklistedKernelModules = [ "nvidia" "nouveau" ];
    boot.kernelModules = [ "vfio_virqfd" "vfio_pci" "vfio_iommu_type1" "vfio" ];
    boot.extraModprobeConfig = "options vfio-pci ids=10de:25a0";
    boot.postBootCommands = ''
      DEVS="0000:01:00.0"

      for DEV in $DEVS; do
        echo "vfio-pci" > /sys/bus/pci/devices/$DEV/driver_override
      done
      modprobe -i vfio-pci
    '';
    services.xserver.videoDrivers = ["intel"];
    systemd.tmpfiles.rules = [
      "f /dev/shm/looking-glass 0660 my-user qemu-libvirtd -"
    ];
  };
13:22:58
@k900:0upti.meK900I'd maybe check for firmware updates13:23:11
@k900:0upti.meK900Sometimes they just fix IOMMU nonsense13:23:19
@rikudou:lemmings.world@rikudou:lemmings.worldHow do you do that? You mean just updating packages?13:23:44
@k900:0upti.meK900I mean BIOS13:23:53
@rikudou:lemmings.world@rikudou:lemmings.worldI see, I'll check13:24:05
@rikudou:lemmings.world@rikudou:lemmings.world
In reply to @k900:0upti.me
I mean BIOS
Do you know how to do that from Linux? I found the firmware, but it requires MSI's flashing utility which is only for Windows
13:42:53
@k900:0upti.meK900There should be a downloadable capsule image13:43:05
@k900:0upti.meK900That you can flash through the firmware UI13:43:10
@k900:0upti.meK900Or maybe fwupd13:43:12
@rikudou:lemmings.world@rikudou:lemmings.worldfwupd didn't find any updates, no idea where to find the capsule image :/14:20:21
@k900:0upti.meK900What's your motherboard model?14:21:49
@rikudou:lemmings.world@rikudou:lemmings.worldMSI MS-159215:24:00
@atemu12:matrix.org@atemu12:matrix.org rikudou@lemmings.world: That's a laptop? 15:25:06
@rikudou:lemmings.world@rikudou:lemmings.worldYep15:25:14
@atemu12:matrix.org@atemu12:matrix.orgIn that case you need the model15:25:40
@atemu12:matrix.org@atemu12:matrix.orgI wouldn't get my hopes up of that working or you being able to flash a BIOS15:25:58
@rikudou:lemmings.world@rikudou:lemmings.world
In reply to @atemu12:matrix.org
In that case you need the model
I'm not sure what do you mean? LIke, you can flash the BIOS easily using their Windows tools, so is there no way to do it in Linux?
15:27:09
@atemu12:matrix.org@atemu12:matrix.orgIf it's not in fwupd, I wouldn't count on it.15:27:27
@atemu12:matrix.org@atemu12:matrix.orgWhat's the exact model of that laptop?15:27:41
@atemu12:matrix.org@atemu12:matrix.orgThat's what you need to Google and see whether MSI offers downloads15:27:55
@atemu12:matrix.org@atemu12:matrix.orgNot the Mobo id15:28:09
@rikudou:lemmings.world@rikudou:lemmings.world
In reply to @atemu12:matrix.org
What's the exact model of that laptop?
MSI Prestige 16 A12UD-201CZ
15:28:18
@k900:0upti.meK900https://www.msi.com/Business-Productivity/Summit-E16-Flip-A11X-RTX/support?sub_product=Summit-E16Flip-A11UCT15:28:26

Show newer messages


Back to Room ListRoom Version: 6