Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752905AbdLMMdI (ORCPT ); Wed, 13 Dec 2017 07:33:08 -0500 Received: from mx1.redhat.com ([209.132.183.28]:48266 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752609AbdLMMdF (ORCPT ); Wed, 13 Dec 2017 07:33:05 -0500 Subject: Re: [PATCH v8 2/4] KVM: X86: Add Paravirt TLB Shootdown To: Wanpeng Li , linux-kernel@vger.kernel.org, kvm@vger.kernel.org Cc: =?UTF-8?B?UmFkaW0gS3LEjW3DocWZ?= , Peter Zijlstra , Wanpeng Li References: <1513128784-5924-1-git-send-email-wanpeng.li@hotmail.com> <1513128784-5924-3-git-send-email-wanpeng.li@hotmail.com> From: Paolo Bonzini Message-ID: <17aebf52-c84c-c12f-1f74-b1b69a67d41f@redhat.com> Date: Wed, 13 Dec 2017 13:33:02 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.5.0 MIME-Version: 1.0 In-Reply-To: <1513128784-5924-3-git-send-email-wanpeng.li@hotmail.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.38]); Wed, 13 Dec 2017 12:33:05 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 521 Lines: 18 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