From patchwork Wed Sep 21 03:51:40 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Collingbourne X-Patchwork-Id: 12983198 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 15F5DC32771 for ; Wed, 21 Sep 2022 03:56:25 +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=7ua8RIYuF2fduqF/SDREZFkoX6GHKNX1REa5RBqhPkk=; b=Ofz5AZt6zVfiICYd5WeRhG7mwe PeovUaFatcHZXG/ZKVGwo/ie1aIEsfjZOjnZ/iBcj22QverbEY8JS7rzZFKm54LE21pIe3FGhcEZi zC8z416YpBhvGHb/t8Enoj/zQv254Ye9g+qMxQgNznlakd73eV4uQEkFssiPGe0lD15Ss2W3cPxvj hlxAmqMvGql/NkU5BRRHqjH5Oi2ByRj95qZo1aL7u6Dw3a1eZCq9gxALr9tAJgHDK+HvqRomX9jMx pk+eIJCJZx9SFDTb+bF7zusU8vHERHc0OjSR9W5ETBpzHf+4W+sdPaglBoNivpf/JgI41YEX7uX3i 9ImjGGOQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1oaqpK-008gmu-44; Wed, 21 Sep 2022 03:55:10 +0000 Received: from mail-yw1-x1149.google.com ([2607:f8b0:4864:20::1149]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1oaqnP-008fuk-Kw for linux-arm-kernel@lists.infradead.org; Wed, 21 Sep 2022 03:53:13 +0000 Received: by mail-yw1-x1149.google.com with SMTP id 00721157ae682-34d574f77b7so1987557b3.15 for ; Tue, 20 Sep 2022 20:53:10 -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; bh=4XpPYlBUoO+WRk0V0AWUxRzw3Rg/SavqF4W61Vi+Vh0=; b=YI9YTrZeD2JX0QYLMS9rcEsnQKi2nn+tGC4bgSYbMP88F+TWT+sfC+ABpLRV9kABWZ 7IgDYo1oeJdskEllVO50FzDiU7l7NtZW1ZjvRXgSBWwB/twXdM9CImyLjjepysc2aCFF FWhGgsOWXR8PXvJ5fSv5UJ+XWR3aq8m1fg37xeWmB5zdYkFPeDIHXAFb5eSxTKhotk9m SfDuXaI4J1IeLrvxsbOHF/LjFdfqyDNhi/bZh+cl4Y90aJQb1S845E1VB7M3fjogATDm 1Iz7A82xrGtHr6v7V+JxrTSyfqLLEVxoCFAz+Ju1mqkNGkX9SSPkaQJgWyaHt7R1fdhA 7Ykg== 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; bh=4XpPYlBUoO+WRk0V0AWUxRzw3Rg/SavqF4W61Vi+Vh0=; b=1ce5+e5+jtGgINf8T3EsvGrlxnpyo8VFmbE7s7faSjgCEAaBqGL10yKXgDiJEgCCkK PYjYFUj/4ne8tzU3L5PzP9do33MpXdkB8ZyWELo6cNqmtKhs01AmP7LZELs6zJvv/KRQ w+TUE6cYQNVRWy6uY8rTqsfHgGsTAGKdD+3MiV8iwKV4wwZTSrHI1yEebCaxES37U6H2 ah2F7mxFmDjXJO2+tqEI2wRCYnWa14x14jZE0iKpNc5CBzOWNB+rUEdl+RS9703UbLtR eMOq5EsJvglJQfiymfpRv5R6jLRKbFuD9FCinzMUcd4hxhOhzgfDBSWn5lIWrojQLNxv yDFQ== X-Gm-Message-State: ACrzQf2cOhotWeLVdWV31yrhh561B2TlAlqWe8FC7VUkmW6BDAXmPSPI +7xWFp12foxXjvTyq2R9OGReKo8a5S5bobyVmXOR06FH9xxWtt17OMX2XzMHRGIWuioWVMudWg6 dk8o/VzeafIxN86OUuKu9zG5GFMxSCnp7Y48CbwLWOVAnAo32mXEL3UBJiFa+YezR57QPQhlo X-Google-Smtp-Source: AMsMyM4h7TI5G+sFMd7rTrrgzthVtJC4/9i0nc1N+1MngQu+uhxfzMb9nU4Ew6v+tvv2pLYsS0wjV3c= X-Received: from pcc-desktop.svl.corp.google.com ([2620:15c:2ce:200:1b89:96f1:d30:e3c]) (user=pcc job=sendgmr) by 2002:a5b:a0c:0:b0:6b4:446d:2f9 with SMTP id k12-20020a5b0a0c000000b006b4446d02f9mr9242835ybq.138.1663732390317; Tue, 20 Sep 2022 20:53:10 -0700 (PDT) Date: Tue, 20 Sep 2022 20:51:40 -0700 In-Reply-To: <20220921035140.57513-1-pcc@google.com> Message-Id: <20220921035140.57513-9-pcc@google.com> Mime-Version: 1.0 References: <20220921035140.57513-1-pcc@google.com> X-Mailer: git-send-email 2.37.3.968.ga6b4b080e4-goog Subject: [PATCH v4 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-20220920_205311_724638_95B54CB8 X-CRM114-Status: GOOD ( 12.73 ) 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 --- 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 abd7c32126ce..7afe603567fd 100644 --- a/Documentation/virt/kvm/api.rst +++ b/Documentation/virt/kvm/api.rst @@ -7486,8 +7486,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.