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 7E3D5C46CA1 for ; Mon, 18 Sep 2023 16:48:40 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230453AbjIRQso (ORCPT ); Mon, 18 Sep 2023 12:48:44 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43062 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230246AbjIRQsX (ORCPT ); Mon, 18 Sep 2023 12:48:23 -0400 Received: from out-227.mta0.migadu.com (out-227.mta0.migadu.com [91.218.175.227]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id F41FB19A2 for ; Mon, 18 Sep 2023 09:47:36 -0700 (PDT) Date: Mon, 18 Sep 2023 09:47:27 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1695055654; 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: in-reply-to:in-reply-to:references:references; bh=ln9R1K2AMa49HKt735eiLwbod7abzVOhRToBSq2nvNc=; b=PFJBeutpTuE5oKhT4iAo5E2TezyBTkbOoFpoDr9CAofMUMrs+vvBLm3svfFoU/zrhN3JkF jKLW1vZOSefLlzcKx2jNzfEo/1sH19ZdAlwPTgI63viOtPrXXEg79oyy8mb86OVbquu2Ql 9aioXtXmYuV0JwAnsdXFHof4cdcdRxo= X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. From: Oliver Upton To: Raghavendra Rao Ananta Cc: Marc Zyngier , Alexandru Elisei , James Morse , Suzuki K Poulose , Paolo Bonzini , Zenghui Yu , Shaoqin Huang , Jing Zhang , Reiji Watanabe , Colton Lewis , linux-arm-kernel@lists.infradead.org, kvmarm@lists.linux.dev, linux-kernel@vger.kernel.org, kvm@vger.kernel.org Subject: Re: [PATCH v5 02/12] KVM: arm64: PMU: Set the default PMU for the guest on vCPU reset Message-ID: References: <20230817003029.3073210-1-rananta@google.com> <20230817003029.3073210-3-rananta@google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: X-Migadu-Flow: FLOW_OUT Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org On Mon, Sep 18, 2023 at 09:41:02AM -0700, Raghavendra Rao Ananta wrote: > On Fri, Sep 15, 2023 at 12:33 PM Oliver Upton wrote: [...] > > This would eliminate the possibility of returning ENODEV to userspace > > where we shouldn't. > > > I understand that we'll be breaking the API contract and userspace may > have to adapt to this change, but is it not acceptable to document and > return ENODEV, since ENODEV may offer more clarity to userspace as to > why the ioctl failed? In general, do we never extend the APIs? Yes, we extend the existing interfaces all the time, but we almost always require user opt in for user-visible changes in behavior. Look at the way arm64_check_features() is handled -- we hide the 'detailed' error and return EINVAL due to UAPI. -- Thanks, Oliver