I create a windows 7 x86 virtual machine by KVM.
When it executes the following instructions:
mov eax, 0x40000000
cpuid
It will return this:
eax=0x40000005
ebx=0x7263694d
ecx=0x666f736f
edx=0x76482074
That is "Microsoft Hv".
How to adjust KVM to return custom value?
If you mean QEMU/KVM, then you need to convince the hyperv enlightenments to have a different configuration.
<vendor_id state='on' value='foobarbaz'/>
between the<hyperv>
</hyperv>
tags.One lazy alternative is to disable the enlightenments across the board (which will hide the hyperv cpuid leaf).
The following is probably not relevant, but it is a direct answer to this question. For a custom VMM that is directly using KVM, use the kvm_set_cpuid2 ioctl. Check out the documentation for more.