From: "Jan Beulich" Subject: Re: [PATCH 2/2 V2] iommu/amd: Workaround for erratum 787 Date: Mon, 10 Jun 2013 14:41:54 +0100 Message-ID: <51B5F3C202000078000DCAD7@nat28.tlf.novell.com> References: <1370840751-11277-1-git-send-email-suravee.suthikulpanit@amd.com> <1370840751-11277-2-git-send-email-suravee.suthikulpanit@amd.com> <20130610093532.GA8802@ocelot.phlegethon.org> <51B5BCDF02000078000DC94E@nat28.tlf.novell.com> <20130610104008.GC8802@ocelot.phlegethon.org> <51B5CC4902000078000DC9A1@nat28.tlf.novell.com> <20130610124329.GF8802@ocelot.phlegethon.org> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <20130610124329.GF8802@ocelot.phlegethon.org> Content-Disposition: inline List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Tim Deegan Cc: suravee.suthikulpanit@amd.com, xen-devel@lists.xen.org List-Id: xen-devel@lists.xenproject.org >>> On 10.06.13 at 14:43, Tim Deegan wrote: > How about: > write-to-clear status.pending > process the log > if (status.pending) > reschedule the tasklet > else > unmask the interrupt. Actually I think this is leaving a window for improperly handled log entries too: There's also no guarantee that re-enabling the interrupt would cause an interrupt to be raised when the buffer became non-empty between the status.pending check and the re-enable. Therefore I think we need write-to-clear status.pending process the log unmask the interrupt. if (status.pending) reschedule the tasklet Jan