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 1C843EB64D7 for ; Mon, 26 Jun 2023 20:52:59 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230231AbjFZUw6 (ORCPT ); Mon, 26 Jun 2023 16:52:58 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49972 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229898AbjFZUw4 (ORCPT ); Mon, 26 Jun 2023 16:52:56 -0400 Received: from out-44.mta1.migadu.com (out-44.mta1.migadu.com [IPv6:2001:41d0:203:375::2c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CCEBD10D for ; Mon, 26 Jun 2023 13:52:54 -0700 (PDT) Date: Mon, 26 Jun 2023 20:52:46 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1687812772; 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=X1L5ZJ3PrRKoApzZhudFyrD6ET1z6DiDInN2mn2qOoA=; b=av6vlVmWwH6Lmd2qCNew8YvpUoDOiGhnuZg5NYkW0fVMhEJGKEF1ML4mve6cyO4xGHvlEI 4K1bAe1c3yvOeYTlymxOebdimsN1DbmlfWnIT1PdorkycXiZI0JrK7TjI+vUS0PVtquXnd g0nRwzgIZRzd80BTuICSOMXIcQRi/b0= X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. From: Oliver Upton To: Jing Zhang Cc: KVM , KVMARM , ARMLinux , Marc Zyngier , Oliver Upton , Will Deacon , Paolo Bonzini , James Morse , Alexandru Elisei , Suzuki K Poulose , Fuad Tabba , Reiji Watanabe , Raghavendra Rao Ananta , Suraj Jitindar Singh Subject: Re: [PATCH v4 0/4] Enable writable for idregs DFR0,PFR0, MMFR{0,1,2} Message-ID: References: <20230607194554.87359-1-jingzhangos@google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230607194554.87359-1-jingzhangos@google.com> X-Migadu-Flow: FLOW_OUT Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org Hi Jing, On Wed, Jun 07, 2023 at 07:45:50PM +0000, Jing Zhang wrote: > > This patch series enable userspace writable for below idregs: > ID_AA64DFR0_EL1, ID_DFR0_EL1, ID_AA64PFR0_EL1, ID_AA64MMFR{0, 1, 2}_EL1. > > It is based on below series [2] which add infrastructure for writable idregs. Could you implement some tests for these changes? We really need to see that userspace is only allowed to select a subset of features that're provided by the host, and that the CPU feature set never exceeds what the host can support. Additionally, there are places in the kernel where we use host ID register values for the sake of emulation (DBGDIDR, LORegion). These both should instead be using the _guest_ ID register values. -- Thanks, Oliver