From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751327AbdBWK5y (ORCPT ); Thu, 23 Feb 2017 05:57:54 -0500 Received: from mail-wm0-f65.google.com ([74.125.82.65]:36624 "EHLO mail-wm0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751099AbdBWK5v (ORCPT ); Thu, 23 Feb 2017 05:57:51 -0500 Subject: Re: [PATCH 2/5] KVM: add KVM request variants without barrier To: =?UTF-8?B?UmFkaW0gS3LEjW3DocWZ?= , linux-kernel@vger.kernel.org, kvm@vger.kernel.org References: <20170216160449.13094-1-rkrcmar@redhat.com> <20170216160449.13094-3-rkrcmar@redhat.com> Cc: Andrew Jones , Marc Zyngier , Christian Borntraeger , Cornelia Huck , James Hogan , Paul Mackerras , Christoffer Dall From: Paolo Bonzini Message-ID: Date: Thu, 23 Feb 2017 11:57:43 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.7.0 MIME-Version: 1.0 In-Reply-To: <20170216160449.13094-3-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 On 16/02/2017 17:04, Radim Krčmář wrote: > + > +static inline void __kvm_request_clear(unsigned req, struct kvm_vcpu *vcpu) > +{ > + test_bit(req, &vcpu->requests); > } Are you sure? :) Paolo > static inline bool kvm_request_test_and_clear(unsigned req, struct kvm_vcpu *vcpu) > { > - if (test_bit(req, &vcpu->requests)) { > - clear_bit(req, &vcpu->requests); > + if (__kvm_request_test(req, vcpu)) { > + __kvm_request_clear(req, vcpu); > > /* > * Ensure the rest of the request is visible to > --