From patchwork Tue Sep 7 10:09:12 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jan Beulich X-Patchwork-Id: 1525259 Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=suse.com header.i=@suse.com header.a=rsa-sha256 header.s=mimecast20200619 header.b=JAW85j2P; dkim=fail reason="signature verification failed" (1024-bit key) header.d=suse.com header.i=@suse.com header.a=rsa-sha256 header.s=mimecast20200619 header.b=JAW85j2P; dkim-atps=neutral Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.ozlabs.org (client-ip=2404:9400:2:0:216:3eff:fee1:b9f1; helo=lists.ozlabs.org; envelope-from=linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@lists.ozlabs.org; receiver=) Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2404:9400:2:0:216:3eff:fee1:b9f1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4H3h5M0cwnz9sjJ for ; Tue, 7 Sep 2021 20:16:55 +1000 (AEST) Received: from boromir.ozlabs.org (localhost [IPv6:::1]) by lists.ozlabs.org (Postfix) with ESMTP id 4H3h5L6YX2z2yPV for ; Tue, 7 Sep 2021 20:16:54 +1000 (AEST) Authentication-Results: lists.ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=suse.com header.i=@suse.com header.a=rsa-sha256 header.s=mimecast20200619 header.b=JAW85j2P; dkim=fail reason="signature verification failed" (1024-bit key) header.d=suse.com header.i=@suse.com header.a=rsa-sha256 header.s=mimecast20200619 header.b=JAW85j2P; dkim-atps=neutral X-Original-To: linuxppc-dev@lists.ozlabs.org Delivered-To: linuxppc-dev@lists.ozlabs.org Authentication-Results: lists.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=suse.com (client-ip=194.104.109.102; helo=de-smtp-delivery-102.mimecast.com; envelope-from=jbeulich@suse.com; receiver=) Authentication-Results: lists.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=suse.com header.i=@suse.com header.a=rsa-sha256 header.s=mimecast20200619 header.b=JAW85j2P; dkim=pass (1024-bit key) header.d=suse.com header.i=@suse.com header.a=rsa-sha256 header.s=mimecast20200619 header.b=JAW85j2P; dkim-atps=neutral X-Greylist: delayed 309 seconds by postgrey-1.36 at boromir; Tue, 07 Sep 2021 20:16:15 AEST Received: from de-smtp-delivery-102.mimecast.com (de-smtp-delivery-102.mimecast.com [194.104.109.102]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 4H3h4b0tXDz2xWx for ; Tue, 7 Sep 2021 20:16:12 +1000 (AEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=mimecast20200619; t=1631009769; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=0znofO36pU2FD4CJIYFn7aacsI8GwthcODXsjcIpWgA=; b=JAW85j2PBd8oT8EzOojf6tT/9Dbkg0b3JA+h2FRzQ/uMI0Ba5f0R6KhBclHIJEp8LCrluh 8Qr6Zz+/yoV1x2l/lvygTcG7AR3kGmRTEogPfXy5bNNJXXqh5bjUh9+kX00ZCX2f+V0d6k e7wIcmKl9xR5JQlT9fLhRD+CzjD7/5A= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=mimecast20200619; t=1631009769; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=0znofO36pU2FD4CJIYFn7aacsI8GwthcODXsjcIpWgA=; b=JAW85j2PBd8oT8EzOojf6tT/9Dbkg0b3JA+h2FRzQ/uMI0Ba5f0R6KhBclHIJEp8LCrluh 8Qr6Zz+/yoV1x2l/lvygTcG7AR3kGmRTEogPfXy5bNNJXXqh5bjUh9+kX00ZCX2f+V0d6k e7wIcmKl9xR5JQlT9fLhRD+CzjD7/5A= Received: from EUR05-VI1-obe.outbound.protection.outlook.com (mail-vi1eur05lp2176.outbound.protection.outlook.com [104.47.17.176]) (Using TLS) by relay.mimecast.com with ESMTP id de-mta-26-RKsAUFFINoOolmJZdNIdKQ-1; Tue, 07 Sep 2021 12:09:15 +0200 X-MC-Unique: RKsAUFFINoOolmJZdNIdKQ-1 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=m+Obh2I+xU/AOuzDzVsCa3QogoiyJWgpxdsjtcqpsayydXyYGSVdx53aa5oEFNnLQWTNr5LIf1Xf9cCMzLOm7jRD0ZqDXrd5FAp0NT1WUmLyQqnb8Dq6gOgP3tfJ7ftAkk6bL63PsxdKHPLGO4raT2qGpOr1xZNsQUh/fA/lnW76GjXV1xzyPbtz6cP+FKqbjFK2qVtkYzQixTKG6EWvRq2aojvD1DOJ4UE0x1SgG1aMt+hZkt8W5hiinkL05Zsm2ID5E92FimUK6/pd30RfgZe3m8d4nIj4auhkkAeGe7e4Ox7DCKqrFWCW4nRBhgvUX3OuX0fCUAA9EK4rLlY6YQ== 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-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 Authentication-Results: lists.ozlabs.org; dkim=none (message not signed) header.d=none;lists.ozlabs.org; dmarc=none action=none header.from=suse.com; Received: from VI1PR04MB5600.eurprd04.prod.outlook.com (2603:10a6:803:e7::16) by VI1PR04MB6176.eurprd04.prod.outlook.com (2603:10a6:803:f6::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4478.21; Tue, 7 Sep 2021 10:09:13 +0000 Received: from VI1PR04MB5600.eurprd04.prod.outlook.com ([fe80::4d37:ec64:4e90:b16b]) by VI1PR04MB5600.eurprd04.prod.outlook.com ([fe80::4d37:ec64:4e90:b16b%7]) with mapi id 15.20.4500.014; Tue, 7 Sep 2021 10:09:13 +0000 Subject: [PATCH 3/9] xen/x86: make "earlyprintk=xen" work better for PVH Dom0 From: Jan Beulich To: Juergen Gross , Boris Ostrovsky References: <4efa804e-3250-227f-00c7-347581366cd4@suse.com> Message-ID: Date: Tue, 7 Sep 2021 12:09:12 +0200 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.13.0 In-Reply-To: <4efa804e-3250-227f-00c7-347581366cd4@suse.com> Content-Language: en-US X-ClientProxiedBy: AM0PR10CA0071.EURPRD10.PROD.OUTLOOK.COM (2603:10a6:208:15::24) To VI1PR04MB5600.eurprd04.prod.outlook.com (2603:10a6:803:e7::16) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from [10.156.60.236] (37.24.206.209) by AM0PR10CA0071.EURPRD10.PROD.OUTLOOK.COM (2603:10a6:208:15::24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4478.19 via Frontend Transport; Tue, 7 Sep 2021 10:09:13 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 2155bbff-726e-4d13-9c57-08d971e78b31 X-MS-TrafficTypeDiagnostic: VI1PR04MB6176: X-LD-Processed: f7a17af6-1c5c-4a36-aa8b-f5be247aa4ba,ExtFwd X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:7691; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: DqSxuuek7MRKqM9FPJxyC3RCob2LpV3j0q4Czc9nWvy5lx1gD2hV6b97MKRao45nN6Rf0ZGl5TIP7GFezJ5VWq6m7SPYwi4bUKd2x8bCZ2cHGspooh86kKm1T+4IW0rL1hySEYgu7V8ATig+QW+LtJLpMtzqHniQvOks5UpWVp4oKc0NyFFGD/v2J8D7HHU/SakxcltURskwnlgIOFAkoHB1Ag3xOHnsfUlkRKupmBtwuWzdjjQVy5uJlkX/V//bBRi/kUDQPXhIZp3I4tCIros3z6E5lpirYVhfIZdxBHDzhMGXrQ10mGK6uUu77sdtNaXSquCijFDf/61E4c9RvSq16xukd0CqtTqwnu7vzQ6aFneL5AKympo2pruHHd8uBbT1i3GVyqlToT6JbLj/VLJ7X1XTcFOJDDrCgR3wBqbAsZdToghOo6HtslSsAUtZ4PGgubRQEhLwsvrcJpTxamf7cCraU2DR3N2aomPbiObPlzpEGVckcl/9Fk3k6zWumLbKhH8bF5n1DS924BdxCfkO1YwZ5yDODuyOlSz8lnHpr5WRFq1WYdL7k5lb2FYfy4IX2AQNirM76DIPvqIdTRRzKsDMDdiVSzhe+Eek+wYIh59PrHyGmouTdfxXWrhFynm183fRx5GM45KeL0QU9RuU35LIFUlRxl3z7f8JFmPrV3Qhk3UCHODjnwH6gMXB+U7JF3aJPFjn8a6flYB63sFsl5+vvBK5MsHhBoMRRqE= X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:VI1PR04MB5600.eurprd04.prod.outlook.com; PTR:; CAT:NONE; SFS:(366004)(136003)(39860400002)(346002)(396003)(376002)(54906003)(66476007)(66556008)(2616005)(86362001)(8676002)(66946007)(4744005)(31696002)(956004)(26005)(38100700002)(6486002)(4326008)(8936002)(186003)(31686004)(36756003)(110136005)(316002)(478600001)(16576012)(2906002)(5660300002)(43740500002)(45980500001); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?2ACKsfr2aGY3JBF/WJdsSPagrRKj?= =?utf-8?q?8Adz4GIS9JbiLYdt7oaHH74Wo0tLvff1wxMPfobcIeZHxtVpeLEXzHfFP+LYwwjYm?= =?utf-8?q?RgWShV9iiBjWaebxGi2Ex0yCIbChEv18GnIRiXShpefW5O89IQ+o3yaSd7fL6tTgz?= =?utf-8?q?rOZbRhSn6XVDc9KRc2z0rQi1n/Ar5YlJdEKNRShafjeMS55jnoOV5jgI0YNfH0Udj?= =?utf-8?q?1y36eBreV5Rfi1AAm7GtKkKqspTMboNAzugWJJ4PHli2vnA8tVJiJ5bKindEPBbRs?= =?utf-8?q?6F1epfR7C/k4Jy7sUyCwzFveE8K2gpCUW7uzULoB/Zy8anXspirtqqVL3YWbC5TpN?= =?utf-8?q?T6vHyESv8PcF6tHtWbsLsVri7iJJWe43q64dV4oHcsokfJdiF0+P4w5QitxcNxmX+?= =?utf-8?q?ATyNGA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?/jC3HKzFldnfQ1ev?= X-OriginatorOrg: suse.com X-MS-Exchange-CrossTenant-Network-Message-Id: 2155bbff-726e-4d13-9c57-08d971e78b31 X-MS-Exchange-CrossTenant-AuthSource: VI1PR04MB5600.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 07 Sep 2021 10:09:13.7983 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: f7a17af6-1c5c-4a36-aa8b-f5be247aa4ba X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: jLBaJrGAjz0mRLQNZfUZ7RbXTndV1ys3SY0nFWniw1bduL2b6Kt5dDipo/9yF0nBg4Tk6gqy+zazSQGQxlYGZA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR04MB6176 X-BeenThere: linuxppc-dev@lists.ozlabs.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: "xen-devel@lists.xenproject.org" , Stefano Stabellini , "linuxppc-dev@lists.ozlabs.org" , lkml Errors-To: linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@lists.ozlabs.org Sender: "Linuxppc-dev" 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 Reviewed-by: Juergen Gross --- 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)