From nobody Wed Nov 27 04:57:03 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1700159020; cv=none; d=zohomail.com; s=zohoarc; b=dOMUcEc+5k8cHRbyFBAexNZFX7wGUG72188g8QdzPuP+oPr+zZLlZhIFF0R1maMnfBdAozftToiYphv02DlhWEFv9XOZtk+WqNaR9NOWKlET9l0qJVHjNSQGoJ9kStLzeZ/kgOvneWj1JLT+IyN1W86+aEz2adteFJh8Qisy4iA= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1700159020; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=XujmckOuorT9tgRmqDDi9Vy4DzacPMlIY64xiIiuhls=; b=AmWY3MifWW2LGzU4nKx/ZNeYCnyDhhlnuLYRHy4VsBJx63RC6tJSYzMXLUxeRQdBWmC8qyrokkBuR5ggpqSfcYrWqpEhwIOGNE5OCsV7UtNA3CI3K0jmgk0IT6g+wJ6008xulFQJzxLBGXNKbQNzGGgsYWP4l1gHezKHAfcQwZI= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1700159020018834.5079165801654; Thu, 16 Nov 2023 10:23:40 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1r3h0j-0007nb-2l; Thu, 16 Nov 2023 13:22:41 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1r3h0h-0007gB-4I for qemu-devel@nongnu.org; Thu, 16 Nov 2023 13:22:39 -0500 Received: from mail-wr1-x42b.google.com ([2a00:1450:4864:20::42b]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1r3h0b-0003sv-6z for qemu-devel@nongnu.org; Thu, 16 Nov 2023 13:22:35 -0500 Received: by mail-wr1-x42b.google.com with SMTP id ffacd0b85a97d-32f7bd27c2aso876209f8f.2 for ; Thu, 16 Nov 2023 10:22:31 -0800 (PST) Received: from orth.archaic.org.uk (orth.archaic.org.uk. [2001:8b0:1d0::2]) by smtp.gmail.com with ESMTPSA id f10-20020adfdb4a000000b0032da35baf7bsm61943wrj.113.2023.11.16.10.22.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 16 Nov 2023 10:22:29 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1700158950; x=1700763750; darn=nongnu.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=XujmckOuorT9tgRmqDDi9Vy4DzacPMlIY64xiIiuhls=; b=Wwgn0ayrRZ4B5Q5b0f0xxCZoxbEqKb1bOtJV4bvwdFraqm4pZ28WBInIuxNWWKOeXJ SM5/fkwzAtQSxTWoAS2wDXr7RUSB+ce91oPil3q4WqQ65Kxmyjgu5KnzwLE41i6XJktR ETvSCguihH1yhvubXH9kqeqAaJzXSXoMgrxPGpiJF6MJNV5vFPGne/q6CII6Edev8QHJ zzhIPyjgf/uYRJidhHqQX/QjLV+MXe2tlS+a1HguvukcKk2yP8RQC1yV+xDwbUBk94Vn Igp7T52OdeBGOHdjdX7reVaLPQYDXnTk/4wnCDUTS9hv/Fa9k6QRGeyuorD6kEG3oz1X uyMA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1700158950; x=1700763750; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=XujmckOuorT9tgRmqDDi9Vy4DzacPMlIY64xiIiuhls=; b=BMb5XeoWJPt6L6C9uIOAO4iwV1T6i4TsyEFqgljXysUTefD/WCSi7LMkQK5ADm2Ow8 GMT9vUPtPxIWcKyKFIrUIP0P9ZxdVWCnM65OE/LmqDEHcG1Pegr9jdli/TgJsg13Pkpd fPNk91tQXWYPKY+3QsVtOBaPWTjgq26Dsv1Sigrm3z2PELMzVVCl1eziP69ixZQu86SU NBjphehhwfcjf1QSDCQCph1at0H2tKv7t0QXwgHEZUoOIU6vHWQ6WxK6zzl9B+K8ppwT BGcKF7QEeI5kNngkqhu6GVq0Li+ELcn7yZbt6pnThpsHy2mMMx01jfozglE4RJfN2Lc6 zBGg== X-Gm-Message-State: AOJu0YyXDP6JET6b6TNwkq5aZd68E5E4ukZ5VJVgEM/zYJh7J4iH2FrC Ocig0K1KkzQhuMGgEaG0o9279FdH30LbKhCW0qs= X-Google-Smtp-Source: AGHT+IFeFRFqwi40/9iUslNevxbdL31IbVPx43hcgUL8VEm/qV2PWKqOBcKzI+8sU03Ho7Vof+XRDg== X-Received: by 2002:a5d:5889:0:b0:32f:7734:a0fa with SMTP id n9-20020a5d5889000000b0032f7734a0famr16649245wrf.2.1700158950190; Thu, 16 Nov 2023 10:22:30 -0800 (PST) From: Peter Maydell To: qemu-devel@nongnu.org Cc: =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , Gerd Hoffmann , Paolo Bonzini , David Woodhouse Subject: [PATCH for-8.2] Revert "ui/console: allow to override the default VC" Date: Thu, 16 Nov 2023 18:22:28 +0000 Message-Id: <20231116182228.3062796-1-peter.maydell@linaro.org> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::42b; envelope-from=peter.maydell@linaro.org; helo=mail-wr1-x42b.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1700159021384100003 Content-Type: text/plain; charset="utf-8" This reverts commit 1bec1cc0da497e55c16e2a7b50f94cdb2a02197f. This commit changed the behaviour of the "-display none" option, so that it now creates a QEMU monitor on the terminal. "-display none" should not be tangled up with whether we create a monitor or a serial terminal; it should purely and only disable the graphical window. Changing its behaviour like this breaks command lines which, for example, use semihosting for their output and don't want a graphical window, as they now get a monitor they never asked for. It also breaks the command line we document for Xen in docs/system/i386/xen.html: $ ./qemu-system-x86_64 --accel kvm,xen-version=3D0x40011,kernel-irqchip=3D= split \ -display none -chardev stdio,mux=3Don,id=3Dchar0,signal=3Doff -mon char= 0 \ -device xen-console,chardev=3Dchar0 -drive file=3D${GUEST_IMAGE},if=3D= xen qemu-system-x86_64: cannot use stdio by multiple character devices qemu-system-x86_64: could not connect serial device to character backend 's= tdio' Revert the commit to restore the previous handling of "-display none". Resolves: https://gitlab.com/qemu-project/qemu/-/issues/1974 Signed-off-by: Peter Maydell Reviewed-by: --- include/ui/console.h | 2 -- system/vl.c | 27 ++++++++++----------------- ui/console.c | 17 ----------------- 3 files changed, 10 insertions(+), 36 deletions(-) diff --git a/include/ui/console.h b/include/ui/console.h index a4a49ffc640..acb61a7f152 100644 --- a/include/ui/console.h +++ b/include/ui/console.h @@ -462,14 +462,12 @@ struct QemuDisplay { DisplayType type; void (*early_init)(DisplayOptions *opts); void (*init)(DisplayState *ds, DisplayOptions *opts); - const char *vc; }; =20 void qemu_display_register(QemuDisplay *ui); bool qemu_display_find_default(DisplayOptions *opts); void qemu_display_early_init(DisplayOptions *opts); void qemu_display_init(DisplayState *ds, DisplayOptions *opts); -const char *qemu_display_get_vc(DisplayOptions *opts); void qemu_display_help(void); =20 /* vnc.c */ diff --git a/system/vl.c b/system/vl.c index 5af7ced2a16..3d64a90f253 100644 --- a/system/vl.c +++ b/system/vl.c @@ -1372,7 +1372,6 @@ static void qemu_setup_display(void) static void qemu_create_default_devices(void) { MachineClass *machine_class =3D MACHINE_GET_CLASS(current_machine); - const char *vc =3D qemu_display_get_vc(&dpy); =20 if (is_daemonized()) { /* According to documentation and historically, -nographic redirec= ts @@ -1391,30 +1390,24 @@ static void qemu_create_default_devices(void) } } =20 - if (nographic || (!vc && !is_daemonized() && isatty(STDOUT_FILENO))) { - if (default_parallel) { + if (nographic) { + if (default_parallel) add_device_config(DEV_PARALLEL, "null"); - } if (default_serial && default_monitor) { add_device_config(DEV_SERIAL, "mon:stdio"); } else { - if (default_serial) { + if (default_serial) add_device_config(DEV_SERIAL, "stdio"); - } - if (default_monitor) { + if (default_monitor) monitor_parse("stdio", "readline", false); - } } } else { - if (default_serial) { - add_device_config(DEV_SERIAL, vc ?: "null"); - } - if (default_parallel) { - add_device_config(DEV_PARALLEL, vc ?: "null"); - } - if (default_monitor && vc) { - monitor_parse(vc, "readline", false); - } + if (default_serial) + add_device_config(DEV_SERIAL, "vc:80Cx24C"); + if (default_parallel) + add_device_config(DEV_PARALLEL, "vc:80Cx24C"); + if (default_monitor) + monitor_parse("vc:80Cx24C", "readline", false); } =20 if (default_net) { diff --git a/ui/console.c b/ui/console.c index 8e688d35695..676d0cbaba2 100644 --- a/ui/console.c +++ b/ui/console.c @@ -1677,23 +1677,6 @@ void qemu_display_init(DisplayState *ds, DisplayOpti= ons *opts) dpys[opts->type]->init(ds, opts); } =20 -const char *qemu_display_get_vc(DisplayOptions *opts) -{ - assert(opts->type < DISPLAY_TYPE__MAX); - if (opts->type =3D=3D DISPLAY_TYPE_NONE) { - return NULL; - } - assert(dpys[opts->type] !=3D NULL); - if (dpys[opts->type]->vc) { - return dpys[opts->type]->vc; - } else { -#ifdef CONFIG_PIXMAN - return "vc:80Cx24C"; -#endif - } - return NULL; -} - void qemu_display_help(void) { int idx; --=20 2.34.1