Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=139.138.36.225 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796400444; b=MVEqcuTtK2BuAKIYwUiv0nDEG2nh5WAEIBnbVGWWHG4YBmsUEjB1Wdd6mLOK6ghgSqtD 7dabeaZpZQjlpUFoTe6cIIqmuPkWkwRRGiJSWqjexC4YmCazNDYGsV7XFYKlFU9EziSWH WTbTPEnH5h3FyKhkTVlMdJsh8e/xbaVOQSzUgr2Ob5GxDZGps4jnD1nBpM5cU1XrX8Nsj YPBx7RWUGUz++gqaH0LLoSBH9nyPaOWBYDWvNdsGQxYLpynbKspz0/oIuJ62KgY6zm9X8 KPaS7+xneFfh4SgVapTAv3XiXIpqv3w5hdHmPR99B2fDfG/y+5du/al9bhTj92oRDyg== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796400444; h=DMARC-Filter:DKIM-Signature:X-CSE-ConnectionGUID:X-CSE-MsgGUID: X-IronPort-AV:X-IronPort-AV:Received:Received:Received:Received:Date: From:To:Cc:Subject:Message-ID:References:MIME-Version:Content-Type: Content-Disposition:In-Reply-To; bh=FApo9TSvDi6PjS66C45NUhFmuIHkfUtmG9iJnnxSbnM=; b=TYCG1LV8R1OtzCvXGjW/bR5QeKSpuWneA1dzyY3/DdioL66fZ2k08ZjKJt0iBxLxHTAh OTcTxudINF+9r6Xh/w4o8Yucgow6yFEroWrMwwq9GILoJ/BCl72eQPqEF+ALLw9ft2jWr 2RhgfxwbcKDNjWJJc5oEOwGwXMS/kAp4UtiO8fC8qeBxsGAVwnGT/n689L2rFSWiChslk 13ZavVTVLzps6cRP8FslMJ8VJFga+m6ZoqqsWr6fr+afRPsWQ1pmOPRoGQTVsBjqh2qlH ZZwNP6WeAoe1fyquvmOgYyFEgYANi6VI7mQoeSQrPgvmGzQoPJLiZVB+PoN3LY4sjnw== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass header.from=fujitsu.com; spf=pass smtp.mailfrom=fujitsu.com; dkim=pass header.d=fujitsu.com header.i=@fujitsu.com header.a=rsa-sha256 header.s=fj2 header.b=UvSyMf4j; arc=none smtp.remote-ip=139.138.36.225 Received: from esa10.hc1455-7.c3s2.iphmx.com (esa10.hc1455-7.c3s2.iphmx.com [139.138.36.225]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 2573F606A322; Fri, 4 Dec 2026 16:07:22 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 2573F606A322 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=fujitsu.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=fujitsu.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key, unprotected) header.d=fujitsu.com header.i=@fujitsu.com header.a=rsa-sha256 header.s=fj2 header.b=UvSyMf4j DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=fujitsu.com; i=@fujitsu.com; q=dns/txt; s=fj2; t=1796400451; x=1827936451; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=xFU+s3Eprqdh/MN+W9lcyI2CMsWngtXMcNqIcTWwtcM=; b=UvSyMf4jjvsedkGeV06b4X4mEC9KZi1stOC8FFD1sW/hg4/zL0bTdJth sP1zgd+hF1WD9A4zQjN2D5rczWK23SYTEceRtCma1FXumuY/l482NABOp 7x0W+DHgQx/Zt9UOqTfXtzP1KGQ7CSoNC9TTVManEWQl6X0jx7kTNVzS9 0w35REnDhAd7EqT0coQs1qRo0JqLjp2nEvvrnHUuulSRt6CMb63x83oMC NRm7IDTvsPBQ/fuACizvgfpFfPfiEP7M9tYBx7iS2bM+kKTsxX0OzGBa8 YmoWeJkhzbX2+YxT14LhqRACdXsmLmwoUtejmIlo7g39P7NcNfvM1eSL5 Q==; X-CSE-ConnectionGUID: VX9xZHH2TPiLx4VeGtZLQQ== X-CSE-MsgGUID: ntP1LB+UQUCPgNrbmF7QWg== X-IronPort-AV: E=McAfee;i="6800,10657,11986"; a="250466972" X-IronPort-AV: E=Sophos;i="6.29,78,1794841200"; d="scan'208";a="250466972" Received: from gmgwnl01.global.fujitsu.com (HELO mgmgwnl01.global.fujitsu.com) ([52.143.17.124]) by esa10.hc1455-7.c3s2.iphmx.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 05 Dec 2026 01:07:28 +0900 Received: from az2nlsmgm1.o.css.fujitsu.com (unknown [10.150.26.203]) (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 mgmgwnl01.global.fujitsu.com (Postfix) with ESMTPS id 69EF2FC91; 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 az2nlsmgm1.o.css.fujitsu.com (Postfix) with ESMTPS id 1FE15C013EC; 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-Mailing-List: kvm@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20261204115725.45272-2-steven.price@arm.com> 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 > +};