Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp3343478pxb; Sun, 7 Feb 2021 06:15:15 -0800 (PST) X-Google-Smtp-Source: ABdhPJxqcZ9Y+A6egK/Gdg+zESxJs2jHp7p41WlvN5ysxQH8sR2Xa7yaTE+CnqGKkmTAbWonc9gn X-Received: by 2002:a50:a6ce:: with SMTP id f14mr12740219edc.346.1612707315280; Sun, 07 Feb 2021 06:15:15 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1612707315; cv=none; d=google.com; s=arc-20160816; b=05GDVVHJYudorq3KjbVzrKdYjCDLRzvXq8YKvXtFMOL0iV3AtNdQiA4DZ3QECrI8KY v9SZPnY0pb6tf/P2hchpYf3Y+H4bD87TnyUM31nPNi3BqE8vM3PjpDOsh8Y7hmUorAom YWnaWw9mEzLdNYNHpCiWlyArqtCfG7rLnzvoH12IYTyNt8rWcnre0PrNcBkaB5GlrgRK nxhcbYn8eVAhQK2e7niRHjohro4+H7jQb3rqSFxnst7c/MBbEEmGjtt1gvuR88T/AXWE xLrbcPFGaAC67jT4aJaWLY6xz72HAWo2J20ah5tp8do5//jEXh88FntN6bje2xFed1TL 1wBA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=s4WZ+XQ2gzSoSrd61MbApkvoEwH993k7eH2ccgmvEBs=; b=uHmgktSg0W4MjIkzemy1c3NB3PNF4DZo5/+cHg8Mq8InT0c5aKDHi3GJ1wpc+tw7qB NNIG3wNJqINMeIBpZ/nwqL1NO6gsu+EH769gIlt1qhEv/F8pR1QlPc/aBmvlCc/LTVnw /FILMEMSTs3Tdp/dD2syLuK2GsYCpMz3yPP7F+IJ91hz9nPizNH2V7KAET1yo7a+XVgt rv1Vn6/nDEpNTgj8dqmoj/es9iZOVixMQk73ZlyTkhuvgrT8nnNysgQiHiIAZQyVeaXN OY+eSsUbOr1IlikQcMrK6BL7ZdBk3KxxCoPJyFRfp0rV8X9ytoMFXaIzH1r4e39IdCRs Bgow== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@shutemov-name.20150623.gappssmtp.com header.s=20150623 header.b="SLwO39e/"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id g7si8899992ejh.224.2021.02.07.06.14.51; Sun, 07 Feb 2021 06:15:15 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@shutemov-name.20150623.gappssmtp.com header.s=20150623 header.b="SLwO39e/"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229846AbhBGOMb (ORCPT + 99 others); Sun, 7 Feb 2021 09:12:31 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41628 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230064AbhBGOLr (ORCPT ); Sun, 7 Feb 2021 09:11:47 -0500 Received: from mail-lf1-x131.google.com (mail-lf1-x131.google.com [IPv6:2a00:1450:4864:20::131]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CB7A0C06174A for ; Sun, 7 Feb 2021 06:11:06 -0800 (PST) Received: by mail-lf1-x131.google.com with SMTP id a8so18086051lfi.8 for ; Sun, 07 Feb 2021 06:11:06 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=shutemov-name.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=s4WZ+XQ2gzSoSrd61MbApkvoEwH993k7eH2ccgmvEBs=; b=SLwO39e/colkQuF4viAXoO72fETD80UbjCemU3uAyTFLCuY5B58Ub6jSr745S6xJbG xR3t7kO9c/H/SeeGLjP23z4MFz+RML2B/VzhUijlLtuuK3gZ1cJyzW3Hc77lxpjedJNv Q0a2HfmY74qW7tOS+4VGQRYxR/rHCeCKQ3i/M5FnLh5Eh6pBOQ5JbMcPOoYuvFVFiK4O Zuh7eDnvUF70o/0lm0S/NUNKJv6LshS4prPO6f4+jy0scJUnXc4PRNSFYDNMeFndM5SG JUELsxUujdJeLQEEq90/KCAMsrMcc0XHHGBsq+FLRAIkU/8yCjUUDS4x+shNJnC3h5AZ ZMqw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=s4WZ+XQ2gzSoSrd61MbApkvoEwH993k7eH2ccgmvEBs=; b=ss+VO9pzOTT+JIn5k+pJ5zCKy7OhHqJ713TwyhoMaYtJgNetx3UXUV8p7rVsL0b2mn o/O991U/WR1oavZHguUxSrXnMd2O+uJQ3echTqvhBFnGjNAuuz3xsH3M1HKxq9RKfUN+ KhwoiWTucTlCKj/c5Rw9NjImJH5Hk3g001LxTmz/AEZ6nYrEPSsABdjQRnL48El0zoZ0 JcddMCjYKQNzJu8y2xgYOdidtsw2Eg143ysbtF5VQ3ideVrDyJ96AQxP7kKISi74bc5h qYGIZc8mO39KWgc0mVlC9U8KDFEEIGWLN6e/7OPJeGWrOCWJIGrKWpdBYyoj0umAxSGc DdWg== X-Gm-Message-State: AOAM533jQq5v3+068cLrF2wc1OS0XoB4RvKeItgTnNC20FQ5f4HCpM6I brz9J/rJAfjlXbjIGJ0RHj2Y2g== X-Received: by 2002:ac2:4d45:: with SMTP id 5mr7950633lfp.135.1612707065193; Sun, 07 Feb 2021 06:11:05 -0800 (PST) Received: from box.localdomain ([86.57.175.117]) by smtp.gmail.com with ESMTPSA id g17sm1741914lfb.30.2021.02.07.06.11.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 07 Feb 2021 06:11:04 -0800 (PST) Received: by box.localdomain (Postfix, from userid 1000) id 6F8C7102656; Sun, 7 Feb 2021 17:11:04 +0300 (+03) Date: Sun, 7 Feb 2021 17:11:04 +0300 From: "Kirill A. Shutemov" To: Dmitry Vyukov Cc: "Kirill A. Shutemov" , Dave Hansen , Andy Lutomirski , Peter Zijlstra , the arch/x86 maintainers , Andrey Ryabinin , Alexander Potapenko , Catalin Marinas , Will Deacon , "H . J . Lu" , Andi Kleen , Linux-MM , LKML Subject: Re: [RFC 0/9] Linear Address Masking enabling Message-ID: <20210207141104.ikxbdxhoisgqaoio@box> References: <20210205151631.43511-1-kirill.shutemov@linux.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sun, Feb 07, 2021 at 09:24:23AM +0100, Dmitry Vyukov wrote: > On Fri, Feb 5, 2021 at 4:16 PM Kirill A. Shutemov > wrote: > > > > Linear Address Masking[1] (LAM) modifies the checking that is applied to > > 64-bit linear addresses, allowing software to use of the untranslated > > address bits for metadata. > > > > The patchset brings support for LAM for userspace addresses. > > > > The most sensitive part of enabling is change in tlb.c, where CR3 flags > > get set. Please take a look that what I'm doing makes sense. > > > > The patchset is RFC quality and the code requires more testing before it > > can be applied. > > > > The userspace API is not finalized yet. The patchset extends API used by > > ARM64: PR_GET/SET_TAGGED_ADDR_CTRL. The API is adjusted to not imply ARM > > TBI: it now allows to request a number of bits of metadata needed and > > report where these bits are located in the address. > > > > There's an alternative proposal[2] for the API based on Intel CET > > interface. Please let us know if you prefer one over another. > > > > The feature competes for bits with 5-level paging: LAM_U48 makes it > > impossible to map anything about 47-bits. The patchset made these > > capability mutually exclusive: whatever used first wins. LAM_U57 can be > > combined with mappings above 47-bits. > > > > I include QEMU patch in case if somebody wants to play with the feature. > > Exciting! Do you plan to send the QEMU patch to QEMU? Sure. After more testing, once I'm sure it's conforming to the hardware. -- Kirill A. Shutemov