From mboxrd@z Thu Jan 1 00:00:00 1970 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 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 smtp.lore.kernel.org (Postfix) with ESMTPS id C76E6C47DA9 for ; Mon, 29 Jan 2024 23:17:37 +0000 (UTC) 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:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=ZZYk3vK3QRZqOv3P0IvLzCcZ54FX1O+2v+NoT7saCaY=; b=zlRrvo8cbWXvfH Rvza4jIobyzrYzYd3kKq86BXBypNC45vrzIV9MSr5pC6i9pYvSej6Ot1A72oLXIX0hMLSaGZUgCFj 50/4hSU2YbDoPjR2RMjf/vJ3n4r1NBPWDeUITnwlvznCg9QB8bXzLyHkVjJmCZ5Alo+keNR233dSJ njfyeFnzYdDGMVVRS3ITyc4WMw4Uj1wd1YSn2klmCc/FeBwdh/nK5ajnWgPQi4mTiFsTF88jgiaA9 oX/gU/kkTWooJbqwT2pry6iQKgVMxlODvhTdqtJc9U6gMFetgz/hOerLOPowD5CqaZI9b7HRmTZ3M Xw0gFiEvos3mFK2En3gQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1rUasU-0000000EZ4R-2zh1; Mon, 29 Jan 2024 23:17:22 +0000 Received: from out-176.mta1.migadu.com ([95.215.58.176]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1rUasR-0000000EZ3E-0ENt for linux-arm-kernel@lists.infradead.org; Mon, 29 Jan 2024 23:17:21 +0000 Date: Mon, 29 Jan 2024 23:17:06 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1706570231; 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: in-reply-to:in-reply-to:references:references; bh=WLuRlRCwuI6asqqMQ9nqwhi3i/dMRQr3XJD+CfB0Xy4=; b=admD522d8Nl6IR0vun3fAoB/CzcnGnamlNUcMKTFhvtQQykH72MoRtbwWmbwRbNv//uele plUr+qqVTK36LEGYcFj9OCElFiDiG5pC6pTG/5pCGLPP790dCQqnv52d2zejGFImLx8lKv HfyseVmIXjQ+Y4HHjuc+7ZrcDXW1U24= X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. From: Oliver Upton To: Colton Lewis Cc: kvm@vger.kernel.org, Marc Zyngier , James Morse , Suzuki K Poulose , Zenghui Yu , Catalin Marinas , Will Deacon , Paolo Bonzini , linux-arm-kernel@lists.infradead.org, kvmarm@lists.linux.dev, linux-kernel@vger.kernel.org Subject: Re: [PATCH] KVM: arm64: Add capability for unconditional WFx passthrough Message-ID: References: <20240129213918.3124494-1-coltonlewis@google.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20240129213918.3124494-1-coltonlewis@google.com> X-Migadu-Flow: FLOW_OUT X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240129_151719_607836_57E4329A X-CRM114-Status: GOOD ( 12.21 ) 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: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Hi Colton, On Mon, Jan 29, 2024 at 09:39:17PM +0000, Colton Lewis wrote: > Add KVM_CAP_ARM_WFX_PASSTHROUGH capability to always allow WFE/WFI > instructions to run without trapping. Current behavior is to only > allow this if the vcpu is the only task running. This commit keeps the > old behavior when the capability is not set. > > This allows userspace to set deterministic behavior and increase > efficiency for platforms with direct interrupt injection support. Marc and I actually had an offlist conversation (shame on us!) about this very topic since there are users asking for the _opposite_ of this patch (unconditionally trap) [*]. I had originally wanted something like this, but Marc made the very good point that (1) the behavior of WFx traps is in no way user-visible and (2) it is entirely an IMP DEF behavior. The architecture only requires the traps be effective if the instruction does not complete in finite time. We need to think of an interface that doesn't depend on implementation-specific behavior, such as a control based on runqueue depth. [*] https://lore.kernel.org/kvmarm/a481ef04-ddd2-dfc1-41b1-d2ec45c6a3b5@huawei.com/ -- Thanks, Oliver _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel