Multiple small fixes needed for CPUID tests

This pull request contain a few small fixes that are necessary to make the CPUID (qemu_cpu) test cases work again, and a small update to .gitignore.