From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=207.54.90.48 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796400444; b=MKkuop3NzanG59IcT5+vEXQyxbTI5pk53x7t8ulhxcdgUHTWQ85Jrh4ICItkxy5cElfs hrxuQLzlZU66YSIo4q32jNwFRuEQioNNihU3tNKLbKQZSuXqytQVYa507XOOjPnR9IvGK WNFb5A/CitcUJtifO1Z0u9M5q437TGKZNLZbYuUgamyV5dqWu9+Z+qr/gr1iOlzXxubjF kjIaTHyhuinSf/71ku7tEnQzDLwIH4arQ7pBTVAwpJa6jZa3NbJCUUZ2mZsY1n8qif6TS Pbc1SIM2IFeF4HKXWAPGPqRI9qlqasp1On2L0hZB9EV4FQHcMtYIh+LMTQDAMVGKuHQ== 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=SveCr6dLhj3dJJnFs5Cj04wmWOK2hCeamG9b58dq1yQTLwD415FmEW4cVNjuwwwYpiRj zZgZgYcZkHRuhPEkv8mH8Ll8Cp2+XvnHwnSRdHXYjT9aX+MQlwgT0h2OhuBCgjICAznrx rsH+RUimMuqTLCAWkIE/iMqYqsjJSCKGchzNkDLxp5CyHVEPUhqX2AshL930tsSDATh/L prA2JLass04qVYV4/Jrnl3R+amysf3Zzxrid1ridFdQmfF3xzHMh59fz+CAS0f/LPXcar GRAZF9h1AcIVQYHFOxPvmgLhuZkweYyq2EMVFTK0wnBR46/xBhFXnPm0VpZUziF561w== 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=mHgsH4Zn; arc=none smtp.remote-ip=207.54.90.48 Received: from esa2.hc1455-7.c3s2.iphmx.com (esa2.hc1455-7.c3s2.iphmx.com [207.54.90.48]) (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 8033F606A32C; Fri, 4 Dec 2026 16:07:23 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 8033F606A32C 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) header.d=fujitsu.com header.i=@fujitsu.com header.a=rsa-sha256 header.s=fj2 header.b=mHgsH4Zn DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=fujitsu.com; i=@fujitsu.com; q=dns/txt; s=fj2; t=1796400444; x=1827936444; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=xFU+s3Eprqdh/MN+W9lcyI2CMsWngtXMcNqIcTWwtcM=; b=mHgsH4ZnO/YWoxtE1M0aP+brjnUS0YHGH5gddHWSuNpj7+PKvgUeGbpk giECb3KAgR8E1EqSCgk7cM388l1+pCwdmqSCYfwaVEAyCX7NhLWfNJoi/ GL/Ln0mxN07lerJPOhMfEQY9sTpSar2+97O83wpOwdDcoiumTKtk4S8Go U7XedKB6GiXvxj1H+HVUwWf555KdmLRXD4ZPYf1VCOQENTmsOp6LcAhoN Lw9bFaxKT7mccOmLgA+heNvtBv2DQMsoO9xQ4p0bTUy4BqF/Evklb8whg AP3m3hM1T2SwgyUIXf4z1+SmVYqFLz27DTL42ZLRs5P+PpCS75Sk+mY7e w==; X-CSE-ConnectionGUID: U6thNjlmS12pf3Dk1BaCNg== X-CSE-MsgGUID: +GROMBVBQ4q48t+JkaHkGw== X-IronPort-AV: E=McAfee;i="6800,10657,11986"; a="264263054" X-IronPort-AV: E=Sophos;i="6.29,78,1794841200"; d="scan'208";a="264263054" Received: from gmgwuk01.global.fujitsu.com ([172.187.114.235]) by esa2.hc1455-7.c3s2.iphmx.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 05 Dec 2026 01:07:21 +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 86CB9C05C54; 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 3EF9E1801FDE; 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: linux-coco@lists.linux.dev 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 > +};