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 A9852C04A6A for ; Tue, 8 Aug 2023 17:03:31 +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=xfBLxJ9AZPiq+PlnUY5M4CBwvVJ0jK4dFxE/baPV8pY=; b=1c89KSWDZCmGtt NBiS8YyyM8lYbg9tT5uMrUJM0wt2BfoPGKnCb2G3A56HGvhXd8K8DgM1YKC/L8ORdVBhhCChtgsFk +SH12apABm0+El4UBS2GN5c8LCMjCFy09cSs6tyimQ+NBXXfv+IR2DeiHdVM1GmykPV7b/I0oc7aI k1dYE8nR9VzsWpUzYOvH32/ERB3FQ/ee5tYMC3DMIN8O+sp/SaJSPFafI+aECyAev2NdZ5n+rPSQ2 9TlpxdbIJ46HemSHy4r9dkCo5wX2bVtIGbgk586L1UqmE7dl7DmuAKOn1VAGQUEWqUe5dbVUIoyP0 hz/DB4XFFgxqlcQ285vA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qTQ6t-0034np-3A; Tue, 08 Aug 2023 17:03:07 +0000 Received: from out-97.mta1.migadu.com ([2001:41d0:203:375::61]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qTQ6r-0034lv-0c for linux-arm-kernel@lists.infradead.org; Tue, 08 Aug 2023 17:03:06 +0000 Date: Tue, 8 Aug 2023 17:02:53 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1691514179; 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=BnRIeeXwdzMlgL7F+jbPI9mR9l8NZ8evsBZQnJMMlI0=; b=lsaCbpgive06ISvMWopxU9mCkabxLZFFooclVgmXpzOe7YiLUanXzqsW+HHVph4r+qqk6v V/WKfDvqn2JvUL/hYSxVsvIwmjJnGm1+OgWWy3j+2BLrLVV5wzfn5hb8qlTIociKTZmNGw jITEvjw8F0Sgrhfl/koOnV90117d6V0= X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. From: Oliver Upton To: Cornelia Huck Cc: Jing Zhang , KVM , KVMARM , ARMLinux , Marc Zyngier , Will Deacon , Paolo Bonzini , James Morse , Alexandru Elisei , Suzuki K Poulose , Fuad Tabba , Reiji Watanabe , Raghavendra Rao Ananta , Suraj Jitindar Singh Subject: Re: [PATCH v7 01/10] KVM: arm64: Allow userspace to get the writable masks for feature ID registers Message-ID: References: <20230801152007.337272-1-jingzhangos@google.com> <20230801152007.337272-2-jingzhangos@google.com> <877cqc8dp2.fsf@redhat.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <877cqc8dp2.fsf@redhat.com> X-Migadu-Flow: FLOW_OUT X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230808_100305_388415_E7DAD313 X-CRM114-Status: GOOD ( 16.90 ) 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 Thu, Aug 03, 2023 at 03:20:41PM +0200, Cornelia Huck wrote: > On Wed, Aug 02 2023, Oliver Upton wrote: > > Sorry, 'index' is a bit overloaded in this context. The point I was > > trying to get across is that we might want to describe a completely > > different range of registers than the feature ID registers in the > > future. Nonetheless, we shouldn't even presume the shape of future > > extensions to the ioctl. > > > > struct reg_mask_range { > > __u64 addr; /* pointer to mask array */ > > __u64 rsvd[7]; > > }; > > > > Then in KVM we should require ::rsvd be zero and fail the ioctl > > otherwise. > > [I assume rsvd == reserved? I think I have tried to divine further > meaning into this for far too long...] Indeed. > Is the idea here for userspace the request a mask array for FEATURE_ID > and future ranges separately instead of getting all id-type regs in one > go? I rambled a bit, but the overall suggestion is that we leave room in the UAPI for future extension. Asserting that the reserved portions of the structure must be zero is the easiest way to accomplish that. The complete feature ID register space is known, but maybe there are other ranges of registers (possibly unrelated to ID) that we'd like to similarly describe with masks. -- Thanks, Oliver _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel