From: Nadav Har'El Date: Wed, 25 May 2011 20:14:38 +0000 (+0300) Subject: KVM: nVMX: Handling of CR0 and CR4 modifying instructions X-Git-Tag: v3.1-rc1~264^2~100 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=eeadf9e7558ce2c34c0d91985d26047a6e2245e7;p=pandora-kernel.git KVM: nVMX: Handling of CR0 and CR4 modifying instructions When L2 tries to modify CR0 or CR4 (with mov or clts), and modifies a bit which L1 asked to shadow (via CR[04]_GUEST_HOST_MASK), we already do the right thing: we let L1 handle the trap (see nested_vmx_exit_handled_cr() in a previous patch). When L2 modifies bits that L1 doesn't care about, we let it think (via CR[04]_READ_SHADOW) that it did these modifications, while only changing (in GUEST_CR[04]) the bits that L0 doesn't shadow. This is needed for corect handling of CR0.TS for lazy FPU loading: L0 may want to leave TS on, while pretending to allow the guest to change it. Signed-off-by: Nadav Har'El Signed-off-by: Marcelo Tosatti --- Reading git-diff-tree failed