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

Joerg Roedel
2011-01-10T11:52:36Z

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