Skip to content

lspci and VM passthrough #235

Description

@Chris-Peterson444

Inspired by your fake-devices-wrapper in ubuntu-drivers-common in Ubuntu I am trying to generate fake PCI devices to pass to a virtual machine (QEMU) to test automatic detection of drivers for installation. Although to do this I need to get the output of lspci to pass the host address to the vfio-pci driver in qemu.

The problem is that I get the following when trying to run lspci with the wrapper script (w/ the aticard device for example):

lspci: sysfs_scan: Couldn't parse entry name aticard

This happens with all of the devices and I haven't figured out a way to make sysfs_scan happy.
I enabled extra logging with UMOCKDEV_DEBUG=all and an extra line is printed:

testbed wrapped opendir(/sys/bus/pci/devices) -> /tmp/umockdev.DDN3K2/sys/bus/pci/devices

which is correct. I suspect there's something I missing with the setup of the test devices, but I'm not sure how to investigate further.

Any hints on how to debug this further (or tips for mocking devices in a VM) would be greatly appreciated.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions