How to fix "BAR0 is 0M" error and NVIDIA driver probe failure after GPU Passthrough?

mildred

New Member
Mar 6, 2026
3
0
1
Hi everyone, I'm having trouble passing through an NVIDIA GPU to a VM. The VM boots up fine, but I keep seeing driver errors in the Guest OS journal as follows:

kernel: nvidia 0000:01:00.0: enabling device (0000 -> 0002)
kernel: NVRM: This PCI I/O region assigned to your NVIDIA device is invalid:
NVRM: BAR0 is 0M @ 0x0 (PCI:0000:01:00.0)
kernel: nvidia: probe of 0000:01:00.0 failed with error -1
kernel: NVRM: The NVIDIA probe routine failed for 1 device(s).

I've double-checked my passthrough settings and they seem correct, but the driver just won't recognize the hardware address. Does anyone know what might be causing this?
 
Seeing this error code usually points to PCI resource allocation issues. Could you clarify whether your VM is using OVMF (UEFI) or SeaBIOS?

Also, what's the VRAM capacity of this GPU?
If you are using a newer model with high VRAM, that is likely the culprit.
 
  • Like
Reactions: mildred
I am currently using OVMF (UEFI) mode because I wanted to support Secure Boot. The GPU is an NVIDIA card with 24GB of VRAM. Could that be causing a conflict? I noticed the error in the logs occurs exactly when the driver tries to probe the GPU's PCI space.
 
The issue lies within the OVMF defaults.

OVMF only reserves a 32GB address space window for 64-bit PCI MMIO by default. When your GPU has a large VRAM (especially 24GB or more), combined with other system resource demands, this default window is often insufficient, leading to the driver detecting an invalid region.

Here are two ways to solve this:

Solution A: Increase the OVMF MMIO Window (Recommended) You can manually increase the 64-bit PCI MMIO size using the qm set command. For instance, to set it to 64GB (65536MB):
qm set <VMID> --args '-fw_cfg name=opt/ovmf/X-PciMmio64Mb,string=65536'
If 64GB is still not enough, try higher values like 128GB (131072) or 256GB (262144).

Solution B: Switch to SeaBIOS If you don't strictly require UEFI-specific features, changing the VM's BIOS type to SeaBIOS usually bypasses this address space limitation entirely.