Skip to content
This repository has been archived by the owner on Nov 1, 2023. It is now read-only.

Qemu FwCFG Workaround

Patrick Magauran edited this page Nov 6, 2021 · 3 revisions

Workaround for Error 3 in SetupQemuFwCfg

This error means that QEMU did not give us the correct fwCfg to proceed. I have no way to easily determine this as I have no machine that has this issue to test with. So we are going to manually pass the files into QEMU. This should hopefully allow the software to continue to work. But be warned, QEMU likely had a reason for not passing them through, so the chance of errors may be greater

Steps

  1. First, we need to get the opregion contents from the CPU. sudo cat /sys/kernel/debug/dri/0/i915_opregion > opregion.bin
    • If for some reason this location is not valid, try to un-blacklist the i915 driver, turn off the VFIO options, and then try again.
    • It may also be in /sys/kernel/debug/dri/1 instead of 0
    • See issue #24 for more information.
  2. Then we need to create a new file with the contents of our GTT stolen memory.(For these CPUs, this seems fixed at 8 MB or 8388608 bytes). This has already been done. See bdsmSize.bin in the Repo.(Make sure to save as raw).
    • If in the future this value needs to be changed, it needs to be written to the file as an 8-byte little endian integer representing the size in bytes.
  3. Now we need to load them into our QEMU command. For this append the following to parameters: -fw_cfg name=etc/igd-opregion,file=opregion.bin and fw_cfg name=etc/igd-bdsm-size,file=bdsmSize.bin

For Contributors

If you wish to try to solve this issue a different way please see issue #10. We should try to determine why QEMU refuses to pass these files through on some systems.

Clone this wiki locally