'how to map MMCONFIG when dmesg shows 'fail to add "MMCONFIG" information'

For a modern pcie device, we need MMCONFIG to access device configuration space. But I run a qemu VM with modern virtual device, VM's dmesg shows that it fails map MMCONFIG space, and cat /proc/mem shows no MCFG or MMCONFIG.

enter image description here

I want write a driver to access this virtual device, how can I map MMCONFIG correctly?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source