Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755151AbdDGI1J (ORCPT ); Fri, 7 Apr 2017 04:27:09 -0400 Received: from foss.arm.com ([217.140.101.70]:51972 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752954AbdDGI1E (ORCPT ); Fri, 7 Apr 2017 04:27:04 -0400 Subject: Re: [PATCH RFC 5/6] KVM: mark requests that do not need a wakeup To: =?UTF-8?B?UmFkaW0gS3LEjW3DocWZ?= , linux-kernel@vger.kernel.org, kvm@vger.kernel.org References: <20170406202056.18379-1-rkrcmar@redhat.com> <20170406202056.18379-6-rkrcmar@redhat.com> Cc: Christoffer Dall , Andrew Jones , Paolo Bonzini , Christian Borntraeger , Cornelia Huck , James Hogan , Paul Mackerras From: Marc Zyngier Organization: ARM Ltd Message-ID: Date: Fri, 7 Apr 2017 09:27:00 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0 MIME-Version: 1.0 In-Reply-To: <20170406202056.18379-6-rkrcmar@redhat.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1011 Lines: 28 On 06/04/17 21:20, 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. > > Suggested-by: Christoffer Dall > Signed-off-by: Radim Krčmář > --- > Btw. do you recall which macro allowed to define bitmasks? (It has > two arguments, FROM and TO.) GENMASK (and its _ULL variant), defined in include/linux/bitops.h. Thanks, M. -- Jazz is not dead. It just smells funny...