From mboxrd@z Thu Jan 1 00:00:00 1970 From: Avi Kivity Subject: Re: [PATCH] Introduce bitmask for apic attention reasons. Date: Thu, 19 Apr 2012 13:35:53 +0300 Message-ID: <4F8FEA89.4020909@redhat.com> References: <1334828002-12709-1-git-send-email-gleb@redhat.com> <4F8FE088.20606@redhat.com> <20120419102627.GA12768@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: kvm@vger.kernel.org, mtosatti@redhat.com, mst@redhat.com To: Gleb Natapov Return-path: Received: from mx1.redhat.com ([209.132.183.28]:19306 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752761Ab2DSKfz (ORCPT ); Thu, 19 Apr 2012 06:35:55 -0400 Received: from int-mx11.intmail.prod.int.phx2.redhat.com (int-mx11.intmail.prod.int.phx2.redhat.com [10.5.11.24]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id q3JAZtWw013810 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Thu, 19 Apr 2012 06:35:55 -0400 In-Reply-To: <20120419102627.GA12768@redhat.com> Sender: kvm-owner@vger.kernel.org List-ID: On 04/19/2012 01:26 PM, Gleb Natapov wrote: > > > > Unrelated: this pattern is probably common. Would be nice to have a > > __deposit_bit() function. > > > What semantics should it have? Set bit A in bitmap B if value C is > non-zero? > void __deposit_bit(bool bit, unsigned index, unsigned long *word) { if (bit) __set_bit(...) else __clear_bit(...) } I think some processors have an instruction for it (not an s390 reference). -- error compiling committee.c: too many arguments to function