Received: by 2002:a05:6a10:f3d0:0:0:0:0 with SMTP id a16csp3428718pxv; Mon, 12 Jul 2021 17:35:18 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwEyHNHM35GMJqles1fKkyx7+2bWpYzDvqUC9tLGDqp/P0nEFe6D4EbnlR2nF6fFCWtB72P X-Received: by 2002:aa7:dd43:: with SMTP id o3mr1928837edw.302.1626136518090; Mon, 12 Jul 2021 17:35:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1626136518; cv=none; d=google.com; s=arc-20160816; b=lHXgsNJ3DApS5K9WnoKuNVZWwCSS4qCm2k+UOC+apPuGgpQKD+mlCMmaWMKYLPpcCN MN73iQ3C8b7yz2YUhlIDXyL/CRp/LnQWn31i6wCe3DigUVmn+Fs+uFiyu89zuhlf5t+u skOD73slGgDsNJKUN662B9qKmYuGsBJDl0qAAsjrf/txhhAUzwDiluouIEDPCMFbotF3 SapKidHYv8Du4UVVg6EuIVW4L8gkvBlknBBBBV6NJezuQFYyFN4H2PLhxk1PaZX61+FR pAPlitesVdHIZBUOXCOGhlGOB/VwRDHHITJ4/7BVZtzyWz8VDBNV6sgqeox/peWb4FkE xjMw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject; bh=eYYX4vCM9GzbRLx0gkXgCBXCiTe0hHDQB3Dq/KWu5lo=; b=wmEB8owU4ceb8bITgRfxEbIw3sdp+CK8L5BbT0Cj1QLim0UvRE4Ib6YO8WGdK0mn7V EjuGzCCcY5C57Jo1KbHM2HI1sfa1wIKHnP39MKbxvb/SdLBoi7JMid631jl6KLttF3Y9 6Arh5aBsw2eejLcDUYNd7S5W6o8l3DcgDynaTSf662Han77uNgmKVFVN/B7oGyE6qkLQ 3Ef9Gn3EWwlsZhEIHGY+zTyUrqCBhxyHvszTfifUThuEwD6PP2/AS7sW+JopFHTOPrBB oMjGRPI8qMwGqNIrKTDe/U9Pwsen8R361xSVTV+ZpiejciIyySVsjAr7p3tB6lAPMiau XieQ== ARC-Authentication-Results: i=1; mx.google.com; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id f8si11795702ejx.293.2021.07.12.17.34.48; Mon, 12 Jul 2021 17:35:18 -0700 (PDT) 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; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233713AbhGMAgV (ORCPT + 99 others); Mon, 12 Jul 2021 20:36:21 -0400 Received: from mga07.intel.com ([134.134.136.100]:50764 "EHLO mga07.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230099AbhGMAgV (ORCPT ); Mon, 12 Jul 2021 20:36:21 -0400 X-IronPort-AV: E=McAfee;i="6200,9189,10043"; a="273907575" X-IronPort-AV: E=Sophos;i="5.84,235,1620716400"; d="scan'208";a="273907575" Received: from orsmga005.jf.intel.com ([10.7.209.41]) by orsmga105.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 12 Jul 2021 17:33:29 -0700 X-IronPort-AV: E=Sophos;i="5.84,235,1620716400"; d="scan'208";a="629866664" Received: from atton-mobl.amr.corp.intel.com (HELO skuppusw-mobl5.amr.corp.intel.com) ([10.212.86.233]) by orsmga005-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 12 Jul 2021 17:33:28 -0700 Subject: Re: [PATCH v2 5/6] platform/x86: intel_tdx_attest: Add TDX Guest attestation interface driver To: Andi Kleen , Dave Hansen , Andy Lutomirski , Thomas Gleixner , Ingo Molnar , Borislav Petkov , Peter Zijlstra , Hans de Goede , Mark Gross , Alexei Starovoitov , Daniel Borkmann , Andrii Nakryiko Cc: Peter H Anvin , Tony Luck , Dan Williams , Kirill Shutemov , Sean Christopherson , Kuppuswamy Sathyanarayanan , x86@kernel.org, linux-kernel@vger.kernel.org, platform-driver-x86@vger.kernel.org, bpf@vger.kernel.org, netdev@vger.kernel.org References: <20210707204249.3046665-1-sathyanarayanan.kuppuswamy@linux.intel.com> <20210707204249.3046665-6-sathyanarayanan.kuppuswamy@linux.intel.com> <06c85c19-e16c-3121-ed47-075cfa779b67@kernel.org> <169451ef-e8f6-5a07-f47a-61eaa085b4ef@intel.com> From: "Kuppuswamy, Sathyanarayanan" Message-ID: Date: Mon, 12 Jul 2021 17:33:25 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.11.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Dave, On 7/8/21 5:38 PM, Andi Kleen wrote: >> Expensive and permanently fractures the direct map. >> >> I'm struggling to figure out why the direct map is even touched here. > I think Sathya did it this way because the TD interface requires a physical address. >> Why not just use a vmalloc area mapping?  You really just need *a* >> decrypted mapping to the page.  You don't need to make *every* mapping >> to the page decrypted. > > Yes it would be possible to use vmap() on the page and only set the vmap encrypted by passing the > right flags directly. Is it alright to have non coherent mappings? If yes, any documentation reference for it? > > That would avoid breaking up the direct mapping. -- Sathyanarayanan Kuppuswamy Linux Kernel Developer