[vfio-users] Accessing the PCI config space from both the VM and the host

Cosmin Chenaru cosmin.chenaru at gmail.com
Fri Jul 29 18:43:44 UTC 2022


Hi,

I have an Intel network card inside a VM using PCI-Passthrough and I would
like to write one register (the Physical Hardware Clock) but from inside
the host, as writing it from inside the VM is complicated with all the
unstable vTSC or other time sensitive tools which don't work best from
inside a VM.

I know that I cannot write it from the host's network driver, as the driver
will unbind the card when starting the VM, so let's say I write the
register from another place (either hacking the network driver or from the
VFIO driver). Do you think this would be possible?

Also, should I worry about locking the access so that the host and VM don't
write to the PCI config space at the same time? I watched Alex's VFIO
presentations and I understand that through Memory Mapped IO the VM can
directly write the PCI config space, so the host will not be able to
intercept and, in my case, to do the locking.

And my apologies if these questions were asked before. I did do a quick
search but could not find anything relevant.

Thank you.

Cosmin.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/vfio-users/attachments/20220729/e9146ddd/attachment.htm>


More information about the vfio-users mailing list