On Thu, 2022-11-10 at 19:02 +0500, Roman Mamedov wrote:
> On Thu, 10 Nov 2022 13:54:58 +0000
> Patrick O'Callaghan <p...@usb.ve> wrote:
> 
> > On Thu, 2022-11-10 at 18:48 +0500, Roman Mamedov wrote:
> > > On Thu, 10 Nov 2022 13:43:56 +0000
> > > Patrick O'Callaghan <p...@usb.ve> wrote:
> > > 
> > > > I've just replaced an old Nvidia card with a newer AMD RX580
> > > > and am
> > > > attempting to reconfigure my Windows VM. However I don't see
> > > > the
> > > > new
> > > > card getting its own IOMMU group:
> > > > 
> > > > $ ls /sys/kernel/iommu_groups
> > > > $
> > > 
> > > Looks like you don't have any IOMMU groups at all. Was GPU
> > > passthrough working
> > > before, on this exact system? Without OS reinstalls, kernel
> > > upgrades
> > > and
> > > without resetting the BIOS settings to defaults?
> > > 
> > 
> > Passthrough was working with the Nvidia card, which did have its
> > own
> > IOMMU group. However it's been some time (months) since I last used
> > it,
> > so it's possible that something else has changed as I do update my
> > system frequently (using Fedora dnf from standard repos).
> > 
> > Other than the GPU, all the hardware is identical, and I haven't
> > touched any BIOS settings.
> 
> Check that IOMMU is enabled in BIOS, and then also add GRUB
> parameters to
> enable it: https://pve.proxmox.com/wiki/Pci_passthrough
> 
> On my system I just have "iommu=pt", while "amd_iommu=on" for the AMD
> motherboard may have defaulted to "on" already.
> 

OK, I corrected the boot line:

$ cat /proc/cmdline 
BOOT_IMAGE=(hd2,gpt2)/vmlinuz-6.0.5-200.fc36.x86_64 
root=UUID=8e1f7af4-c0bf-434e-b1c4-a9af2c810d56 ro rootflags=subvol=root 
modprobe.blacklist=nvidia modprobe.blacklist=nouveau rd.blacklist=nvidia 
rd.blacklist=nouveau intel_iommu=on,igfx_off iommu=pt rd.driver.pre=vfio-pci 
vconsole.font=latarcyrheb-sun16 rhgb quiet 
resume=UUID=6c16e7ba-a483-4832-ab9b-a32af7f46d62 audit=0 hugepages=4096

IOMMU groups now appear:

$ ls /sys/kernel/iommu_groups/*/devices
/sys/kernel/iommu_groups/0/devices:
0000:00:00.0

/sys/kernel/iommu_groups/10/devices:
0000:00:1f.0  0000:00:1f.2  0000:00:1f.3

/sys/kernel/iommu_groups/11/devices:
0000:03:00.0

/sys/kernel/iommu_groups/1/devices:
0000:00:01.0  0000:01:00.0  0000:01:00.1

/sys/kernel/iommu_groups/2/devices:
0000:00:14.0

/sys/kernel/iommu_groups/3/devices:
0000:00:16.0

/sys/kernel/iommu_groups/4/devices:
0000:00:1a.0

/sys/kernel/iommu_groups/5/devices:
0000:00:1b.0

/sys/kernel/iommu_groups/6/devices:
0000:00:1c.0

/sys/kernel/iommu_groups/7/devices:
0000:00:1c.1

/sys/kernel/iommu_groups/8/devices:
0000:00:1d.0

/sys/kernel/iommu_groups/9/devices:
0000:00:1e.0

$ lspci -nn|grep AMD
01:00.0 VGA compatible controller [0300]: Advanced Micro Devices, Inc. 
[AMD/ATI] Ellesmere [Radeon RX 470/480/570/570X/580/580X/590] [1002:67df] (rev 
e7)
01:00.1 Audio device [0403]: Advanced Micro Devices, Inc. [AMD/ATI] Ellesmere 
HDMI Audio [Radeon RX 470/480 / 570/580/590] [1002:aaf0]

I booted Windows 10 under QEMU/KVM (using virt-manager) with no
modifications to my existing VM config. The virt-manager info page
shows both AMD devices (video and audio) at the correct PCI addresses:

<hostdev mode="subsystem" type="pci" managed="yes">
  <driver name="vfio"/>
  <source>
    <address domain="0x0000" bus="0x01" slot="0x00" function="0x0"/>
  </source>
  <alias name="hostdev0"/>
  <address type="pci" domain="0x0000" bus="0x00" slot="0x06"
function="0x0"/>

</hostdev>
<hostdev mode="subsystem" type="pci" managed="yes">
  <driver name="vfio"/>
  <source>
    <address domain="0x0000" bus="0x01" slot="0x00" function="0x1"/>
  </source>
  <alias name="hostdev1"/>
  <address type="pci" domain="0x0000" bus="0x00" slot="0x0a"
function="0x0"/>
</hostdev>

However the Win10 console is displaying in the virt-manager window on
the IGP display, while the AMD screen shows the KVM boot console.

Under Win10, the Device Manager menu doesn't show the AMD GPU, neither
video nor audio.

poc

_______________________________________________
vfio-users mailing list
vfio-users@redhat.com
https://listman.redhat.com/mailman/listinfo/vfio-users

Reply via email to