The function is now only used from within a single file. Backports commit dd941cdcfec536aad6a310a153778142ed9f3e92 from qemu
Backports commit ba4b5c65a98ea91dc3b13e42dd9404808c999dda from qemu