From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.3 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 535A0C4361B for ; Wed, 9 Dec 2020 20:13:52 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 25FD1239D1 for ; Wed, 9 Dec 2020 20:13:52 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2388141AbgLIUNv (ORCPT ); Wed, 9 Dec 2020 15:13:51 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33236 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730623AbgLIUNv (ORCPT ); Wed, 9 Dec 2020 15:13:51 -0500 Received: from mail-ot1-x342.google.com (mail-ot1-x342.google.com [IPv6:2607:f8b0:4864:20::342]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C7101C0613CF for ; Wed, 9 Dec 2020 12:13:10 -0800 (PST) Received: by mail-ot1-x342.google.com with SMTP id q25so2643169otn.10 for ; Wed, 09 Dec 2020 12:13:10 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=e8PjCwF/fkBvctzYsKsZigRs7c0yUbgHiIHG6Juga9s=; b=BIV963S9gDvXeQAOzns5FeH54xHaZsWE2jkhvfcqjhTbpeqeT0estcM/IfKJmSSHH+ jkh57TwvgmRVvfxB+Qo71cAE0xrZYMHfkKuyI64hd1XQdnL6GMJZlsO2xpbIJrcTcX9V vKHcJUdwk3WKtQciMOSuTQh5G++HPfT/Joq8LGH4unQwsOxA44wujOoCBlvODbfuPGzg el+3ulvnUXnUhmFx+pSJBMi+fGpeU+1aEjt7cOgXEdndQM3eISMcRGcodf14HUz4jTJo bYRVTqY7o9uYWxwgrlTFgr47ReMJfvbUmzJ/WQpWW6Ri+wy8gteEDbtHpTLzD9lngSKX RzwA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=e8PjCwF/fkBvctzYsKsZigRs7c0yUbgHiIHG6Juga9s=; b=jG0oTSRlcUMYXrsoS37HKZ8NujcxIR7aB6vdah2BoFhQ91SkQQFQbLcLv+VaFrvvCM 5IeHiI2S89jFZbf3L926d9ZnhiuDzewcUz2Kk8wtdpyM7xKLbZGQTZUL2yvZ+mJDCGvL dVPqsnPuhjcgdAGoy3RXBYWBi2umbuOb6+bZ71f0cq6kp0ptrcZBeqdAlYrdglCkeWcZ 2IqHtMDegUsvjbpxVmBHNH7HIQstQcJudz2cJ1658A6p8T/d4hsteDBEGpWLGynCAo1I bhZsGJWUtvDQPIQAR+jUZShJkoIkHUUtXCOIuq0koZpiFWNVZMruAnpSe7pOH/8bBU9C Y6Mg== X-Gm-Message-State: AOAM532K8MDyud+immWSj5Bv06iOgMSWn6IUPV/wvujmbM0cWiD+2D/+ 70ZooGEtUnRlY8prIxH0/WVD3Q== X-Google-Smtp-Source: ABdhPJymjhe79Shp+3MxdinfT87wlVy927PQ3peJTbXAMIVFHAHI6bhArk4K6dMUycTMNOoArAw/Kw== X-Received: by 2002:a05:6830:1ae4:: with SMTP id c4mr2163447otd.295.1607544790091; Wed, 09 Dec 2020 12:13:10 -0800 (PST) Received: from [10.10.121.52] (fixed-187-189-51-144.totalplay.net. [187.189.51.144]) by smtp.gmail.com with ESMTPSA id l1sm522451ooi.48.2020.12.09.12.13.07 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 09 Dec 2020 12:13:09 -0800 (PST) Subject: Re: [PATCH v5 0/2] MTE support for KVM guest To: Catalin Marinas Cc: Marc Zyngier , Steven Price , Peter Maydell , Haibo Xu , lkml - Kernel Mailing List , Juan Quintela , QEMU Developers , "Dr. David Alan Gilbert" , Thomas Gleixner , Will Deacon , kvmarm , arm-mail-list , Dave Martin References: <0d0eb6da6a11f76d10e532c157181985@kernel.org> <20201207163405.GD1526@gaia> <874kkx5thq.wl-maz@kernel.org> <20201208172143.GB13960@gaia> <7ff14490e253878d0735633b792e1ea9@kernel.org> <20201209124443.GB13566@gaia> <20201209152741.GC13566@gaia> <8c39b104-39c3-7cca-82b9-2e47d7cb9a9a@linaro.org> <20201209183920.GI13566@gaia> From: Richard Henderson Message-ID: <6b9072fb-1232-e9fb-0b97-e69709980f99@linaro.org> Date: Wed, 9 Dec 2020 14:13:05 -0600 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0 MIME-Version: 1.0 In-Reply-To: <20201209183920.GI13566@gaia> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 12/9/20 12:39 PM, Catalin Marinas wrote: >> I would have thought that the best way is to use TCO, so that we don't have to >> have dual mappings (and however many MB of extra page tables that might imply). > > The problem appears when the VMM wants to use MTE itself (e.g. linked > against an MTE-aware glibc), toggling TCO is no longer generic enough, > especially when it comes to device emulation. But we do know exactly when we're manipulating guest memory -- we have special routines for that. So the special routines gain a toggle of TCO around the exact guest memory manipulation, not a blanket disable of MTE across large swaths of QEMU. r~