From patchwork Wed Dec 6 10:05:02 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Fuad Tabba X-Patchwork-Id: 13481568 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 C3806C10DCE for ; Wed, 6 Dec 2023 11:15:37 +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:Cc:To:From:Subject:Message-ID: References:Mime-Version:In-Reply-To:Date:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=QwfzzQHGUeDxmwIw8VKudfBYbSoQl1DrrbHIy2Ly/tA=; b=VObnByTNZ7iTjbxQ37mQGNGvVK Vd/1oShJtfueBJl3AAiOKq+9dXAoxr45CdJvEfzFbpvFA/6dk1yHxW3PILSHqU4SNXQdYPbse/hwk fpLpxt3xezSAPm0MY0sMm/91+3Yj+inQD7BM0OsweKiiGo74Xua+cJwYHZyPfj6sAd+v/BWX18mZC eml0eyR6MKfYihVZcdfp/+LeC/Re9v8nEfLbJAO4kXczDXjp7Nc+5dISNAvcKFlQnFwmHtYz14Dn3 pl3Za6k33BXyHw8IUrVLyqs56u6r/RrFibLhtkBLty2jG2GQCCBgOEOfNug63SlBpM06WdVTzmbO6 O7zyDiTQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1rApsL-009teg-2f; Wed, 06 Dec 2023 11:15:33 +0000 Received: from mail-yw1-x1149.google.com ([2607:f8b0:4864:20::1149]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1rAome-009dFI-17 for linux-arm-kernel@lists.infradead.org; Wed, 06 Dec 2023 10:05:37 +0000 Received: by mail-yw1-x1149.google.com with SMTP id 00721157ae682-5d9c036769cso22735247b3.2 for ; Wed, 06 Dec 2023 02:05:35 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1701857135; x=1702461935; darn=lists.infradead.org; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:from:to:cc:subject:date:message-id:reply-to; bh=xUiJNYgu3BcJ5Sp8pydb/vXasIJyg0fyLlEISb7NPAM=; b=YI/P/JF1D7c0VTlGw/upKrLaYqaicNClLvtGE92pUhLYrDotxopybGhd3XEv7+oAbb IO097h6tUMK6gyS5fe83k0gd5UDoime9SSdl/bpFfvTXyvOnjJHmLMXXT1l5PFAKGGb8 4Ix9DcYhvGFaaIsRsqIX9RzIhg6EAiRAVPvBjoockOCEGvTdnb+YG3T6k2LRj+byT9wc I9mIwHNmBW8K+TdEnGDNwZSxMZt/dgiN7/ncXduH58ri8uSETFwFWPIu3vXmSS3pDEqZ 1jV3IWpP9c0JPpXk11Xo4Mc7zgXHdhjKR1lNTODNEgTnpkydW/FlOQgqZVuEaSN1fV5T IgaQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1701857135; x=1702461935; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=xUiJNYgu3BcJ5Sp8pydb/vXasIJyg0fyLlEISb7NPAM=; b=CrjPzxtBj4cja9ArIJbuuk4NnKrD1MXUVWKfwLdqT0SnmutaUzFo8MgyYXy6bDdEXF V+D7ZuWEcNTzCI7QeDgK0L3qcYVYeb7eVHKoMtuDlRKPqsGgw0JVebHkBWG5qR8bziVl aNPQsazFbgvB9yQVCYJbqfTxiueH0zH2ZmlcjK7oISjLbA5EO6ec64XVOFOIkui6QnOd SrkS/yLocE6z9mfWstkqxyrxfY74RtdgSjDnz3VQ/0ATxb49JmEO+RcTX90c+YksZyXD qTAU2KELm5xWfdN57XGfQizs+QCYFSezaxMFLjongARnVI3iJv9NylOn/m2S8G21oZQi ukCA== X-Gm-Message-State: AOJu0Yw8yJkTfkhCq9ONZAXg7uDpS260usbNrWptQC6I60IVpJnlpWOq WK+7fH0fgsm6/wra+4s8kldzJGUy9A== X-Google-Smtp-Source: AGHT+IFGRw3zitwl4XnEhwjmIR/zDmnE2y22FrkJSb1iLC2yNmu9JaaASYyY8nJsZ4cyowrGUlwSuBOEsQ== X-Received: from fuad.c.googlers.com ([fda3:e722:ac3:cc00:28:9cb1:c0a8:1613]) (user=tabba job=sendgmr) by 2002:a25:d751:0:b0:db7:d315:6643 with SMTP id o78-20020a25d751000000b00db7d3156643mr4262ybg.6.1701857135072; Wed, 06 Dec 2023 02:05:35 -0800 (PST) Date: Wed, 6 Dec 2023 10:05:02 +0000 In-Reply-To: <20231206100503.564090-1-tabba@google.com> Mime-Version: 1.0 References: <20231206100503.564090-1-tabba@google.com> X-Mailer: git-send-email 2.43.0.rc2.451.g8631bc7472-goog Message-ID: <20231206100503.564090-13-tabba@google.com> Subject: [PATCH v2 12/12] KVM: arm64: Mark CMOW as allowed for protected VMs From: Fuad Tabba To: kvmarm@lists.linux.dev Cc: maz@kernel.org, oliver.upton@linux.dev, james.morse@arm.com, suzuki.poulose@arm.com, yuzenghui@huawei.com, catalin.marinas@arm.com, will@kernel.org, eric.auger@redhat.com, jingzhangos@google.com, joey.gouly@arm.com, tabba@google.com, linux-arm-kernel@lists.infradead.org X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20231206_020536_403787_1BC98F0E X-CRM114-Status: GOOD ( 10.55 ) 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 Cache maintenance operations are not trapped for protected VMs, and shouldn't be. Mark the feature as allowed. Signed-off-by: Fuad Tabba --- arch/arm64/kvm/hyp/include/nvhe/fixed_config.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/arch/arm64/kvm/hyp/include/nvhe/fixed_config.h b/arch/arm64/kvm/hyp/include/nvhe/fixed_config.h index e91922daa8ca..e628541585fc 100644 --- a/arch/arm64/kvm/hyp/include/nvhe/fixed_config.h +++ b/arch/arm64/kvm/hyp/include/nvhe/fixed_config.h @@ -101,6 +101,7 @@ * - Privileged Access Never * - SError interrupt exceptions from speculative reads * - Enhanced Translation Synchronization + * - Control for cache maintenance permission */ #define PVM_ID_AA64MMFR1_ALLOW (\ ARM64_FEATURE_MASK(ID_AA64MMFR1_EL1_HAFDBS) | \ @@ -108,7 +109,8 @@ ARM64_FEATURE_MASK(ID_AA64MMFR1_EL1_HPDS) | \ ARM64_FEATURE_MASK(ID_AA64MMFR1_EL1_PAN) | \ ARM64_FEATURE_MASK(ID_AA64MMFR1_EL1_SpecSEI) | \ - ARM64_FEATURE_MASK(ID_AA64MMFR1_EL1_ETS) \ + ARM64_FEATURE_MASK(ID_AA64MMFR1_EL1_ETS) | \ + ARM64_FEATURE_MASK(ID_AA64MMFR1_EL1_CMOW) \ ) /*