Received: by 2002:ab2:784b:0:b0:1fd:adc2:8405 with SMTP id m11csp373856lqp; Mon, 10 Jun 2024 06:52:50 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWIX+0is5agIx24PYSVeJdK99SuQIZDZ4OWh6JjDPwG6rrB0UGHDacvPW1pqhrB90dJu6BWfIrL8FIfTJ4bnU1oXE22plnXQu3Mvf5lcA== X-Google-Smtp-Source: AGHT+IFkW8tSlssWYkfZ0NCETHItpn+3ewMDD7EJ6NuVfZLaZTZxZGxUSBOJ5XwzjEpflSKlFfD+ X-Received: by 2002:a05:620a:450a:b0:796:af63:b7d0 with SMTP id af79cd13be357-796af63bde3mr243460285a.47.1718027569778; Mon, 10 Jun 2024 06:52:49 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1718027569; cv=pass; d=google.com; s=arc-20160816; b=IpW+4NCvZASyIgxUeYoLLlBgvG93ks88ideRgya+WmvCM3DZGlJq26ZhYWaK4+LGu7 4DJsSEKo2eQQ5L/Ie4JBq++Bc86OmR1Fskr6OEe4+cKa4CkVLiR/4Me66GMl4Mnn1/bG qH7drYmWlZt4egAZ1pY+CNerUe82+UP2fEWV0lS4sKXSBlhp1P1C5MqzRG0Abhun/zRP e15qr3q+ocyepY0Bq1xooRj061ysx5z7ZiidryIoYNwT1qzMAZ4lKy5yuxYkvhR2FQfQ 5y5rmjvDHgktedmDBYBDsPOL24qRXlCHkuPkot9w2Zmhdv6H4HFlwMzmBfM80zWb3rol bKfg== 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=/8oNUMjoIHmx6CJ/J0MueZU4A6ubx06iOGjRs6PTMOs=; fh=NDCPdPn2hiqHaiIRDYQAzsW9PK20CTia4nECGof6enU=; b=JSWFAYSg2OpHiWj/SbqMMNkIP9QhmOooe0tnevumbax6KgibJHhi85lelQJ6jS2O3w bGwuUQ3Y+MdOSDT05I5HOoiiBA1x6gY6KpHiM3vxYPz4IyTbGY3D0ZFKDbbNU1ROvahH FwfzSZG3AkyUW+3Dh68+boN2K6dP+EeN1PKXtUTQQoAkviXT4K8xtMJ9hnP2SQaZqZZw O06F8xEmR9gOaQKaIXZ5QTOx1uyPPfU+urUdqc+UkGrJVVM8MygmxrKdsqw9ryDrgCYS 9UXJqtQeuko+oL9gxLjKF4MPDQOfxid9qBgVyB7ATmZb1ImG8tHe8PWGlGLArXAK/bqr HJzw==; 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-208280-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-208280-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id af79cd13be357-795331d2e85si1100241185a.237.2024.06.10.06.52.49 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 10 Jun 2024 06:52:49 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-208280-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; 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-208280-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-208280-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 ny.mirrors.kernel.org (Postfix) with ESMTPS id 7E64D1C226E5 for ; Mon, 10 Jun 2024 13:52:49 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 82AC6156F36; Mon, 10 Jun 2024 13:44:10 +0000 (UTC) Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by smtp.subspace.kernel.org (Postfix) with ESMTP id C3F2813E058; Mon, 10 Jun 2024 13:44:08 +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=1718027050; cv=none; b=Fmwj/xkaYkqz48kUL3ssVFE6nTCk8RuSW4jQma4LggkcUuN9T7ZhxfoEWrVboYbPLSGeKL2imDWDvRxR+2FjMtpVW8Fg1qLEPXgQjKzQdrUvJq4ViexpHKwDzjcoXYgfleAgmX1skqpLSSPR2uIAdEFwxfKUgkEPUuztGhnSTdw= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718027050; c=relaxed/simple; bh=6o0hfap9T2Anc1/LIyXBFzP+0/36ODrXRTAniVLk7kI=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=G2LpQRs7kd70qerQpeCebLN4yRWg8arq4qgosD5iFGNN5/5wOY9TxJSJ2qNJM4rf8a4ZV7acfujVTAdDAGMbqSyHZCiKz4y2jnVInrZAAROrRH72MNqorqy5P38i9BfyD0ZwKxsWP5X4Dj68anPmGXt3ig7mf8PgfQtYX2glCX4= 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 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> 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 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; -- 2.34.1