Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp3747535pxj; Mon, 7 Jun 2021 20:01:36 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxn5hXCNLjDBh23zfynUvViyoRh8EXAlMgV5lqX+2mxpRpmAU1RTVppecAeGTSgrR5WR/YE X-Received: by 2002:a05:6402:101a:: with SMTP id c26mr23795114edu.19.1623121296072; Mon, 07 Jun 2021 20:01:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1623121296; cv=none; d=google.com; s=arc-20160816; b=No7nxPiezwanqOgAEYOECHT7JuARautCllxPPqtBpxNWYUgjG5DXZR+quRWkyHWfzC KCqDuLIk3HvEu/uzbN73KG3bdHpD8HbnpfFmc/9dQ9Fbm8hYdzj9UU7w0ju3n60I2cfk 9fPUtAefswwdBXeFklzzjCkaDhIPtSUotfp3Bjy8EEX+Q1TJ19pUHBo20gd5LlnL5FjJ VZ3hUr3Lq3867zSDMzPfCct1XVErtVHJVWWYhsQdn1toZYl1+sFVvqGnNVexdDfXWAfo PA4WMal2Y6JSuxfDuFkUu0EY9Ezsk/2YbqCPDyW51idQSCrQyl6nu/yZWbYChH+pB1Dp bOYQ== 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=nBZnmZEwvmN4KNDGgBsIqmCo58GsVyVFHE2GeS9WgVs=; b=bHTl7hB+PKlmFX5UXTxgIQDE/DzJAy0RrtyD7aL9XFzJmHOiLE/JOjcPjwVSkm92K4 N4RYosoMwVyKhrfcyRJulWnQbOwmlTjU+CTw5fQ0eqxAXgsPQU2om5EGPRD9WCuB2L57 yrttXojr9ny8+oAjY8PIGNfDF76hHBN0BBZbUWpr0okEexG8Ls77Fsx/kOh7/KLkoBNc vtdL7SamGWxZ1S/AX1MHikaXlPhydrLRtq2pWGcoK4FeXJBg8FesFBiYEwApZC6oqqze ukRxmGLgCZPwcW7o1pxIMs59vwhSMfzLNGbnULHfdOl1VRiws2FGsnJNckOYY7h13Qpp uLkA== 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 g25si13667328eds.466.2021.06.07.20.01.12; Mon, 07 Jun 2021 20:01:36 -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 S231177AbhFHC7h (ORCPT + 99 others); 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