Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp4409638pxj; Wed, 12 May 2021 05:11:18 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyMxbOn3m2kS6qXooBdfmwTSUJHRVdg2AqG0rpWFohcl8gYKVV7CTXVr56i8WdJmdhF/dzi X-Received: by 2002:a17:907:2d0d:: with SMTP id gs13mr36872720ejc.266.1620821478391; Wed, 12 May 2021 05:11:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1620821478; cv=none; d=google.com; s=arc-20160816; b=sCe1E41wPH3oWrADmTYpH5C53R/Tx7RUnad7U0HdEWPmptYsUlUpZUcvQlE6KSCaur I895NbX4AaksVCbdBpJRXon24fExlXGwY6dzaKoNSSHwUNDlKEJBkXjpjWqivOmif8Sf 3CZtn2Tv+oesQwVSuVkkucBVecjkm4YFV7UF5eygJC0PV+95UImTX++oeHjaqlgr8JvV ZDpC1JZc1M8FikY4rbiR81wcSdnJid3vfNTzxJ/KGwJWvOnHDMDCMRW0QVku/81wvDRK q5PqI2qrUH5DAdBsMWoZx2lfl3WShuO/puWz1uehU0rMLrGhkATgb8UKliE1i2TBzVRU MWOA== 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-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=KHy1jvonypHY1PVvtBVNiZG6J8HrF2PSi5nvjXdw7fg=; b=RAbW54zGJdwvx7lWWVTfhTPJvMtLLByEGf1ACZOu3tuWFL5XVani1rYLE2WnSiCQO4 ynaye5zpOYtJX/gdhKoo5KfqUlcYW5fYPOGcqDRgQYCTY/M1Wjujo9YaafTqHxmRIB/P Y10/K77LMpMp840GId7bnTHTu6ZjA5Ys+jpCiJbkssdCF5z28HNI83d8t2apTEWDaQdU 44+z0rJdAQgFwmuaJLhyUyPizGVqJ+08ENB0us0V9puj9U1iqh01KBVkEKsK3adBo5Kt ihK5/Mi1MA+UXBlbbFu+7xLMwP4EvknZvCw5kxCf0lfwVf0RX+9q0+k9m0pbBo1ghsIT jCew== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@shutemov-name.20150623.gappssmtp.com header.s=20150623 header.b=yDxMwV6R; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id j25si21235344edr.112.2021.05.12.05.10.54; Wed, 12 May 2021 05:11: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; dkim=pass header.i=@shutemov-name.20150623.gappssmtp.com header.s=20150623 header.b=yDxMwV6R; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230246AbhELMIn (ORCPT + 99 others); Wed, 12 May 2021 08:08:43 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58276 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230355AbhELMIm (ORCPT ); Wed, 12 May 2021 08:08:42 -0400 Received: from mail-lj1-x22f.google.com (mail-lj1-x22f.google.com [IPv6:2a00:1450:4864:20::22f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 05603C061574 for ; Wed, 12 May 2021 05:07:34 -0700 (PDT) Received: by mail-lj1-x22f.google.com with SMTP id v5so29238452ljg.12 for ; Wed, 12 May 2021 05:07:33 -0700 (PDT) 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:content-transfer-encoding:in-reply-to; bh=KHy1jvonypHY1PVvtBVNiZG6J8HrF2PSi5nvjXdw7fg=; b=yDxMwV6RjIr4H55bS3sal4v4ypfoppfN+kwyHHiwnw4KKcP/JCbLTeDhFCRy0z3eSE eqTJtTDp/ovZmPbn60DJNxzFbPUa/JjyRgYqzmlUsdvZCR399XvxomiQc1obinMfrvOj Ev5EpCvES+aWM5QGxPqqxrXEX0aV4oZF0tOtEUn0v5h7qMQAejh/khksEPCzGuEoFztu SeogP63zqikgOrVkRIouqHAMI95EDhX7kfs57K8AuEvykdWH2KTIo6buhT+Uqbu5sHA5 LkJvgos2DrBJDW+SO5aKZqE+qzzM94CK8T4b5m6IzJkRF4WS3OIzWd+Y9o2qjt/apqPh 5zXw== 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:content-transfer-encoding :in-reply-to; bh=KHy1jvonypHY1PVvtBVNiZG6J8HrF2PSi5nvjXdw7fg=; b=Vxa+T71ZGjGNsvbk1COBDRwsTe9wCBMtObMitovB5qPMmvM/oyMV+PTd1Q7zSXfnGW lN81hY9NlFOx8hc5Lu56tmMUL52orzJ+a5bJG3OErHobd6OmuUNbYEQDm4BSeeCYi34f PzaHYvRqw73wS3zl3LjmHDFAEYTkzxcHJnFKfpUHRyr36Ds1MUm6mdFaRyTc6f1uuFrm Eadix+DhAbqdSrj0VeHLe7rXIkEFi8Qjon9W0ySheBC3T/pVCbKbrkS1RUD1hIZa45/R QP7S3OcTbkZ0HboUdXMDpwx4fz0lRJRVMd4nLeDRKsNoYGYSLS9vTmc+XBMl3AifTDgg FZFw== X-Gm-Message-State: AOAM530hVOd8WNSwSiXjNi6AfdSfMQT4MxNBwXd9o+JSphgZOpenzWST c8k6QLa5hD45ThzWj7Xi1qqvFA== X-Received: by 2002:a2e:83cb:: with SMTP id s11mr28219873ljh.462.1620821252460; Wed, 12 May 2021 05:07:32 -0700 (PDT) Received: from box.localdomain ([86.57.175.117]) by smtp.gmail.com with ESMTPSA id w16sm2973340lfu.160.2021.05.12.05.07.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 12 May 2021 05:07:31 -0700 (PDT) Received: by box.localdomain (Postfix, from userid 1000) id 8A53010265F; Wed, 12 May 2021 15:07:32 +0300 (+03) Date: Wed, 12 May 2021 15:07:32 +0300 From: "Kirill A. Shutemov" To: Juergen Gross Cc: Andi Kleen , Borislav Petkov , Kuppuswamy Sathyanarayanan , Peter Zijlstra , Andy Lutomirski , Dave Hansen , Dan Williams , Tony Luck , Kirill Shutemov , Kuppuswamy Sathyanarayanan , Raj Ashok , Sean Christopherson , linux-kernel@vger.kernel.org Subject: Re: [RFC v2 01/32] x86/paravirt: Introduce CONFIG_PARAVIRT_XL Message-ID: <20210512120732.dtdg3vompizse6df@box.shutemov.name> References: <4f8c9559dd04d8e8485c419c5ebc9471613f7928.1619458733.git.sathyanarayanan.kuppuswamy@linux.intel.com> <41463493-48bb-0e69-dcb2-3072e2ddf208@suse.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <41463493-48bb-0e69-dcb2-3072e2ddf208@suse.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, May 10, 2021 at 05:56:05PM +0200, Juergen Gross wrote: > On 10.05.21 17:52, Andi Kleen wrote: > > \ > > > > > 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. > > No. We have PARAVIRT_XXL for Xen PV guests, and we have PARAVIRT for > other hypervisor's guests, supporting basically the TLB flush operations > and time related operations only. Adding the halt related operations to > PARAVIRT wouldn't break anything. Yeah, I think we can do this. It should be fine. -- Kirill A. Shutemov