KVM: x86: tag the instructions which are used to write page table
authorXiao Guangrong <xiaoguangrong@cn.fujitsu.com>
Thu, 22 Sep 2011 08:53:46 +0000 (16:53 +0800)
committerAvi Kivity <avi@redhat.com>
Tue, 27 Dec 2011 09:16:48 +0000 (11:16 +0200)
commitd5ae7ce835cc89556dc18e2070e754f026402efa
tree6a4a74a1b6b1f59dccc14ec8211ae0793644c84f
parentf759e2b4c728cee82e4bc1132d0e41177b79a0b1
KVM: x86: tag the instructions which are used to write page table

The idea is from Avi:
| tag instructions that are typically used to modify the page tables, and
| drop shadow if any other instruction is used.
| The list would include, I'd guess, and, or, bts, btc, mov, xchg, cmpxchg,
| and cmpxchg8b.

This patch is used to tag the instructions and in the later path, shadow page
is dropped if it is written by other instructions

Signed-off-by: Xiao Guangrong <xiaoguangrong@cn.fujitsu.com>
Signed-off-by: Avi Kivity <avi@redhat.com>
arch/x86/kvm/emulate.c