Re: [PATCH v8 2/4] KVM: X86: Add Paravirt TLB Shootdown

From: Paolo Bonzini
Date: Wed Dec 13 2017 - 07:33:11 EST


On 13/12/2017 02:33, Wanpeng Li wrote:
> @@ -53,6 +54,7 @@ struct kvm_steal_time {
>
> #define KVM_VCPU_NOT_PREEMPTED (0 << 0)
> #define KVM_VCPU_PREEMPTED (1 << 0)
> +#define KVM_VCPU_SHOULD_FLUSH (1 << 1)
>
> #define KVM_CLOCK_PAIRING_WALLCLOCK 0

Two issues with the name:

1) it doesn't say *what* is flushed

2) in the usual meaning of "should", it would be just a recommendation
i.e. it's fine not to flush the TLB. This is not true in this case, so
KVM_VCPU_FLUSH_TLB is better.

Paolo