From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from out-213.mta0.migadu.com (out-213.mta0.migadu.com [91.218.175.213]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 3BB1810E5 for ; Mon, 18 Sep 2023 16:47:35 +0000 (UTC) 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> Precedence: bulk X-Mailing-List: kvmarm@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: 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 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 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 9FA3EC46CA1 for ; Mon, 18 Sep 2023 16:48:08 +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=w8QoIMC2ydKckT//A0jXrpPLkHEJvLI7w7UxB8iILSw=; b=0wc6+x5yFviOci M2Yyc2Unj28xQDn44EYEoS5EQAjsSRsRgv19Ih3cy2qMf/RIiWGo9lf1lU9eMXLy0zjnQtnw1sF2W /d5bzLg2i1KW9b2NWxauAZgpINo3mDJYVdaBXxVurrqRLZILWhgwzAkenwhFGLSLwkz3dH+LXeBvx PhhY8w0xFhsKiH9zL6kS9KAxqOKIxYn7LznkwFt9gg23WXfnuT3EcGNvLCTi756UWZrXrwA1NsdhS MEVFiKCBv5ImI0Bi4SWHRRoLn70j3354Iq+1YjOMz77fcTuMs+ymgJneTEuszQNwWGdVPTcScs817 06K1QNoJO4ZgVcysVaTg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qiHPT-00FuAP-1U; Mon, 18 Sep 2023 16:47:43 +0000 Received: from out-218.mta0.migadu.com ([2001:41d0:1004:224b::da]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qiHPQ-00Fu9z-2h for linux-arm-kernel@lists.infradead.org; Mon, 18 Sep 2023 16:47:42 +0000 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-Disposition: inline In-Reply-To: X-Migadu-Flow: FLOW_OUT X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230918_094741_297901_39A8F030 X-CRM114-Status: GOOD ( 11.85 ) 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="utf-8" Content-Transfer-Encoding: base64 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org T24gTW9uLCBTZXAgMTgsIDIwMjMgYXQgMDk6NDE6MDJBTSAtMDcwMCwgUmFnaGF2ZW5kcmEgUmFv IEFuYW50YSB3cm90ZToKPiBPbiBGcmksIFNlcCAxNSwgMjAyMyBhdCAxMjozM+KAr1BNIE9saXZl ciBVcHRvbiA8b2xpdmVyLnVwdG9uQGxpbnV4LmRldj4gd3JvdGU6CgpbLi4uXQoKPiA+IFRoaXMg d291bGQgZWxpbWluYXRlIHRoZSBwb3NzaWJpbGl0eSBvZiByZXR1cm5pbmcgRU5PREVWIHRvIHVz ZXJzcGFjZQo+ID4gd2hlcmUgd2Ugc2hvdWxkbid0Lgo+ID4KPiBJIHVuZGVyc3RhbmQgdGhhdCB3 ZSdsbCBiZSBicmVha2luZyB0aGUgQVBJIGNvbnRyYWN0IGFuZCB1c2Vyc3BhY2UgbWF5Cj4gaGF2 ZSB0byBhZGFwdCB0byB0aGlzIGNoYW5nZSwgYnV0IGlzIGl0IG5vdCBhY2NlcHRhYmxlIHRvIGRv Y3VtZW50IGFuZAo+IHJldHVybiBFTk9ERVYsIHNpbmNlIEVOT0RFViBtYXkgb2ZmZXIgbW9yZSBj bGFyaXR5IHRvIHVzZX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