From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=209.132.183.28; helo=mx1.redhat.com; envelope-from=lersek@redhat.com; receiver=edk2-devel@lists.01.org Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 655BE21CEB120 for ; Thu, 26 Oct 2017 08:17:01 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 1CB955F7B9; Thu, 26 Oct 2017 15:20:47 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 1CB955F7B9 Authentication-Results: ext-mx10.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx10.extmail.prod.ext.phx2.redhat.com; spf=fail smtp.mailfrom=lersek@redhat.com Received: from lacos-laptop-7.usersys.redhat.com (ovpn-120-110.rdu2.redhat.com [10.10.120.110]) by smtp.corp.redhat.com (Postfix) with ESMTP id 37AB8600CA; Thu, 26 Oct 2017 15:20:45 +0000 (UTC) From: Laszlo Ersek To: Julien Grall , edk2-devel-01 , star.zeng@intel.com, heyi.guo@linaro.org, ruiyu.ni@intel.com Cc: Anthony PERARD , Leif Lindholm , Ard Biesheuvel References: <7516a301-dfbb-5bd4-5e1e-ccd18c26db30@linaro.org> <74e0ac36-195f-9275-922e-e499a513569f@redhat.com> Message-ID: <32b3c432-7f17-c387-5334-a6826d6fa769@redhat.com> Date: Thu, 26 Oct 2017 17:20:44 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.4.0 MIME-Version: 1.0 In-Reply-To: <74e0ac36-195f-9275-922e-e499a513569f@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.39]); Thu, 26 Oct 2017 15:20:47 +0000 (UTC) Subject: Re: Xen Console input very slow in recent UEFI X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 26 Oct 2017 15:17:01 -0000 Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit On 10/26/17 17:13, Laszlo Ersek wrote: > Hello Julien, > > On 10/26/17 13:05, Julien Grall wrote: >> Hi all, >> >> I was doing more testing of UEFI in Xen guests and noticed some slow >> down when using the shell. The characters are only echoed after a second >> or two that is a bit annoying. >> >> The change that introduced this issue is 4cf3f37c87 "MdeModulePkg >> SerialDxe: Process timeout consistently in SerialRead". >> >> The Serial Driver for Xen PV console is very simple (see >> OvmfPkg/Library/XenConsoleSerialPortLib). So I am not sure where the >> root cause is. >> >> Would anyone have any tips on it? > > The exact same issue has been encountered earlier under QEMU, please > refer to the following sub-thread (please read it to end): > > http://mid.mail-archive.com/b748580c-cb51-32c9-acf9-780841ef15da@redhat.com > > The fix was commit 5f0f5e90ae8c ("ArmVirtPkg/FdtPL011SerialPortLib: call > PL011UartLib in all SerialPortLib APIs", 2017-08-16). > > I think if you can implement the same for XenConsoleSerialPortLib, that > should return to working state as well. Hmmm, wait, at a closer look, it looks like OvmfPkg/Library/XenConsoleSerialPortLib/XenConsoleSerialPortLib.c already implements that suggestion? (I.e., it sets EFI_SERIAL_INPUT_BUFFER_EMPTY in *Control as necessary?) Are we sure the SerialPortPoll() function works correctly? I don't see any MemoryFence() calls in SerialPortPoll(), around checking the fields in (*mXenConsoleInterface). Could that be the problem? Thanks, Laszlo > > ... This is why we need active Xen participants in edk2 ;) > > Thanks! > Laszlo >