From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from NAM02-DM3-obe.outbound.protection.outlook.com (NAM02-DM3-obe.outbound.protection.outlook.com [40.107.95.87]) by mx.groups.io with SMTP id smtpd.web10.17155.1634058446223622959 for ; Tue, 12 Oct 2021 10:07:26 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@nvidia.com header.s=selector2 header.b=R3uofSOJ; spf=permerror, err=parse error for token &{10 18 %{i}._ip.%{h}._ehlo.%{d}._spf.vali.email}: invalid domain name (domain: nvidia.com, ip: 40.107.95.87, mailfrom: ashishsingha@nvidia.com) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=dPujx/MaZxVF9vm1bqPdtV03+NMikLrhgzWVoyX3E5GE2jO78Qp3IGWyMpHoq2ZPQhPsXtIi5I5QWMg4m6lGpTnaRbIefW/JxzeuSzsiUafQOoyardbO334751UOLSB8Q/6qPhVd9WkhJLihlF8mF/5U0AdLRqnC3sOSPEOyd3ZBOwxmSwAqbbP5AbyXuqCCclfFq129/6RTsfBAlgNrmAZ6rO76fNCKGjf0KHISO1D2sZlec1fhuXY35vVevLderSWtEvn113deruF8FKeJkh4Et4JzW/amGjMvSC5vg1iG9KJktrIHj9B9ZAEoktNh9K7ExqrsG2NPpIG0mZQu4g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=yupMAfhhhbbIMKto/CvyJ5uAoTdkccuIiM45fPkxXqE=; b=kc+nFeUcjS6iWL6VG+xnFVJ3jL9vtQ6jDU5sYoYQ/N47u0MJMzL7rcLNmsEYlYPhPT7K8lUhEYNXOsAi6henGgr35WNpvewt/Q7yK27gfiuHpjE7Lmlk+W/PxA8NpEqF8Y+qZpETS1Rf2mTVvoYQK20d6KMBqw6jQxeviwVcylgHGTUnRWB8XI8yiLcXwOIhwhrPQORqDiQu4K44oX+KaNk9uGVTivjKjEEFXBIi29EWBBRZMZDFbeMPJQJr+KcgsLOoNDlMzwSinGBHnHYcaK91vwOQPhD7DwKkFyWbDilBBxVpugw24IEn8f7aaXLImb4p7GRS+Ji3lJbrji/pLw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nvidia.com; dmarc=pass action=none header.from=nvidia.com; dkim=pass header.d=nvidia.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Nvidia.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=yupMAfhhhbbIMKto/CvyJ5uAoTdkccuIiM45fPkxXqE=; b=R3uofSOJPJ3o05UZJrs3Hv4fcuyB/VbrjqNxiikxT6VH7740OLDChY0MzMZrb0q0DgEaak7n8jNsXNkxHHqXeSdhJx9xmd4B50kgdi5Wig7eV7X4fuIzfxvA6pmUkzp4LI4HjHkNsqmHwKFSptqwlH+8Dx0pfbtda56POERDM5UJTQqX4oVR7IMw+gxgYHp7UvNwcxAmGaaLyd0SV+ExR7kIpjpy1opdFNiq2YUztiueELjMv3dH41P7w8xgVslvh9wQWF8/bdSYSbRIN+OOGNXS+SjHxZ69rre6tOQHXDoQFay8LZ5qdvsAxBuk57Z/bQ2HHEh57p2Ag+kLg7YwGA== Received: from CO6PR12MB5396.namprd12.prod.outlook.com (2603:10b6:303:139::8) by CO6PR12MB5426.namprd12.prod.outlook.com (2603:10b6:5:35d::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4587.18; Tue, 12 Oct 2021 17:07:24 +0000 Received: from CO6PR12MB5396.namprd12.prod.outlook.com ([fe80::3181:5873:ca0f:cf8b]) by CO6PR12MB5396.namprd12.prod.outlook.com ([fe80::3181:5873:ca0f:cf8b%7]) with mapi id 15.20.4587.026; Tue, 12 Oct 2021 17:07:24 +0000 From: "Ashish Singhal" To: Marc Zyngier CC: Shanker Donthineni , Ard Biesheuvel , edk2-devel-groups-io , Leif Lindholm , Ard Biesheuvel Subject: Re: [PATCH v2] ArmPkg/TimerDxe: Delay End Of Interrupt Signal Thread-Topic: [PATCH v2] ArmPkg/TimerDxe: Delay End Of Interrupt Signal Thread-Index: AQHXvuitkDcYT9ItPUy1xjbmHBblWKvOX7wAgACwtICAAGPiiYAADgyAgAAG55SAAATmgIAAADLXgAAKtng= Date: Tue, 12 Oct 2021 17:07:24 +0000 Message-ID: References: <87h7dmpqn2.wl-maz@kernel.org> <87czoap7rg.wl-maz@kernel.org> <87bl3up5t2.wl-maz@kernel.org> In-Reply-To: Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: suggested_attachment_session_id: 544012d8-45c8-c133-ad7f-4d46db6502a2 authentication-results: kernel.org; dkim=none (message not signed) header.d=none;kernel.org; dmarc=none action=none header.from=nvidia.com; x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 4de3ff3e-92ae-46ca-185b-08d98da2c30c x-ms-traffictypediagnostic: CO6PR12MB5426: x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:9508; x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: RoOiqoFtDSuDzORwkP6stDh79FyL+wp+Tp2Dkf4SZ9OotL+Pe6jO+lb4EKd2RqB6MIgP8Qu8MXWY9h/NTMydTaJnOJlzM6IcNjYgoVMB4xdiKGqyLGUhkwpWxcqAeNT//y8RFyYuR6lUDcV6p0lx3TQ5sev+FW0xdKbzRpEob9/r1iEf0FxOZO9Z8j76hpS/iuTlIU3Fk5LQDhC8LFZRhP/6VfZsT9B9RWcPK7JTuD5ZyHVBJE0qmtL3ECRB5Sk+6FkLXIMazwvtco8/BPtDSCiKN04rYxyxjsvdydfZOwHQwc5gDTyHuFQFZzy39ZwAo5BEU5ZVOvg3Ilt/MuSD6EKRdRXNGNsvxfC41BPaUML+UanXBJmLCMNw1AGKqF30DJMrOT6RoAQMQvfp/Mx5A9Fl2hN+k+yhaznIeZFfj1g+neMTS0TwWhKug/17WxlE+aSUsUrZ3lcydqvGgEbiFmeH02U02lzxhEEkeZ5hUEMQqZeUzrWFCmaboyxAO1nCtXKUZMrOtZtyQMuLdjDOZ74Y4cxFtOEdNiWwnYeFK4WvPpA9001tYDCvvC613Ov1YVr/6smaelvMhpsQUSuI0aKLxk6l076WN3wvyAD+Z4Z3+mUlqcoS1qb0bS6rZzcXlNfuZElljG3RidiKcGhfqjDvojvBS1ac0XJ5VdU/XN9uAMAP9a6DLH10i7E1X0xylwy4YsFqnvKQt/k74O4XdQ== x-forefront-antispam-report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:CO6PR12MB5396.namprd12.prod.outlook.com;PTR:;CAT:NONE;SFS:(4636009)(366004)(86362001)(2940100002)(38100700002)(64756008)(66476007)(66556008)(55016002)(71200400001)(66446008)(66946007)(33656002)(54906003)(38070700005)(76116006)(91956017)(122000001)(5660300002)(83380400001)(26005)(52536014)(4326008)(2906002)(8676002)(186003)(316002)(9686003)(8936002)(508600001)(6916009)(7696005)(53546011)(6506007);DIR:OUT;SFP:1101; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?iso-8859-1?Q?CzJmjcYh5482UW3ycwap46zeTMAZMdu2zhTc2UTRWaP2/pAD2PU3nnhwTF?= =?iso-8859-1?Q?7899mB2En/csZ8Et6IpE114cHXrLUyX0pDWhbRz8Phz8TyHL5SqwGe23UZ?= =?iso-8859-1?Q?AR9orHsAdrsbPDUwd4Tle4np7eoo654dEln2LsVcBeyzluaP58JsKEekBb?= =?iso-8859-1?Q?YLg9pjLMjh9iHuReWsDkSDuAjz/TsdIS3kiPk56E2Lvi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Yh/HV3h0W41QYgr9wDgkcVTSr6E3kMubOWLJq?= =?iso-8859-1?Q?LTOFc1KIf9SrKNx9NWw/ugd0Q7tQhC9cJJPas1/Gc1WybdWW4w1eqIcy8Z?= =?iso-8859-1?Q?gvk0GTf0qufQYW/oNWcNSCSuGeoC9L1P+2BW3aYSBpjM2XzQlZSbwnjJ/c?= =?iso-8859-1?Q?gQdJXIQ4Ub0VwMaY3eNv0meXA790ub3K319dhEN7Senfi8PGDVGnAPZtqk?= =?iso-8859-1?Q?aZpJ2C3608oJJ5avgb51GSFSDOuSxfsKrsEDRDrAIz4Z4Dw=3D?= MIME-Version: 1.0 X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: CO6PR12MB5396.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 4de3ff3e-92ae-46ca-185b-08d98da2c30c X-MS-Exchange-CrossTenant-originalarrivaltime: 12 Oct 2021 17:07:24.4760 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: 536nEuvojBfu994wUQ84Dx41UTqJlU6JWUbH4TMoymLIkUtcb+nG1mG62zYyzfX7/w39bSJ9VpVsY7CSW5a9Fw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: CO6PR12MB5426 Content-Language: en-US Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable =0A= =0A= =0A= From: Ashish Singhal =0A= Sent: Tuesday, October 12, 2021 10:32 AM=0A= To: Marc Zyngier =0A= Cc: Shanker Donthineni ; Ard Biesheuvel ; edk2-devel-groups-io ; Leif Lindholm ; Ard Biesheuvel =0A= Subject: Re: [PATCH v2] ArmPkg/TimerDxe: Delay End Of Interrupt Signal =0A= =A0=0A= =0A= =0A= =0A= From: Marc Zyngier =0A= Sent: Tuesday, October 12, 2021 10:27 AM=0A= To: Ashish Singhal =0A= Cc: Shanker Donthineni ; Ard Biesheuvel ; edk2-devel-groups-io ; Leif Lindholm ; Ard Biesheuvel =0A= Subject: Re: [PATCH v2] ArmPkg/TimerDxe: Delay End Of Interrupt Signal =0A= =A0=0A= External email: Use caution opening links or attachments=0A= =0A= =0A= On Tue, 12 Oct 2021 17:11:36 +0100,=0A= Ashish Singhal wrote:=0A= >=0A= > Marc,=0A= >=0A= > What do you suggest should be the proper fix for getting timer=0A= > interrupts even when ISTATUS bit is not set? Should we ignore them=0A= > the way it is in current implementation? I am OK to file a bug for=0A= > this if you think that is a better way to discuss this.=0A= =0A= I don't think there is anything to fix.=0A= =0A= Yes, the order in EDKII is odd. No, changing the order doesn't give=0A= any extra guarantee. Spurious interrupts can always happen. Broken (or=0A= slow) HW and bad emulation are more susceptible to it.=0A= =0A= Now, how often do you see that? On which HW?=0A= =0A= =A0=A0=A0=A0=A0=A0=A0 M.=0A= =0A= --=0A= Without deviation from the norm, progress is not possible.=0A= =0A= Marc,=0A= =0A= We see at least one spurious interrupt after every valid timer interrupt. W= hile both valid and spurious interrupt has the correct source, spurious int= errupt does not have ISTATUS bit set. We are seeing this on Silicon and not= on the emulation platform. Delaying EOI signal to GIC does take the spurio= us interrupt out as with the new flow we clear the interrupt before signali= ng EOI so that next time only a valid interrupt can be triggered and not th= e old interrupt which was still not cleared while signaling EOI to GIC.=0A= =0A= Thanks=0A= Ashish=0A= =0A= Thanks=0A= Ashish=0A= =0A= Marc,=0A= =0A= I can confirm that with the current code on edk2, we get 1 spurious interru= pt for every 1 valid interrupt from GIC. With the change I proposed, we do = not get the spurious interrupt at all.=0A= =0A= Thanks=0A= Ashish=