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 E6EDCC47258 for ; Tue, 23 Jan 2024 19:01:07 +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=b5tdV02UnuuZ7VrObjsjzOSjBKolbq2nmPCkaHikx2Y=; b=MlldfiI2GJ51Oq 3o4PkDVR5b1nsrVw8dPFdQGPR6hHkC6idge9W7tHXGOldQWTSrjkzX6fGoORklssGI3V+KgIl8m7R TwTQL31zGWERR2FYfJkYn7PvZEDoPbZ36AsBLkmI8B8IPCSVYjopCFhZgk48wko8Df1ojHYQlFJj0 mO7T54j7WGigrOboHmrN2yCTBz1VZ7bjmNT4mJSM3HT/xRhzTys4J2GBF0Ds/AE3L4U8+OBsVS6mv mW8F7CB1BNqHwGRU259gkFc0U79jhO3+jV5t8C7+O2GB+arsnMNGA7/MbMs8wzOx850HpbkbZRDvi MgJbR/+hLTZj2PU/yYzg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1rSM0f-000BoY-1E; Tue, 23 Jan 2024 19:00:33 +0000 Received: from out-170.mta1.migadu.com ([95.215.58.170]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1rSM0c-000Bm4-2H for linux-arm-kernel@lists.infradead.org; Tue, 23 Jan 2024 19:00:32 +0000 Date: Tue, 23 Jan 2024 19:00:23 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1706036427; 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=eYMck5L6uue4zc3PPO2ctKiLd5MW2oLCukny7sBp2yA=; b=Slc3bqyGnQbls7pi/u8B+xOBhLft1gJPx7L42fMBMqeCXrBmNvPKs+KsXRwaH9jUlwA7ry DI7wJgeioGokPC+o6du6iGrX71qjPvczafhmDNdTEOL8C+fMY9q+unxab9XJS5+2IbC4G+ QXf3ed9n0ZqSo5P768GQLkR4RIM+jcA= X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. From: Oliver Upton To: James Morse Cc: kvmarm@lists.linux.dev, linux-arm-kernel@lists.infradead.org, Marc Zyngier , Suzuki K Poulose , Zenghui Yu Subject: Re: [PATCH v2 0/4] KVM: arm64: Hide unsupported MPAM from the guest Message-ID: References: <20231207150804.3425468-1-james.morse@arm.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-20240123_110031_142122_29F75E54 X-CRM114-Status: GOOD ( 13.77 ) 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 On Fri, Jan 19, 2024 at 05:15:59PM +0000, James Morse wrote: [...] > > We've already done something similar to hide our mistakes with IMP DEF > > PMU versions in commit f90f9360c3d7 ("KVM: arm64: Rewrite IMPDEF PMU > > version as NI"), and I think MPAM may be a good candidate for something > > similar. > > As there is precedent, I feel less dirty doing that! > > This also solves the problem of the VMM re-writing the broken value after the vCPU has > started running, and getting a surprise error. A weird side effect of doing this would be > you can write MPAM=1 on A53 and KVM will ignore it, I don't want user-space to start > relying on that! I'll add a final-cap check so this can only be ignored on hardware that > actually has MPAM, and could have been exposed to the bug. Ah, good idea. I probably should've done something similar in the PMU case. -- Thanks, Oliver _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel