From nobody Tue Feb 10 19:00:22 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org ARC-Seal: i=1; a=rsa-sha256; t=1684810123; cv=none; d=zohomail.com; s=zohoarc; b=f3jUUphkHDNk6negm/uvyyL+x7gZG7q1v+hunCUWxex8mx2BuLuG0WGzg9F6LzHXWOf92QB8Cgkv/iFCkyYm2PCRtbkW3eYh1I5yV1F0+zBVH7OjDVSHAhASqHs7hiSKqz5zHDcAzVDrL+l5YQlwrYGlo39467sCF/cN9wHgkrs= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1684810123; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject; bh=fB3pJeeWuuS9kbphHugRAauKE7v/4ZOcuHnfKDbWEJI=; b=Orvf8mutlhl7Ig5fqMfi4D/FCCZTzfTHllcjmp8zu4Hi9Vf9ESABcTTKwi2rJ+qbZragg3Be2naSb7BLC6UiNPP68TTyNpwHy5Ya8jfGLdDzxpYGIE5M+t+VUkgTL81s26jaeLUSIMKvlKfH3QDjC/JBJHr2MDcWzhYJnRybeCs= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1684810123792675.9829297919242; Mon, 22 May 2023 19:48:43 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1q1I2v-00044o-3D; Mon, 22 May 2023 22:46:45 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1q1I2d-0003Wk-W4 for qemu-devel@nongnu.org; Mon, 22 May 2023 22:46:28 -0400 Received: from mail-pj1-x102b.google.com ([2607:f8b0:4864:20::102b]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1q1I2c-0004kQ-El for qemu-devel@nongnu.org; Mon, 22 May 2023 22:46:27 -0400 Received: by mail-pj1-x102b.google.com with SMTP id 98e67ed59e1d1-253340db64fso6281109a91.2 for ; Mon, 22 May 2023 19:46:26 -0700 (PDT) Received: from alarm.. ([157.82.204.253]) by smtp.gmail.com with ESMTPSA id o10-20020a17090aac0a00b002467717fa60sm4769847pjq.16.2023.05.22.19.46.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 22 May 2023 19:46:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=daynix-com.20221208.gappssmtp.com; s=20221208; t=1684809985; x=1687401985; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=fB3pJeeWuuS9kbphHugRAauKE7v/4ZOcuHnfKDbWEJI=; b=UDUS8XU8hgk3DauES++FVWzCJDuCVscyr6uAQSoLVt6zy1UiHJ/BNUjoyhF28JvgW3 6RBQnX5BYTTsd0tAF8RGYAyXDogJ4bNoR91/KIZB0F6d+sOGZ7xeOJ89/aof3humLSrt n+OvT8V/W1HnglfGdW1vq3H0aVLHWksth7tbK3Y5DIEm5Y6O2FDJHaTViu5T4FwRJZRd ejrsueRFECgP6O3EVxGKQlULVbtNEVart9dsx5qn+XQ9b+1DUchC/Xhy9DpASnXyv4dF 2YyhOGZ8B6cY9P/vrTn8pxdG0L2g5iJnHR3YkLpUZk4J50W604wk6IVR2P/3njYA4RqE Ev0g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1684809985; x=1687401985; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=fB3pJeeWuuS9kbphHugRAauKE7v/4ZOcuHnfKDbWEJI=; b=lZfwz9crKdWAp4qyB66CSTrx+29IBA7Quz6/5zdiOPePyuGSxBcqFThzsfbnEMITg9 F98GJMUS2+oLYFCVnjN48bG+hw/xKy6FluYl0BE9WVAwXKmwjIrer/o8NqCgqWijeQQz Ym2H61xWWbSIgRKTwUDUz1JYQGig4UtsvWhhhWMi+Qxpya0/hdc9V0oBQiG7uJEqN2K/ 4hBlRePfnnDcrxYhgc+nGn3Xfdw0ZTO7dYdkjJAwocweVtPlvClFrc5GpAggcR2EHvUg NfsYHhMKjpCP2ibhalVpTfEO+sc9PErbIGl+6Oh4Oh2ApeVNFrOqFQJ7Lea1vNZFzF2u o/+g== X-Gm-Message-State: AC+VfDyI5BqR1aPzrS+BNusH7SI7yCqk0Zh13nakuQ6v/Fgcpza1l3+f RjkSuy3yBhi79x2ntUhdS0BJ4A== X-Google-Smtp-Source: ACHHUZ42xaJAatQT7gby+UXhbdp+5LZMDMwrj73bWwLhn/1gPQ8kKT7B7Gy40hcJJ8pKFOILFPVEkA== X-Received: by 2002:a17:90a:e505:b0:255:58c4:fbae with SMTP id t5-20020a17090ae50500b0025558c4fbaemr5796197pjy.10.1684809985027; Mon, 22 May 2023 19:46:25 -0700 (PDT) From: Akihiko Odaki To: Cc: Sriram Yagnaraman , Jason Wang , Dmitry Fleytman , "Michael S . Tsirkin" , =?UTF-8?q?Alex=20Benn=C3=A9e?= , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Thomas Huth , Wainer dos Santos Moschetta , Beraldo Leal , Cleber Rosa , Laurent Vivier , Paolo Bonzini , qemu-devel@nongnu.org, Tomasz Dzieciol , Akihiko Odaki Subject: [PATCH v5 45/48] igb: Clear-on-read ICR when ICR.INTA is set Date: Tue, 23 May 2023 11:43:36 +0900 Message-Id: <20230523024339.50875-46-akihiko.odaki@daynix.com> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20230523024339.50875-1-akihiko.odaki@daynix.com> References: <20230523024339.50875-1-akihiko.odaki@daynix.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: none client-ip=2607:f8b0:4864:20::102b; envelope-from=akihiko.odaki@daynix.com; helo=mail-pj1-x102b.google.com X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_NONE=0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @daynix-com.20221208.gappssmtp.com) X-ZM-MESSAGEID: 1684810125423100007 Content-Type: text/plain; charset="utf-8" For GPIE.NSICR, Section 7.3.2.1.2 says: > ICR bits are cleared on register read. If GPIE.NSICR =3D 0b, then the > clear on read occurs only if no bit is set in the IMS or at least one > bit is set in the IMS and there is a true interrupt as reflected in > ICR.INTA. e1000e does similar though it checks for CTRL_EXT.IAME, which does not exist on igb. Suggested-by: Sriram Yagnaraman Signed-off-by: Akihiko Odaki --- hw/net/igb_core.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/hw/net/igb_core.c b/hw/net/igb_core.c index 823dde8f28..d00b1caa6a 100644 --- a/hw/net/igb_core.c +++ b/hw/net/igb_core.c @@ -2598,6 +2598,8 @@ igb_mac_icr_read(IGBCore *core, int index) } else if (core->mac[IMS] =3D=3D 0) { trace_e1000e_irq_icr_clear_zero_ims(); igb_lower_interrupts(core, ICR, 0xffffffff); + } else if (core->mac[ICR] & E1000_ICR_INT_ASSERTED) { + igb_lower_interrupts(core, ICR, 0xffffffff); } else if (!msix_enabled(core->owner)) { trace_e1000e_irq_icr_clear_nonmsix_icr_read(); igb_lower_interrupts(core, ICR, 0xffffffff); --=20 2.40.1