Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp3472677pxj; Mon, 7 Jun 2021 11:27:30 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyqUXbYL2P+oCgyEQb3NnsEBbAkHKffYQaYlOMVdVu6jjFi+ccH8vg5YWzUaNd7D6Dspgjx X-Received: by 2002:a17:906:3e8d:: with SMTP id a13mr19224706ejj.463.1623090450142; Mon, 07 Jun 2021 11:27:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1623090450; cv=none; d=google.com; s=arc-20160816; b=SsRsYfKrBiFXYLJDl5SUy7O8RmJOPO2laKpux5gyKPgu42JMr9cbwJLaPgwPlqzr14 E1pm0cma68M9D8iXLR+53u4oTiiKEZv8Dz756x7gZzAbpXXkZN2SfrBY7zZaQidTglxi 0src3L0DwqfGKbmNS6JUUj59Oqtta/bSOmMiPm7q3uvvmQbUv/3yXxCB7uozbOXVsynh tCkRh01dG3tlqDWv4Me54iaIKeUlgUeW14sbap4ilzIASVaqYmchUDV9u1/bxUYeHqqC 48DUcI/j28LmY/ShYGCGDyD/uzSpY41uJIpUhKN3JOuNRMHgN4/sMZKNgaBHWwA7t+XD Q1bQ== 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=azms+Yk2ZETfvoS+P+DUK8+0jUupud5mBLYULKl7iGc=; b=FwtQ8IJE0kCzbpgXZ1w3K4bXEb04ArbUFpSdfxN6Foo91q6r5d4qQoRsOMN7fECzC1 ohS7S63RtFXMZhdn5bFT7XWSEFMKK0J88a0BmG2/6WLNwz+xGX7S8DSzR1uELqw/q2uX SvZDjACikU0r8Y9t8cu4iKI5JAuBORN3Gw8maAWvu5uit1/P0DrNQ57VANhmtjM/+sWR SpgTWq2tQurmjCjtv+I9KJsHLvIdW0XJCp1YcnsoS3Pp1MtZX0hbeZV1ODv2wyCg2AXK C/OcWWsXttC+swIFPVI48abq+SKWvu1JxOoCatM53RvT3KlmvEsF4czW2V3xNwocIGgF aooA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@alien8.de header.s=dkim header.b=ULD7Pl98; 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=pass (p=NONE sp=NONE dis=NONE) header.from=alien8.de Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id qo1si12665193ejb.590.2021.06.07.11.27.06; Mon, 07 Jun 2021 11:27:30 -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; dkim=pass header.i=@alien8.de header.s=dkim header.b=ULD7Pl98; 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=pass (p=NONE sp=NONE dis=NONE) header.from=alien8.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231147AbhFGS2C (ORCPT + 99 others); Mon, 7 Jun 2021 14:28:02 -0400 Received: from mail.skyhub.de ([5.9.137.197]:45502 "EHLO mail.skyhub.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230314AbhFGS2B (ORCPT ); Mon, 7 Jun 2021 14:28:01 -0400 Received: from zn.tnic (p200300ec2f0b4f0088b5a9d37dea41e8.dip0.t-ipconnect.de [IPv6:2003:ec:2f0b:4f00:88b5:a9d3:7dea:41e8]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.skyhub.de (SuperMail on ZX Spectrum 128k) with ESMTPSA id 539F91EC046E; Mon, 7 Jun 2021 20:26:09 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=alien8.de; s=dkim; t=1623090369; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:in-reply-to:in-reply-to: references:references; bh=azms+Yk2ZETfvoS+P+DUK8+0jUupud5mBLYULKl7iGc=; b=ULD7Pl98JEvCjX/K6tcniNLBpm0mLFd3n7JWgE2IusVZtD2+V7E5sJwZHITYhvOGUHiHkJ FbpTUC8IA+uwaEVRWO/8/JAQsiVe5nZtw/d9b0ZWtjuUZIs96sFHeqPO1yqLAMo1pX0Tzr Db/8A7k5ZSK+WVeJbj09AXEHHeZaIf8= Date: Mon, 7 Jun 2021 20:26:04 +0200 From: Borislav Petkov To: "Kuppuswamy, Sathyanarayanan" Cc: Peter Zijlstra , Andy Lutomirski , Dave Hansen , Tony Luck , Andi Kleen , Kirill Shutemov , Kuppuswamy Sathyanarayanan , Dan Williams , Raj Ashok , Sean Christopherson , linux-kernel@vger.kernel.org, Tom Lendacky Subject: Re: [RFC v2-fix-v2 1/1] x86: Introduce generic protected guest abstraction Message-ID: References: <20210527042356.3983284-2-sathyanarayanan.kuppuswamy@linux.intel.com> <20210601211417.2177598-1-sathyanarayanan.kuppuswamy@linux.intel.com> <82f9e5a9-682a-70be-e5ea-938bb742265f@linux.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <82f9e5a9-682a-70be-e5ea-938bb742265f@linux.intel.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Jun 07, 2021 at 11:01:05AM -0700, Kuppuswamy, Sathyanarayanan wrote: > Why move this header outside CONFIG_INTEL_TDX_GUEST or > CONFIG_AMD_MEM_ENCRYPT ifdef? Because asm headers are usually included at the beginning of another, possibly generic header. Unless you have a specially particular reason to put them in additional guarding ifdeffery. Have a look at include/linux/. > This header only exists in x86 arch code. So it is better to protect > it with x86 specific header file. That doesn't sound like a special reason to me. And compilers are usually very able at discarding unused symbols so I don't see a problem with keeping all includes at the top, like it is usually done. -- Regards/Gruss, Boris. https://people.kernel.org/tglx/notes-about-netiquette