From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([209.51.188.92]:56582) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gzfpG-00065Z-NV for qemu-devel@nongnu.org; Fri, 01 Mar 2019 05:55:35 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gzfpF-0005Zw-T5 for qemu-devel@nongnu.org; Fri, 01 Mar 2019 05:55:34 -0500 Date: Fri, 1 Mar 2019 11:55:13 +0100 From: Cornelia Huck Message-ID: <20190301115513.48696631.cohuck@redhat.com> In-Reply-To: <20190221005753.27955-14-crosa@redhat.com> References: <20190221005753.27955-1-crosa@redhat.com> <20190221005753.27955-14-crosa@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH v3 13/20] scripts/qemu.py: support adding a console with the default serial device List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Cleber Rosa Cc: qemu-devel@nongnu.org, Caio Carrara , Alex =?UTF-8?B?QmVubsOpZQ==?= , Wainer dos Santos Moschetta , Aleksandar Rikalo , Aurelien Jarno , Fam Zheng , Eduardo Habkost , Philippe =?UTF-8?B?TWF0aGlldS1EYXVkw6k=?= , Stefan Markovic , qemu-s390x@nongnu.org, Aleksandar Markovic On Wed, 20 Feb 2019 19:57:46 -0500 Cleber Rosa wrote: > The set_console() utility function traditionally adds a device either > based on the explicitly given device type, or based on the machine type, > a known good type of device. Hm, I find this sentence hard to parse... maybe it should be "either adds a device..." and "adds a known good type of device"? > > But, for a number of machine types, it may be impossible or > inconvenient to add the devices my means of "-device" command line s/my/by/ > options, and then it may better to just use the "-serial" option and > let QEMU itself, based on the machine type, set the device > accordingly. > > To achieve that, the behavior of set_console() now flags the intention > to add a console device on launch(), and if no explicit device type is > given, and there's no definition on CONSOLE_DEV_TYPES, the "-serial" > is going to be added to the QEMU command line, instead of raising > exceptions. > > Based on testing with different machine types, the CONSOLE_DEV_TYPES > is now being set to the bare essential entries (one entry to be > honest), for machine types that can not easily give us a working > console with "-serial". > > Signed-off-by: Cleber Rosa > --- > scripts/qemu.py | 39 +++++++++++++++++++-------------------- > 1 file changed, 19 insertions(+), 20 deletions(-) > > diff --git a/scripts/qemu.py b/scripts/qemu.py > index ee85309923..bd1d2e2b9a 100644 > --- a/scripts/qemu.py > +++ b/scripts/qemu.py > @@ -42,11 +42,6 @@ def kvm_available(target_arch=None): > > #: Maps machine types to the preferred console device types > CONSOLE_DEV_TYPES = { > - r'^clipper$': 'isa-serial', > - r'^malta': 'isa-serial', > - r'^(pc.*|q35.*|isapc)$': 'isa-serial', > - r'^(40p|powernv|prep)$': 'isa-serial', > - r'^pseries.*': 'spapr-vty', > r'^s390-ccw-virtio.*': 'sclpconsole', FWIW, s390x has supported the '-serial' parameter since 3.0 (commit 052888f043bacb18231046045b1f9cd946703170). Maybe you can drop this now? If not, what error are you getting?