Received: by 2002:ab2:7041:0:b0:1f4:bcc8:f211 with SMTP id x1csp18699lql; Fri, 12 Apr 2024 02:08:58 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXdVvJTnMYAmFrc9ZEeM3/hqu4uYuYs+T6jXiOQJodBWiYgN/tSZDZsIrF2F2GgukV7Ml+Ka4pyiFonGlw5ZDI9zVmOiwNhxuhTxF4Q5Q== X-Google-Smtp-Source: AGHT+IHEvIFBajD4vDRT+34ZlMerB4FFvPADEKmvcgZ9+gXN3TH8DgLBNmif2v4cbJB2yyBn1O68 X-Received: by 2002:a05:6830:102:b0:6ea:1323:f216 with SMTP id i2-20020a056830010200b006ea1323f216mr1953413otp.35.1712912937912; Fri, 12 Apr 2024 02:08:57 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1712912937; cv=pass; d=google.com; s=arc-20160816; b=dSs/vqiQ//rKxT9zjRcqVpuHQAN2YkfL4dLel+e7t+1r3TzMyKOEM02kWuTSBj8RDy qCnB2xBbkghZpB8SrArQl49aLbzc/5/igBNp0nOjF46quA1mY0iOunWiYarOapm8WmTh gdXfg7nKQj4cdR482oao3KTxhsoLqwg23ieAwaGTI09+olGvrrVV7qilFhEqt2h5MgD4 OqbcBAESqddVE7Oi6mV9Zf1tdtuOh6DbpR2s9d/2lio0SE32rCB6VNCNaHP8jUxWZU+C e2DoMOpFVG88cytNOOgtGR+ZZfTmmF9va8m23r8LFzYjnXU07q8R+9IkPPYYk2wgvI8S eGJA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from; bh=PcA6ICO+VVJQc3wcdSPzepG0ppeoZVCw4nnB04B1gw8=; fh=NDCPdPn2hiqHaiIRDYQAzsW9PK20CTia4nECGof6enU=; b=eDAS+NKo5igFXPhKRHwPhv7MXpWE+KLNCtFjbkRazQXbwICyTBdSlPv3lp7XETIf5a ZeFFr3crvbM+4nFO2JtJLKurokMd/KqQxv0eZ194RdWMoxBp/SjFanioNXygcfxMzrVm EIWuGrdT0WPlelzORYBDht/dYJqDcdiVPsVt6TilqURsJLEgTupoV2zvSMQ8G1fHu4bI qbVpEgL8vNtZWZIPTUSX0ZJtzR0nDRhrOTYUiy3ERhUiwW+F8xBh/rHI4UotYimsetTC diL3XwbHzySh27lbXkGhbuBD3boO2dgEuWBBQZSth8dVjDDvnYLuIzww5zQ+2wzXCymA cqiQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=arm.com dmarc=pass fromdomain=arm.com); spf=pass (google.com: domain of linux-kernel+bounces-142304-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-142304-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id y17-20020a63b511000000b005dc4300d4f0si2753253pge.444.2024.04.12.02.08.57 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 12 Apr 2024 02:08:57 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-142304-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=arm.com dmarc=pass fromdomain=arm.com); spf=pass (google.com: domain of linux-kernel+bounces-142304-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-142304-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id 5AED728DC63 for ; Fri, 12 Apr 2024 08:58:37 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 7F09812EBE2; Fri, 12 Apr 2024 08:44:40 +0000 (UTC) Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by smtp.subspace.kernel.org (Postfix) with ESMTP id C51D712D1FD; Fri, 12 Apr 2024 08:44:38 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=217.140.110.172 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712911480; cv=none; b=reRd5f1TMNrUzb4RD2F1n5sB8gSU+WSbdAPYGcLPJGi/sRGWx0oXjMx6cN1Hwr0aZctaMN1GTBIcwTb+lMK4dpxaU07c0W3hO2PtZz/JX9tMELmvKzgKo6USgLga52o9VfdLS1jhlbhYwbkd4cjNhRFRLDvojq9yOHSr1mzKAfM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712911480; c=relaxed/simple; bh=AqCUcS/gRURD7Vk64ruXPVhKlKT/z5PyTtKyCdH3lUI=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=RMvX977yV8s2fL7bTBNDbfmb3XrVMoFasGZ1rJxnQ167wWLqF+5torOuThmIlXi+lJ3kd/vmLkDap0OjbHDlXCO12hMn4aLOPu2uxpGLF6Q28QJgSLFm6F24BkDOPMVVGVdJ8tqZX0HgA/pW2aV71pvy1XXQqB+RAq4B3wXQYEA= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arm.com; spf=pass smtp.mailfrom=arm.com; arc=none smtp.client-ip=217.140.110.172 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 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 B796B113E; Fri, 12 Apr 2024 01:45:07 -0700 (PDT) Received: from e112269-lin.cambridge.arm.com (e112269-lin.cambridge.arm.com [10.1.194.51]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 5BC8B3F6C4; Fri, 12 Apr 2024 01:44:36 -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 v2 34/43] kvm: rme: Hide KVM_CAP_READONLY_MEM for realm guests Date: Fri, 12 Apr 2024 09:43:00 +0100 Message-Id: <20240412084309.1733783-35-steven.price@arm.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240412084309.1733783-1-steven.price@arm.com> References: <20240412084056.1733704-1-steven.price@arm.com> <20240412084309.1733783-1-steven.price@arm.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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 2aad83053b62..69d29797c2ed 100644 --- a/arch/arm64/kvm/arm.c +++ b/arch/arm64/kvm/arm.c @@ -284,7 +284,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: @@ -298,6 +297,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; -- 2.34.1