From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.3 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,NICE_REPLY_A,SPF_HELO_NONE, SPF_PASS,USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 5FE81C433B4 for ; Wed, 12 May 2021 13:24:29 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 30720613DA for ; Wed, 12 May 2021 13:24:29 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231126AbhELNZg (ORCPT ); Wed, 12 May 2021 09:25:36 -0400 Received: from mga12.intel.com ([192.55.52.136]:12642 "EHLO mga12.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230452AbhELNZe (ORCPT ); Wed, 12 May 2021 09:25:34 -0400 IronPort-SDR: Nu+QsXIE7qdmqG/fTUk6Cgwn7D0wNwqq6IHOISjz4ht5hWl6w8vqxqY4YiSofqgh4hl1aDl1k2 TRblAWEjDKrQ== X-IronPort-AV: E=McAfee;i="6200,9189,9981"; a="179295096" X-IronPort-AV: E=Sophos;i="5.82,293,1613462400"; d="scan'208";a="179295096" Received: from fmsmga007.fm.intel.com ([10.253.24.52]) by fmsmga106.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 12 May 2021 06:24:19 -0700 IronPort-SDR: g5AGXqEVqXD86+BSNrf0+aPS2nAh12n9UL131agrsM+8vWFTN8KzEJ8zRdtoSZicQoVVyN5LbM B3JHV7Vr5/bg== X-IronPort-AV: E=Sophos;i="5.82,293,1613462400"; d="scan'208";a="400105510" Received: from akleen-mobl1.amr.corp.intel.com (HELO [10.209.126.19]) ([10.209.126.19]) by fmsmga007-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 12 May 2021 06:24:18 -0700 Subject: Re: [RFC v2 01/32] x86/paravirt: Introduce CONFIG_PARAVIRT_XL To: Peter Zijlstra , Juergen Gross Cc: Borislav Petkov , Kuppuswamy Sathyanarayanan , 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> <41463493-48bb-0e69-dcb2-3072e2ddf208@suse.com> From: Andi Kleen Message-ID: Date: Wed, 12 May 2021 06:24:17 -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 On 5/12/2021 6:18 AM, Peter Zijlstra wrote: > On Mon, May 10, 2021 at 05:56:05PM +0200, Juergen Gross wrote: > >> 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. > Also, I don't think anything modern should actually ever hit any of the > HLT instructions, most everything should end up at an MWAIT. > > Still, do we wants to give arch_safe_halt() and halt() the > PVOP_ALT_VCALL0() treatment? From performance reasons it's pointless to patch. HLT (and MWAIT) are so slow anyways that using patching or an indirect pointer is completely in the noise. So I would use whatever is cleanest in the code. -Andi