From patchwork Wed Aug 10 19:30: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: 12940955 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 3C999C00140 for ; Wed, 10 Aug 2022 19:34:48 +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=HQG+xPa95S9SJ+zZrN+zMGl20mYtcqjWZkE5a7sP13I=; b=JPNbn4PV5rwEMLOmy1zLLOlY7P HKAzZpQInaUoSaKrfD4Hn9QSMrCaury2A/sq9w8WDx9QpZJJh2HQ6DpiGxhS3lRLL1bwgSAXb0ibg 5EH6VhH78CT3+Q5TS+pIu4p+2uhoCq15Fj3YNCOgXObXeIE7yMx3MMYFTYx1m6oqY+TmmtrcKETUT PqGKmCjDBdHwCdv1r+HRNx9k8JpTwmnjC+4nlwdm+Rb5ABVSyn0P4GfleE0bimBnlAkC82sg5mjp5 NutBg9d7Ej+enQcPNeaDOo0O2oXo4jNeFH5gR/ZYzU493AliH+P7xPmM+rqZap+P98v4DV9IekoyJ Br4ckl3g==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1oLrSM-00EDWd-3q; Wed, 10 Aug 2022 19:33:30 +0000 Received: from mail-pl1-x649.google.com ([2607:f8b0:4864:20::649]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1oLrPw-00EBoP-5i for linux-arm-kernel@lists.infradead.org; Wed, 10 Aug 2022 19:31:01 +0000 Received: by mail-pl1-x649.google.com with SMTP id d3-20020a170902cec300b0016f04e2e730so10173161plg.1 for ; Wed, 10 Aug 2022 12:30:57 -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; bh=4ClZUMx8TnkVPiWPppNyKCT9yBDdrvfugyfW4aVoXbY=; b=eth5rcymjcTo6VYe4CYLR2cfYrhUHSgDwphDXVe5M9W77uVjamZK3zEQPkOaz8MeS4 v18WcYItKk9ZR7udLSpcf89ncUrsRl8E52JO0GZ6cpgSHrfsX2fYCvuid4bHHF8HPf6M VsybieO28xH93+w4aUORM8rnRRWfPK8qg4uhN+vSJcDmX/KTUojSyVAaty4iu025crUn vhfdnOeVpgVQ0zQfeT5i0V29ivvaM60SPNcLfBkYjlU1gOQKl/2a8hwlEyB9SnHFD9wY ljJ/GYwGbhbF9yHI2U65mevgovogtg33yQx8TLgb2O2HkI/g6wZ4HGrZlviH543LdqlE x1eA== 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; bh=4ClZUMx8TnkVPiWPppNyKCT9yBDdrvfugyfW4aVoXbY=; b=XYQ+w8gYH37Y2xwEPHG1ywpf0S+BgaMCyZgxEUAFUZ5kDr1yPQwYURRYHA8aFVBhyw yoq3f8cco6dAuOP9iU8ZcbViNLx+oUrWUksPpR/5NTEYnrtGG7rIKJV+yJtduaA14GpX SS/CZ0x2NAY6y75zhlKNeTw4ZqGrpGEZZtotiZ/rPI9tguz7fF9OqvzDwa8cJhDzjTXc xOoAPZqwDAsBQsaefc4/vn1oM0wb3Q6O7rEmAKNgYxrZOjNdONr1J0dxosZv6P0n1FIZ xfl0sjx5evcddMaguNd3ee+ZZoO/df8rtG5Ct0n0F7dWOMWj8+wSVHbGNrRpMtoed941 jaIg== X-Gm-Message-State: ACgBeo20uV3RFv9WZgJrjj3+lianiHmjDPVYp+tD2j2vDzu/XOoSUJWo VlsJL7q4UZly9BcyzkLx2FNDGT5MmJXsRGteSEMoplTA15T+o4DfJvOPHDm1p8JZlWwYQoTNwru tW+H1Gud55u2NuT4LDJ0g5NbwS6Sm0FAc1BPs1Xa7JPJQSh65DdB6blq1JW+hHiEYH1CtPg9q X-Google-Smtp-Source: AA6agR5ruBssTN91JyZyYKhtoX72CT7taSbOJaMPbA/aSzLBfq1S0116heTn2cGcPhGw5MM6Pcu1B5w= X-Received: from pcc-desktop.svl.corp.google.com ([2620:15c:2ce:200:4d8b:fb2a:2ecb:c2bb]) (user=pcc job=sendgmr) by 2002:a17:90a:fe10:b0:1f3:1de7:fe1b with SMTP id ck16-20020a17090afe1000b001f31de7fe1bmr5057895pjb.189.1660159855775; Wed, 10 Aug 2022 12:30:55 -0700 (PDT) Date: Wed, 10 Aug 2022 12:30:33 -0700 In-Reply-To: <20220810193033.1090251-1-pcc@google.com> Message-Id: <20220810193033.1090251-8-pcc@google.com> Mime-Version: 1.0 References: <20220810193033.1090251-1-pcc@google.com> X-Mailer: git-send-email 2.37.1.559.g78731f0fdb-goog Subject: [PATCH v3 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-20220810_123100_239909_E5A88AE8 X-CRM114-Status: GOOD ( 12.39 ) 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 9788b19f9ff7..30e0c35828ef 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.