From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:33026) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WnQ2J-0000LK-9h for qemu-devel@nongnu.org; Thu, 22 May 2014 06:15:49 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WnQ2D-0008NR-94 for qemu-devel@nongnu.org; Thu, 22 May 2014 06:15:43 -0400 Message-ID: <537DCE47.2010204@suse.de> Date: Thu, 22 May 2014 12:15:35 +0200 From: Alexander Graf MIME-Version: 1.0 References: <859BC03D-7C6A-434B-87D3-7A51615970FC@suse.de> In-Reply-To: <859BC03D-7C6A-434B-87D3-7A51615970FC@suse.de> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [Qemu-ppc] [PATCH] openpic: Initialize destmask at reset List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Paul Janzen Cc: Scott Wood , "qemu-ppc@nongnu.org" , qemu-devel , kvm-ppc On 21.05.14 21:47, Alexander Graf wrote: > >> Am 21.05.2014 um 18:33 schrieb Paul Janzen : >> >>> On Wed, May 21, 2014 at 12:45 AM, Alexander Graf wrote: >>> >>> Or maybe it's safer overall to just call write_IRQreg_idr() instead of >>> setting idr directly? That would update destmask along the way as well and >>> we would catch all subtle corner cases. >> I considered this initially but decided to go with the simpler >> approach. But you have convinced me. Specifically, the current >> implementation does not reset src->output or src->nomask, which >> write_IRQreg_idr() will. I will test this change and re-submit the >> patch. >> >>> Do you have a simple test case for this patch? We seem to have the same bug >>> in the in-kernel KVM MPIC emulation code and I'd like to have it fixed there >>> as well, but I don't really like to do that change blindly. >> I have tested this patch using a proprietary embedded operating system >> which doesn't bother to initialize the IDR registers. > Do you think it'd be possible for you to test whether it works with kvm when I give you a patch? Do you have real hardware to run kvm on? :) I just checked - we don't properly implement reset at all in the in-kernel MPIC we do in KVM. So it's merely something to keep in mind for now until someone sits down and implements proper reset support ;). Alex