Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1033955AbdD0Lfq (ORCPT ); Thu, 27 Apr 2017 07:35:46 -0400 Received: from mx1.redhat.com ([209.132.183.28]:46432 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753956AbdD0Lfj (ORCPT ); Thu, 27 Apr 2017 07:35:39 -0400 DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 8D80061B90 Authentication-Results: ext-mx10.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx10.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=drjones@redhat.com DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.redhat.com 8D80061B90 Date: Thu, 27 Apr 2017 13:35:34 +0200 From: Andrew Jones To: Radim =?utf-8?B?S3LEjW3DocWZ?= Cc: linux-kernel@vger.kernel.org, kvm@vger.kernel.org, Christoffer Dall , Marc Zyngier , Paolo Bonzini , Christian Borntraeger , Cornelia Huck , James Hogan , Paul Mackerras Subject: Re: [PATCH v2 4/9] KVM: mark requests that do not need a wakeup Message-ID: <20170427113534.4gofjdl7xb5xqcj4@kamzik.brq.redhat.com> References: <20170426203227.12321-1-rkrcmar@redhat.com> <20170426203227.12321-5-rkrcmar@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20170426203227.12321-5-rkrcmar@redhat.com> User-Agent: Mutt/1.6.0.1 (2016-04-01) X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.39]); Thu, 27 Apr 2017 11:35:38 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1077 Lines: 26 On Wed, Apr 26, 2017 at 10:32:22PM +0200, Radim Krčmář wrote: > Some operations must ensure that the guest is not running with stale > data, but if the guest is halted, then the update can wait until another > event happens. kvm_make_all_requests() currently doesn't wake up, so we > can mark all requests used with it. > > First 8 bits were arbitrarily reserved for request numbers. > > Most uses of requests have the request type as a constant, so a compiler > will optimize the '&'. > > An alternative would be to have an inline function that would return > whether the request needs a wake-up or not, but I like this one better > even though it might produce worse assembly. > > Signed-off-by: Radim Krčmář > --- > v2: use GENMASK [Marc] > --- > arch/arm/include/asm/kvm_host.h | 2 +- > arch/arm64/include/asm/kvm_host.h | 2 +- > arch/x86/include/asm/kvm_host.h | 6 +++--- > include/linux/kvm_host.h | 12 +++++++----- > 4 files changed, 12 insertions(+), 10 deletions(-) Reviewed-by: Andrew Jones