[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH 3/9] xen/x86: make "earlyprintk=xen" work better for PVH Dom0


  • To: Juergen Gross <jgross@xxxxxxxx>, Boris Ostrovsky <boris.ostrovsky@xxxxxxxxxx>
  • From: Jan Beulich <jbeulich@xxxxxxxx>
  • Date: Tue, 7 Sep 2021 12:09:12 +0200
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=suse.com; dmarc=pass action=none header.from=suse.com; dkim=pass header.d=suse.com; arc=none
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=0znofO36pU2FD4CJIYFn7aacsI8GwthcODXsjcIpWgA=; b=bPEHIaEv9JYVoSbY+gvx5oyBVL1BqnjFPM4qZbZclx5+Qmy7GCDTKEjJDC3kHJ5L5uZ/7CbZ/rk7Q+4Ji9TPj9FWzGPjojIZf6gImmPwTAeTmx9HjcBVfwHHG06pnOeXBFTPDlD+MyodyOXnqEaVAF3ovQP99bcmmk6kyfktKgI70vS0DOnMTBWo+ijj1Si7UAWkCeXjIQyhsIDBxWGHRoEZHEJF7TfnOChTVwH2/NrneIsLzzH6ogEQdBsQbrmeKyqdmNYciOikikmk6ZMsqn6KCi3tzl32lFWXXG3Kiwxio066IUC5Op9h6tczPI7uUZ9bHTYmtafJZdLpG0xv+g==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=m+Obh2I+xU/AOuzDzVsCa3QogoiyJWgpxdsjtcqpsayydXyYGSVdx53aa5oEFNnLQWTNr5LIf1Xf9cCMzLOm7jRD0ZqDXrd5FAp0NT1WUmLyQqnb8Dq6gOgP3tfJ7ftAkk6bL63PsxdKHPLGO4raT2qGpOr1xZNsQUh/fA/lnW76GjXV1xzyPbtz6cP+FKqbjFK2qVtkYzQixTKG6EWvRq2aojvD1DOJ4UE0x1SgG1aMt+hZkt8W5hiinkL05Zsm2ID5E92FimUK6/pd30RfgZe3m8d4nIj4auhkkAeGe7e4Ox7DCKqrFWCW4nRBhgvUX3OuX0fCUAA9EK4rLlY6YQ==
  • Authentication-results: lists.ozlabs.org; dkim=none (message not signed) header.d=none;lists.ozlabs.org; dmarc=none action=none header.from=suse.com;
  • Cc: Stefano Stabellini <sstabellini@xxxxxxxxxx>, lkml <linux-kernel@xxxxxxxxxxxxxxx>, "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>, "linuxppc-dev@xxxxxxxxxxxxxxxx" <linuxppc-dev@xxxxxxxxxxxxxxxx>
  • Delivery-date: Tue, 07 Sep 2021 10:09:20 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

The xen_hvm_early_write() path better wouldn't be taken in this case;
while port 0xE9 can be used, the hypercall path is quite a bit more
efficient. Put that first, as it may also work for DomU-s (see also
xen_raw_console_write()).

While there also bail from the function when the first
domU_write_console() failed - later ones aren't going to succeed.

Signed-off-by: Jan Beulich <jbeulich@xxxxxxxx>

--- a/drivers/tty/hvc/hvc_xen.c
+++ b/drivers/tty/hvc/hvc_xen.c
@@ -632,17 +632,16 @@ static void xenboot_write_console(struct
        unsigned int linelen, off = 0;
        const char *pos;
 
+       if (dom0_write_console(0, string, len) >= 0)
+               return;
+
        if (!xen_pv_domain()) {
                xen_hvm_early_write(0, string, len);
                return;
        }
 
-       dom0_write_console(0, string, len);
-
-       if (xen_initial_domain())
+       if (domU_write_console(0, "(early) ", 8) < 0)
                return;
-
-       domU_write_console(0, "(early) ", 8);
        while (off < len && NULL != (pos = strchr(string+off, '\n'))) {
                linelen = pos-string+off;
                if (off + linelen > len)




 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.