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=-3.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS 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 D293CC433E0 for ; Sun, 7 Feb 2021 14:11:08 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 6FFBE64E50 for ; Sun, 7 Feb 2021 14:11:08 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 6FFBE64E50 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=shutemov.name Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id C06F46B0006; Sun, 7 Feb 2021 09:11:07 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id BB80B6B006C; Sun, 7 Feb 2021 09:11:07 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id ACCA86B006E; Sun, 7 Feb 2021 09:11:07 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0146.hostedemail.com [216.40.44.146]) by kanga.kvack.org (Postfix) with ESMTP id 962A56B0006 for ; Sun, 7 Feb 2021 09:11:07 -0500 (EST) Received: from smtpin30.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay02.hostedemail.com (Postfix) with ESMTP id 2CF353632 for ; Sun, 7 Feb 2021 14:11:07 +0000 (UTC) X-FDA: 77791658574.30.brake72_200999b275f6 Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin30.hostedemail.com (Postfix) with ESMTP id 0A772180B3AB8 for ; Sun, 7 Feb 2021 14:11:07 +0000 (UTC) X-HE-Tag: brake72_200999b275f6 X-Filterd-Recvd-Size: 5192 Received: from mail-lf1-f53.google.com (mail-lf1-f53.google.com [209.85.167.53]) by imf34.hostedemail.com (Postfix) with ESMTP for ; Sun, 7 Feb 2021 14:11:06 +0000 (UTC) Received: by mail-lf1-f53.google.com with SMTP id m22so18114340lfg.5 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=k1fnijeFHGX9JFNS2mHiy6BsQIb/jj/6Vclq6E/PcHbKSzmRtdPSvE8bci0yskiVoW tRpMh69g4YmvKeYmrucaA/071kCdoRcHOnZc7u7RR3+3Z63kH/J9th88YcES3J6pbmEO Bh0ryC1zprvxVVvphJlTyRqS20PtmvH/FTH9SEoa3RWw3nieb9M7cjjej6HaSIRtylpG tjJEXJn8dLsX94xDzp40SFyTPtQUtJIZ6t8WRBmDAEPJqkKNfG0tCEKALABOdhOzZ/nO +oECdOZG1Rupy/SA+PmkzG3Ton22FbDbDFdPXSODUjkUgXhGVphefHfLZ04UnEBzToE/ /r1Q== X-Gm-Message-State: AOAM531D6kQfR2r+HsA0pWRFVt2DtxMJUpUr1jXfBzkcALFiJF3KeC/A OoChCyJ+Dtn5w6usZZqRPIVL8g== X-Google-Smtp-Source: ABdhPJwMXw8/BIi1fzug5jfv2ICrED3bATc7yibBV1zlVwBkrGNJLHWYg9k/vE/YoMlg/YELc/CK3g== 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: X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: 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