Re: [KVM TSC trapping / migration 1/2] Add TSC trapping for SVMand VMX

From: Joerg Roedel
Date: Mon Jan 10 2011 - 06:52:46 EST


On Thu, Jan 06, 2011 at 12:10:44AM -1000, Zachary Amsden wrote:
> +static void svm_set_tsc_trapping(struct kvm_vcpu *vcpu, bool trap)
> +{
> + struct vcpu_svm *svm = to_svm(vcpu);
> + if (trap)
> + svm->vmcb->control.intercept |= 1ULL << INTERCEPT_RDTSC;
> + else
> + svm->vmcb->control.intercept &= ~(1ULL << INTERCEPT_RDTSC);
> +}

This needs to update the clean-bits. Please use
set_intercept/clr_intercept instead which already takes care of this.

Joerg

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/