Skip to content
Commit d3edefc0 authored by Avi Kivity's avatar Avi Kivity
Browse files

KVM: VMX: Only reload guest cr2 if different from host cr2



cr2 changes only rarely, and writing it is expensive.  Avoid the costly cr2
writes by checking if it does not already hold the desired value.

Shaves 70 cycles off the vmexit latency.

Signed-off-by: default avatarAvi Kivity <avi@redhat.com>
parent 681405bf
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment