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,URIBL_BLOCKED,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 6B937C47082 for ; Tue, 8 Jun 2021 02:57:46 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 4E5F56120F for ; Tue, 8 Jun 2021 02:57:46 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231217AbhFHC7h (ORCPT ); Mon, 7 Jun 2021 22:59:37 -0400 Received: from mga05.intel.com ([192.55.52.43]:56453 "EHLO mga05.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230319AbhFHC7g (ORCPT ); Mon, 7 Jun 2021 22:59:36 -0400 IronPort-SDR: tdFJY7Y2vcCwLnK2KLOM8HL6HjS9JeVxB3S1gguIzQ8V6z19V7ciLeLvdtF4ISoQp77POo+37e ImbJPCcLdIKA== X-IronPort-AV: E=McAfee;i="6200,9189,10008"; a="290390456" X-IronPort-AV: E=Sophos;i="5.83,256,1616482800"; d="scan'208";a="290390456" Received: from orsmga001.jf.intel.com ([10.7.209.18]) by fmsmga105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 07 Jun 2021 19:57:44 -0700 IronPort-SDR: wd5XJNjPUXoZ951IwOlPYQTMyoik1TIRWWiW8En2dyVZsUr2k9/snG9HoOcAJcyB/lZmIsS6ls Sprj8OQrxhyA== X-IronPort-AV: E=Sophos;i="5.83,256,1616482800"; d="scan'208";a="481775066" Received: from akleen-mobl1.amr.corp.intel.com (HELO [10.212.158.33]) ([10.212.158.33]) by orsmga001-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 07 Jun 2021 19:57:44 -0700 Subject: Re: [RFC v2-fix-v1 3/3] x86/tdx: Handle port I/O To: Dan Williams , "Kuppuswamy, Sathyanarayanan" Cc: Peter Zijlstra , Andy Lutomirski , Dave Hansen , Tony Luck , Kirill Shutemov , Kuppuswamy Sathyanarayanan , Raj Ashok , Sean Christopherson , Linux Kernel Mailing List References: <20210527042356.3983284-1-sathyanarayanan.kuppuswamy@linux.intel.com> <20210527042356.3983284-4-sathyanarayanan.kuppuswamy@linux.intel.com> <2aba694b-ec36-d57f-06e0-a269f9953bb3@linux.intel.com> From: Andi Kleen Message-ID: Date: Mon, 7 Jun 2021 19:57:43 -0700 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.10.2 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 ps://elixir.bootlin.com/linux/latest/source/kernel/printk/printk_safe.c#L382 > That depends on printk_nmi_direct_enter() to set the context, wouldn't > an equivalent printk_ve_direct_enter() context flag be needed as well? Even without it the console semaphore is always trylocked. So recursion is just not possible. What would be possible is a endless loop (printk adding more information to the log buffer, which is then printed etc.), but that's true for everywhere in the console/serial driver subsystem. -Andi