Message ID | 20220722015034.809663-7-pcc@google.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show
Return-Path: <linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org> 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 B8EEAC43334 for <linux-arm-kernel@archiver.kernel.org>; Fri, 22 Jul 2022 01:53:22 +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:References: Mime-Version:Message-Id: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=JHm3xBpy13pgXqXrPR6x2GmE1FxxWIqgAZUAF9WjBTc=; b=r4Ec/JCd8v85pA/a8bMRujI/ZQ iJYjfGXfDzFITGUI48WyxGd39rydrkmyb7/P7dF594hIKPes6wUrCVKNb2vTAJ4ZP6Mc95vqRCjS3 6j9DoZrnX8oY7HRu7q/rOe36aPJcUB8UVhKlQ93ixEtjo0Elqz2IHecMFa7p/Qc3mqrYnpzZCHB2O 3uJ3ngGLxmN9Mxyz/42nVz2tdAU+0kigeFgCFPZBdvbIIYkILNFeLJ+g/iVzc0YRTffsY1hWL8yVX cVROijG75PYgZsbIrz/6r9ZI3hEkewf8soIoy/l15TpaIfcQbPy5efM5vfG5zdjZhtwzsZhwdZiGP LkgcHfsA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1oEhq3-00FoHm-Ib; Fri, 22 Jul 2022 01:52:23 +0000 Received: from mail-yw1-x114a.google.com ([2607:f8b0:4864:20::114a]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1oEhot-00Flx3-MC for linux-arm-kernel@lists.infradead.org; Fri, 22 Jul 2022 01:51:13 +0000 Received: by mail-yw1-x114a.google.com with SMTP id 00721157ae682-31e62f7b377so28370807b3.17 for <linux-arm-kernel@lists.infradead.org>; Thu, 21 Jul 2022 18:51:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=date:in-reply-to:message-id:mime-version:references:subject:from:to :cc; bh=cXHHG5JyJT6/zfSdYwcZ5hplI/Zwtw5pce4ngWT2RP0=; b=B/196tHwJZGxwdFpPDFtGgET20t1oaPOi+B7MforGvjteQqAubrBbnDQDcEDABfdFN 3DK9BLo4bXahlAM1Zsxz6zcxuz6ugGDvcoav9uuevoCJW5/jGeVxKgcMDWkvWNt+YlYE YGooogCFEZU+f/gGBwXExbBhTXJG7xpnwCN4d1QjLWLCX6p/euCGwNgqngATINfEafUZ vmxSUdXRy8210cbejvc/kzSbNqREBTwRlsnUJ3CeOb7E82yXcf7pGch9UX8WepzcpJGw gVDLrfHbXsI5qYh6TeA8MbgK6BZW4I+5FNvZUO3QAWxqrGa639qAV9IpgKC4MjSspDJg W3qQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:in-reply-to:message-id:mime-version :references:subject:from:to:cc; bh=cXHHG5JyJT6/zfSdYwcZ5hplI/Zwtw5pce4ngWT2RP0=; b=hlr2KDQS293AlgqE0ju5KHCHvFcHoQoW9vpXAP9axsRu3M7+8pDXTgg+y9nZ0bTsIc q6cqqlbyRmXOrV28o8cRLwPXL//rNnsslHdI1QFy9+pmfGTFIlEDIzjC4KlBh6H/hjms 8jEAJM5XlnH0eqsl1b2gRo7J0qlY+NHLMcLSEaYNdkN/cWpz+W47zeifknrc8Z08BYJu qzW/DNyAzg1vMcqJwOwKt8Q0thkUdqjRtFIBAd84SUNklP8yH09Xv6+RUoY7rnG8aa1E JHE+V5BMETTfJvi2OF/amHooU/DkWRt0c+5Ucqvol2cBLovVfHAc1twRJJUCNUngstFv zmVg== X-Gm-Message-State: AJIora9bVlLxfhcxizFVREHDJpl5IaprZ9aZtymKZTNdfU1Z89WXaftF ZSJCw49Z/CzLxVE7ZgpaanqIumZzX9eLGDho86l/ap5VZm84NrhiWb8Uoq5ofchG5WAhyCbApDg bbiFqX44Nih5inZ6YnLewrIBmSmWXlePbeAujpQREZ4g/5CqdCOhjDQcp/K4Y+NNNeJvy7gpV X-Google-Smtp-Source: AGRyM1uyeQgFMIiL2ECknr9YM3j6WFlHrejpaFbSL4QcZoqTrnLYKShMPao1gximyv/6/63IGwrd5rM= X-Received: from pcc-desktop.svl.corp.google.com ([2620:15c:2ce:200:7ed4:5864:d5e1:ffe1]) (user=pcc job=sendgmr) by 2002:a81:124b:0:b0:31c:fc99:d4de with SMTP id 72-20020a81124b000000b0031cfc99d4demr1273232yws.348.1658454670287; Thu, 21 Jul 2022 18:51:10 -0700 (PDT) Date: Thu, 21 Jul 2022 18:50:32 -0700 In-Reply-To: <20220722015034.809663-1-pcc@google.com> Message-Id: <20220722015034.809663-7-pcc@google.com> Mime-Version: 1.0 References: <20220722015034.809663-1-pcc@google.com> X-Mailer: git-send-email 2.37.1.359.gd136c6c3e2-goog Subject: [PATCH v2 6/7] KVM: arm64: permit all VM_MTE_ALLOWED mappings with MTE enabled From: Peter Collingbourne <pcc@google.com> To: linux-arm-kernel@lists.infradead.org, kvmarm@lists.cs.columbia.edu Cc: Peter Collingbourne <pcc@google.com>, Cornelia Huck <cohuck@redhat.com>, Catalin Marinas <catalin.marinas@arm.com>, Will Deacon <will@kernel.org>, Marc Zyngier <maz@kernel.org>, Evgenii Stepanov <eugenis@google.com>, kvm@vger.kernel.org, Steven Price <steven.price@arm.com>, Vincenzo Frascino <vincenzo.frascino@arm.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220721_185111_755596_51F8975C X-CRM114-Status: GOOD ( 12.57 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: <linux-arm-kernel.lists.infradead.org> List-Unsubscribe: <http://lists.infradead.org/mailman/options/linux-arm-kernel>, <mailto:linux-arm-kernel-request@lists.infradead.org?subject=unsubscribe> List-Archive: <http://lists.infradead.org/pipermail/linux-arm-kernel/> List-Post: <mailto:linux-arm-kernel@lists.infradead.org> List-Help: <mailto:linux-arm-kernel-request@lists.infradead.org?subject=help> List-Subscribe: <http://lists.infradead.org/mailman/listinfo/linux-arm-kernel>, <mailto:linux-arm-kernel-request@lists.infradead.org?subject=subscribe> Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" <linux-arm-kernel-bounces@lists.infradead.org> Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org |
Series |
KVM: arm64: permit MAP_SHARED mappings with MTE enabled
|
expand
|
diff --git a/arch/arm64/kvm/mmu.c b/arch/arm64/kvm/mmu.c index d54be80e31dd..fc65dc20655d 100644 --- a/arch/arm64/kvm/mmu.c +++ b/arch/arm64/kvm/mmu.c @@ -1075,14 +1075,6 @@ static void sanitise_mte_tags(struct kvm *kvm, kvm_pfn_t pfn, static bool kvm_vma_mte_allowed(struct vm_area_struct *vma) { - /* - * VM_SHARED mappings are not allowed with MTE to avoid races - * when updating the PG_mte_tagged page flag, see - * sanitise_mte_tags for more details. - */ - if (vma->vm_flags & VM_SHARED) - return false; - return vma->vm_flags & VM_MTE_ALLOWED; }
Certain VMMs such as crosvm have features (e.g. sandboxing) that depend on being able to map guest memory as MAP_SHARED. The current restriction on sharing MAP_SHARED pages with the guest is preventing the use of those features with MTE. Now that the races between tasks concurrently clearing tags on the same page have been fixed, remove this restriction. Signed-off-by: Peter Collingbourne <pcc@google.com> --- arch/arm64/kvm/mmu.c | 8 -------- 1 file changed, 8 deletions(-)