From patchwork Fri Nov 4 01:10:41 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Collingbourne X-Patchwork-Id: 13031163 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 0F88BC433FE for ; Fri, 4 Nov 2022 01:13:54 +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=0P2DbS8D+bmQFUteciSB1MYDiq5Cu43m4qjV9USMrzQ=; b=kW1tTGCij0mWrXk0BLaCui5qDR lFanfm3j4fmc044TERt5T/FFwFIwsSgtREUScAcp/T1XLTxjgMBkVDpkuy/ULMUC1BUpx+hcR5j7l CLGsLcVu1eyuquQ7TmaBUZ5xqW+/VZ65eefERBTjSgn68zurlMuC3RPMzVNSjPQ9ICzAhMLfptvPK qOMZ29OPJ4c9aou05tr35n+k4Lb+3Z3SBbO77Zx3a4oRzZ32VmbVWIGckn+KoZphvRmka4TDZc8Bu d7NPZn046UcNczC343gAtfk6hWx+Lo3BVMml0V68uozQwtRm+IgNEq7vYr5ydpASgm7xG84ZNzJlk qvU6nygA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1oqlGJ-0025Af-UO; Fri, 04 Nov 2022 01:12:48 +0000 Received: from mail-yb1-xb4a.google.com ([2607:f8b0:4864:20::b4a]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1oqlEu-0024bL-86 for linux-arm-kernel@lists.infradead.org; Fri, 04 Nov 2022 01:11:21 +0000 Received: by mail-yb1-xb4a.google.com with SMTP id y6-20020a25b9c6000000b006c1c6161716so3628756ybj.8 for ; Thu, 03 Nov 2022 18:11:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=cc:to:from:subject:references:mime-version:message-id:in-reply-to :date:from:to:cc:subject:date:message-id:reply-to; bh=DVyQMJ/hVRvvulqgoMW2WeWXC7WT0Qk0m1EuDV5v41A=; b=PQ01Z/eWCROdg6wptfL9xDEZzpuwG0L8Xm+zs8jhf8zCDIKQHzgHS2nYXtnxlIotzm QK0pJhfhkSTRdHdGFphaXaLW1wNck7vtuv15Cz3sELQBwWxIVmgfSSbPdHUXVm+F1NXE VACBoH2MK+PRd3kTd/87J0HS5jB+JpvZeWsto5Z+1PvCcYoxya2SDs7W63OS/SkKAqYk e4h+LHQ+zRqw6B5kSDX/xzaRtYzuRalDlXNp5zcoGD+hmpQUwJhImh32C5LnLg34BwTP LJ+wnwtZsSakJ7QaJglHzffQdgmQkl/8eLWdd7P/evkLEdw1ajSbxO19hQL9wfyUwZnS +e7A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:from:subject:references:mime-version:message-id:in-reply-to :date:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=DVyQMJ/hVRvvulqgoMW2WeWXC7WT0Qk0m1EuDV5v41A=; b=bOV67IpF4GvRiIvJ/EvxnzNANgErvef6B/VZneuZnkq5NFR+0WJBY6asfuMLpsoyf0 v4ynKrOVRJD5HYXMN1xHVBRA51upbLeFupXTX8fRPKCX0lRHpImgiYoILdEzSl1twHoK /TdFt+ycm3R+0+PrTh855HZAAGNuH8V0u/4+qr+pHUkJwGaBN24IMLONWmLEiwYh6b8q +HUk0DTYKJhCAYHOU9LTimA2yI6eGnNGrjhPGvJ1J7WeXJPqRIAqdAqNr+2ZSTs2BhSl TU/9HDzirNIl9i/ctBg2/qje1n6FGO9JEhmWk5dtvg7FQTLa54NSlTxg9JqmxvUdShAM LOvw== X-Gm-Message-State: ACrzQf3PIqRgs6SeiBiTCbpvpynMTVJpOpu0hjseZl3DcIGN/gghvzYF sX5jT3SrWZ3xTg236CEzIepGQfWoJOTj3MiK/Ud26JzQ+7gd2pvcVjr/CzdqOZbx852pOUkKIIt YwaXSKUh1ovdAR4r0XGQEEHSlZhoSe53x5gzHRur2Z4NETGx5xDEN4UXZ1lCOpkJc1uXr5WSf X-Google-Smtp-Source: AMsMyM5iy+9LxEdaoz+PBI8tytwaj51kRKgjlikY6ojuKPepInTV3TsN3lEgpA/59HjnDyluctdWXjE= X-Received: from pcc-desktop.svl.corp.google.com ([2620:15c:2ce:200:2844:b0ec:e556:30d8]) (user=pcc job=sendgmr) by 2002:a81:7094:0:b0:370:4592:dffe with SMTP id l142-20020a817094000000b003704592dffemr219576ywc.345.1667524278368; Thu, 03 Nov 2022 18:11:18 -0700 (PDT) Date: Thu, 3 Nov 2022 18:10:41 -0700 In-Reply-To: <20221104011041.290951-1-pcc@google.com> Message-Id: <20221104011041.290951-9-pcc@google.com> Mime-Version: 1.0 References: <20221104011041.290951-1-pcc@google.com> X-Mailer: git-send-email 2.38.1.431.g37b22c650d-goog Subject: [PATCH v5 8/8] Documentation: document the ABI changes for KVM_CAP_ARM_MTE From: Peter Collingbourne To: linux-arm-kernel@lists.infradead.org, kvmarm@lists.cs.columbia.edu Cc: Peter Collingbourne , Cornelia Huck , Catalin Marinas , Will Deacon , Marc Zyngier , Evgenii Stepanov , kvm@vger.kernel.org, Steven Price , Vincenzo Frascino X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20221103_181120_308921_85AFC7A4 X-CRM114-Status: GOOD ( 12.26 ) 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 Document both the restriction on VM_MTE_ALLOWED mappings and the relaxation for shared mappings. Signed-off-by: Peter Collingbourne Acked-by: Catalin Marinas Reviewed-by: Cornelia Huck --- Documentation/virt/kvm/api.rst | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Documentation/virt/kvm/api.rst b/Documentation/virt/kvm/api.rst index eee9f857a986..b55f80dadcfe 100644 --- a/Documentation/virt/kvm/api.rst +++ b/Documentation/virt/kvm/api.rst @@ -7385,8 +7385,9 @@ hibernation of the host; however the VMM needs to manually save/restore the tags as appropriate if the VM is migrated. When this capability is enabled all memory in memslots must be mapped as -not-shareable (no MAP_SHARED), attempts to create a memslot with a -MAP_SHARED mmap will result in an -EINVAL return. +``MAP_ANONYMOUS`` or with a RAM-based file mapping (``tmpfs``, ``memfd``), +attempts to create a memslot with an invalid mmap will result in an +-EINVAL return. When enabled the VMM may make use of the ``KVM_ARM_MTE_COPY_TAGS`` ioctl to perform a bulk copy of tags to/from the guest.