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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id B4D4AC64EC7 for ; Sat, 25 Feb 2023 10:34:16 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229520AbjBYKeQ (ORCPT ); Sat, 25 Feb 2023 05:34:16 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50920 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229495AbjBYKeO (ORCPT ); Sat, 25 Feb 2023 05:34:14 -0500 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3010128D1B for ; Sat, 25 Feb 2023 02:34:14 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id B4AA160A77 for ; Sat, 25 Feb 2023 10:34:13 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 27721C433D2; Sat, 25 Feb 2023 10:34:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1677321253; bh=7WQkbyJnkoeszCQNg0KtPZdoNpoaX0qi2rpLodXjZwA=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=jabOTYe8xMnpMp0spzrkOo2nen8Ya3DhbzkT3EfFYEM0f0PIZANFBvR7Uq/Q1c3Rh O3bbpxhIeJpPV6BNxplpDpMdKq3NeJ2Ctz/i80yA3OMv54LPPHtVMAiLEMNry9c+fm atIAOFLk1GjI3e37lAgYutXBwkysj5bzctRZ4YK98jBhFZoYMGolCePC3lwJV5FdQZ ZM5VF8JTOt+2J7xfRsnhKI/+gyA0TMZF1R7Ap0o5gW4KVq3o8ury5QKIf4QUamVLwI FxHc7ty1Ec5cKSDQ4BkemWC992l2d8nrnSggAlV0DFBeTk71AITAUz7aYTkpKi2p1T ZYRFhvv1kop8A== Received: from sofa.misterjones.org ([185.219.108.64] helo=wait-a-minute.misterjones.org) by disco-boy.misterjones.org with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.95) (envelope-from ) id 1pVrsT-00D6wY-Mt; Sat, 25 Feb 2023 10:34:06 +0000 Date: Sat, 25 Feb 2023 10:34:05 +0000 Message-ID: <87bklidof6.wl-maz@kernel.org> From: Marc Zyngier To: Colton Lewis Cc: kvmarm@lists.linux.dev, kvm@vger.kernel.org, linux-arm-kernel@lists.infradead.org, james.morse@arm.com, suzuki.poulose@arm.com, oliver.upton@linux.dev, yuzenghui@huawei.com, ricarkol@google.com, sveith@amazon.de, dwmw2@infradead.org, christoffer.dall@arm.com Subject: Re: [PATCH 13/16] KVM: arm64: nv: timers: Support hyp timer emulation In-Reply-To: References: <20230216142123.2638675-14-maz@kernel.org> User-Agent: Wanderlust/2.15.9 (Almost Unreal) SEMI-EPG/1.14.7 (Harue) FLIM-LB/1.14.9 (=?UTF-8?B?R29qxY0=?=) APEL-LB/10.8 EasyPG/1.0.0 Emacs/27.1 (x86_64-pc-linux-gnu) MULE/6.0 (HANACHIRUSATO) MIME-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") Content-Type: text/plain; charset=US-ASCII X-SA-Exim-Connect-IP: 185.219.108.64 X-SA-Exim-Rcpt-To: coltonlewis@google.com, kvmarm@lists.linux.dev, kvm@vger.kernel.org, linux-arm-kernel@lists.infradead.org, james.morse@arm.com, suzuki.poulose@arm.com, oliver.upton@linux.dev, yuzenghui@huawei.com, ricarkol@google.com, sveith@amazon.de, dwmw2@infradead.org, christoffer.dall@arm.com X-SA-Exim-Mail-From: maz@kernel.org X-SA-Exim-Scanned: No (on disco-boy.misterjones.org); SAEximRunCond expanded to false Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org On Fri, 24 Feb 2023 20:08:15 +0000, Colton Lewis wrote: > > I hope someone else looks at this one because I don't understand NV. Don't worry, you're not alone. > Marc Zyngier writes: > > > + struct arch_timer_context *ctx; > > + > > + ctx = (vcpu_has_nv(vcpu) && is_hyp_ctxt(vcpu)) ? vcpu_hvtimer(vcpu) > > + : vcpu_vtimer(vcpu); > > I don't think that ternary is the easiest to read and would prefer an if > statement. As the saying goes, there is no accounting for taste. Do you see a technical issue with this statement? M. -- Without deviation from the norm, progress is not possible.