From patchwork Fri Jul 22 01:50:33 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Collingbourne X-Patchwork-Id: 12925885 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 1A976C43334 for ; Fri, 22 Jul 2022 01:53:45 +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=HvfWnHEFdTgaQdh5sH820+Uv51/ANLsb9QqbOfSkDFw=; b=oyK/hO1iK4BHCG/LnMu1pze4R/ MYKReJJ5ZwLll4PU83Hnpw46kU9xeypTykDzNmsrXnUQlKzLJ9FifBCrzoTx4dzInUFVxp7ALXCmf MRIrw0X9rpuOZ/W+2rbes0fm6XL8lcAnMxVw9jRyKrMNizfSdjA8HFvvAx2lN4f1tljZeNSqlOx0/ JPlfLw2e+g/tnoHqVVttZBhVIokqNsrB2uZIJMW9B7+gxCSI6tOHPmsHhXqaxBTEVNo9iMIqJpD9I hR7iENUVj5+9eIIGi41m+8KkMV754FiCEIEmURGpFawt7f5FCcZTjsB2BWCPr+r0stwVkAEpGfm/T 85DFvj9Q==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1oEhqO-00Fop5-UP; Fri, 22 Jul 2022 01:52:45 +0000 Received: from mail-yb1-xb49.google.com ([2607:f8b0:4864:20::b49]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1oEhow-00Fm8B-Pw for linux-arm-kernel@lists.infradead.org; Fri, 22 Jul 2022 01:51:16 +0000 Received: by mail-yb1-xb49.google.com with SMTP id f85-20020a253858000000b00670a44473e2so2595044yba.9 for ; Thu, 21 Jul 2022 18:51:13 -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=h8uEQ9pObe4PCZBHvRMWu04/OqsxiUE5izQACc/t1qA=; b=Ukex56V06NQTMwxsfTfflZTIhlPAb6x0ltdKx1zBysm7RfXqd7wFZZQRKyH0VzOFQr Y+L4jMyhTpQ+5w62O8ljEcGyetRTzpXeuJgVDGx43FYmUqMCaazs1z2HBznVt+e4xRTq 8BTFjP0UISkfuw1zjrGHTk4NeN9Gui7Aq8k3JLm7lnIxA8ow7cBGdHuEknVOeG4Zq2jJ J9377HHBqBU/OmUz2MYbyVym3D1J4ix3ONzdHWHv+cgfaKXYyjSk51Fxzzm8xDa3ZIuJ bPVIvVXhJSKu35qiAyGNuqhVJ+94oMqsxGmrvFTR76HbL2jMIv5z7gCGfkLNOmC1jMDe iMpg== 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=h8uEQ9pObe4PCZBHvRMWu04/OqsxiUE5izQACc/t1qA=; b=bfFBCTUIiF/03H4us3O0WU/SISNB00UpZtU/7vwaGYi0efRv8hlhRDD41seKA6RhGy 36xaLCmi6prWq3oUS2h/A8IguXctcNseD9R2NvwmV5QrRAAwJnXSmr/SkFEWqvzO+yz2 fg+apaoA51KyH6Ik3+JNZ6ghfP7SlDy/NmXkNq7F5AY+zjN7opTPhyulXa6C9K8pnPwc UMhrZ+JAuu92L6YCve5pyVJbfRpkmu99jPUQhQ7YiF4HRKqxz5sj73yXJHYp6UhvBmW8 Z4JvvnjK/F/0EoZG9uv33ODi8EjhqEQQ/cZ+j25yQE3JuEjGza35cNq3bTfSvdWmsFo0 46IA== X-Gm-Message-State: AJIora/hyK6p6eRuedOunzEw0tbd0yw5+eEFJSKbJbnFKT99YWw54kX8 vzUDICkjGgZ/CTkVUu6392wb2eKpY6dkdA3vxDtqCF3cQafcHlGcc35nN25ELxk98ye+f7SWdrZ xAByx9dap/fwebBHkpKtTQJnKq6HUl3+hKezWO8RmfB8N9kemI3gyF+QJGqNXcSyUd++HfKwS X-Google-Smtp-Source: AGRyM1vtD7rOxtriQj5Ecvofp6SqMq07c0PbfEhxrYPq2ZOkp7UkUbp02IAcwvO8QMo59HdQ9f5IQn4= X-Received: from pcc-desktop.svl.corp.google.com ([2620:15c:2ce:200:7ed4:5864:d5e1:ffe1]) (user=pcc job=sendgmr) by 2002:a25:5ec5:0:b0:66f:b76a:c5e9 with SMTP id s188-20020a255ec5000000b0066fb76ac5e9mr1185482ybb.334.1658454672828; Thu, 21 Jul 2022 18:51:12 -0700 (PDT) Date: Thu, 21 Jul 2022 18:50:33 -0700 In-Reply-To: <20220722015034.809663-1-pcc@google.com> Message-Id: <20220722015034.809663-8-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 7/7] 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-20220721_185114_877249_7D3CDFB5 X-CRM114-Status: GOOD ( 12.17 ) 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 --- 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 ebc5a519574f..5bb74b73bff3 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.