From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id F0527606A322 for ; Fri, 4 Dec 2026 16:07:55 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.a=rsa-sha256 header.s=bombadil.20210309 header.b=Z1AhK82h; dkim=pass (2048-bit key) header.d=fujitsu.com header.i=@fujitsu.com header.a=rsa-sha256 header.s=fj2 header.b=pqyLvzzY 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:In-Reply-To:Content-Type: MIME-Version:References:Message-ID: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-Unsubscribe-Post:List-Owner; bh=FApo9TSvDi6PjS66C45NUhFmuIHkfUtmG9iJnnxSbnM=; b=Z1AhK82hMmndIQILQArKyHDG86 sfAF91gcjYQ/8ApkN0D7q3IfbtTuJf4Ar0LfBZbt5PUN9spanoflRlq4z8TIcR18KKkfoK7EKD9+e z46AW40VjPDMC9J8h/Mq8mFiVxuqPVPLdnOGYGspWlMnXqzQITlHdIkAWtdy8AYZfXj6JM6pzIxqg RbAxxuyBqn5udltwb53kWiAsi9/3EekRO1eZ/x6rAPqsj/HyUnFTgwNAbo+DVBith/E6In4H4p6vP Gex8jVqNGfGoVImO//XAfpRWhIF1h7UoM3Wam78kK/5qnIa42hMFp4DmdPsQ3sUG76o9kQC59/JUV MDskMcUA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.100.1 #2 (Red Hat Linux)) id 1xZVp3-00000000skl-1Cjd; Fri, 04 Dec 2026 16:07:45 +0000 Received: from esa10.hc1455-7.c3s2.iphmx.com ([139.138.36.225]) by bombadil.infradead.org with esmtps (Exim 4.100.1 #2 (Red Hat Linux)) id 1xZVoi-00000000sfG-2n9v for linux-arm-kernel@lists.infradead.org; Fri, 04 Dec 2026 16:07:40 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=fujitsu.com; i=@fujitsu.com; q=dns/txt; s=fj2; t=1796400453; x=1827936453; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=xFU+s3Eprqdh/MN+W9lcyI2CMsWngtXMcNqIcTWwtcM=; b=pqyLvzzYYlwOC8dXZDir8W+QLIa55nP94+8vf4ilAeKHVMi5qJMHeHV0 +Jt1xnvWAvHwpmrPzRJlxbUAnSyrQ9USkIjrC3aJkX7byQW/8qQ7k/DNS 3DQYTSiqAHKlsAxAsfkZktErjAHJ9/Dr85hiw3FtSmYX7gm2HFqEbeQma tYQF8S/W3pSOoaFkoX9PAnUu/4IVpyqtP19BwZQVTCE7L9A+GKx9UmOAy fHeerMTGFi499mWN7bsvtLtUKqo0VeHMkbro39bPAzx6R87jrmQw7LNfk dvLjnIJ4UrKHgxYyn9kc9PDXdiLmOFb9spy8uyQ/rmPKzeHL0ysVQv6u+ w==; X-CSE-ConnectionGUID: jVh/czrjQuClT1891xTijA== X-CSE-MsgGUID: Uo7ofDizTqa1iijZPPqqtw== X-IronPort-AV: E=McAfee;i="6800,10657,11986"; a="250466973" X-IronPort-AV: E=Sophos;i="6.29,78,1794841200"; d="scan'208";a="250466973" Received: from gmgwuk01.global.fujitsu.com ([172.187.114.235]) by esa10.hc1455-7.c3s2.iphmx.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 05 Dec 2026 01:07:29 +0900 Received: from az2uksmgm2.o.css.fujitsu.com (unknown [10.151.22.199]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by gmgwuk01.global.fujitsu.com (Postfix) with ESMTPS id 7A095C05C49 for ; Fri, 4 Dec 2026 16:07:20 +0000 (UTC) Received: from az2nlsmom2.o.css.fujitsu.com (unknown [10.150.26.200]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by az2uksmgm2.o.css.fujitsu.com (Postfix) with ESMTPS id 34D201801FE6 for ; Fri, 4 Dec 2026 16:07:20 +0000 (UTC) Received: from FCCLS0092175.localdomain (unknown [10.9.23.61]) by az2nlsmom2.o.css.fujitsu.com (Postfix) with SMTP id DEAE1181291C; Fri, 4 Dec 2026 16:07:11 +0000 (UTC) Date: Sat, 5 Dec 2026 01:07:03 +0900 From: Kohei Enju To: Steven Price Cc: kvm@vger.kernel.org, kvmarm@lists.linux.dev, Suzuki K Poulose , Catalin Marinas , Marc Zyngier , Will Deacon , James Morse , Oliver Upton , Zenghui Yu , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Joey Gouly , Alexandru Elisei , Christoffer Dall , Fuad Tabba , linux-coco@lists.linux.dev, Ganapatrao Kulkarni , Gavin Shan , Shanker Donthineni , Alper Gun , "Aneesh Kumar K . V" , Emi Kisanuki , Vishal Annapurve , WeiLin.Chang@arm.com, Lorenzo Pieralisi , Fuad Tabba Subject: Re: [PATCH v6 01/11] KVM: arm64: CCA: Introduce Realms Message-ID: References: <20261204115725.45272-1-steven.price@arm.com> <20261204115725.45272-2-steven.price@arm.com> X-Archived-By: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20261204115725.45272-2-steven.price@arm.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.9.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20261204_080727_148985_3D9810CD X-CRM114-Status: GOOD ( 16.90 ) X-Spam-Score: -2.1 (--) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" X-Spam-Status: No, score=-11.3 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=4.0.1 X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-26) on aws-us-west-2-korg-listserv-alma10-1 On 12/04 11:57, Steven Price wrote: > From: Suzuki K Poulose > > Introduce the Realm VM flavor and per-VM state tracking. Realm and > protected pKVM states are mutually exclusive, so share their storage > in kvm_arch. Update pKVM callers of the protected VM helpers to > check the VM flavor. > > Realm VMs cannot be created yet; RMI initialization and the creation > UABI follow in later patches. > > Signed-off-by: Suzuki K Poulose > Signed-off-by: Steven Price > Reviewed-by: Fuad Tabba Reviewed-by: Kohei Enju Minor nit below. [...] > +/** > + * enum realm_state - State of a Realm > + * > + * Mirrors the RMM's Realm lifecycle states where they are meaningful to KVM, > + * with REALM_STATE_DYING being a KVM-internal state used to prevent further Strictly speaking, REALM_STATE_NONE and REALM_STATE_DEAD are also KVM-internal states, so I think the comment should reflect this if you resend the series. Thanks, Kohei > + * requests while teardown is in progress. KVM does not track REALM_SYSTEM_OFF > + * or REALM_ZOMBIE separately as they naturally lead to teardown. > + */ > +enum realm_state { > + /** > + * @REALM_STATE_NONE: > + * Realm has not yet been created. rmi_realm_create() has not > + * yet been called. > + */ > + REALM_STATE_NONE, > + /** > + * @REALM_STATE_NEW: > + * Realm is under construction, Realm Descriptor has been created, > + * but it is not yet activated. Memory may be populated. > + */ > + REALM_STATE_NEW, > + /** > + * @REALM_STATE_ACTIVE: > + * Realm has been created and is eligible for execution with > + * rmi_rec_enter(). Memory may no longer be populated with known > + * contents. > + */ > + REALM_STATE_ACTIVE, > + /** > + * @REALM_STATE_DYING: > + * Realm is in the process of being destroyed or has already been > + * destroyed. > + */ > + REALM_STATE_DYING, > + /** > + * @REALM_STATE_DEAD: > + * Realm has been destroyed. > + */ > + REALM_STATE_DEAD > +};