From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from a7-12.smtp-out.eu-west-1.amazonses.com (a7-12.smtp-out.eu-west-1.amazonses.com [54.240.7.12]) by mx.groups.io with SMTP id smtpd.web10.11256.1675938660648013189 for ; Thu, 09 Feb 2023 02:31:01 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@ipxe.org header.s=cphpx6z2rfcgehlykjjh3gknqe3hsoe2 header.b=BXF2UplK; spf=pass (domain: eu-west-1.amazonses.com, ip: 54.240.7.12, mailfrom: 0102018635ba76f6-c07f4d20-2b46-4de1-b348-6a29a3b28fa4-000000@eu-west-1.amazonses.com) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/simple; s=cphpx6z2rfcgehlykjjh3gknqe3hsoe2; d=ipxe.org; t=1675938658; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From:In-Reply-To:Content-Type:Content-Transfer-Encoding; bh=pcPikAD7s3/myqGWahQAT1G2H27kxAic1em9EHWjb/Q=; b=BXF2UplKZOYEfAa2tfAmXG6xdKgRgXnvhrbr/p+N4C/yY+aV0vvzPYwJDfX6WO+f ePHfzJuuNfKGvBwg1ILILBgi61oXk01ZeX4djxVOXqP6XII/RhnKmrCgkuVpiGITDXR Bl+t4hDH6I8DzbwNKREKnTpq57JUTQfdNsd9VjPCHP5AwZVeYZX6FRP5JdeZlEO3RRs wi4q3hi31ECWeZBMoGyE8TX3Y/83+1NiiH3cDp1Cfvdgc/kFmlIJUrCtREhj+IJRLYh tw00qqFwS4NFq7VF5qZ7G39bnKrVLoUzCGfhMleGJIwMheSGdyv9EUAAfigKi6D39hd GMySH6w++A== DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/simple; s=ihchhvubuqgjsxyuhssfvqohv7z3u4hn; d=amazonses.com; t=1675938658; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From:In-Reply-To:Content-Type:Content-Transfer-Encoding:Feedback-ID; bh=pcPikAD7s3/myqGWahQAT1G2H27kxAic1em9EHWjb/Q=; b=d8lvgYSlnGduiMuemeedDfBy6T3fwAX45QI9sfgOcMXe3TzN8dov/qspn/cZKchN 4dRi1dfAgEDNA0QzjM1lBuP13JTd6onjcQbYoNvFod9WgPtMO4aUTu78nBHp7+Sbh82 LOGn/YKCqxEJFQaDouY429TmL9+1rJMhV3SjfLe0= Message-ID: <0102018635ba76f6-c07f4d20-2b46-4de1-b348-6a29a3b28fa4-000000@eu-west-1.amazonses.com> Date: Thu, 9 Feb 2023 10:30:58 +0000 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.6.0 Subject: Re: [edk2-devel] [edk2-staging/RiscV64QemuVirt PATCH V7 05/20] UefiCpuPkg: Add CpuTimerDxe module To: devel@edk2.groups.io, sunilvl@ventanamicro.com Cc: Eric Dong , Ray Ni , Rahul Kumar , Daniel Schaefer , Gerd Hoffmann , Abner Chang References: <20230128191807.2080547-1-sunilvl@ventanamicro.com> <20230128191807.2080547-6-sunilvl@ventanamicro.com> <0102018635ae8953-b7e0dd96-6282-4365-a8da-f3696a61a20c-000000@eu-west-1.amazonses.com> From: "Michael Brown" In-Reply-To: X-Spam-Status: No, score=-2.9 required=5.0 tests=ALL_TRUSTED,BAYES_00 autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on blyat.fensystems.co.uk Feedback-ID: 1.eu-west-1.fspj4M/5bzJ9NLRzJP0PaxRwxrpZqiDQJ1IF94CF2TA=:AmazonSES X-SES-Outgoing: 2023.02.09-54.240.7.12 Content-Language: en-US Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit On 09/02/2023 10:28, Sunil V L wrote: >>> + gBS->RestoreTPL (OriginalTPL); >>> + RiscVEnableTimerInterrupt (); // enable SMode timer int >>> +} >> >> This design looks as though it does not support nested timer interrupts. >> The call to RestoreTPL() may invoke callbacks that may themselves include >> delay loops that wait upon further timer interrupts. With the above code, >> those timer interrupts will never arrive since the timer interrupt is >> disabled at the point that you call RestoreTPL(). >> >> This will break device drivers such as those for USB network devices that >> rely on nested timer interrupts. > > Thanks a lot for this feedback and background. We are aware of few issues > in this module. Currently, it is mostly porting what exists today in > edk2-platforms repo. We want to add all these additional fixes after > this basic thing is merged. That way we will have git history instead of > combining all fixes single commit. Andrei has a patch ready and waiting > for this to get merged. We can either combine this with his patch or > create one more. > > Would that strategy be fine with you? Sure, as long as someone other than me is keeping track of the need to fix this bug. My work here is done. :) Thanks, Michael