From patchwork Mon Jun 10 13:41:53 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Steven Price X-Patchwork-Id: 13692184 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 71ED3C27C55 for ; Mon, 10 Jun 2024 14:48:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=I6WTZ7RclIy+CN07HMpK8tg/ruqZrp06ef/+Kz4Pcow=; b=US6MDazilBmdTj DHViXiruoKysje3kq4CW7xS6EtEMepBGjXlxDH6jJXB1vwEXx1w0qLW8eH9dDJZpb0mlyeD1a/n7A vlE4O0ANzX2rXeR0J7Bl7YoOBaokcVQlxe0AxtQ0ThEVaeDu2ck1lm0RRO9ku91e408FNXEfBIANw 4cEh3qKod0UWViG1CePQHpjOZYGWU/AP3ekmjIgiynM774mTnFB2MhXvEabXfNRnYZvezgNIh3BY0 NoFP5K16CwdiXbgVGpek5RKkqhP6Jv3t4PR7AWF4C7QpBi6UV7QTckgj5QKGgM4SzECtZbwGm7mrN bPcGH1EqUsak3z2Vr5og==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sGgJh-00000005UVJ-3IfY; Mon, 10 Jun 2024 14:48:13 +0000 Received: from desiato.infradead.org ([2001:8b0:10b:1:d65d:64ff:fe57:4e05]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sGfJp-00000005ELH-2vpN for linux-arm-kernel@bombadil.infradead.org; Mon, 10 Jun 2024 13:44:17 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=desiato.20200630; h=Content-Transfer-Encoding:MIME-Version :References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Sender:Reply-To: Content-Type:Content-ID:Content-Description; bh=/8oNUMjoIHmx6CJ/J0MueZU4A6ubx06iOGjRs6PTMOs=; b=hlScolnGdMn8wxjWE4GMygt37v 15RfrAzb7/3jbU/pbC3rXc9FIS30gvbKpeFzRKQ9xpEKhuvtgGi5x6iL2YUkEH4Yv4wG1fj/5+lvJ wPC42WEFhbdxkcD3q7nAWbsCgxUGwPbKcnCyEcHGEPli2Xx2KDN19TwMzCvihrn1C3mvVK+8iwkkn ycSlJUjyi7N2Jt7t/qG5J7LAUCbLMpa92ZhMksC/0agXFHCBoCRU3fAtt5BGFeKR9nL+J+nXS4j8N lQi0Vpb0OcaWUyR/qVe3zlTieBs8fUlwj7fu2lz1dWLck0bTH+d8fQn7ZyBjJaRntBLfLzAEvb/70 OAS0YPlA==; Received: from foss.arm.com ([217.140.110.172]) by desiato.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sGfJh-00000001S8l-3R0s for linux-arm-kernel@lists.infradead.org; Mon, 10 Jun 2024 13:44:15 +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 F3E6F169C; Mon, 10 Jun 2024 06:44:32 -0700 (PDT) Received: from e122027.cambridge.arm.com (e122027.cambridge.arm.com [10.1.35.41]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 06AD53F58B; Mon, 10 Jun 2024 06:44:05 -0700 (PDT) From: Steven Price To: kvm@vger.kernel.org, kvmarm@lists.linux.dev Cc: Steven Price , Catalin Marinas , Marc Zyngier , Will Deacon , James Morse , Oliver Upton , Suzuki K Poulose , 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 Subject: [PATCH v3 34/43] kvm: rme: Hide KVM_CAP_READONLY_MEM for realm guests Date: Mon, 10 Jun 2024 14:41:53 +0100 Message-Id: <20240610134202.54893-35-steven.price@arm.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240610134202.54893-1-steven.price@arm.com> References: <20240610134202.54893-1-steven.price@arm.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240610_144413_556895_D23AAD1D X-CRM114-Status: GOOD ( 10.12 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org For protected memory read only isn't supported. While it may be possible to support read only for unprotected memory, this isn't supported at the present time. Signed-off-by: Steven Price --- arch/arm64/kvm/arm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm64/kvm/arm.c b/arch/arm64/kvm/arm.c index e642484e3611..b04f08e242a6 100644 --- a/arch/arm64/kvm/arm.c +++ b/arch/arm64/kvm/arm.c @@ -363,7 +363,6 @@ int kvm_vm_ioctl_check_extension(struct kvm *kvm, long ext) case KVM_CAP_ONE_REG: case KVM_CAP_ARM_PSCI: case KVM_CAP_ARM_PSCI_0_2: - case KVM_CAP_READONLY_MEM: case KVM_CAP_MP_STATE: case KVM_CAP_IMMEDIATE_EXIT: case KVM_CAP_VCPU_EVENTS: @@ -377,6 +376,7 @@ int kvm_vm_ioctl_check_extension(struct kvm *kvm, long ext) case KVM_CAP_COUNTER_OFFSET: r = 1; break; + case KVM_CAP_READONLY_MEM: case KVM_CAP_SET_GUEST_DEBUG: r = !kvm_is_realm(kvm); break;