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 1DE9ACDB465 for ; Thu, 19 Oct 2023 10:46:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Type:MIME-Version: References:Message-ID:In-Reply-To:Subject:cc:To:From:Date:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=7KkxhQgtHH/FuDFWYgIjO/x0TE6wGpJI+1MUniuwh4k=; b=TAnO2oV3oT47sZ7mssPwhvD1bs a10tv7BrFGdb9g7d4R7wAry2PUufoiKVbNyo/uw539BEsGdOS8yT8ZwwX7juBuj239kLbnYlqTk19 vn0o4vwAYN0NHNH7B/Pt3DR9McZRHbSNAhPSAP+2eN6T35QpyGCb2FcS6yrDK6uwveWWX7Pb2BUMl Ypzi8GbfHtUwqkBaSRFXl0Po2EhKmZYZPZcYADxWBh1U0PecFNVu7MOhFG8FLDDEKi93/BoV/T7Vz mjSuiIhup9+Hw1+7oRQvxjEfttwS5bXtfVOycn8MT/9DzGPZN0vzfHxS72lgtMnigUGXkVbFD6sMd HndaEHgA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qtQX7-00H5QV-2a; Thu, 19 Oct 2023 10:45:41 +0000 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qtQX5-00H5NC-15 for linux-arm-kernel@lists.infradead.org; Thu, 19 Oct 2023 10:45:40 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1697712337; 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=nZU5n3KTDTfUWmADsG196A6CHko6IR01XuC7O+Kf4xw=; b=Hvh6moc+LfQVJzHc7AgxVfGWFY1xHN0lR98Fl9kJsPQMI/JiAW4JawLXsK/W/K6g0SSFoj i5z9pJQ/J+yFm77jk9ZVjjN/XgSuqV84Zro2h8eJ81EgGtt3jnqNakXXfa2ym4dbPRlzlG 8WyVX+wsj04Q1gU5P8zf4qJtV9tU/7I= Received: from mail-vs1-f71.google.com (mail-vs1-f71.google.com [209.85.217.71]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-416-VjRAhNu7NUiy4u99oKQ5kA-1; Thu, 19 Oct 2023 06:45:35 -0400 X-MC-Unique: VjRAhNu7NUiy4u99oKQ5kA-1 Received: by mail-vs1-f71.google.com with SMTP id ada2fe7eead31-457e3fa6563so1550101137.0 for ; Thu, 19 Oct 2023 03:45:35 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1697712335; x=1698317135; h=mime-version:references:message-id:in-reply-to:subject:cc:to:from :date:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=Lxd5MODsmAGKbTuOienYvfNws4TA5AoutDP3QGe6tEs=; b=fMwJYPvnK8oMAyvMqMZlQRNDa+m7ybs1LOWXk+juaFOuhKIyOI1DAqMhFRJbyxdLm2 3V/+q8kB0v0PSEWhHXztI+GLIhxCVwo7ZBW7WTdb3IzReHG0KLGdrSkRQsPYX/yd0tuv 1LZz3kWTH+9vENMLU/O9K61ny1DgH5mhZGuVbkgr/SljwZSoao/KP5waVmLsuib374Ce lXQpQKD1Qmm2BHRGkUf6ZPFNf5ZKa8qIyUHQJDfCbPmFLlOaUqQ5yCVFjZUJb2H64dfP beVbiaYVUaWas9fIZ2OqMHrOivzGPObar5aTypKCaW5avnmp0wWX3Vmbp5CQa7Neo7UZ GjQw== X-Gm-Message-State: AOJu0YzlSoK6ZLW+0t7DwYLzgfUc/737fRXYxYVoiEysIVBzdWP/6MQs KOFFIeNDN9ljLooyBTKWfG5nnBT+bBUbuHbpf8AsTebRE4TD0POW5JX3ENszLAa8XxjOEENYbTT q2cciGWM/69vdY6dh+DoZfiTaTemgso2ouTY= X-Received: by 2002:a67:b702:0:b0:44e:ac98:c65d with SMTP id h2-20020a67b702000000b0044eac98c65dmr1269388vsf.27.1697712335136; Thu, 19 Oct 2023 03:45:35 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFYky3whGsAgdNN+wxhIzNqJbdy0LW6MrG6Q0VPEs7UbfeSBAf1GMlgRpft6IJk9K4PeYFSrA== X-Received: by 2002:a67:b702:0:b0:44e:ac98:c65d with SMTP id h2-20020a67b702000000b0044eac98c65dmr1269373vsf.27.1697712334816; Thu, 19 Oct 2023 03:45:34 -0700 (PDT) Received: from rh (p200300c93f0047001ec25c15da4a4a7b.dip0.t-ipconnect.de. [2003:c9:3f00:4700:1ec2:5c15:da4a:4a7b]) by smtp.gmail.com with ESMTPSA id em17-20020ad44f91000000b0064f43efc844sm687385qvb.32.2023.10.19.03.45.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 19 Oct 2023 03:45:34 -0700 (PDT) Date: Thu, 19 Oct 2023 12:45:30 +0200 (CEST) From: Sebastian Ott To: Raghavendra Rao Ananta cc: Oliver Upton , 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 v7 08/12] KVM: arm64: PMU: Allow userspace to limit PMCR_EL0.N for the guest In-Reply-To: Message-ID: References: <20231009230858.3444834-1-rananta@google.com> <20231009230858.3444834-9-rananta@google.com> <5d35c9f3-455e-6aa9-fd6a-4433cf70803a@redhat.com> MIME-Version: 1.0 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: multipart/mixed; boundary="-1463795790-1917350782-1697712334=:15494" X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20231019_034539_473182_67A6BABE X-CRM114-Status: GOOD ( 13.14 ) 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 This message is in MIME format. The first part should be readable text, while the remaining parts are likely unreadable without MIME-aware tools. ---1463795790-1917350782-1697712334=:15494 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8BIT On Tue, 17 Oct 2023, Raghavendra Rao Ananta wrote: > On Tue, Oct 17, 2023 at 8:52 AM Sebastian Ott wrote: >> >> On Mon, 9 Oct 2023, Raghavendra Rao Ananta wrote: >>> +static int set_pmcr(struct kvm_vcpu *vcpu, const struct sys_reg_desc *r, >>> + u64 val) >>> +{ >>> + struct kvm *kvm = vcpu->kvm; >>> + u64 new_n, mutable_mask; >>> + >>> + mutex_lock(&kvm->arch.config_lock); >>> + >>> + /* >>> + * Make PMCR immutable once the VM has started running, but do >>> + * not return an error (-EBUSY) to meet the existing expectations. >>> + */ >> >> Why should we mention which error we're _not_ returning? >> > Oh, it's not to break the existing userspace expectations. Before this > series, any 'write' from userspace was possible. Returning -EBUSY all > of a sudden might tamper with this expectation. Yes I get that part. What I've meant is why specifically mention -EBUSY? You're also not returning -EFAULT nor -EINVAL. /* * Make PMCR immutable once the VM has started running, but do * not return an error to meet the existing expectations. */ IMHO provides the same info to the reader and is less confusing Sebastian ---1463795790-1917350782-1697712334=:15494 Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel ---1463795790-1917350782-1697712334=:15494--