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:45:26 +0300 Message-ID: <4F8FECC6.10801@redhat.com> References: <1334828002-12709-1-git-send-email-gleb@redhat.com> <4F8FE088.20606@redhat.com> <20120419102627.GA12768@redhat.com> <4F8FEA89.4020909@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]:15273 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753792Ab2DSKp3 (ORCPT ); Thu, 19 Apr 2012 06:45:29 -0400 Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id q3JAjSFD019287 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Thu, 19 Apr 2012 06:45:28 -0400 In-Reply-To: <4F8FEA89.4020909@redhat.com> Sender: kvm-owner@vger.kernel.org List-ID: On 04/19/2012 01:35 PM, Avi Kivity wrote: > 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). > Looks like x86 will get one too: PDEP. -- error compiling committee.c: too many arguments to function