backport 64bit patches from qemu