From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.3 required=3.0 tests=DKIM_ADSP_CUSTOM_MED, DKIM_INVALID,DKIM_SIGNED,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id E11FCC83004 for ; Tue, 28 Apr 2020 04:05:51 +0000 (UTC) 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 mail.kernel.org (Postfix) with ESMTPS id ACF48206E2 for ; Tue, 28 Apr 2020 04:05:51 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="s/ry4TNh" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org ACF48206E2 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1jTHV7-0000Nr-PL; Tue, 28 Apr 2020 04:05:41 +0000 Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1jTHV7-0000NG-14 for xen-devel@lists.xenproject.org; Tue, 28 Apr 2020 04:05:41 +0000 X-Inumbo-ID: 8493327c-8905-11ea-b07b-bc764e2007e4 Received: from mail-qv1-xf44.google.com (unknown [2607:f8b0:4864:20::f44]) by us1-rack-iad1.inumbo.com (Halon) with ESMTPS id 8493327c-8905-11ea-b07b-bc764e2007e4; Tue, 28 Apr 2020 04:05:38 +0000 (UTC) Received: by mail-qv1-xf44.google.com with SMTP id t8so9767793qvw.5 for ; Mon, 27 Apr 2020 21:05:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=MJ/wYWaIjP7f/7FREcfMpppu/JiqlH2FlZ3lrFsDLA4=; b=s/ry4TNhkeyiE/CLvIMK4n0nF/fmFPiReG/8ypM0JBO77Pxfbx9bmOZWUeGka/9g3n sVFSrodQSuasNMSayb9oShCWv5NHaqWYhDTc6xUA3C9CfVn4w9bY7tqDRiVNs4bq+I3f zkPBiNww8ZL+BQKA/V7uLnuR9u3mZoFXCsiHH8wZTLU9mWsFH5BMXJTQYFE9e8e4K7Fl 6DwirhucY+FSieVTDC8gAi2KgAYNs0OakeNDHEhLbEd2i9AwPwo0nSpWs4t01YMC2GBC FnYsHVwrRziElstqoP90yK7Qi4XNL7Y/gS74+QUL0BT9E3cdzaDthvBy6Se3q9DSvOBs jEuQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=MJ/wYWaIjP7f/7FREcfMpppu/JiqlH2FlZ3lrFsDLA4=; b=YX3dBevT/cC5e2XayThPn2zTfdBXrsqgGN0MMJIsrUogjgycytuAMmMfp2lQ/+igb0 VGA9NnW4nbQiprvu/AZyXZrjJK/kP5/3ICKKqLvw40m30fQ/y4HI+f59O9kODdk1qYRu xw++tjGHJkTT4lVHwCLfo2uywz7lGWZ0KTX9kTsTvgvs9cOn1568Qc7U50XieNv2XNGy NdMOJtvHAPe2YaKEIh64jBwFDtpqSyw1OXkeexsLlLNJzukNalH8NIEqRAKfAY0Nl+bR JtYGFM0RoqAqvfCq4y9iArYzJK1DLJbryihJxmwCxPky4RxMcdb0NffedNy8z3xGCp0x JprQ== X-Gm-Message-State: AGi0PuYFv6A53V2flDb64SPREwxFKWsNbeQ5b+nzdMoAgLSS0ez1rHaL MKY5uvxqRlOz7qHso8csLi/+MhPn X-Google-Smtp-Source: APiQypJI07Mxea/Un6qnNGKeAqvst+331zueBYLP+BJJ5zZRFAdjrm2anrdQvvDxr8R7MWoY70R5fQ== X-Received: by 2002:ad4:4e4d:: with SMTP id eb13mr24927138qvb.169.1588046737427; Mon, 27 Apr 2020 21:05:37 -0700 (PDT) Received: from shine.lan ([2001:470:8:67e:f1d1:23b9:fc94:a1a9]) by smtp.gmail.com with ESMTPSA id v2sm13445480qth.66.2020.04.27.21.05.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 27 Apr 2020 21:05:36 -0700 (PDT) From: Jason Andryuk To: xen-devel@lists.xenproject.org Subject: [PATCH v5 03/21] libxl: fix qemu-trad cmdline for no sdl/vnc case Date: Tue, 28 Apr 2020 00:04:15 -0400 Message-Id: <20200428040433.23504-4-jandryuk@gmail.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200428040433.23504-1-jandryuk@gmail.com> References: <20200428040433.23504-1-jandryuk@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: xen-devel@lists.xenproject.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Cc: Wei Liu , Wei Liu , Jason Andryuk , =?UTF-8?q?Marek=20Marczykowski-G=C3=B3recki?= , Anthony PERARD , Ian Jackson Errors-To: xen-devel-bounces@lists.xenproject.org Sender: "Xen-devel" From: Marek Marczykowski-Górecki When qemu is running in stubdomain, any attempt to initialize vnc/sdl there will crash it (on failed attempt to load a keymap from a file). If vfb is present, all those cases are skipped. But since b053f0c4c9e533f3d97837cf897eb920b8355ed3 "libxl: do not start dom0 qemu for stubdomain when not needed" it is possible to create a stubdomain without vfb and contrary to the comment -vnc none do trigger VNC initialization code (just skips exposing it externally). Change the implicit SDL avoiding method to -nographics option, used when none of SDL or VNC is enabled. Signed-off-by: Marek Marczykowski-Górecki Reviewed-by: Jason Andryuk Acked-by: Ian Jackson Acked-by: Wei Liu Signed-off-by: Jason Andryuk --- Changes in v2: - typo in qemu option Changes in v3: - add missing { } --- tools/libxl/libxl_dm.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/tools/libxl/libxl_dm.c b/tools/libxl/libxl_dm.c index f4007bbe50..b91e63db6f 100644 --- a/tools/libxl/libxl_dm.c +++ b/tools/libxl/libxl_dm.c @@ -734,14 +734,15 @@ static int libxl__build_device_model_args_old(libxl__gc *gc, if (libxl_defbool_val(vnc->findunused)) { flexarray_append(dm_args, "-vncunused"); } - } else + } else if (!sdl) { /* * VNC is not enabled by default by qemu-xen-traditional, - * however passing -vnc none causes SDL to not be - * (unexpectedly) enabled by default. This is overridden by - * explicitly passing -sdl below as required. + * however skipping -vnc causes SDL to be + * (unexpectedly) enabled by default. If undesired, disable graphics at + * all. */ - flexarray_append_pair(dm_args, "-vnc", "none"); + flexarray_append(dm_args, "-nographic"); + } if (sdl) { flexarray_append(dm_args, "-sdl"); -- 2.20.1