From patchwork Mon Jul 10 14:12:38 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Roger_Pau_Monn=C3=A9?= X-Patchwork-Id: 13307182 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 01E1CEB64DA for ; Mon, 10 Jul 2023 14:13:30 +0000 (UTC) Received: from list by lists.xenproject.org with outflank-mailman.561221.877624 (Exim 4.92) (envelope-from ) id 1qIrdP-0007Pm-U8; Mon, 10 Jul 2023 14:13:03 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 561221.877624; Mon, 10 Jul 2023 14:13:03 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1qIrdP-0007Pf-Rd; Mon, 10 Jul 2023 14:13:03 +0000 Received: by outflank-mailman (input) for mailman id 561221; Mon, 10 Jul 2023 14:13:03 +0000 Received: from se1-gles-flk1-in.inumbo.com ([94.247.172.50] helo=se1-gles-flk1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1qIrdP-0007PZ-Cv for xen-devel@lists.xenproject.org; Mon, 10 Jul 2023 14:13:03 +0000 Received: from esa5.hc3370-68.iphmx.com (esa5.hc3370-68.iphmx.com [216.71.155.168]) by se1-gles-flk1.inumbo.com (Halon) with ESMTPS id dfe2185a-1f2b-11ee-8611-37d641c3527e; Mon, 10 Jul 2023 16:13:00 +0200 (CEST) Received: from mail-mw2nam12lp2045.outbound.protection.outlook.com (HELO NAM12-MW2-obe.outbound.protection.outlook.com) ([104.47.66.45]) by ob1.hc3370-68.iphmx.com with ESMTP/TLS/ECDHE-RSA-AES128-GCM-SHA256; 10 Jul 2023 10:12:50 -0400 Received: from SJ0PR03MB6423.namprd03.prod.outlook.com (2603:10b6:a03:38d::21) by PH0PR03MB7114.namprd03.prod.outlook.com (2603:10b6:510:291::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6565.31; Mon, 10 Jul 2023 14:12:46 +0000 Received: from SJ0PR03MB6423.namprd03.prod.outlook.com ([fe80::fb95:b992:be69:7fa2]) by SJ0PR03MB6423.namprd03.prod.outlook.com ([fe80::fb95:b992:be69:7fa2%5]) with mapi id 15.20.6565.028; Mon, 10 Jul 2023 14:12:46 +0000 X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" X-Inumbo-ID: dfe2185a-1f2b-11ee-8611-37d641c3527e DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=citrix.com; s=securemail; t=1688998380; h=from:to:cc:subject:date:message-id: content-transfer-encoding:mime-version; bh=Y6oh3zp3Z/2dIERwBPNGl0nWCaJMPxQkTE54A1X6tLY=; b=HKE8hNI8xEbSz1lN3ahQhIzRikmb+69f6fAGaG0pEqQcsfhxPa+cNgLg NoktkeH+kksOzSXprY7tEtcUGTGU/A8R+rfMNj+JXfpGW/KwvfO+LmwiY y0aZbrUwSWcaqDUifnNSc+Tnq4jdLpwAdRPpdPqyGc7Ir5rmaHzo1Gp9R o=; X-IronPort-RemoteIP: 104.47.66.45 X-IronPort-MID: 114419237 X-IronPort-Reputation: None X-IronPort-Listener: OutboundMail X-IronPort-SenderGroup: RELAY_O365 X-IronPort-MailFlowPolicy: $RELAYED IronPort-Data: A9a23:TFAbs6Cv7GNM+RVW/w7iw5YqxClBgxIJ4kV8jS/XYbTApDN21mMDn GMbDDrVaa7b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7Og1MADG02WE= X-IronPort-AV: E=Sophos;i="6.01,194,1684814400"; d="scan'208";a="114419237" ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=c9VMYI3zTBK7T3vPn2Y+Bqg0OgCkuvx8ZI9UMH9HPykGvdtMihm4OZNpEFZKPI4PaSrA7d9ymGSaIq8k6q3XZn73IHMnht/xp9bSwy9s4yFj6PMp/bl/aMi1rx36g0UjADpsdcEwDclmmE9TZb619f4l6kHI8TjAcpc6Q6x3n+8TyQJBUMJL0X/pMa9LreohUwMAUIAl20flLRjpgIxugJ+MA2B9DmNE1bvIFcOTbfovaXVq80cST2ACZ1UCj70kt1Z5bnqWW73Pnkb94CqLJEmhNsLdjZH2y8XBHNQrtmv9L7r/82jQ2bIAjCbQNck/xnnaL8RGFHNLu5G1OaKK3w== 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:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=IlsLkyE9EbE83jCQDjjMDNyDHqXyyQDGqmf1ljap4rs=; b=VLaMlJrBh4Q6R67ga9cFDypNE1ef3IYv0VHD50PyCOFXgLjUJTsZr8q82SD88NDjbgaj24QqG4wNM5ui0IQ0GKwcbfA8eJZ5N0tDQ2LzUoLViLeN7Rfck14Hqgqa/V1afXKu2/tt3UjUMVd1IxCzI51N6P068DtY8iST9CTyBFAq+IzkgIeZnpyHmcvMdoGb5FcyGHf+26EoLHNw9yjFwummfCCN1vPgV5ufHB/ePrj32t+TdEF/pizGx7JuiU9kO195XUaE2M27Y5rrCfrkvQP/wDHFjg1H4Uqb16mUriGiH0tclpj6CkKT2B0u5TfEWnb8y04z1Jupq8hcVsHtXA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=citrix.com; dmarc=pass action=none header.from=citrix.com; dkim=pass header.d=citrix.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=citrix.onmicrosoft.com; s=selector2-citrix-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=IlsLkyE9EbE83jCQDjjMDNyDHqXyyQDGqmf1ljap4rs=; b=J1LKqlY2FBr9SUh+nJ54glr8p7OZqIsn2PDFez/9nZL/0WdsQyftp2jumZYtlgAc0w3cRSryozO0iMX+T6Ka0NZ615dxhh9hLZaqLEIBozk0zTjxrMMz2h3gdYhwamVZi0V3T7TLDrKyFntL/MWwm2/2Ifws7gBFf6jWd3Przu0= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=citrix.com; From: Roger Pau Monne To: xen-devel@lists.xenproject.org Cc: Roger Pau Monne , Jan Beulich , Andrew Cooper , Wei Liu Subject: [PATCH] cmdline: only set ask mode if vga= is present Date: Mon, 10 Jul 2023 16:12:38 +0200 Message-ID: <20230710141238.375-1-roger.pau@citrix.com> X-Mailer: git-send-email 2.41.0 X-ClientProxiedBy: LO2P123CA0024.GBRP123.PROD.OUTLOOK.COM (2603:10a6:600:a6::36) To SJ0PR03MB6423.namprd03.prod.outlook.com (2603:10b6:a03:38d::21) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SJ0PR03MB6423:EE_|PH0PR03MB7114:EE_ X-MS-Office365-Filtering-Correlation-Id: fdd642fd-49fd-45a9-ae39-08db814fbc01 X-LD-Processed: 335836de-42ef-43a2-b145-348c2ee9ca5b,ExtAddr,ExtFwd X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 1Qvb6+L6KGcjTctk6RXWh0dKP6ZjTLBq9A72n+ts5RNEun4/IMfsQHgBHpQUxwp7hX7Edcd9FZKHygkhYixv96odZlzcUxlzE80rtVlYHgosLg2GFOduaH2vMu1ciWayIOXV5T5fSe4kNEaQhI4zObDJlbrmY7XlORsO0QE8WivcKljvSfl5X3FSO3OcfLb9jv9DxW6+dsm0gPoOZXSmlAKu6LvdN5OXzRpKszvp5xGD3rNFUZc2nxYG0Lnp9gPOCnKQEbcN8POUsa7ydCKUpP7YgvDoMh/AXI7YLIaeea5aBSq+qifBewnK1p5KNGW6b0LSTFYBu56YQ4w802sdN7u6W3bTr8EVBbCFpBWMZY4FaGtYJsXWdvp2OHmOeFuuWZ6Q/MdTAAA6MStVW5NP5CkroXhghaRIBZNGWdx3mFVHkz/tdZOa83IoNJqVkncXvZZE3KytB6Ds7lgX2DlOuVzhZE+6W1++qQ1KDSsIa4Pgrm+fJ6mXh/xnAw6O9xl/NamUEXYgAs/nIKA7AZ5zP32HcYRblguRcMHeC25cCRo= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:SJ0PR03MB6423.namprd03.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230028)(4636009)(136003)(39860400002)(396003)(366004)(346002)(376002)(451199021)(6666004)(6486002)(478600001)(83380400001)(1076003)(26005)(2616005)(6506007)(186003)(36756003)(966005)(6512007)(316002)(2906002)(41300700001)(38100700002)(82960400001)(66476007)(66946007)(66556008)(6916009)(4326008)(86362001)(8676002)(8936002)(5660300002)(54906003);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?rdtk+2gak4nkzgvuK+7BI3W6F5Cr?= =?utf-8?q?sEMBXIBq7ayngUvtnxzleZ87tefQN7onBUUXbXxR2C8oncMT45+0o0JPjaFeG1gwQ?= =?utf-8?q?HKfrwQDXGX6oW/MQEJRQuifoZSBUS3vBk8hmUSpGH+mUXSPbcsWy6Y3qLzjKgqY4K?= =?utf-8?q?VviwR67PeeRXKQspDHdiizLwbuuegWiFwN7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RJeiFHeNT?= =?utf-8?q?9N6KQozZP2ozgSKoTVhHzSAJNMHSTq8+XfBqnZ1URF6jBUHEbBMVYQe4K+TZjUT+Z?= =?utf-8?q?IWG6IYFMoDx6kjytIYdJA7oVAcMUgsaaFmA0e+aEuxtSnKKxy2KX/I3a+iAdywgw/?= =?utf-8?q?Dy1w0bp/Q7gw8JHWggeIhqjHRIApWIweZCU/ZMRcaC04z6SwgAz4iyq6I9wnNSVU3?= =?utf-8?q?z4/5U3238iU1AaDuJilWar10AZeLgXqi0mbw/RjvphfaYHmCOvYyfdHtWXWj32tti?= =?utf-8?q?RWH22Fh5to0bF353Kpdmfsqjxa9kXM4G9xrdd5kbdsh2rSxVLvwxcP10DuK4dZylO?= =?utf-8?q?eUVxnXQ2ya59gKfV8/G+Cok+zUkzAW2v/H6me4XmlHL6TNs21ErhFoRopSonmrkSP?= =?utf-8?q?GA3fgHEKZ5xTbehLDtDEFCAorPccCp4sD4v4v0VeBYQciVzUGILuiN72tVJEzb0vi?= =?utf-8?q?em+WdtF2pv6e?= X-MS-Exchange-AntiSpam-ExternalHop-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-ExternalHop-MessageData-0: fZeLOy5BbpnPd8oKhCAmZqrpjeg0etY/JZJPtPtC3Tv2T3NJ8Apu63bNVBH7gTo9K/D0TjCmguklcC1+Q998UcdIi7056aeyf46m8zyfL+cK1/xEeoKCymqQGYcGsIPpjzr3rfPvYIIB7O4V7FWK29NvgmjFrSH+eeCiXwnMX9ANCEgtg+wCZdi0DZ6r94SPxXXFhHziMVDtraXy8BsOKVC9362fOkQNRLMVqMkCiKO9gH7ja7R+L3Jpa4472lCzxpUeML/4oIjHAIefJMYEpna6HcCO6Cq4ljGxIM2BWBxLfsZZ2geACnihv0PCt630Zd9FfCV2Lxc3gm8AMozTCA2kZ7t81vLpgqtxcufMJogBgcLXMrSSjJ+tDCrk2EFYfBP6T0P8Sy0s+844n/PPYhf3emd/HQpGT6i5LsdCWn+UU5Hj2F0NtlDSaDLuLHK3Kw5qK7dEMWqRQxpkx2kk753itQsCOAXUohpYsNIrpgxBI2+YuR6tXcf8zd6guMdeXLN0EghXGqfHfloY6b7ki0JDav53GFHPTs7DjzMUTKUjIZXD28T2EsUZHytm5wMjnEk2Yt2LnX1eDoaZ7RUWzrTHv4YI9Bqflt4JDf5cReaSUxUFRJxXVIxI22l7bcWIv/7XRFABD/xNEr04omAGgtfnGP9l1affYBZFtAE2EbwOELoGI2LmcEHjIkLRZ53I7uqSVJ80UrhT/pzXFKuVNrBnbgG+dLzXRwazKrdqoIVOBdH8aoaLIBom/x4xu4L3JapOVIXODHnUUO0X7yJCniuFDCsXcGlGvv5OsXKfB18iz/Si2Q/VSF/pzWHZx5H5 X-OriginatorOrg: citrix.com X-MS-Exchange-CrossTenant-Network-Message-Id: fdd642fd-49fd-45a9-ae39-08db814fbc01 X-MS-Exchange-CrossTenant-AuthSource: SJ0PR03MB6423.namprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 10 Jul 2023 14:12:46.2539 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 335836de-42ef-43a2-b145-348c2ee9ca5b X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: r2Cmq1bI6kSesaFh7xVGXqw8VU7FGSLjNaas1/Vs/rwLEwhpMJDBnJvDwpXBjsrtRb/Ca5qlACUmkZH6LDmoMg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH0PR03MB7114 Commit 9473d9a24182 set the ASK mode without checking if there was a `vga` option provided in the command line. This breaks existing behavior, so exit early without changes if `vga` is not present in the command line. Fixes: 9473d9a24182 ('cmdline: parse multiple instances of the vga option') Signed-off-by: Roger Pau Monné Reviewed-by: Jan Beulich --- Does seem to fix the broken gitlab tests: https://gitlab.com/xen-project/people/royger/xen/-/pipelines/926397265 --- xen/arch/x86/boot/cmdline.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/xen/arch/x86/boot/cmdline.c b/xen/arch/x86/boot/cmdline.c index 10dcc6142c85..74997703b31e 100644 --- a/xen/arch/x86/boot/cmdline.c +++ b/xen/arch/x86/boot/cmdline.c @@ -279,9 +279,13 @@ static void vga_parse(const char *cmdline, early_boot_opts_t *ebo) { const char *c = cmdline; + c = find_opt(c, "vga=", true); + if ( !c ) + return; + ebo->boot_vid_mode = ASK_VGA; - while ( (c = find_opt(c, "vga=", true)) != NULL ) + do { unsigned int tmp, vesa_depth, vesa_height, vesa_width; @@ -332,6 +336,7 @@ static void vga_parse(const char *cmdline, early_boot_opts_t *ebo) else if ( !strmaxcmp(c, "ask", delim_chars_comma) ) ebo->boot_vid_mode = ASK_VGA; } + while ( (c = find_opt(c, "vga=", true)) != NULL ); } #endif