> Only allow one resolution change per guest boot, which prevents a > > crash when the guest writes garbage to the configuration space (e.g. > > when rebooting). > > Hmm? Did you see that happen in practice? > It is not easy to write to fw_cfg by accident ... > > Yes, this does happen in practice. It's observed in KVMGT setups by another github user and me, when the guest Intel driver loads or when the guest reboots. Link: https://github.com/intel/gvt-linux/issues/23#issuecomment-483651476
Now that you mentioned it, I start to feel that it's not accidental. A closer look at the "garbage" in that post shows that the overwriting content are valid resolution values in the wrong endian. It could be a misguided attempt to "resize ramfb" by the guest Intel driver. ----- I'll fix the addr / length thing and remove the test part in vfio-pci in V2. Qiming