From patchwork Mon Oct 18 14:47:13 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nicolas Saenz Julienne X-Patchwork-Id: 12566743 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 94193C433F5 for ; Mon, 18 Oct 2021 14:49:09 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 5477D60174 for ; Mon, 18 Oct 2021 14:49:09 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 5477D60174 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-Id:Date:Subject:Cc :To:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=GA3y4u3WAfEWUrU8f6T+tuFz+8jAknYsnxILgXCyb4U=; b=dSzUQ/2FIqZsUq rNeI9rsmNETsoKuUztBKsVr5j1+r7ACDcuwycIaiwmglaG7baKEHLfBovwag1eRmihY1ATIoAnhld 3Vvv2YOeheYBJFngJAXKM0hA10tiD6M+dw6PIDfodCL90C2wr8nKTPieZGqJa04Nn47v8HMeLM7UB 8ohqgHQqC6eJY5QoJTEFRuQkGPvEPWU1FRA9qXTJweba7IGgSU88jOC2Y5yy6vU2N1uPUbfz9Pn79 n0utEYCty5fqHsB0NP4oyEz7W5NsEpcapmCA9BZxN1PPBpdN981KD5MyF8cSpoI0SNM1j0nYP3zk3 QRLxOljE1OOTj876PQbg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mcTvO-00GAMu-Oa; Mon, 18 Oct 2021 14:47:38 +0000 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mcTvL-00GAMV-HV for linux-arm-kernel@lists.infradead.org; Mon, 18 Oct 2021 14:47:37 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1634568452; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=WmxZEp4yqdNNLlvT7rzDrMmyXp0y31eMUrmrU80g9MI=; b=SLz4vMfSumnVhZbtnX8Yj0OliOln0q0pDFTgX1XyKqmsutsM0pru6X5L541jJgJqseO210 7JXcvqUw52Fm/4Ren6U2VlIdsL6eKAvytfAsd0c4dIefaYlj/v1t2NG+MdOgK6ZIphVfqQ u8f4dHn150SYnJgduRsnsnOYwwgIQwE= Received: from mail-wr1-f71.google.com (mail-wr1-f71.google.com [209.85.221.71]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-218-V9Iy_kPBMfCqI1IJ2KuO2A-1; Mon, 18 Oct 2021 10:47:30 -0400 X-MC-Unique: V9Iy_kPBMfCqI1IJ2KuO2A-1 Received: by mail-wr1-f71.google.com with SMTP id j12-20020adf910c000000b0015e4260febdso1932981wrj.20 for ; Mon, 18 Oct 2021 07:47:30 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=WmxZEp4yqdNNLlvT7rzDrMmyXp0y31eMUrmrU80g9MI=; b=QdSQCHFk/dGfqPI5oSZLzmIqtvyKNJxPi1z7h5lw2Av7hVV59kx8+sIEZXo3kWGHc3 7C2JF1Y/t/9YcDEbepgT65GYI5BfXSCeyGPYednFS/dI2+YqcTggiRCSKlZKQL85yNmE L9aQU47CismXZUaGDFMvS94DZ9hePQTv0E2N1FPh3u1lRMq93AchS4Vs9h9jxWoDLRUZ 5r8IiwQ6qFiWwZ5l1BKNB/3kcYG+sTLT8dNhULBiI3dnpxjEwLXbOcckjSpmACM2H3rx uqnZLlJGcBu+xDm1tS+ZbRcjyjk6p8pxkzRnBtl6sMbh4UPoVTasdVtV54jhPAx6sq2t HC6g== X-Gm-Message-State: AOAM533HNOlvpH/BlvTdhXVhwLXShsbusrl2krUMDjNaxjX56nrUzbzM WdWGGrSAzDPYpWoF2zKoHU7AxA41VlK8ZI0N+naehx/UP59e8iXM2a4mFRt4/LNx1T4g69YUNzH z1yqJGudk2KYPvrc7sKvzVNJ5jWCFyUrzHgk= X-Received: by 2002:a1c:21c3:: with SMTP id h186mr43695344wmh.107.1634568449257; Mon, 18 Oct 2021 07:47:29 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy+AfcvS7b8/Ma7cBY7/u+xL2JNBiFSC9ZhyQJEBt99kwlDxDLXwW9fQYNJd2gPRma42OiViA== X-Received: by 2002:a1c:21c3:: with SMTP id h186mr43695325wmh.107.1634568449085; Mon, 18 Oct 2021 07:47:29 -0700 (PDT) Received: from vian.redhat.com ([2a0c:5a80:1d03:b900:220f:ce79:c9ab:4686]) by smtp.gmail.com with ESMTPSA id f3sm17909155wmb.12.2021.10.18.07.47.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 18 Oct 2021 07:47:28 -0700 (PDT) From: Nicolas Saenz Julienne To: catalin.marinas@arm.com, will@kernel.org, tglx@linutronix.de Cc: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Nicolas Saenz Julienne Subject: [PATCH] arm64: Select POSIX_CPU_TIMERS_TASK_WORK Date: Mon, 18 Oct 2021 16:47:13 +0200 Message-Id: <20211018144713.873464-1-nsaenzju@redhat.com> X-Mailer: git-send-email 2.32.0 MIME-Version: 1.0 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=nsaenzju@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20211018_074735_695794_D84BFD49 X-CRM114-Status: UNSURE ( 8.53 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org With 6caa5812e2d1 ("KVM: arm64: Use generic KVM xfer to guest work function") all arm64 exit paths are properly equipped to handle the POSIX timers' task work. Deferring timer callbacks to thread context, not only limits the amount of time spent in hard interrupt context, but is a safer implementation[1], and will allow PREEMPT_RT setups to use KVM[2]. So let's enable POSIX_CPU_TIMERS_TASK_WORK on arm64. [1] https://lore.kernel.org/all/20200716201923.228696399@linutronix.de/ [2] https://www.spinics.net/lists/linux-rt-users/msg24860.html Signed-off-by: Nicolas Saenz Julienne Acked-by: Mark Rutland Acked-by: Marc Zyngier --- This was tested by running all relevant kernel timer self-tests and making sure KVM still works as expected. arch/arm64/Kconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/arm64/Kconfig b/arch/arm64/Kconfig index 789036cf74f5..ce0d0d254542 100644 --- a/arch/arm64/Kconfig +++ b/arch/arm64/Kconfig @@ -191,6 +191,7 @@ config ARM64 select HAVE_PERF_REGS select HAVE_PERF_USER_STACK_DUMP select HAVE_REGS_AND_STACK_ACCESS_API + select HAVE_POSIX_CPU_TIMERS_TASK_WORK select HAVE_FUNCTION_ARG_ACCESS_API select HAVE_FUTEX_CMPXCHG if FUTEX select MMU_GATHER_RCU_TABLE_FREE