On 12/22/2010 03:44 PM, Marcelo Tosatti wrote:
On Mon, Dec 20, 2010 at 03:46:12PM +0200, Avi Kivity wrote:
> Instead of syncing the guest cr3 every exit, which is expensince on vmx
> with ept enabled, sync it only on demand.
>
> static inline ulong kvm_read_cr3(struct kvm_vcpu *vcpu)
> {
> + if (!test_bit(VCPU_EXREG_CR3, (ulong *)&vcpu->arch.regs_avail))
> + kvm_x86_ops->decache_cr3(vcpu);
> return vcpu->arch.cr3;
> }
Should mark register available on vcpu->arch.cr3 assignment
(kvm_set_cr3, kvm_set_sregs, etc), so that subsequent cr3 read does not
use decache value.
True. Will fix and repost.
(it's not a correctness problem, since the cached value will match
GUEST_CR3, but it's nicer)
--
error compiling committee.c: too many arguments to function
--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html