From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:43957) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YzLfR-0008Ic-4b for qemu-devel@nongnu.org; Mon, 01 Jun 2015 05:05:57 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YzLfN-0003fl-2t for qemu-devel@nongnu.org; Mon, 01 Jun 2015 05:05:57 -0400 Received: from mail-wi0-x22c.google.com ([2a00:1450:400c:c05::22c]:37156) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YzLfM-0003fh-Rf for qemu-devel@nongnu.org; Mon, 01 Jun 2015 05:05:52 -0400 Received: by wifw1 with SMTP id w1so96120085wif.0 for ; Mon, 01 Jun 2015 02:05:52 -0700 (PDT) Sender: Paolo Bonzini Message-ID: <556C2067.1030607@redhat.com> Date: Mon, 01 Jun 2015 11:05:43 +0200 From: Paolo Bonzini MIME-Version: 1.0 References: <1432686576-14816-1-git-send-email-pcacjr@zytor.com> <1433023482-25721-1-git-send-email-pcacjr@zytor.com> In-Reply-To: <1433023482-25721-1-git-send-email-pcacjr@zytor.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH v2 1/3] ich9: add TCO interface emulation List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Paulo Alcantara , qemu-devel@nongnu.org Cc: seabios@seabios.org, "Michael S. Tsirkin" On 31/05/2015 00:04, Paulo Alcantara wrote: > + case TCO_RLD: > + tr->timeouts_no = 0; > + if (can_start_tco_timer(tr)) { > + tr->tco.rld = tr->tco.tmr; > + tco_timer_reload(tr); > + } else { > + tr->tco.rld = val; Please mask out bits outside TCO_RLD_MASK here, same as you do for TCO1_STS_MASK and friends. > + } > + break; [...] > + tr->tco.cnt1 = tr->tco.cnt1 & TCO_LOCK ? val | TCO_LOCK : val; Since you have to respin, you can do: tr->tco.cnt1 = val | (tr->tco.cnt1 & TCO_LOCK); Otherwise looks good to me. CCing the maintainer. Paolo