From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-pg1-f178.google.com (mail-pg1-f178.google.com [209.85.215.178]) by mx.groups.io with SMTP id smtpd.web11.11322.1675939087181817702 for ; Thu, 09 Feb 2023 02:38:07 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@ventanamicro.com header.s=google header.b=XqKmh6f7; spf=pass (domain: ventanamicro.com, ip: 209.85.215.178, mailfrom: sunilvl@ventanamicro.com) Received: by mail-pg1-f178.google.com with SMTP id 78so1271156pgb.8 for ; Thu, 09 Feb 2023 02:38:07 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ventanamicro.com; s=google; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=8Si05hNql0bRzZUW+oHcZ1TNPrl6oDpuiZDVRjWsT90=; b=XqKmh6f7zAvGBy7T28Ikw3+IAdfFVM4xOBjolp5VG+3xKIgGToub3Zg0Ve48axwdYy dL/gfyvY4PB4HJOyQCwnpGsugULPGM72uxZB0i/3cOSB6PsuRThuIvXX+ZNB7HP+EAP1 CtCdxeaomu8JARzB8m3RpZubWHI+miJXdnOzhiKJXqNJReG9eqWAVcuLIQpnDjYch5YP CztMGRnolRC78QxfrpHDkQHsESUZ5xI5Hh+n5Ny9K4zHkca96RwWNg152PgTGcn74GhM xIsJmdOmSfnxMzfqyFVk7E4Q74HieGsxOl9U12q4xD/Zd7z0PYifo+8Us8WwhwqEV1W2 I3vg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=8Si05hNql0bRzZUW+oHcZ1TNPrl6oDpuiZDVRjWsT90=; b=wxugSMNbnfcTbb4zEUiH99ETD2d4kj9skvqrcO0weMVOqmaSABq/48GCC7K9IItHw/ GFwyGYbrJgq45QlNw62DCpQ9Z6jxTChLA1547MyTfAQ8Sua9QG4moIOxjRrmffQLw7Mw yPAomQGBCiOo43mMgocZed+CPVqqIFuCHa1euDzAGv+C6Vsdyrv65m/dO5urZIGbsae/ jLNE5FstkAKolj/R3clESP+f6cP6AomVi8ZAzMSESEwKNWT2iAi0v0BzGnjGD94SkGqE kqJOUKF4+ne35jx7EnREA1+3DCDEzzp0ShFGiA+K+WHFQwO5UJJSfeBgCNGkd4ZYgpRH 6rvw== X-Gm-Message-State: AO0yUKUTVk/hbvKTKTlP9m2NlgpeF91W8yW/q7ei5eF6qjUSj7thOkgK TsoPZPOntm5OOawo2jxKFqB6OA== X-Google-Smtp-Source: AK7set8RZXdCKwRuMShvoQ4qQVM0uBR/2116OS5QZ3tjn+enMv7rBgrnt8mCizodPWz3x6Dxznhjaw== X-Received: by 2002:a62:6182:0:b0:5a8:5d89:3ae6 with SMTP id v124-20020a626182000000b005a85d893ae6mr1234028pfb.20.1675939086652; Thu, 09 Feb 2023 02:38:06 -0800 (PST) Return-Path: Received: from sunil-laptop ([49.206.14.226]) by smtp.gmail.com with ESMTPSA id h11-20020aa786cb000000b005a831a42c86sm1082246pfo.72.2023.02.09.02.38.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 09 Feb 2023 02:38:06 -0800 (PST) Date: Thu, 9 Feb 2023 16:07:59 +0530 From: "Sunil V L" To: Michael Brown Cc: devel@edk2.groups.io, Eric Dong , Ray Ni , Rahul Kumar , Daniel Schaefer , Gerd Hoffmann , Abner Chang Subject: Re: [edk2-devel] [edk2-staging/RiscV64QemuVirt PATCH V7 05/20] UefiCpuPkg: Add CpuTimerDxe module Message-ID: 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> <0102018635ba76f6-c07f4d20-2b46-4de1-b348-6a29a3b28fa4-000000@eu-west-1.amazonses.com> MIME-Version: 1.0 In-Reply-To: <0102018635ba76f6-c07f4d20-2b46-4de1-b348-6a29a3b28fa4-000000@eu-west-1.amazonses.com> Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Thu, Feb 09, 2023 at 10:30:58AM +0000, Michael Brown wrote: > 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. :) > Sure, I will keep track of this. We will need your help to review the changes. Hope that is fine. Thanks! Sunil