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 7833F606A33F for ; Fri, 4 Dec 2026 17:27:29 +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=wzrST66s; dkim=pass (1024-bit key) header.d=arm.com header.i=@arm.com header.a=rsa-sha256 header.s=foss header.b=kiFu4qtD 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-Transfer-Encoding: Content-Type:In-Reply-To:From:References:Cc:To:Subject:MIME-Version:Date: Message-ID:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Unsubscribe-Post: List-Owner; bh=pt1awIak1CU96k7VyflDKFR9Lv1QfBI/uPXp8jEIgQw=; b=wzrST66skHYwPu uQ/597Tlo+3n8HHm6fyJyDjsCBdFc/v5fOXF5eYJUiZwGvyDU/myF/kqwva0UD0cgKm9WbgAS5MKf ZT/dyiIW0cDJl1lMTzlk/fG5KsfovJED8V906Jz4BPQSTGiT5+TML5jnK2ZAJBbGz651Zk71Ov9dX h7PLdrjPGwH9OTMtpvWCuabPwtXATUoaMKB9+FAmqGetdWZE1I18RCDeK/IAo8DIKOa5ZbZcT7ZSN pP56UBaWOe2CO9L7FIRe9ocD6ii7xn89MCWCYfvlK5zOXdk9N92NvHHoTz+9p2PdoFcaRfp0jx5pv 5lWeSr5T5jqj6MNuhXgw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.100.1 #2 (Red Hat Linux)) id 1xZWlz-000000010u7-33WP; Fri, 04 Dec 2026 17:08:39 +0000 Received: from foss.arm.com ([217.140.110.172]) by bombadil.infradead.org with esmtp (Exim 4.100.1 #2 (Red Hat Linux)) id 1xZWj8-000000010jl-0tuJ for linux-arm-kernel@lists.infradead.org; Fri, 04 Dec 2026 17:08:07 +0000 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id DF3B81576; Fri, 4 Dec 2026 09:05:37 -0800 (PST) Received: from [10.0.128.193] (e122027.cambridge.arm.com [10.0.128.193]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 39BCD3F86F; Fri, 4 Dec 2026 09:05:34 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=arm.com; s=foss; t=1796403940; bh=Rkf/J0AUj1+ZY05NoU3BS1K7H1qwHD5SNglzvd+dnQI=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=kiFu4qtDi3lsMpmklxM9NEMRWDEQvi88m02CLBRDorE4kHTxTt2/3FeI1auHkO7jU w7XjRaQwOkIaRs2nJ7U0eTOg5xMCCltbMMzFHu4pfizgEMwyvO4aiA3ncgDbZ7CFaf zfJuV9Cm2CVA7bBC5+DR9/p3K68VcVajG5Dw9SQE= Message-ID: <91e1565e-47a3-42dc-8476-e64eaff1c68b@arm.com> Date: Fri, 4 Dec 2026 17:05:31 +0000 X-Archived-By: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v6 01/11] KVM: arm64: CCA: Introduce Realms To: Kohei Enju 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 References: <20261204115725.45272-1-steven.price@arm.com> <20261204115725.45272-2-steven.price@arm.com> From: Steven Price Content-Language: en-GB In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.9.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20261204_090607_815140_7E6714EB X-CRM114-Status: GOOD ( 14.77 ) X-Spam-Note: SpamAssassin invocation failed 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=-12.8 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,USER_AGENT_SANE_1 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 04/12/2026 16:07, Kohei Enju wrote: > 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. Good point - it's a little confusing not mentioning those two other states. Thanks, Steve > 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 >> +};