fix MSR_COUNT for kvm_arch_save_regs()qemu-0.11.0-7.fc12qemu-0.11.0-7.fc13
authorEduardo Habkost <ehabkost@redhat.com>
Wed, 14 Oct 2009 18:02:27 +0000 (15:02 -0300)
committerMark McLoughlin <markmc@redhat.com>
Mon, 19 Oct 2009 10:22:33 +0000 (11:22 +0100)
commit7834349cfcc68b946c0d241ffd99c598857e489b
tree50b3d787643a30464dd616610b61f08c33a2174a
parent1df18d4a961a66b9ea28ab83b409f4d9d470f148
fix MSR_COUNT for kvm_arch_save_regs()

A new register was added to the load/save list on commit
d283d5a65a2bdcc570065267be21848bd6fe3d78, but MSR_COUNT was not updated, leading
to potential stack corruption on kvm_arch_save_regs().

The following registers are saved by kvm_arch_save_regs():

 1) MSR_IA32_SYSENTER_CS
 2) MSR_IA32_SYSENTER_ESP
 3) MSR_IA32_SYSENTER_EIP
 4) MSR_STAR
 5) MSR_IA32_TSC
 6) MSR_VM_HSAVE_PA
 7) MSR_CSTAR (x86_64 only)
 8) MSR_KERNELGSBASE (x86_64 only)
 9) MSR_FMASK (x86_64 only)
10) MSR_LSTAR (x86_64 only)

(cherry picked from commit e7e5448ba387adc20be1cf08411a5b526d684299)

Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
Signed-off-by: Mark McLoughlin <markmc@redhat.com>
Fedora-patch: qemu-fix-msr-count-potential-segfault.patch
qemu-kvm-x86.c