From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LApQH-0000BJ-Qi for qemu-devel@nongnu.org; Thu, 11 Dec 2008 12:34:01 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LApQH-0000As-9I for qemu-devel@nongnu.org; Thu, 11 Dec 2008 12:34:01 -0500 Received: from [199.232.76.173] (port=49728 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LApQH-0000Aj-3W for qemu-devel@nongnu.org; Thu, 11 Dec 2008 12:34:01 -0500 Received: from yw-out-1718.google.com ([74.125.46.156]:43654) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1LApQG-0004VK-N4 for qemu-devel@nongnu.org; Thu, 11 Dec 2008 12:34:00 -0500 Received: by yw-out-1718.google.com with SMTP id 6so478307ywa.82 for ; Thu, 11 Dec 2008 09:33:59 -0800 (PST) Message-ID: Date: Thu, 11 Dec 2008 19:33:58 +0200 From: "Blue Swirl" Subject: Re: [Qemu-devel] [PATCH] Allow to register a callback with fw_cfg_add_callback() In-Reply-To: <20081211153253.GO5555@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <1229008168-8012-1-git-send-email-Laurent.Vivier@bull.net> <20081211153253.GO5555@redhat.com> Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Laurent Vivier On 12/11/08, Gleb Natapov wrote: > On Thu, Dec 11, 2008 at 04:09:28PM +0100, Laurent Vivier wrote: > > fw_cfg_add_callback() checks if key has FW_CFG_WRITE_CHANNEL bit set > > after masking the key with FW_CFG_ENTRY_MASK. > > > > But as FW_CFG_ENTRY_MASK is ~(FW_CFG_WRITE_CHANNEL | FW_CFG_ARCH_LOCAL), > > the bit is never set and function exits. > > > > This patch corrects this by checking the bit before masking the value. > > > > Signed-by-off: Laurent Vivier > > Acked-by: Gleb Natapov Thanks, committed in r5978.