Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp1685688pxj; Wed, 19 May 2021 11:26:39 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzxEfAG8qZZeFD9zvhcPhuZNfj2eDYWMvn+4YzExFdhikO1HMDHk3TJX7HeMmK2m/nKHx+a X-Received: by 2002:a17:907:76d9:: with SMTP id kf25mr496637ejc.340.1621448798909; Wed, 19 May 2021 11:26:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1621448798; cv=none; d=google.com; s=arc-20160816; b=QRn4s2r0MoEcfrcvZcDhwx0zzvcoU5MOhTu/F5wcT+10w7vPs0poWW3lip+6Z8xaBz oM+G6vR/KIWJRRN2VCN1/IxcJp/HokJ0LLT2uuGszeCjn922IdiECL2eY6peQ7aw9IL8 Lv123hE5W494Ja9D839NiPMu21m9UhQxzRnqwwxi8TOIZNMkGpTxCBJ5ORcQcMdk8n7c GsMVEu3yowexiFOiiB/8JkVCNnSop+uJ1w6DqMDP20ayu00SOImWNwa1oJd3Ew6lfhbx Hqh/lq6gbmftpoedpApJz95yuAUt53HZH/JNe2aPwvj4Jv8UEds3OsGAox3VOPkJmvte 4UPQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-language:content-transfer-encoding :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject:ironport-sdr:ironport-sdr; bh=VhSb022Ca3+dta43JO/yfC6rPSyFb6yYP6IodjWBvjo=; b=Tmm9czhj9KK73QP7Ae3fN75Wj2RI578uyPXkRMOrWsPcvGfFqkAheXCyqa51xHcS5Z fzhbp40BR6pLFj3MyQP4QMozRn65yJqQGjPxbXWiBwus6a1qk2wuXoXx5JtD631sZnQU vEYUCqTX+vHU6x/Yt4YcMdJKzaqnjzFqGe2chaaNWI8Vl0kRRzLA8YmM5W94rG6msbM8 ljHkkwDQEm8+WFLcMig/7WC/dFjjiYMWRsXkuyfqh1txvn6k9cmVW2zpQrdM9Y8njjdG jlE+OsQz15OBe1oISVKMv5n1LkCUQe83HiD8FTscb/BdJPfjdFpLIYyE8kDstPRNj2Oa 9VBg== 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 p10si336878ejo.39.2021.05.19.11.25.52; Wed, 19 May 2021 11:26:38 -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 S1346598AbhERRG4 (ORCPT + 99 others); Tue, 18 May 2021 13:06:56 -0400 Received: from mga06.intel.com ([134.134.136.31]:15523 "EHLO mga06.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239478AbhERRGy (ORCPT ); Tue, 18 May 2021 13:06:54 -0400 IronPort-SDR: QPdF1ztT0rFD0osdKBojHSuUz3+WAjxlTf8xmNDI7RZPDz6v79WX9voKjHbjorVoEB79oM6WjI TVpnGAq8VKVw== X-IronPort-AV: E=McAfee;i="6200,9189,9988"; a="261992703" X-IronPort-AV: E=Sophos;i="5.82,310,1613462400"; d="scan'208";a="261992703" Received: from orsmga008.jf.intel.com ([10.7.209.65]) by orsmga104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 18 May 2021 10:05:33 -0700 IronPort-SDR: 9Y5XrH47M7H7EM4RTFwgxagVk60ykgSs7wGCsE0xsSga+ZhMcAIxRscCSejx3ios1gnrmp/Cna DGvFlZjlwOhQ== X-IronPort-AV: E=Sophos;i="5.82,310,1613462400"; d="scan'208";a="439526861" Received: from akleen-mobl1.amr.corp.intel.com (HELO [10.209.65.183]) ([10.209.65.183]) by orsmga008-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 18 May 2021 10:05:33 -0700 Subject: Re: [RFC v2-fix 1/1] x86/tdx: Handle in-kernel MMIO To: Dave Hansen , Kuppuswamy Sathyanarayanan , Peter Zijlstra , Andy Lutomirski Cc: Tony Luck , Kirill Shutemov , Kuppuswamy Sathyanarayanan , Dan Williams , Raj Ashok , Sean Christopherson , linux-kernel@vger.kernel.org References: <3e9a26c3-8eee-88f5-f8e2-8a2dd2c028ea@intel.com> <20210518004807.258503-1-sathyanarayanan.kuppuswamy@linux.intel.com> <36cd2665-6d8b-9c0b-eec1-25152dcca2a3@intel.com> <43e583a3-ee2b-52d8-5275-e26a6609c126@linux.intel.com> <94dc5a5a-8c51-8624-5810-e6278783789c@intel.com> From: Andi Kleen Message-ID: <6f2c97b3-8cfe-9f08-7f70-525039e3d00e@linux.intel.com> Date: Tue, 18 May 2021 10:05:32 -0700 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.10.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Content-Language: en-US Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > Or, do we expect the first folks who expose a movdir64b-using driver to > TDX to go and update this code? That's what we want to do. > > Also, the sev_key_active() stuff in there makes me nervous. Does this > scheme work with these: > >> static inline void outs##bwl(int port, const void *addr, unsigned long count) \ >> static inline void ins##bwl(int port, void *addr, unsigned long count) \ > ? This is not MMIO, but port IO. We do similar changes as AMD for TDX. -Andi