From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:46056) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X2lIr-0008LC-50 for qemu-devel@nongnu.org; Thu, 03 Jul 2014 14:00:19 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1X2lIk-0003EL-Iq for qemu-devel@nongnu.org; Thu, 03 Jul 2014 14:00:13 -0400 Received: from cantor2.suse.de ([195.135.220.15]:49114 helo=mx2.suse.de) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X2lIk-0003CA-DM for qemu-devel@nongnu.org; Thu, 03 Jul 2014 14:00:06 -0400 Message-ID: <53B59A24.5090000@suse.de> Date: Thu, 03 Jul 2014 20:00:04 +0200 From: Alexander Graf MIME-Version: 1.0 References: <1404409177-3226-1-git-send-email-agraf@suse.de> In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH] e1000: Delay LSC until mask is active List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Peter Maydell Cc: Paolo Bonzini , Gabriel Somlo , QEMU Developers , Stefan Hajnoczi , "Michael S. Tsirkin" On 03.07.14 19:57, Peter Maydell wrote: > On 3 July 2014 18:39, Alexander Graf wrote: >> Mac OS X reads ICR on every interrupt. When the IRQ line is shared, this may >> result in a race where LSC is not interpreted yet, but already gets cleared. >> >> The guest already has a way of telling us that it can interpret LSC events >> though and that's via the interrupt mask register (IMS). >> >> So if we just leave the LSC interrupt bit pending, but invisible to the guest >> as long as it's not ready to receive LSC interrupts, we basically defer the >> interrupt to the earliest point in time when the guest would know how to >> handle it. > This would break any guests dealing with this in a polling > mode (ie "permanently leave interrupts masked and read > ICR periodically to find out whether anything interesting > has happened"), right? If those guests would wait for a link detect event that way, yes. Considering all the hackery we already have about link negotiation (delay it until a random amount of ms passed) I'd say the breakage this patch fixes is a lot more likely than a polling guest that waits for a link based on ICR.LSC :). Alex