From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=2607:f8b0:4001:c0b::244; helo=mail-it0-x244.google.com; envelope-from=ard.biesheuvel@linaro.org; receiver=edk2-devel@lists.01.org Received: from mail-it0-x244.google.com (mail-it0-x244.google.com [IPv6:2607:f8b0:4001:c0b::244]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 8E01320956064 for ; Thu, 15 Mar 2018 02:46:11 -0700 (PDT) Received: by mail-it0-x244.google.com with SMTP id v194-v6so8425592itb.0 for ; Thu, 15 Mar 2018 02:52:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=Crb++YrJ/4F6+mogwSksbJCpdJc6Mz4Vj4/CYtXWgvU=; b=Tvl3dbSX19WaKK8VXBpKQmJwenZXubWA+cLZUydEYBfv8xjjdOtXElcac4ZFb0z9Kh tH8VZz576BEbLFhsEdpYL4oSKFvKXTBeXPPhhK5um1GQGkrJnc1zUekUKU4Y2bpxGEMl gTObnV9MkbarhiYyODuXYTXBAXGazzMo+6nuk= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=Crb++YrJ/4F6+mogwSksbJCpdJc6Mz4Vj4/CYtXWgvU=; b=WDrA9vfUqWsXdVv0JaXcnZxBMg6GpDJgj0N/LLnMVcJwOzr8LFXqTlmq106Z8+/iH0 sydMaibX19fvUk4bfq4/rIKq6evcaIIf2rWiX9wssHv8TY9rUJZK+hQw99uyMHHvrqYz ALk7sepv4a4U4YC5GuCAVPRoQv63KifMaaoJOgIbD/CEEkj0LtXtcYeHCLMJ1OKVcds1 f68AO4+Y1G8PER8MuCOg2X483V90griNJTow9GpJguEZAh36xFKAIWIHmyLrT+R1/jv7 n8hK2CxoSB+WcFd+4mRqkswcqdsttygjIGJ2Q91GQS+O6HjEvurod+BtZUC8OLagzj5/ /WrA== X-Gm-Message-State: AElRT7GcXCVpvBnodTRktOOF2hw7goJ+FntCQlfvRitSj1/7su5ElWGz mjtTGgyAOzYSuVRCwekJ7FpYCq9AE9d+To8ctWJlQd3NWu4= X-Google-Smtp-Source: AG47ELtKQssFcZzO0RBp9uP/zW648RABHbdinzW3LiEs0mDmQ8q9exVazU38twUye0TMyOsMd5FrN8Uj7ZwbjY3pWps= X-Received: by 10.36.90.5 with SMTP id v5mr5462621ita.138.1521107554614; Thu, 15 Mar 2018 02:52:34 -0700 (PDT) MIME-Version: 1.0 Received: by 10.107.138.209 with HTTP; Thu, 15 Mar 2018 02:52:33 -0700 (PDT) In-Reply-To: <147790b3-379c-81b8-57e1-f7b5d99b9db7@arm.com> References: <1520901090-96694-1-git-send-email-heyi.guo@linaro.org> <1520901090-96694-2-git-send-email-heyi.guo@linaro.org> <0403f2bf-d6a8-b101-73a2-949946f71e46@arm.com> <20180314002509.GE96299@SZX1000114654> <86a7vbaynt.wl-marc.zyngier@arm.com> <20180315071133.GD108227@SZX1000114654> <147790b3-379c-81b8-57e1-f7b5d99b9db7@arm.com> From: Ard Biesheuvel Date: Thu, 15 Mar 2018 09:52:33 +0000 Message-ID: To: Marc Zyngier Cc: Guo Heyi , "edk2-devel@lists.01.org" , Yi Li , Leif Lindholm Subject: Re: [PATCH v2 1/1] ArmPkg/TimerDxe: Add ISB for timer compare value reload X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Mar 2018 09:46:12 -0000 Content-Type: text/plain; charset="UTF-8" On 15 March 2018 at 09:40, Marc Zyngier wrote: > On 15/03/18 07:30, Ard Biesheuvel wrote: >> On 15 March 2018 at 07:11, Guo Heyi wrote: >>> Hi Marc and Ard, >>> >>> I found the timer re-enable code was added by Ard for special reason: >>> >>> commit b1a633434ddc5fc28de817debd963f7845fb78c7 >>> Author: Ard Biesheuvel >>> Date: Thu Sep 18 21:16:47 2014 +0000 >>> >>> ArmPkg/TimerDxe: add workaround for KVM timer interrupt handling >>> >>> So this line of code cannot be removed and I will add an ISB after enabling >>> timer. >>> >> >> I'm not sure. IIUC, the KVM issue that required this has been fixed >> long ago, and I don't want to carry this forever. Marc? > > This has been fixed quite a while ago: > > commit f120cd6533d21075ab103ae6c225b1697853660d > Author: Marc Zyngier > Date: Mon Jun 23 13:59:13 2014 +0100 > > KVM: arm/arm64: timer: Allow the timer to control the active state > > In order to remove the crude hack where we sneak the masked bit > into the timer's control register, make use of the phys_irq_map > API control the active state of the interrupt. > > This causes some limited changes to allow for potential error > propagation. > > Reviewed-by: Christoffer Dall > Signed-off-by: Marc Zyngier > Does this mean we can lose this as well? https://github.com/tianocore/edk2/blob/master/ArmPkg/Library/ArmGenericTimerVirtCounterLib/ArmGenericTimerVirtCounterLib.c#L31 >>> Another strange thing is that we got lots of "Spurious GIC interrupt" error >>> messages when timer enable code was removed, though at last it could boot to EFI >>> shell. Please let me know if you have any idea about the possible reason of this >>> issue. >>> >> >> No idea, sorry. > > Me neither. You'd have to dump the control register before and after, > and work out what is being changed exactly. > > Thanks, > > M. > -- > Jazz is not dead. It just smells funny...