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:c06::243; helo=mail-io0-x243.google.com; envelope-from=ard.biesheuvel@linaro.org; receiver=edk2-devel@lists.01.org Received: from mail-io0-x243.google.com (mail-io0-x243.google.com [IPv6:2607:f8b0:4001:c06::243]) (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 9F03821E080FF for ; Thu, 19 Apr 2018 07:34:11 -0700 (PDT) Received: by mail-io0-x243.google.com with SMTP id d26-v6so6853376ioc.2 for ; Thu, 19 Apr 2018 07:34:11 -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=i5OUPZQXvglD1b6u+2TEYbQkMCQPdh99ulpq32J52o4=; b=Nv0BER8kTeZgvk0K9sjxksrtdDdWVcPSUA0yzyMkHNDRUprt4pMRZsf0r4e8DIjKF8 +kgkcprTHGhXifvHTGC9jM84F5wrfXP8c7myjO+rGgJ3ACqp9IRXgnKHrEhQubraQ1HQ iIkdzvrj0MnZYzPKy0CBnZ+xsBWT+sDsDzUYM= 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=i5OUPZQXvglD1b6u+2TEYbQkMCQPdh99ulpq32J52o4=; b=MbbHC5/eB9xm0crzG/yAyA5RkwQ+CPx8CZBFcIeOflYmDGQ3EbAwopbqF+tZmtByhD +hJ+qTUbgfF4RJN8AVMoQpJoSTBrLy4pPGoEIOZHMR5VAAodbcyhYlmGRYYH5ZKR79dv WmzjTyiUUHVVWkeKq2nQGjjb2OiN9YCS2FY446jSTaplc86XpFQIFND03kAZsxePvXBx Rsa5p+OgZfPnjH7vCFNf3b9fupjdjPj0IZnhlEr7ywnVFzvWyHVYdsSGTaHzlFLaCJQ/ roNiBql1RUv0JM4F0FGcreB95kMknGW5IU8mFvzzN5ACpD5B0HczgGb5RrXFhgGCmkzY hHpA== X-Gm-Message-State: ALQs6tC3AP/pu48JUbded+LdVPrzm4pY5sSQJDdpRNkL8sW60LM8ouY9 27lgKIqoKc6G4jAuw4IlnMvoJb4HUi56rALn0v1OWQ== X-Google-Smtp-Source: AIpwx4966IDlHfWXji6pVe6HnDiE7rxIvt4sCieDKZRXoMZUEzTTGgGT0mPMSL4TzRdINgcGby9SjIeE0WjBy3ugvmA= X-Received: by 2002:a6b:d90f:: with SMTP id r15-v6mr6828702ioc.107.1524148450519; Thu, 19 Apr 2018 07:34:10 -0700 (PDT) MIME-Version: 1.0 Received: by 10.107.187.67 with HTTP; Thu, 19 Apr 2018 07:34:09 -0700 (PDT) In-Reply-To: References: <20180417060320.29090-1-ard.biesheuvel@linaro.org> From: Ard Biesheuvel Date: Thu, 19 Apr 2018 16:34:09 +0200 Message-ID: To: Julien Grall Cc: "edk2-devel@lists.01.org" , Marc Zyngier , cross-distro@lists.linaro.org, Laszlo Ersek Subject: Re: [PATCH v2] ArmPkg/TimerDxe: remove workaround for KVM timer handling X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 19 Apr 2018 14:34:11 -0000 Content-Type: text/plain; charset="UTF-8" On 19 April 2018 at 16:23, Julien Grall wrote: > Hi Ard, > > Sorry for the late reply. > > On 19/04/18 09:16, Ard Biesheuvel wrote: >> >> On 17 April 2018 at 08:03, Ard Biesheuvel >> wrote: >>> >>> When we first ported EDK2 to KVM/arm, we implemented a workaround for >>> the quirky timer handling on the KVM side. This has been fixed in >>> Linux commit f120cd6533d2 ("KVM: arm/arm64: timer: Allow the timer to >>> control the active state") dated 23 June 2014, which was incorporated >>> into Linux release 4.3. >>> >>> So almost 4 years later, it should be safe to drop this workaround on >>> the EDK2 side. >>> >>> This reverts commit b1a633434ddc. >>> >>> Cc: cross-distro@lists.linaro.org >>> Contributed-under: TianoCore Contribution Agreement 1.1 >>> Signed-off-by: Ard Biesheuvel >>> Acked-by: Marc Zyngier >>> Reviewed-by: Leif Lindholm >>> Acked-by: Laszlo Ersek >> >> >> Pushed as 411a373ed6426fb1bff253905b6a59ada44e18ad > > > While this was added for KVM, I believe that code is also needed by Xen. > Indeed before injecting the interrupt the hypervisor will mask the > interrupt. > > So would it be possible to revert that patch? > Given that this is now a Xen-only quirk, I'd rather work around it by creating a separate ArmGenericTimerCounterLib implementation for Xen. I will try to put something together beginning of next week.