Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp2803222pxj; Mon, 10 May 2021 11:03:43 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwP7VPrFl3a3hzPxlucMhIwD4haLocek1SRO8kkI9V3Nlg0imCM4q4+4BRNN+GH2IfYE47k X-Received: by 2002:a05:6e02:e81:: with SMTP id t1mr5959649ilj.228.1620669823686; Mon, 10 May 2021 11:03:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1620669823; cv=none; d=google.com; s=arc-20160816; b=nYfEfTOMEN3eu3JaFdNnRJpwI4dcrzAcU+VgxVUxdHSANknOLCDQRmDXlipeL17wPn af2MqtA/4lEfwz7xFnwB/avFw1aRsTvfoIFN5hsMZtLn9AucHaYdfR8UWY4zzMeIhr99 ljUljt36mR77QAQTokAhYDnu4PUpd99MRPGl9wVPaR1pk21qiDcOVQ71Y0YeHNX5nZHz 19/e1jYKcPbTZDoNC47E5O212RCrFVkKXnr1NGvqA91vS4WRAV1B+4Tb1oIhBenXD+bL Y/xGFFaRtRbXQGMhuXds8jCzpY581P6v8B9yZnMZY2hQTQ5EMGz9PJ97npterR1iqEB4 CdTQ== 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=nKqvpCL4oNk3wr5x4FWt7nSuSMywKOa6hXz8MXbmzxw=; b=KiZ8pgbrRW0oxejSeNl3e/rQvQsmBSymR2EPSiipzbe1Swz4G0y9Fi5YoACdCJN1W0 Y9/FxX4nqXLBJEUvTmGGt5GXCJxlQh3e2kuLQjpCevRoE4R8jMRZN1/notShsn7zcvXI EJGt6d5MnfUpZHbqNpkyO+XD7NNYfADGuQgEjO4nvfKKfHYK3j/xjB5en2tJj6IvDQ97 WIril1Yp8aSdzeD7ppf2aHGf8u85T0ydzE8GXIdo9AAtpf8tfsxhUWzFJIvf+MeB4ha/ 1ZZFD4HGK3Jg0C1T+hJIQQraAlsrjc3u73RRvh3D0dQ9/OiORvmaTPdmQ38BKJja5A2j VFsA== 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 m18si223926jaj.112.2021.05.10.11.03.29; Mon, 10 May 2021 11:03:43 -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 S231290AbhEJPxf (ORCPT + 99 others); Mon, 10 May 2021 11:53:35 -0400 Received: from mga17.intel.com ([192.55.52.151]:18037 "EHLO mga17.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231558AbhEJPxY (ORCPT ); Mon, 10 May 2021 11:53:24 -0400 IronPort-SDR: y9dIWG64qIKryxleJ682CFKXp/duFvsUvFivkoFNeh3t+eiUfg6uc61zFbgiJYwQ13WDASoBGb dN81BmVT0dng== X-IronPort-AV: E=McAfee;i="6200,9189,9980"; a="179488770" X-IronPort-AV: E=Sophos;i="5.82,287,1613462400"; d="scan'208";a="179488770" Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by fmsmga107.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 10 May 2021 08:52:16 -0700 IronPort-SDR: 27OxFMx8kBBjIQtItvuM1QSdQTrvYwqDTKVkFjoUUwrMw2+wwZexGL1NWnkSc2ae8sV7nWchi9 h1oU74SsLuiw== X-IronPort-AV: E=Sophos;i="5.82,287,1613462400"; d="scan'208";a="433865599" Received: from akleen-mobl1.amr.corp.intel.com (HELO [10.209.32.217]) ([10.209.32.217]) by fmsmga008-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 10 May 2021 08:52:16 -0700 Subject: Re: [RFC v2 01/32] x86/paravirt: Introduce CONFIG_PARAVIRT_XL To: Juergen Gross , Borislav Petkov , Kuppuswamy Sathyanarayanan Cc: Peter Zijlstra , Andy Lutomirski , Dave Hansen , Dan Williams , Tony Luck , Kirill Shutemov , Kuppuswamy Sathyanarayanan , Raj Ashok , Sean Christopherson , linux-kernel@vger.kernel.org References: <4f8c9559dd04d8e8485c419c5ebc9471613f7928.1619458733.git.sathyanarayanan.kuppuswamy@linux.intel.com> From: Andi Kleen Message-ID: Date: Mon, 10 May 2021 08:52:14 -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: 8bit Content-Language: en-US Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org \ >>> CONFIG_PARAVIRT_XL will be used by TDX that needs couple of paravirt >>> calls that were hidden under CONFIG_PARAVIRT_XXL, but the rest of the >>> config would be a bloat for TDX. >> >> Used how? Why is it bloat for TDX? > > Is there any major downside to move the halt related pvops functions > from CONFIG_PARAVIRT_XXL to CONFIG_PARAVIRT? I think the main motivation is to get rid of all the page table related hooks for modern configurations. These are the bulk of the annotations and  cause bloat and worse code. Shadow page tables are really obscure these days and very few people still need them and it's totally reasonable to build even widely used distribution kernels without them. On contrast most of the other hooks are comparatively few and also on comparatively slow paths, so don't really matter too much. I think it would be ok to have a CONFIG_PARAVIRT that does not have page table support, and a separate config option for those (that could be eventually deprecated). But that would break existing .configs for those shadow stack users, that's why I think Kirill did it the other way around. -Andi