From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=217.140.110.172 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796403942; b=2enk3HKM6WuoYiljhYrAfjD8Zo+WI44+XF0BZ8StOxv0y6bhAmgTYZTu6/ShX1OCHmex HAAHWY2+8IvWxFV8gx8Ji00FHTl5NBjsOKyEOAT2OWUVy2z1b35y36qx4MDPnmXDtyf0o HCBw+9XpxGofuMH72Ul6YgKckTLWgMol8g0TcEDF7QRLehDon35rHxfWQqZioEFrAyWZ8 G5xfitna4HSkjo9v4hW9xntIObAHDLLyYVx+doowDpAsh92RTSAbwB0uZzBjDJoXU191t kHc4O97WY5SNLh0GvkH9SZSOzIAe9suv51VRG2KtUkmBvOHRKfTwgO3gbLT4wXFRMzQ== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796403942; h=DMARC-Filter:Received:Received:DKIM-Signature:Message-ID:Date: MIME-Version:User-Agent:Subject:To:Cc:References:From: Content-Language:In-Reply-To:Content-Type:Content-Transfer-Encoding; bh=pt1awIak1CU96k7VyflDKFR9Lv1QfBI/uPXp8jEIgQw=; b=MYv+PJwKNnShfHsZXCKxk3d8e/AL7Ri8FYXCCgnDU+ED0wbVIB93QmBWYUGdOdtshtkc ezvgNsLoKWp2A1G4hNdWaurIchvRcRFWsIxyZSxaM9whncnBhcS9mgANlk3UD/Ullq4j2 N402tK8oJk9W7F6g2686ShDdJ2hZrVu/WdWrEL6caRooB39QtI4PViSkbE9AinoVYtWOD hyvpFuT3Af9QtBozRUMjqm+bNK+VBXrlOU2HpM/Hn+NM68Aw3jywk2bRn/uFrETa+UDC+ uZRia5/eYUI8/FX80SFTD/0Bf4QWFXkMPrHSXAIx3+AjsMhxFJGTUUdMPEOHf5ZC6vw== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass header.from=arm.com; spf=pass smtp.mailfrom=arm.com; dkim=pass header.d=arm.com header.i=@arm.com header.a=rsa-sha256 header.s=foss header.b=kiFu4qtD; arc=none smtp.remote-ip=217.140.110.172 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 6A6A2606A32C; Fri, 4 Dec 2026 17:05:41 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 6A6A2606A32C Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arm.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=arm.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=arm.com header.i=@arm.com header.a=rsa-sha256 header.s=foss header.b=kiFu4qtD 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-Mailing-List: linux-coco@lists.linux.dev List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list 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 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 >> +};