]> pilppa.com Git - linux-2.6-omap-h63xx.git/commit
[PATCH] KVM: x86 emulator: fix bit string instructions
authorAvi Kivity <avi@qumranet.com>
Tue, 23 Jan 2007 04:40:40 +0000 (20:40 -0800)
committerLinus Torvalds <torvalds@woody.linux-foundation.org>
Tue, 23 Jan 2007 15:52:06 +0000 (07:52 -0800)
commit038e51de2e7ae2c8e9d8a0b15231f8509875dc33
treeb74e9b4c8c088c0e85f91cc91d64ce20ef5066a6
parentcccf748b810832cfab4dbb3ed4c7cf1a1ee35ad2
[PATCH] KVM: x86 emulator: fix bit string instructions

The various bit string instructions (bts, btc, etc.) fail to adjust the
address correctly if the bit address is beyond BITS_PER_LONG.

This bug creeped in as the emulator originally relied on cr2 to contain the
memory address; however we now decode it from the mod r/m bits, and must
adjust the offset to account for large bit indices.

The patch is rather large because it switches src and dst decoding around, so
that the bit index is available when decoding the memory address.

This fixes workloads like the FC5 installer.

Signed-off-by: Avi Kivity <avi@qumranet.com>
Cc: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
drivers/kvm/x86_emulate.c