Patches and fixes for QEMU