From nobody Sat May 18 19:12:47 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; 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=fail(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1603094192; cv=none; d=zohomail.com; s=zohoarc; b=blGO0vGZtp0+ZFgJ0zAUvj8snu8H+aMNC0izS+4n3I6fk80sGvw6VPn2tgiShx3bK5nvr5pH5tRxzbsUYrnzaCptSyKs5Ht8WO7wuHO85vofEngpRSH7iHltMx8hNtQ2/q1nXJUL/gz6Z+Md1ibkQArvhTNTqpUtfJe/XOFOgvg= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1603094192; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=lV8TwNiT16RM5Txuvx4O/Oq+lSwbIom6PY+cZuGZOvQ=; b=isuY0ZiDsjB1ayjnhk/kMtvYVG9laRtznDrbxLK5KiBsKXqZnwFgjuh8UxVr3vzfCNezCpdLY3VlWIdmL3UiRtUndJi0mNqfW2tcKY8J0OnTEHRggqup4ColOk+4lhfuJ8itd18S9LPEhj8n/rElWlRe8bs/fsZ1c+VmYm9ddnU= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; 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=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1603094192198576.1533224442279; Mon, 19 Oct 2020 00:56:32 -0700 (PDT) Received: from localhost ([::1]:60796 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kUQ1v-00016A-1C for importer@patchew.org; Mon, 19 Oct 2020 03:56:31 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:54266) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kUPyH-0005B6-EK for qemu-devel@nongnu.org; Mon, 19 Oct 2020 03:52:45 -0400 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:55985) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1kUPyE-00085k-Bg for qemu-devel@nongnu.org; Mon, 19 Oct 2020 03:52:45 -0400 Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-283-oOvfNnJhOcWE20gsY9xXGw-1; Mon, 19 Oct 2020 03:52:38 -0400 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id BA85C18A0761 for ; Mon, 19 Oct 2020 07:52:37 +0000 (UTC) Received: from sirius.home.kraxel.org (ovpn-112-56.ams2.redhat.com [10.36.112.56]) by smtp.corp.redhat.com (Postfix) with ESMTP id 2021D76653; Mon, 19 Oct 2020 07:52:25 +0000 (UTC) Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id 236821750A; Mon, 19 Oct 2020 09:52:24 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1603093961; 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=lV8TwNiT16RM5Txuvx4O/Oq+lSwbIom6PY+cZuGZOvQ=; b=LYg/lKa+2L08EcPQKnGZfU9Locn8yPOzp0XuKKUc2+XLeMgfWp51iETL65a/Vd2aVWZh8c 2vf8I+LYsr8J7wPdY4Xqs536O1vJNCSzADEpAtFa/Z88gs4QYe/px9W0llcKRmGXRbXYtC 6cRkDE+9NL2e0U4obc7Sd7eL78vx7NE= X-MC-Unique: oOvfNnJhOcWE20gsY9xXGw-1 From: Gerd Hoffmann To: qemu-devel@nongnu.org Subject: [PATCH 01/14] spice: add module helpers Date: Mon, 19 Oct 2020 09:52:11 +0200 Message-Id: <20201019075224.14803-2-kraxel@redhat.com> In-Reply-To: <20201019075224.14803-1-kraxel@redhat.com> References: <20201019075224.14803-1-kraxel@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=kraxel@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com 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=216.205.24.124; envelope-from=kraxel@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/10/19 01:44:30 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] [fuzzy] 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, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H4=-0.01, RCVD_IN_MSPIKE_WL=-0.01, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , Paolo Bonzini , Gerd Hoffmann , Markus Armbruster , "Dr. David Alan Gilbert" Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" Add new spice-module.c + qemu-spice-module.h files. The code needed to support modular spice will be there. For starters this will be only the using_spice variable, more will follow ... Signed-off-by: Gerd Hoffmann Reviewed-by: Marc-Andr=C3=A9 Lureau --- include/ui/qemu-spice-module.h | 23 +++++++++++++++++++++++ include/ui/qemu-spice.h | 4 +--- ui/spice-core.c | 1 - ui/spice-module.c | 23 +++++++++++++++++++++++ ui/meson.build | 1 + 5 files changed, 48 insertions(+), 4 deletions(-) create mode 100644 include/ui/qemu-spice-module.h create mode 100644 ui/spice-module.c diff --git a/include/ui/qemu-spice-module.h b/include/ui/qemu-spice-module.h new file mode 100644 index 000000000000..1af0e659a109 --- /dev/null +++ b/include/ui/qemu-spice-module.h @@ -0,0 +1,23 @@ +/* + * Copyright (C) 2010 Red Hat, Inc. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 or + * (at your option) version 3 of the License. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, see . + */ + +#ifndef QEMU_SPICE_MODULE_H +#define QEMU_SPICE_MODULE_H + +extern int using_spice; + +#endif diff --git a/include/ui/qemu-spice.h b/include/ui/qemu-spice.h index 0e8ec3f0d776..ab523788b9a9 100644 --- a/include/ui/qemu-spice.h +++ b/include/ui/qemu-spice.h @@ -19,14 +19,13 @@ #define QEMU_SPICE_H =20 #include "qapi/error.h" +#include "ui/qemu-spice-module.h" =20 #ifdef CONFIG_SPICE =20 #include #include "qemu/config-file.h" =20 -extern int using_spice; - void qemu_spice_init(void); void qemu_spice_input_init(void); void qemu_spice_display_init(void); @@ -50,7 +49,6 @@ int qemu_spice_migrate_info(const char *hostname, int por= t, int tls_port, =20 #include "qemu/error-report.h" =20 -#define using_spice 0 #define spice_displays 0 static inline int qemu_spice_set_passwd(const char *passwd, bool fail_if_connected, diff --git a/ui/spice-core.c b/ui/spice-core.c index 47700b220059..a7fa5743585f 100644 --- a/ui/spice-core.c +++ b/ui/spice-core.c @@ -48,7 +48,6 @@ static time_t auth_expires =3D TIME_MAX; static int spice_migration_completed; static int spice_display_is_running; static int spice_have_target_host; -int using_spice =3D 0; =20 static QemuThread me; =20 diff --git a/ui/spice-module.c b/ui/spice-module.c new file mode 100644 index 000000000000..f86b0ac517dc --- /dev/null +++ b/ui/spice-module.c @@ -0,0 +1,23 @@ +/* + * spice module support, also spice stubs. + * + * Copyright (C) 2010 Red Hat, Inc. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 or + * (at your option) version 3 of the License. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, see . + */ + +#include "qemu/osdep.h" +#include "ui/qemu-spice-module.h" + +int using_spice; diff --git a/ui/meson.build b/ui/meson.build index 6ce814867852..fc1b31daec47 100644 --- a/ui/meson.build +++ b/ui/meson.build @@ -12,6 +12,7 @@ softmmu_ss.add(files( 'keymaps.c', 'qemu-pixman.c', )) +softmmu_ss.add([spice_headers, files('spice-module.c')]) =20 softmmu_ss.add(when: 'CONFIG_LINUX', if_true: files('input-linux.c')) softmmu_ss.add(when: [spice, 'CONFIG_SPICE'], if_true: files('spice-core.c= ', 'spice-input.c', 'spice-display.c')) --=20 2.27.0 From nobody Sat May 18 19:12:47 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; 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=fail(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1603094341; cv=none; d=zohomail.com; s=zohoarc; b=LVG6sLuugQnieHthP27177M+IgsypPWC/9lyRQY9T+5R4Y+YcpQujniOKnRX0stIIedeKKKnUAVw+TIpeMuNT2P1sRZdD+XGRSARe5Vuxh0GKm6J5jBoSQsie2+5mZTTTlaSGqvS8OQCN1zRsMryqnYdUe6m4sWAfQKYdbWqoT0= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1603094341; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=i4SQi3qlFXaEs4MAuJUwCkKtwhjjNVrBj9tqjfNCtgI=; b=FeChayAdrGc17NNOOScQlRCHsU5OsMmwBWmZQz8GvHjL+JkucpWh9QIRk/e91+jamSNeH1sPyf9JJ5hceiuJyFLwakQYQKitL9SZiZkvnNIEsvtSpbkYhU2l834KVZ6uXmRCoM+kKvEGFHPPOn+U/0YgowLfQ76oNzAVX0BG8NU= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; 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=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 160309434140751.655210241785426; Mon, 19 Oct 2020 00:59:01 -0700 (PDT) Received: from localhost ([::1]:39492 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kUQ4K-0003xd-8C for importer@patchew.org; Mon, 19 Oct 2020 03:59:00 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:54300) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kUPyK-0005IJ-Et for qemu-devel@nongnu.org; Mon, 19 Oct 2020 03:52:48 -0400 Received: from us-smtp-delivery-124.mimecast.com ([63.128.21.124]:58498) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1kUPyH-00087G-Eu for qemu-devel@nongnu.org; Mon, 19 Oct 2020 03:52:48 -0400 Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-482-t6gXDulkO1C3LctWjI0eTg-1; Mon, 19 Oct 2020 03:52:42 -0400 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 9E60018A824E for ; Mon, 19 Oct 2020 07:52:41 +0000 (UTC) Received: from sirius.home.kraxel.org (ovpn-112-56.ams2.redhat.com [10.36.112.56]) by smtp.corp.redhat.com (Postfix) with ESMTP id 08DFC5B4C3; Mon, 19 Oct 2020 07:52:25 +0000 (UTC) Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id 32EE11753B; Mon, 19 Oct 2020 09:52:24 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1603093964; 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=i4SQi3qlFXaEs4MAuJUwCkKtwhjjNVrBj9tqjfNCtgI=; b=LivSQTXVYo0MtVvBynLv/LeQFTzZ/4BGdlCATyl/fZsi0tHZm7ACKEHD7y/iPJ0kujR9Ed o4vTq0F/xrQm3nTlKSt48Ppbel0JwOx31aaUkHVoQxEulFrYKmG44jva0LdgqT+fBPDUDU ge/jYkIT7McMuRsO3EKjG/Nyrf98M+Y= X-MC-Unique: t6gXDulkO1C3LctWjI0eTg-1 From: Gerd Hoffmann To: qemu-devel@nongnu.org Subject: [PATCH 02/14] spice: add QemuSpiceOps, move migrate_info Date: Mon, 19 Oct 2020 09:52:12 +0200 Message-Id: <20201019075224.14803-3-kraxel@redhat.com> In-Reply-To: <20201019075224.14803-1-kraxel@redhat.com> References: <20201019075224.14803-1-kraxel@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=kraxel@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com 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=63.128.21.124; envelope-from=kraxel@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/10/19 02:32:01 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] [fuzzy] X-Spam_score_int: -30 X-Spam_score: -3.1 X-Spam_bar: --- X-Spam_report: (-3.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H5=-1, RCVD_IN_MSPIKE_WL=-0.01, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , Paolo Bonzini , Gerd Hoffmann , Markus Armbruster , "Dr. David Alan Gilbert" Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" Add QemuSpiceOps struct. This struct holds function pointers to the spice functions. It will be initialized with pointers to the stub functions. When spice gets initialized the function pointers will be re-written to the real functions. The spice stubs will move from qemu-spice.h to spice-module.c for that, because they will be needed for both "CONFIG_SPICE=3Dn" and "CONFIG_SPICE= =3Dy but spice module not loaded" cases. This patch adds the infrastructure and starts with moving qemu_spice_migrate_info() to QemuSpiceOps. Signed-off-by: Gerd Hoffmann Reviewed-by: Marc-Andr=C3=A9 Lureau --- include/ui/qemu-spice-module.h | 5 +++++ include/ui/qemu-spice.h | 5 ----- monitor/misc.c | 2 +- ui/spice-core.c | 5 +++++ ui/spice-module.c | 10 ++++++++++ 5 files changed, 21 insertions(+), 6 deletions(-) diff --git a/include/ui/qemu-spice-module.h b/include/ui/qemu-spice-module.h index 1af0e659a109..7a9963dd5810 100644 --- a/include/ui/qemu-spice-module.h +++ b/include/ui/qemu-spice-module.h @@ -18,6 +18,11 @@ #ifndef QEMU_SPICE_MODULE_H #define QEMU_SPICE_MODULE_H =20 +struct QemuSpiceOps { + int (*migrate_info)(const char *h, int p, int t, const char *s); +}; + extern int using_spice; +extern struct QemuSpiceOps qemu_spice; =20 #endif diff --git a/include/ui/qemu-spice.h b/include/ui/qemu-spice.h index ab523788b9a9..3157016c2bb4 100644 --- a/include/ui/qemu-spice.h +++ b/include/ui/qemu-spice.h @@ -60,11 +60,6 @@ static inline int qemu_spice_set_pw_expire(time_t expire= s) { return -1; } -static inline int qemu_spice_migrate_info(const char *h, int p, int t, - const char *s) -{ - return -1; -} =20 static inline int qemu_spice_display_add_client(int csock, int skipauth, int tls) diff --git a/monitor/misc.c b/monitor/misc.c index 4a859fb24a21..32e6a8c13d07 100644 --- a/monitor/misc.c +++ b/monitor/misc.c @@ -437,7 +437,7 @@ void qmp_client_migrate_info(const char *protocol, cons= t char *hostname, return; } =20 - if (qemu_spice_migrate_info(hostname, + if (qemu_spice.migrate_info(hostname, has_port ? port : -1, has_tls_port ? tls_port : -1, cert_subject)) { diff --git a/ui/spice-core.c b/ui/spice-core.c index a7fa5743585f..b03d743cf9b9 100644 --- a/ui/spice-core.c +++ b/ui/spice-core.c @@ -993,8 +993,13 @@ int qemu_spice_display_is_running(SimpleSpiceDisplay *= ssd) return spice_display_is_running; } =20 +static struct QemuSpiceOps real_spice_ops =3D { + .migrate_info =3D qemu_spice_migrate_info, +}; + static void spice_register_config(void) { + qemu_spice =3D real_spice_ops; qemu_add_opts(&qemu_spice_opts); } opts_init(spice_register_config); diff --git a/ui/spice-module.c b/ui/spice-module.c index f86b0ac517dc..f1939545a684 100644 --- a/ui/spice-module.c +++ b/ui/spice-module.c @@ -21,3 +21,13 @@ #include "ui/qemu-spice-module.h" =20 int using_spice; + +static int qemu_spice_migrate_info_stub(const char *h, int p, int t, + const char *s) +{ + return -1; +} + +struct QemuSpiceOps qemu_spice =3D { + .migrate_info =3D qemu_spice_migrate_info_stub, +}; --=20 2.27.0 From nobody Sat May 18 19:12:47 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; 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=fail(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1603095028; cv=none; d=zohomail.com; s=zohoarc; b=JOMhIGEjinzNpbG30nw73wmD62TU/AoBkVjm9cU7aOm4PCTTOYcQrzTEq/93DYunAAIfbNcreZ66LiIN54akQGVkfvkR/Mfj6qlMbfkeLGU7l0WaeZ61VwM846k1LOT9qstBg9t+eyvi3wMTeroKFREYNvo1V1Hs/DO+u/9XkxM= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1603095028; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=Xq8w7QqagUWaZ2mJ8I060g3WfexDGAMQOZPMGH1qR90=; b=hX0lPvT+b/ygK+GSURnkmMgv+Wzq3/Z22oU0RcrIilsyRdWyRPqkRof5a1WhEryLB+bIE7ZmnK0AMYi1n0oeSEVC7V6TrykFH/HPBgjOdmxQhtCaF2ENXMwF/xIGeNrpb48ulqOvB8oi2FctzqSWyDKy66ATb59AsbuB43jMuxE= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; 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=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 16030950286757.134728774978953; Mon, 19 Oct 2020 01:10:28 -0700 (PDT) Received: from localhost ([::1]:36988 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kUQFO-0006vg-HW for importer@patchew.org; Mon, 19 Oct 2020 04:10:26 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:54372) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kUPya-0005ab-EI for qemu-devel@nongnu.org; Mon, 19 Oct 2020 03:53:04 -0400 Received: from us-smtp-delivery-124.mimecast.com ([63.128.21.124]:31145) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1kUPyW-0008Cz-1y for qemu-devel@nongnu.org; Mon, 19 Oct 2020 03:53:04 -0400 Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-406-kWWVPpUzN4CWmojrMCroOg-1; Mon, 19 Oct 2020 03:52:57 -0400 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 4B88D80572D for ; Mon, 19 Oct 2020 07:52:56 +0000 (UTC) Received: from sirius.home.kraxel.org (ovpn-112-56.ams2.redhat.com [10.36.112.56]) by smtp.corp.redhat.com (Postfix) with ESMTP id 202667369E; Mon, 19 Oct 2020 07:52:25 +0000 (UTC) Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id 428129D8F; Mon, 19 Oct 2020 09:52:24 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1603093979; 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=Xq8w7QqagUWaZ2mJ8I060g3WfexDGAMQOZPMGH1qR90=; b=VzKR7LOhMBpZvayigGbj1HNDNPp8ZuwYeozcucaIwifyjW8+rYrldWJuj+uDdA9IYWMai/ ylzkQyYOTf9eGskHAe7bpOmxdUQeTGpOznEHdAnm+hHRTb01plMSebXEd1q3KOWyb913Ox AEe+kdKBuKEKM5ZPDliLakdEQ29je4U= X-MC-Unique: kWWVPpUzN4CWmojrMCroOg-1 From: Gerd Hoffmann To: qemu-devel@nongnu.org Subject: [PATCH 03/14] spice: move qemu_spice_init() to QemuSpiceOps. Date: Mon, 19 Oct 2020 09:52:13 +0200 Message-Id: <20201019075224.14803-4-kraxel@redhat.com> In-Reply-To: <20201019075224.14803-1-kraxel@redhat.com> References: <20201019075224.14803-1-kraxel@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=kraxel@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com 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=63.128.21.124; envelope-from=kraxel@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/10/19 02:32:01 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] [fuzzy] X-Spam_score_int: -30 X-Spam_score: -3.1 X-Spam_bar: --- X-Spam_report: (-3.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H5=-1, RCVD_IN_MSPIKE_WL=-0.01, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , Paolo Bonzini , Gerd Hoffmann , Markus Armbruster , "Dr. David Alan Gilbert" Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" Signed-off-by: Gerd Hoffmann Reviewed-by: Marc-Andr=C3=A9 Lureau --- include/ui/qemu-spice-module.h | 1 + include/ui/qemu-spice.h | 5 ----- softmmu/vl.c | 2 +- ui/spice-core.c | 3 ++- ui/spice-module.c | 5 +++++ 5 files changed, 9 insertions(+), 7 deletions(-) diff --git a/include/ui/qemu-spice-module.h b/include/ui/qemu-spice-module.h index 7a9963dd5810..b182bc4c21a6 100644 --- a/include/ui/qemu-spice-module.h +++ b/include/ui/qemu-spice-module.h @@ -19,6 +19,7 @@ #define QEMU_SPICE_MODULE_H =20 struct QemuSpiceOps { + void (*init)(void); int (*migrate_info)(const char *h, int p, int t, const char *s); }; =20 diff --git a/include/ui/qemu-spice.h b/include/ui/qemu-spice.h index 3157016c2bb4..e6df0a8715b0 100644 --- a/include/ui/qemu-spice.h +++ b/include/ui/qemu-spice.h @@ -26,7 +26,6 @@ #include #include "qemu/config-file.h" =20 -void qemu_spice_init(void); void qemu_spice_input_init(void); void qemu_spice_display_init(void); int qemu_spice_display_add_client(int csock, int skipauth, int tls); @@ -74,10 +73,6 @@ static inline void qemu_spice_display_init(void) abort(); } =20 -static inline void qemu_spice_init(void) -{ -} - #endif /* CONFIG_SPICE */ =20 static inline bool qemu_using_spice(Error **errp) diff --git a/softmmu/vl.c b/softmmu/vl.c index cb476aa70bcc..65c34a6b8a2e 100644 --- a/softmmu/vl.c +++ b/softmmu/vl.c @@ -4151,7 +4151,7 @@ void qemu_init(int argc, char **argv, char **envp) /* spice needs the timers to be initialized by this point */ /* spice must initialize before audio as it changes the default auiode= v */ /* spice must initialize before chardevs (for spicevmc and spiceport) = */ - qemu_spice_init(); + qemu_spice.init(); =20 qemu_opts_foreach(qemu_find_opts("chardev"), chardev_init_func, NULL, &error_fatal); diff --git a/ui/spice-core.c b/ui/spice-core.c index b03d743cf9b9..6ef66eb387de 100644 --- a/ui/spice-core.c +++ b/ui/spice-core.c @@ -633,7 +633,7 @@ static void vm_change_state_handler(void *opaque, int r= unning, } } =20 -void qemu_spice_init(void) +static void qemu_spice_init(void) { QemuOpts *opts =3D QTAILQ_FIRST(&qemu_spice_opts.head); const char *password, *str, *x509_dir, *addr, @@ -994,6 +994,7 @@ int qemu_spice_display_is_running(SimpleSpiceDisplay *s= sd) } =20 static struct QemuSpiceOps real_spice_ops =3D { + .init =3D qemu_spice_init, .migrate_info =3D qemu_spice_migrate_info, }; =20 diff --git a/ui/spice-module.c b/ui/spice-module.c index f1939545a684..a30fa452ea93 100644 --- a/ui/spice-module.c +++ b/ui/spice-module.c @@ -22,6 +22,10 @@ =20 int using_spice; =20 +static void qemu_spice_init_stub(void) +{ +} + static int qemu_spice_migrate_info_stub(const char *h, int p, int t, const char *s) { @@ -29,5 +33,6 @@ static int qemu_spice_migrate_info_stub(const char *h, in= t p, int t, } =20 struct QemuSpiceOps qemu_spice =3D { + .init =3D qemu_spice_init_stub, .migrate_info =3D qemu_spice_migrate_info_stub, }; --=20 2.27.0 From nobody Sat May 18 19:12:47 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; 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=fail(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1603094065; cv=none; d=zohomail.com; s=zohoarc; b=OS25bHw1E7l2p9al6ttnCiybdBOxPwuAp6HdhVu7zCAI9uuUSZ0KUi1MDWOZB+CHubQWDnHhm5q13xnGbhuNVuJGuglIfYw0VQOUFoD/XerhF2C+6CAaMDMJP0TjnYfehV3eQ/X/r+fW1izbqVIhBIsZ3sqBr2LUSPCgffFcw84= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1603094065; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=OxA3Qq4UKBx78H131SKHi4ZpLY9OCsgstMMSifTmJY4=; b=KM7XegSfCpEBnOCrKwCHOy6Th4k4/YXoqXQtXvZKDko1bv8a/xNIjtHPAbK0FcVhFt05g+zVfya/Ydoca+8zRPaLTqrz3V5a3QMChPl9J5Ny+oEX6+T7YG7ET5IEsh3bID4vvx2tcEtAIXcWzwh/lZ/5GNr2xPlmh/fyyUthSwo= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; 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=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1603094065781328.23136878892365; Mon, 19 Oct 2020 00:54:25 -0700 (PDT) Received: from localhost ([::1]:53852 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kUPzs-0006Zc-KV for importer@patchew.org; Mon, 19 Oct 2020 03:54:24 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:54212) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kUPyF-00057a-1F for qemu-devel@nongnu.org; Mon, 19 Oct 2020 03:52:43 -0400 Received: from us-smtp-delivery-124.mimecast.com ([63.128.21.124]:23327) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1kUPyD-00085a-7B for qemu-devel@nongnu.org; Mon, 19 Oct 2020 03:52:42 -0400 Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-572-qLqPAl1SN62Ewam4u5Qeug-1; Mon, 19 Oct 2020 03:52:38 -0400 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 3E01C803F42 for ; Mon, 19 Oct 2020 07:52:37 +0000 (UTC) Received: from sirius.home.kraxel.org (ovpn-112-56.ams2.redhat.com [10.36.112.56]) by smtp.corp.redhat.com (Postfix) with ESMTP id 3E82A5C641; Mon, 19 Oct 2020 07:52:25 +0000 (UTC) Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id 51C459D5A; Mon, 19 Oct 2020 09:52:24 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1603093960; 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=OxA3Qq4UKBx78H131SKHi4ZpLY9OCsgstMMSifTmJY4=; b=APuDgPjNdBc8VA0NsIRoYTbLdb2HArNRgvq03BzVIm9XR9KtR61ZW9Q4dflyPByn3tzLHM 6n9tqh4eE7XH2oORxbkyvkhA+LhEtJ0HcND4xSPwKLjy04qUDybe8B5ebc/PGwIUqZeetp FGwGmso1GczLdVW6ssTzdYXJfIXFtOg= X-MC-Unique: qLqPAl1SN62Ewam4u5Qeug-1 From: Gerd Hoffmann To: qemu-devel@nongnu.org Subject: [PATCH 04/14] spice: move display_init() to QemuSpiceOps. Date: Mon, 19 Oct 2020 09:52:14 +0200 Message-Id: <20201019075224.14803-5-kraxel@redhat.com> In-Reply-To: <20201019075224.14803-1-kraxel@redhat.com> References: <20201019075224.14803-1-kraxel@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=kraxel@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com 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=63.128.21.124; envelope-from=kraxel@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/10/19 02:32:01 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] [fuzzy] X-Spam_score_int: -30 X-Spam_score: -3.1 X-Spam_bar: --- X-Spam_report: (-3.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H5=-1, RCVD_IN_MSPIKE_WL=-0.01, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , Paolo Bonzini , Gerd Hoffmann , Markus Armbruster , "Dr. David Alan Gilbert" Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" Signed-off-by: Gerd Hoffmann Reviewed-by: Marc-Andr=C3=A9 Lureau --- include/ui/qemu-spice-module.h | 1 + include/ui/qemu-spice.h | 7 ------- softmmu/vl.c | 2 +- ui/spice-core.c | 1 + ui/spice-module.c | 9 +++++++++ 5 files changed, 12 insertions(+), 8 deletions(-) diff --git a/include/ui/qemu-spice-module.h b/include/ui/qemu-spice-module.h index b182bc4c21a6..dbe09035dade 100644 --- a/include/ui/qemu-spice-module.h +++ b/include/ui/qemu-spice-module.h @@ -20,6 +20,7 @@ =20 struct QemuSpiceOps { void (*init)(void); + void (*display_init)(void); int (*migrate_info)(const char *h, int p, int t, const char *s); }; =20 diff --git a/include/ui/qemu-spice.h b/include/ui/qemu-spice.h index e6df0a8715b0..a3fd1ea5ade8 100644 --- a/include/ui/qemu-spice.h +++ b/include/ui/qemu-spice.h @@ -66,13 +66,6 @@ static inline int qemu_spice_display_add_client(int csoc= k, int skipauth, return -1; } =20 -static inline void qemu_spice_display_init(void) -{ - /* This must never be called if CONFIG_SPICE is disabled */ - error_report("spice support is disabled"); - abort(); -} - #endif /* CONFIG_SPICE */ =20 static inline bool qemu_using_spice(Error **errp) diff --git a/softmmu/vl.c b/softmmu/vl.c index 65c34a6b8a2e..8a06fe8bf77a 100644 --- a/softmmu/vl.c +++ b/softmmu/vl.c @@ -4447,7 +4447,7 @@ void qemu_init(int argc, char **argv, char **envp) #endif =20 if (using_spice) { - qemu_spice_display_init(); + qemu_spice.display_init(); } =20 if (foreach_device_config(DEV_GDB, gdbserver_start) < 0) { diff --git a/ui/spice-core.c b/ui/spice-core.c index 6ef66eb387de..82d5dbda3e26 100644 --- a/ui/spice-core.c +++ b/ui/spice-core.c @@ -995,6 +995,7 @@ int qemu_spice_display_is_running(SimpleSpiceDisplay *s= sd) =20 static struct QemuSpiceOps real_spice_ops =3D { .init =3D qemu_spice_init, + .display_init =3D qemu_spice_display_init, .migrate_info =3D qemu_spice_migrate_info, }; =20 diff --git a/ui/spice-module.c b/ui/spice-module.c index a30fa452ea93..56868aaffe9a 100644 --- a/ui/spice-module.c +++ b/ui/spice-module.c @@ -18,6 +18,7 @@ */ =20 #include "qemu/osdep.h" +#include "qemu/error-report.h" #include "ui/qemu-spice-module.h" =20 int using_spice; @@ -26,6 +27,13 @@ static void qemu_spice_init_stub(void) { } =20 +static void qemu_spice_display_init_stub(void) +{ + /* This must never be called if CONFIG_SPICE is disabled */ + error_report("spice support is disabled"); + abort(); +} + static int qemu_spice_migrate_info_stub(const char *h, int p, int t, const char *s) { @@ -34,5 +42,6 @@ static int qemu_spice_migrate_info_stub(const char *h, in= t p, int t, =20 struct QemuSpiceOps qemu_spice =3D { .init =3D qemu_spice_init_stub, + .display_init =3D qemu_spice_display_init_stub, .migrate_info =3D qemu_spice_migrate_info_stub, }; --=20 2.27.0 From nobody Sat May 18 19:12:47 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; 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=fail(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1603095005; cv=none; d=zohomail.com; s=zohoarc; b=Ikhnw4n3fDvjxhJEsnQ9ANvUkap+8aRwrGqvBsjmPg0If1ch0Qane0OZqARqW6cBW9MyZttFnia4j327PkvEJ4Fvy8m0WEoo9/4FyxciBAlyfC7PthF2Vxo4IYFdpxQDx/bCU8RbCHlRBzhTHfG+M5N/o/3kbEi4JCbwF28Tvu0= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1603095005; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=eE9mBPuPyoIHUaLUiTwklM3yiYnxfSZ2OJjaqaTZ920=; b=XvTBHdXtnsvQNvC6HAxTk522RSaX6nbD53DHMl9KavWIUqq9yt1xrAQcRigyiV6foOglTC7z2EwrWw9EtbUchP9ux3KuCZaVpYZaCt2mz1ETagkbIt+PLP1OQU0codP8sMy54GNi1DvlBSpVLgQAMpndKhHmyld+4MJBVuhLeK0= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; 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=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1603095005745221.97236084967767; Mon, 19 Oct 2020 01:10:05 -0700 (PDT) Received: from localhost ([::1]:35968 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kUQF2-0006V0-Jj for importer@patchew.org; Mon, 19 Oct 2020 04:10:04 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:54478) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kUPyf-0005f5-V2 for qemu-devel@nongnu.org; Mon, 19 Oct 2020 03:53:10 -0400 Received: from us-smtp-delivery-124.mimecast.com ([63.128.21.124]:33298) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1kUPyc-0008Fl-CX for qemu-devel@nongnu.org; Mon, 19 Oct 2020 03:53:09 -0400 Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-412-jEULipKnNNiCYeA5spD1Rw-1; Mon, 19 Oct 2020 03:52:59 -0400 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 6B5C61054F8E for ; Mon, 19 Oct 2020 07:52:58 +0000 (UTC) Received: from sirius.home.kraxel.org (ovpn-112-56.ams2.redhat.com [10.36.112.56]) by smtp.corp.redhat.com (Postfix) with ESMTP id 3043D6FEE7; Mon, 19 Oct 2020 07:52:38 +0000 (UTC) Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id 62C189D74; Mon, 19 Oct 2020 09:52:24 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1603093985; 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=eE9mBPuPyoIHUaLUiTwklM3yiYnxfSZ2OJjaqaTZ920=; b=c928Bw7YQnqO5tJa4zn7sOgVF52OFDQ5zu1qp0pd/IAo89v/U2aAnbubwKfF5SBaFIGjxP K5ndFRA454m9A1P3dqGdRRCpLj/WoXwIs2diVuusWutMnEOAsjlT3b86QmoWyZCrsxF171 ArPSsei+fpRKUvl6ELA3kxQISZRqGOo= X-MC-Unique: jEULipKnNNiCYeA5spD1Rw-1 From: Gerd Hoffmann To: qemu-devel@nongnu.org Subject: [PATCH 05/14] spice: move add_interface() to QemuSpiceOps. Date: Mon, 19 Oct 2020 09:52:15 +0200 Message-Id: <20201019075224.14803-6-kraxel@redhat.com> In-Reply-To: <20201019075224.14803-1-kraxel@redhat.com> References: <20201019075224.14803-1-kraxel@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=kraxel@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com 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=63.128.21.124; envelope-from=kraxel@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/10/19 02:32:01 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] [fuzzy] X-Spam_score_int: -30 X-Spam_score: -3.1 X-Spam_bar: --- X-Spam_report: (-3.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H5=-1, RCVD_IN_MSPIKE_WL=-0.01, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , Paolo Bonzini , Gerd Hoffmann , Markus Armbruster , "Dr. David Alan Gilbert" Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" Signed-off-by: Gerd Hoffmann Reviewed-by: Marc-Andr=C3=A9 Lureau --- include/ui/qemu-spice-module.h | 7 +++++++ include/ui/qemu-spice.h | 1 - audio/spiceaudio.c | 4 ++-- chardev/spice.c | 2 +- ui/spice-core.c | 5 +++-- ui/spice-input.c | 6 +++--- 6 files changed, 16 insertions(+), 9 deletions(-) diff --git a/include/ui/qemu-spice-module.h b/include/ui/qemu-spice-module.h index dbe09035dade..f93acde5743c 100644 --- a/include/ui/qemu-spice-module.h +++ b/include/ui/qemu-spice-module.h @@ -18,10 +18,17 @@ #ifndef QEMU_SPICE_MODULE_H #define QEMU_SPICE_MODULE_H =20 +#ifdef CONFIG_SPICE +#include +#endif + struct QemuSpiceOps { void (*init)(void); void (*display_init)(void); int (*migrate_info)(const char *h, int p, int t, const char *s); +#ifdef CONFIG_SPICE + int (*add_interface)(SpiceBaseInstance *sin); +#endif }; =20 extern int using_spice; diff --git a/include/ui/qemu-spice.h b/include/ui/qemu-spice.h index a3fd1ea5ade8..6018577c5278 100644 --- a/include/ui/qemu-spice.h +++ b/include/ui/qemu-spice.h @@ -29,7 +29,6 @@ void qemu_spice_input_init(void); void qemu_spice_display_init(void); int qemu_spice_display_add_client(int csock, int skipauth, int tls); -int qemu_spice_add_interface(SpiceBaseInstance *sin); bool qemu_spice_have_display_interface(QemuConsole *con); int qemu_spice_add_display_interface(QXLInstance *qxlin, QemuConsole *con); int qemu_spice_set_passwd(const char *passwd, diff --git a/audio/spiceaudio.c b/audio/spiceaudio.c index ed6dff1dcc41..8967cca12925 100644 --- a/audio/spiceaudio.c +++ b/audio/spiceaudio.c @@ -106,7 +106,7 @@ static int line_out_init(HWVoiceOut *hw, struct audsett= ings *as, out->active =3D 0; =20 out->sin.base.sif =3D &playback_sif.base; - qemu_spice_add_interface (&out->sin.base); + qemu_spice.add_interface(&out->sin.base); #if SPICE_INTERFACE_PLAYBACK_MAJOR > 1 || SPICE_INTERFACE_PLAYBACK_MINOR >= =3D 3 spice_server_set_playback_rate(&out->sin, settings.freq); #endif @@ -215,7 +215,7 @@ static int line_in_init(HWVoiceIn *hw, struct audsettin= gs *as, void *drv_opaque) in->active =3D 0; =20 in->sin.base.sif =3D &record_sif.base; - qemu_spice_add_interface (&in->sin.base); + qemu_spice.add_interface(&in->sin.base); #if SPICE_INTERFACE_RECORD_MAJOR > 2 || SPICE_INTERFACE_RECORD_MINOR >=3D 3 spice_server_set_record_rate(&in->sin, settings.freq); #endif diff --git a/chardev/spice.c b/chardev/spice.c index 7d1fb1771894..1104426e3a11 100644 --- a/chardev/spice.c +++ b/chardev/spice.c @@ -110,7 +110,7 @@ static void vmc_register_interface(SpiceChardev *scd) return; } scd->sin.base.sif =3D &vmc_interface.base; - qemu_spice_add_interface(&scd->sin.base); + qemu_spice.add_interface(&scd->sin.base); scd->active =3D true; trace_spice_vmc_register_interface(scd); } diff --git a/ui/spice-core.c b/ui/spice-core.c index 82d5dbda3e26..483d880a3362 100644 --- a/ui/spice-core.c +++ b/ui/spice-core.c @@ -800,7 +800,7 @@ static void qemu_spice_init(void) migration_state.notify =3D migration_state_notifier; add_migration_state_change_notifier(&migration_state); spice_migrate.base.sif =3D &migrate_interface.base; - qemu_spice_add_interface(&spice_migrate.base); + qemu_spice.add_interface(&spice_migrate.base); =20 qemu_spice_input_init(); =20 @@ -829,7 +829,7 @@ static void qemu_spice_init(void) #endif } =20 -int qemu_spice_add_interface(SpiceBaseInstance *sin) +static int qemu_spice_add_interface(SpiceBaseInstance *sin) { if (!spice_server) { if (QTAILQ_FIRST(&qemu_spice_opts.head) !=3D NULL) { @@ -997,6 +997,7 @@ static struct QemuSpiceOps real_spice_ops =3D { .init =3D qemu_spice_init, .display_init =3D qemu_spice_display_init, .migrate_info =3D qemu_spice_migrate_info, + .add_interface =3D qemu_spice_add_interface, }; =20 static void spice_register_config(void) diff --git a/ui/spice-input.c b/ui/spice-input.c index 21990fa9962b..bbd502564edf 100644 --- a/ui/spice-input.c +++ b/ui/spice-input.c @@ -231,7 +231,7 @@ static void mouse_mode_notifier(Notifier *notifier, voi= d *data) } =20 if (is_absolute) { - qemu_spice_add_interface(&pointer->tablet.base); + qemu_spice.add_interface(&pointer->tablet.base); } else { spice_server_remove_interface(&pointer->tablet.base); } @@ -245,13 +245,13 @@ void qemu_spice_input_init(void) =20 kbd =3D g_malloc0(sizeof(*kbd)); kbd->sin.base.sif =3D &kbd_interface.base; - qemu_spice_add_interface(&kbd->sin.base); + qemu_spice.add_interface(&kbd->sin.base); qemu_add_led_event_handler(kbd_leds, kbd); =20 pointer =3D g_malloc0(sizeof(*pointer)); pointer->mouse.base.sif =3D &mouse_interface.base; pointer->tablet.base.sif =3D &tablet_interface.base; - qemu_spice_add_interface(&pointer->mouse.base); + qemu_spice.add_interface(&pointer->mouse.base); =20 pointer->absolute =3D false; pointer->mouse_mode.notify =3D mouse_mode_notifier; --=20 2.27.0 From nobody Sat May 18 19:12:47 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; 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=fail(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1603094260; cv=none; d=zohomail.com; s=zohoarc; b=AaDt2P1NMHckDXMNpvVxuf4X0/1WWfTjaxxLnUskP1y/PZnDJxAi3wAdh/7WJUgoA3M/d1e8qA6fDExUkxvGUcONMLFtEc8J0Q8kUoIT5MSmh9bCgrPjpRS93QZc8aRjx/LcD4ychIGjPKJ3mVpZkpfqLxYVNqN/UCVIWYOt6gc= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1603094260; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=ptSUS1ZoNxucYqTonbIkFhdP4kVQLFG/6xT9BWi0YgI=; b=Mi9wCZGxPZNlmAwWh33r3c+OT0QdEeZzznopfeTWSdVRg60YNN82LScgkbhnJy/WhZs+I2y3WI+8sRT17wI5MQEDQZESJ8ohkWBhOzQDvumqjRQ0a216nK8LGnqi4hVsnqnUnvzc0L4lIUWigIhjJA0s/rOMCjBgnooJXXkuJX0= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; 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=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1603094260842475.0604178639154; Mon, 19 Oct 2020 00:57:40 -0700 (PDT) Received: from localhost ([::1]:35382 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kUQ31-0002Fe-O7 for importer@patchew.org; Mon, 19 Oct 2020 03:57:39 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:54480) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kUPyg-0005fY-96 for qemu-devel@nongnu.org; Mon, 19 Oct 2020 03:53:10 -0400 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:24250) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1kUPyd-0008Ge-1I for qemu-devel@nongnu.org; Mon, 19 Oct 2020 03:53:09 -0400 Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-269-S0lAd7lqMA6mcurucms9eg-1; Mon, 19 Oct 2020 03:53:04 -0400 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 5CF4A18C35A6 for ; Mon, 19 Oct 2020 07:53:03 +0000 (UTC) Received: from sirius.home.kraxel.org (ovpn-112-56.ams2.redhat.com [10.36.112.56]) by smtp.corp.redhat.com (Postfix) with ESMTP id 30F3270597; Mon, 19 Oct 2020 07:52:38 +0000 (UTC) Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id 7234D9D0D; Mon, 19 Oct 2020 09:52:24 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1603093986; 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=ptSUS1ZoNxucYqTonbIkFhdP4kVQLFG/6xT9BWi0YgI=; b=U2rdscJlzbQ70HJveKAs9tvuQ+tkA3vEqGksHdyzcyAFMwTgl1QMNSq87cXBEdQzrMpagX 68FIwOgVL+OhG13b6SOgjUg7B45Ua7yS33NxAUmIDvbJPS6ffUFrvJ6+aw1LfLo/Rt1fm/ UBQwGcRodkxvCwcOy6Y+mXX0v/BqVe4= X-MC-Unique: S0lAd7lqMA6mcurucms9eg-1 From: Gerd Hoffmann To: qemu-devel@nongnu.org Subject: [PATCH 06/14] spice: move auth functions to QemuSpiceOps. Date: Mon, 19 Oct 2020 09:52:16 +0200 Message-Id: <20201019075224.14803-7-kraxel@redhat.com> In-Reply-To: <20201019075224.14803-1-kraxel@redhat.com> References: <20201019075224.14803-1-kraxel@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=kraxel@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com 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=216.205.24.124; envelope-from=kraxel@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/10/19 01:44:30 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] [fuzzy] 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, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H4=-0.01, RCVD_IN_MSPIKE_WL=-0.01, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , Paolo Bonzini , Gerd Hoffmann , Markus Armbruster , "Dr. David Alan Gilbert" Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" Move qemu_spice_set_passwd() and qemu_spice_set_pw_expire() functions to QemuSpiceOps. Signed-off-by: Gerd Hoffmann Reviewed-by: Marc-Andr=C3=A9 Lureau --- include/ui/qemu-spice-module.h | 3 +++ include/ui/qemu-spice.h | 14 -------------- monitor/qmp-cmds.c | 4 ++-- ui/spice-core.c | 10 ++++++---- ui/spice-module.c | 14 ++++++++++++++ 5 files changed, 25 insertions(+), 20 deletions(-) diff --git a/include/ui/qemu-spice-module.h b/include/ui/qemu-spice-module.h index f93acde5743c..1ea3a999ce8a 100644 --- a/include/ui/qemu-spice-module.h +++ b/include/ui/qemu-spice-module.h @@ -26,6 +26,9 @@ struct QemuSpiceOps { void (*init)(void); void (*display_init)(void); int (*migrate_info)(const char *h, int p, int t, const char *s); + int (*set_passwd)(const char *passwd, + bool fail_if_connected, bool disconnect_if_connected= ); + int (*set_pw_expire)(time_t expires); #ifdef CONFIG_SPICE int (*add_interface)(SpiceBaseInstance *sin); #endif diff --git a/include/ui/qemu-spice.h b/include/ui/qemu-spice.h index 6018577c5278..921b7a38d023 100644 --- a/include/ui/qemu-spice.h +++ b/include/ui/qemu-spice.h @@ -31,9 +31,6 @@ void qemu_spice_display_init(void); int qemu_spice_display_add_client(int csock, int skipauth, int tls); bool qemu_spice_have_display_interface(QemuConsole *con); int qemu_spice_add_display_interface(QXLInstance *qxlin, QemuConsole *con); -int qemu_spice_set_passwd(const char *passwd, - bool fail_if_connected, bool disconnect_if_conne= cted); -int qemu_spice_set_pw_expire(time_t expires); int qemu_spice_migrate_info(const char *hostname, int port, int tls_port, const char *subject); =20 @@ -48,17 +45,6 @@ int qemu_spice_migrate_info(const char *hostname, int po= rt, int tls_port, #include "qemu/error-report.h" =20 #define spice_displays 0 -static inline int qemu_spice_set_passwd(const char *passwd, - bool fail_if_connected, - bool disconnect_if_connected) -{ - return -1; -} -static inline int qemu_spice_set_pw_expire(time_t expires) -{ - return -1; -} - static inline int qemu_spice_display_add_client(int csock, int skipauth, int tls) { diff --git a/monitor/qmp-cmds.c b/monitor/qmp-cmds.c index 1abef70a8959..8ac59977e661 100644 --- a/monitor/qmp-cmds.c +++ b/monitor/qmp-cmds.c @@ -197,7 +197,7 @@ void qmp_set_password(const char *protocol, const char = *password, if (!qemu_using_spice(errp)) { return; } - rc =3D qemu_spice_set_passwd(password, fail_if_connected, + rc =3D qemu_spice.set_passwd(password, fail_if_connected, disconnect_if_connected); if (rc !=3D 0) { error_setg(errp, QERR_SET_PASSWD_FAILED); @@ -243,7 +243,7 @@ void qmp_expire_password(const char *protocol, const ch= ar *whenstr, if (!qemu_using_spice(errp)) { return; } - rc =3D qemu_spice_set_pw_expire(when); + rc =3D qemu_spice.set_pw_expire(when); if (rc !=3D 0) { error_setg(errp, QERR_SET_PASSWD_FAILED); } diff --git a/ui/spice-core.c b/ui/spice-core.c index 483d880a3362..4fe543aba058 100644 --- a/ui/spice-core.c +++ b/ui/spice-core.c @@ -727,7 +727,7 @@ static void qemu_spice_init(void) tls_ciphers); } if (password) { - qemu_spice_set_passwd(password, false, false); + qemu_spice.set_passwd(password, false, false); } if (qemu_opt_get_bool(opts, "sasl", 0)) { if (spice_server_set_sasl(spice_server, 1) =3D=3D -1) { @@ -941,8 +941,8 @@ static int qemu_spice_set_ticket(bool fail_if_conn, boo= l disconnect_if_conn) fail_if_conn, disconnect_if_conn); } =20 -int qemu_spice_set_passwd(const char *passwd, - bool fail_if_conn, bool disconnect_if_conn) +static int qemu_spice_set_passwd(const char *passwd, + bool fail_if_conn, bool disconnect_if_con= n) { if (strcmp(auth, "spice") !=3D 0) { return -1; @@ -953,7 +953,7 @@ int qemu_spice_set_passwd(const char *passwd, return qemu_spice_set_ticket(fail_if_conn, disconnect_if_conn); } =20 -int qemu_spice_set_pw_expire(time_t expires) +static int qemu_spice_set_pw_expire(time_t expires) { auth_expires =3D expires; return qemu_spice_set_ticket(false, false); @@ -997,6 +997,8 @@ static struct QemuSpiceOps real_spice_ops =3D { .init =3D qemu_spice_init, .display_init =3D qemu_spice_display_init, .migrate_info =3D qemu_spice_migrate_info, + .set_passwd =3D qemu_spice_set_passwd, + .set_pw_expire =3D qemu_spice_set_pw_expire, .add_interface =3D qemu_spice_add_interface, }; =20 diff --git a/ui/spice-module.c b/ui/spice-module.c index 56868aaffe9a..299aeb479be5 100644 --- a/ui/spice-module.c +++ b/ui/spice-module.c @@ -40,8 +40,22 @@ static int qemu_spice_migrate_info_stub(const char *h, i= nt p, int t, return -1; } =20 +static int qemu_spice_set_passwd_stub(const char *passwd, + bool fail_if_connected, + bool disconnect_if_connected) +{ + return -1; +} + +static int qemu_spice_set_pw_expire_stub(time_t expires) +{ + return -1; +} + struct QemuSpiceOps qemu_spice =3D { .init =3D qemu_spice_init_stub, .display_init =3D qemu_spice_display_init_stub, .migrate_info =3D qemu_spice_migrate_info_stub, + .set_passwd =3D qemu_spice_set_passwd_stub, + .set_pw_expire =3D qemu_spice_set_pw_expire_stub, }; --=20 2.27.0 From nobody Sat May 18 19:12:47 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; 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=fail(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1603095098; cv=none; d=zohomail.com; s=zohoarc; b=BHFg8SeNOtJyfvT7TNdOWUrAFXVVDsFWzput+jSWClJS7EyDj/IY+scS2CgN7AT+MYCJQcxF/UVu5X0ZdtZjWtTZDE0gZAn8SOTzE8/iy03SJzcktXO8VU9zopYWLofXEdYeosgsOfFSF6cNm3ekK61o94fpmaGfHtcrjDY6onE= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1603095098; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=efct5dMGUCNCT0EVZ2xRSyo4byWypz2XZQaZZeAadPw=; b=GNRLLvfE/0h9zfywehD3vK1T/4AJHBOoguWRwUxoEgNUhC8m9q8I3YyqjTkldJu9i8gu/rJwD8sdbXEN4V2mpDeyZxLNcAoJ72yHu97tjbPfHx5BCqcCz2v/JkKvqe1dkT3qxx3AZzg0IijLa7Pq2jVkKl6ismd5i4vLh0oFPi4= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; 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=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1603095098323828.0400262595391; Mon, 19 Oct 2020 01:11:38 -0700 (PDT) Received: from localhost ([::1]:41454 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kUQGX-0000VS-7U for importer@patchew.org; Mon, 19 Oct 2020 04:11:37 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:54450) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kUPyd-0005dC-Bg for qemu-devel@nongnu.org; Mon, 19 Oct 2020 03:53:07 -0400 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:23697) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1kUPyW-0008E1-AR for qemu-devel@nongnu.org; Mon, 19 Oct 2020 03:53:07 -0400 Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-563-Zs3Ow4yMNWqSysxhLaXtNQ-1; Mon, 19 Oct 2020 03:52:57 -0400 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 6AF2410A0B9D for ; Mon, 19 Oct 2020 07:52:56 +0000 (UTC) Received: from sirius.home.kraxel.org (ovpn-112-56.ams2.redhat.com [10.36.112.56]) by smtp.corp.redhat.com (Postfix) with ESMTP id 94C856EF44; Mon, 19 Oct 2020 07:52:38 +0000 (UTC) Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id 817E59D0E; Mon, 19 Oct 2020 09:52:24 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1603093979; 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=efct5dMGUCNCT0EVZ2xRSyo4byWypz2XZQaZZeAadPw=; b=IPmPSZGwZOnYFzX/w9QItu3NNbfE7TDVGmzjDZzishTpzjuIE7fmdLKkuUuaEEiIkzeJJl vExaZxper+HvQpv6RgJxRFsXR03fgRfHpswwF22qqjGLcDoXDcQ87oQXUPCzeWIJJbWYWp Tgzhr1U5YkVZQ3/UeMTxfBJ51YX5XGo= X-MC-Unique: Zs3Ow4yMNWqSysxhLaXtNQ-1 From: Gerd Hoffmann To: qemu-devel@nongnu.org Subject: [PATCH 07/14] spice: move display_add_client() to QemuSpiceOps. Date: Mon, 19 Oct 2020 09:52:17 +0200 Message-Id: <20201019075224.14803-8-kraxel@redhat.com> In-Reply-To: <20201019075224.14803-1-kraxel@redhat.com> References: <20201019075224.14803-1-kraxel@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=kraxel@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com 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=216.205.24.124; envelope-from=kraxel@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/10/19 01:44:30 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] [fuzzy] 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, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H4=-0.01, RCVD_IN_MSPIKE_WL=-0.01, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , Paolo Bonzini , Gerd Hoffmann , Markus Armbruster , "Dr. David Alan Gilbert" Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" Signed-off-by: Gerd Hoffmann Reviewed-by: Marc-Andr=C3=A9 Lureau --- include/ui/qemu-spice-module.h | 1 + include/ui/qemu-spice.h | 6 ------ monitor/qmp-cmds.c | 2 +- ui/spice-core.c | 3 ++- ui/spice-module.c | 7 +++++++ 5 files changed, 11 insertions(+), 8 deletions(-) diff --git a/include/ui/qemu-spice-module.h b/include/ui/qemu-spice-module.h index 1ea3a999ce8a..7422f6404ba0 100644 --- a/include/ui/qemu-spice-module.h +++ b/include/ui/qemu-spice-module.h @@ -29,6 +29,7 @@ struct QemuSpiceOps { int (*set_passwd)(const char *passwd, bool fail_if_connected, bool disconnect_if_connected= ); int (*set_pw_expire)(time_t expires); + int (*display_add_client)(int csock, int skipauth, int tls); #ifdef CONFIG_SPICE int (*add_interface)(SpiceBaseInstance *sin); #endif diff --git a/include/ui/qemu-spice.h b/include/ui/qemu-spice.h index 921b7a38d023..2beb7929728c 100644 --- a/include/ui/qemu-spice.h +++ b/include/ui/qemu-spice.h @@ -28,7 +28,6 @@ =20 void qemu_spice_input_init(void); void qemu_spice_display_init(void); -int qemu_spice_display_add_client(int csock, int skipauth, int tls); bool qemu_spice_have_display_interface(QemuConsole *con); int qemu_spice_add_display_interface(QXLInstance *qxlin, QemuConsole *con); int qemu_spice_migrate_info(const char *hostname, int port, int tls_port, @@ -45,11 +44,6 @@ int qemu_spice_migrate_info(const char *hostname, int po= rt, int tls_port, #include "qemu/error-report.h" =20 #define spice_displays 0 -static inline int qemu_spice_display_add_client(int csock, int skipauth, - int tls) -{ - return -1; -} =20 #endif /* CONFIG_SPICE */ =20 diff --git a/monitor/qmp-cmds.c b/monitor/qmp-cmds.c index 8ac59977e661..a08143b32335 100644 --- a/monitor/qmp-cmds.c +++ b/monitor/qmp-cmds.c @@ -340,7 +340,7 @@ void qmp_add_client(const char *protocol, const char *f= dname, } skipauth =3D has_skipauth ? skipauth : false; tls =3D has_tls ? tls : false; - if (qemu_spice_display_add_client(fd, skipauth, tls) < 0) { + if (qemu_spice.display_add_client(fd, skipauth, tls) < 0) { error_setg(errp, "spice failed to add client"); close(fd); } diff --git a/ui/spice-core.c b/ui/spice-core.c index 4fe543aba058..99457c226e6f 100644 --- a/ui/spice-core.c +++ b/ui/spice-core.c @@ -959,7 +959,7 @@ static int qemu_spice_set_pw_expire(time_t expires) return qemu_spice_set_ticket(false, false); } =20 -int qemu_spice_display_add_client(int csock, int skipauth, int tls) +static int qemu_spice_display_add_client(int csock, int skipauth, int tls) { if (tls) { return spice_server_add_ssl_client(spice_server, csock, skipauth); @@ -999,6 +999,7 @@ static struct QemuSpiceOps real_spice_ops =3D { .migrate_info =3D qemu_spice_migrate_info, .set_passwd =3D qemu_spice_set_passwd, .set_pw_expire =3D qemu_spice_set_pw_expire, + .display_add_client =3D qemu_spice_display_add_client, .add_interface =3D qemu_spice_add_interface, }; =20 diff --git a/ui/spice-module.c b/ui/spice-module.c index 299aeb479be5..8fbc99c03c55 100644 --- a/ui/spice-module.c +++ b/ui/spice-module.c @@ -52,10 +52,17 @@ static int qemu_spice_set_pw_expire_stub(time_t expires) return -1; } =20 +static int qemu_spice_display_add_client_stub(int csock, int skipauth, + int tls) +{ + return -1; +} + struct QemuSpiceOps qemu_spice =3D { .init =3D qemu_spice_init_stub, .display_init =3D qemu_spice_display_init_stub, .migrate_info =3D qemu_spice_migrate_info_stub, .set_passwd =3D qemu_spice_set_passwd_stub, .set_pw_expire =3D qemu_spice_set_pw_expire_stub, + .display_add_client =3D qemu_spice_display_add_client_stub, }; --=20 2.27.0 From nobody Sat May 18 19:12:47 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; 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=fail(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1603094068; cv=none; d=zohomail.com; s=zohoarc; b=NxSIq20agrR+JbOeB7x1Z874o6rz+TxIQLAH62yZQHu3/bTxPN9X/cCr7DEI2fKrS0xsoYHFN8mgNkKtvUSvfzI0mT5oAhSl8dtHlsMLTq2NB0FlIsK0DRZvjr9dlPx4dz5QP8019PVd8kNxVr1LAPR/waP8jaPsMw/MsEBYjCQ= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1603094068; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=maxUohMWEPw0bBb1vHeCZsFpQesaxYhCQBd/D4o2Tj0=; b=EthWFTMDrLCiqNMSFmL+SmZHft3C0iJSwRjviXsZ3juSqzq4NYLXDaAgTZ6Hi2LsktsrHwJ8Nr7D4Nt0xg3oFHgSsCfPqBi8ZnTqoCZNt/5ZLQAtVX3wMur7mlflWpU9LWQavArV/Aa8VtN5yxu0vsaVqQjNyLAcJ76ghGmxqHc= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; 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=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1603094068533208.08778445643748; Mon, 19 Oct 2020 00:54:28 -0700 (PDT) Received: from localhost ([::1]:54004 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kUPzu-0006fJ-Ej for importer@patchew.org; Mon, 19 Oct 2020 03:54:26 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:54256) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kUPyG-00059m-Lc for qemu-devel@nongnu.org; Mon, 19 Oct 2020 03:52:44 -0400 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:54250) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1kUPyE-00086b-Nn for qemu-devel@nongnu.org; Mon, 19 Oct 2020 03:52:44 -0400 Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-317-FazRPJ4nN-SdKSDo8wZ6uw-1; Mon, 19 Oct 2020 03:52:39 -0400 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id D1D9A18A077E for ; Mon, 19 Oct 2020 07:52:38 +0000 (UTC) Received: from sirius.home.kraxel.org (ovpn-112-56.ams2.redhat.com [10.36.112.56]) by smtp.corp.redhat.com (Postfix) with ESMTP id 947E15C641; Mon, 19 Oct 2020 07:52:38 +0000 (UTC) Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id 8D7F59D0F; Mon, 19 Oct 2020 09:52:24 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1603093961; 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=maxUohMWEPw0bBb1vHeCZsFpQesaxYhCQBd/D4o2Tj0=; b=bBOZJrcLEYqD/Rg4FUzxhuHotelnQxZOwxBRKRZrnreRmx2EriOZZH0mSH20tqMvJjfXtp jZaFVPMRHZEgoTnFdj1rr3b5Uh3TE2/ufti78Qa0m4rbGh5rVMShyK/zjT+siQ/aWJFROB 765lKm0Aa9DZO6TtcG9RjJXeog7zwt4= X-MC-Unique: FazRPJ4nN-SdKSDo8wZ6uw-1 From: Gerd Hoffmann To: qemu-devel@nongnu.org Subject: [PATCH 08/14] spice: wire up monitor in QemuSpiceOps. Date: Mon, 19 Oct 2020 09:52:18 +0200 Message-Id: <20201019075224.14803-9-kraxel@redhat.com> In-Reply-To: <20201019075224.14803-1-kraxel@redhat.com> References: <20201019075224.14803-1-kraxel@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=kraxel@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com 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=216.205.24.124; envelope-from=kraxel@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/10/19 01:44:30 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] [fuzzy] 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, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H4=-0.01, RCVD_IN_MSPIKE_WL=-0.01, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , Paolo Bonzini , Gerd Hoffmann , Markus Armbruster , "Dr. David Alan Gilbert" Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" Rename qmp_query_spice() to qmp_query_spice_real(), add to QemuSpiceOps. Add new qmp_query_spice() function which calls the real function via QemuSpiceOps if available, otherwise return SpiceInfo.enabled =3D false. Signed-off-by: Gerd Hoffmann Reviewed-by: Marc-Andr=C3=A9 Lureau --- include/ui/qemu-spice-module.h | 3 +++ ui/spice-core.c | 3 ++- ui/spice-module.c | 17 +++++++++++++++++ 3 files changed, 22 insertions(+), 1 deletion(-) diff --git a/include/ui/qemu-spice-module.h b/include/ui/qemu-spice-module.h index 7422f6404ba0..1f22d557ea2f 100644 --- a/include/ui/qemu-spice-module.h +++ b/include/ui/qemu-spice-module.h @@ -22,6 +22,8 @@ #include #endif =20 +typedef struct SpiceInfo SpiceInfo; + struct QemuSpiceOps { void (*init)(void); void (*display_init)(void); @@ -32,6 +34,7 @@ struct QemuSpiceOps { int (*display_add_client)(int csock, int skipauth, int tls); #ifdef CONFIG_SPICE int (*add_interface)(SpiceBaseInstance *sin); + SpiceInfo* (*qmp_query)(Error **errp); #endif }; =20 diff --git a/ui/spice-core.c b/ui/spice-core.c index 99457c226e6f..eea52f538999 100644 --- a/ui/spice-core.c +++ b/ui/spice-core.c @@ -502,7 +502,7 @@ static QemuOptsList qemu_spice_opts =3D { }, }; =20 -SpiceInfo *qmp_query_spice(Error **errp) +static SpiceInfo *qmp_query_spice_real(Error **errp) { QemuOpts *opts =3D QTAILQ_FIRST(&qemu_spice_opts.head); int port, tls_port; @@ -1001,6 +1001,7 @@ static struct QemuSpiceOps real_spice_ops =3D { .set_pw_expire =3D qemu_spice_set_pw_expire, .display_add_client =3D qemu_spice_display_add_client, .add_interface =3D qemu_spice_add_interface, + .qmp_query =3D qmp_query_spice_real, }; =20 static void spice_register_config(void) diff --git a/ui/spice-module.c b/ui/spice-module.c index 8fbc99c03c55..32223358722c 100644 --- a/ui/spice-module.c +++ b/ui/spice-module.c @@ -19,6 +19,9 @@ =20 #include "qemu/osdep.h" #include "qemu/error-report.h" +#include "qapi/error.h" +#include "qapi/qapi-types-ui.h" +#include "qapi/qapi-commands-ui.h" #include "ui/qemu-spice-module.h" =20 int using_spice; @@ -66,3 +69,17 @@ struct QemuSpiceOps qemu_spice =3D { .set_pw_expire =3D qemu_spice_set_pw_expire_stub, .display_add_client =3D qemu_spice_display_add_client_stub, }; + +#ifdef CONFIG_SPICE + +SpiceInfo *qmp_query_spice(Error **errp) +{ + if (!qemu_spice.qmp_query) { + SpiceInfo *info =3D g_new0(SpiceInfo, 1); + info->enabled =3D false; + return info; + } + return qemu_spice.qmp_query(errp); +} + +#endif --=20 2.27.0 From nobody Sat May 18 19:12:47 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; 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=fail(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1603094093; cv=none; d=zohomail.com; s=zohoarc; b=Dfm1utpmj2Yn3g8axnpRef/LWheqpGJHsr3fwfG5hwA8+l/EjTfmXwRmLgIkIrRwiHDVq3Lu1qh7/gqCNIlnpeffprPuBlbFsB+0uYe/N/qNrYjAUKIDnBf37YIaXHWcRetvM+5KHULz/Zgwgja6eo2aGagmT7Q+Dw5PH9kfxoE= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1603094093; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=6oNdsopwxGeW8FZidNYUY/DdLfskXgln8I19HdBRc88=; b=Kh3H4WtVKDNpYvwE0bFWXRSv2TDVhNChFB++lt0EGPkCfYODM96cNjbe753uBLYTMnwo0OZgG+DxivWB+7EcbehFAMaik9P3wyCVZqYuZJdNxk/dQw2hmWwTpjyhZe1yZJvu4j2r+z4oTF3wEYFXK7KoouOnHZod0AFl76sJcoQ= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; 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=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1603094093659203.19746484646873; Mon, 19 Oct 2020 00:54:53 -0700 (PDT) Received: from localhost ([::1]:55682 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kUQ0K-0007Ka-L9 for importer@patchew.org; Mon, 19 Oct 2020 03:54:52 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:54268) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kUPyH-0005BS-Ji for qemu-devel@nongnu.org; Mon, 19 Oct 2020 03:52:45 -0400 Received: from us-smtp-delivery-124.mimecast.com ([63.128.21.124]:22587) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1kUPyE-00086d-U8 for qemu-devel@nongnu.org; Mon, 19 Oct 2020 03:52:45 -0400 Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-398-VC3LB0jOOA6dqqngUPAZ8Q-1; Mon, 19 Oct 2020 03:52:40 -0400 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 85D20803F42 for ; Mon, 19 Oct 2020 07:52:39 +0000 (UTC) Received: from sirius.home.kraxel.org (ovpn-112-56.ams2.redhat.com [10.36.112.56]) by smtp.corp.redhat.com (Postfix) with ESMTP id 4BFDC5C662; Mon, 19 Oct 2020 07:52:39 +0000 (UTC) Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id 962279D10; Mon, 19 Oct 2020 09:52:24 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1603093962; 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=6oNdsopwxGeW8FZidNYUY/DdLfskXgln8I19HdBRc88=; b=fTZ9dgxoK0aU02mvLHEubKp0Qwo68jXtj4pf0Et4HYWHe9IQw/xLIVr7iXrw6BJzCI9A3O zDwvxAVTo2CtTncUE0CtCDNAdoz79PC/DYs5k0HTpOnP1+De/cPFsZKe7QZqjk1kEY1eqk 7dv27/CmZwiHo0vBykIqEXxTTldMf6Q= X-MC-Unique: VC3LB0jOOA6dqqngUPAZ8Q-1 From: Gerd Hoffmann To: qemu-devel@nongnu.org Subject: [PATCH 09/14] spice: load module when enabled on the cmdline Date: Mon, 19 Oct 2020 09:52:19 +0200 Message-Id: <20201019075224.14803-10-kraxel@redhat.com> In-Reply-To: <20201019075224.14803-1-kraxel@redhat.com> References: <20201019075224.14803-1-kraxel@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=kraxel@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com 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=63.128.21.124; envelope-from=kraxel@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/10/19 02:32:01 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] [fuzzy] X-Spam_score_int: -30 X-Spam_score: -3.1 X-Spam_bar: --- X-Spam_report: (-3.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H5=-1, RCVD_IN_MSPIKE_WL=-0.01, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , Paolo Bonzini , Gerd Hoffmann , Markus Armbruster , "Dr. David Alan Gilbert" Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" In case the spice opts are not registered, try loading the spice module. Signed-off-by: Gerd Hoffmann Reviewed-by: Marc-Andr=C3=A9 Lureau --- softmmu/vl.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/softmmu/vl.c b/softmmu/vl.c index 8a06fe8bf77a..14fc527fc6e0 100644 --- a/softmmu/vl.c +++ b/softmmu/vl.c @@ -3705,7 +3705,11 @@ void qemu_init(int argc, char **argv, char **envp) break; } case QEMU_OPTION_spice: - olist =3D qemu_find_opts("spice"); + olist =3D qemu_find_opts_err("spice", NULL); + if (!olist) { + ui_module_load_one("spice-core"); + olist =3D qemu_find_opts("spice"); + } if (!olist) { error_report("spice support is disabled"); exit(1); --=20 2.27.0 From nobody Sat May 18 19:12:47 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; 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=fail(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1603094836; cv=none; d=zohomail.com; s=zohoarc; b=BaIcaU3MImuFThYtHBayDDCWALcpZYMYG60xWin85MzvYmMsy2g2yaZ+SJCv1HwT1goLDKXCVFw2O0rBUhUI5fyHIuGJbq7IYvwO4Ccxn1F42t0Wl7aTuKIMSWXG0xe96cGJuddYWN2H2fUHLl88LMuMeLCURTozaXDvcUy+M5g= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1603094836; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=nNvux07/SdqP+pMnqGlzxtbO4m8lLOQgtNVf7KekUGQ=; b=B8a7/JOveLMuHA7awimH0JD2gvuhkKTKQ4rxvlzzPqH+8v6S7Jw4yKtTMvv+98AqvEY3c7FqYT1GZQKAzjwPyLqKs04TJyDcbwloCisVRd/zADrmiaqthSoMKdAQPzjTxB+ZI+DNDKaoRRWIqdlDPukETrNwf5jqa+B5Ii8HgJM= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; 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=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1603094835995479.1211928263875; Mon, 19 Oct 2020 01:07:15 -0700 (PDT) Received: from localhost ([::1]:56166 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kUQCF-000323-Pk for importer@patchew.org; Mon, 19 Oct 2020 04:07:13 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:54376) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kUPya-0005b2-Kg for qemu-devel@nongnu.org; Mon, 19 Oct 2020 03:53:04 -0400 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:45310) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1kUPyW-0008Dj-7J for qemu-devel@nongnu.org; Mon, 19 Oct 2020 03:53:04 -0400 Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-561-vRHcZvgENPuFmY5AU2ZWwQ-1; Mon, 19 Oct 2020 03:52:57 -0400 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 6E82F8064C1 for ; Mon, 19 Oct 2020 07:52:56 +0000 (UTC) Received: from sirius.home.kraxel.org (ovpn-112-56.ams2.redhat.com [10.36.112.56]) by smtp.corp.redhat.com (Postfix) with ESMTP id CB3FD73672; Mon, 19 Oct 2020 07:52:39 +0000 (UTC) Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id 9ECF49B31; Mon, 19 Oct 2020 09:52:24 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1603093979; 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=nNvux07/SdqP+pMnqGlzxtbO4m8lLOQgtNVf7KekUGQ=; b=Qe6T3UX14xddc6jxH90OrDvOA0S4yfkenEz7C2BSs75lSg9EOoGPFC6IauvrCgBPrFD0AE P1rywG/QmsCY4hsP8hZNJNZZIE8PeOQ/BhI/CImmx7lUpRfvu0fSBLTV5lhScgZ7CQLROJ /eOdKpv/xEJQbfa775FoxhS13I3WEDM= X-MC-Unique: vRHcZvgENPuFmY5AU2ZWwQ-1 From: Gerd Hoffmann To: qemu-devel@nongnu.org Subject: [PATCH 10/14] modules: dependencies infrastructure Date: Mon, 19 Oct 2020 09:52:20 +0200 Message-Id: <20201019075224.14803-11-kraxel@redhat.com> In-Reply-To: <20201019075224.14803-1-kraxel@redhat.com> References: <20201019075224.14803-1-kraxel@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=kraxel@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com 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=216.205.24.124; envelope-from=kraxel@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/10/19 01:44:30 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] [fuzzy] 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, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H4=-0.01, RCVD_IN_MSPIKE_WL=-0.01, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , Paolo Bonzini , Gerd Hoffmann , Markus Armbruster , "Dr. David Alan Gilbert" Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" Allow modules depending on other modules. module_load_file() gets the option to export symbols (by not adding the G_MODULE_BIND_LOCAL flag). module_load_one() will check the module dependency list to figure (a) whenever are other modules must be loaded first, or (b) the module should export the symbols. The dependencies are specificed as static list in the source code for now as I expect the list will stay small. Signed-off-by: Gerd Hoffmann Reviewed-by: Marc-Andr=C3=A9 Lureau --- util/module.c | 32 +++++++++++++++++++++++++++----- 1 file changed, 27 insertions(+), 5 deletions(-) diff --git a/util/module.c b/util/module.c index f0ed05fbd06b..0c0f258923dc 100644 --- a/util/module.c +++ b/util/module.c @@ -110,7 +110,7 @@ void module_call_init(module_init_type type) } =20 #ifdef CONFIG_MODULES -static int module_load_file(const char *fname, bool mayfail) +static int module_load_file(const char *fname, bool mayfail, bool export_s= ymbols) { GModule *g_module; void (*sym)(void); @@ -118,7 +118,7 @@ static int module_load_file(const char *fname, bool may= fail) int len =3D strlen(fname); int suf_len =3D strlen(dsosuf); ModuleEntry *e, *next; - int ret; + int ret, flags; =20 if (len <=3D suf_len || strcmp(&fname[len - suf_len], dsosuf)) { /* wrong suffix */ @@ -132,7 +132,11 @@ static int module_load_file(const char *fname, bool ma= yfail) =20 assert(QTAILQ_EMPTY(&dso_init_list)); =20 - g_module =3D g_module_open(fname, G_MODULE_BIND_LAZY | G_MODULE_BIND_L= OCAL); + flags =3D G_MODULE_BIND_LAZY; + if (!export_symbols) { + flags |=3D G_MODULE_BIND_LOCAL; + } + g_module =3D g_module_open(fname, flags); if (!g_module) { if (!mayfail) { fprintf(stderr, "Failed to open module: %s\n", @@ -167,6 +171,12 @@ static int module_load_file(const char *fname, bool ma= yfail) out: return ret; } + +static const struct { + const char *name; + const char *dep; +} module_deps[] =3D { +}; #endif =20 bool module_load_one(const char *prefix, const char *lib_name, bool mayfai= l) @@ -182,7 +192,8 @@ bool module_load_one(const char *prefix, const char *li= b_name, bool mayfail) char *dirs[5]; char *module_name; int i =3D 0, n_dirs =3D 0; - int ret; + int ret, dep; + bool export_symbols =3D false; static GHashTable *loaded_modules; =20 if (!g_module_supported()) { @@ -196,6 +207,17 @@ bool module_load_one(const char *prefix, const char *l= ib_name, bool mayfail) =20 module_name =3D g_strdup_printf("%s%s", prefix, lib_name); =20 + for (dep =3D 0; dep < ARRAY_SIZE(module_deps); dep++) { + if (strcmp(module_name, module_deps[dep].name) =3D=3D 0) { + /* we depend on another module */ + module_load_one("", module_deps[dep].dep, false); + } + if (strcmp(module_name, module_deps[dep].dep) =3D=3D 0) { + /* another module depends on us */ + export_symbols =3D true; + } + } + if (!g_hash_table_add(loaded_modules, module_name)) { g_free(module_name); return true; @@ -220,7 +242,7 @@ bool module_load_one(const char *prefix, const char *li= b_name, bool mayfail) for (i =3D 0; i < n_dirs; i++) { fname =3D g_strdup_printf("%s/%s%s", dirs[i], module_name, CONFIG_HOST_DSOSUF); - ret =3D module_load_file(fname, mayfail); + ret =3D module_load_file(fname, mayfail, export_symbols); g_free(fname); fname =3D NULL; /* Try loading until loaded a module file */ --=20 2.27.0 From nobody Sat May 18 19:12:47 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; 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=fail(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1603094248; cv=none; d=zohomail.com; s=zohoarc; b=RnirxWS1nSWwD11MkK4esLLabm1OSyGgkXible770Y7KZOsk25xeaOb7dwDk/TGSP32E1t6Qhvn71PLDOZq1wlezVnSt9RowTAuFa1ooR4N2sRUH0oQT+KRlYS7tS0pMEjzQ3Labf33jXlaF2m5W7GN06CjJ14n2MAMiSYXTr2Q= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1603094248; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=SJWEUPkM8ov3uNRbYGGfVz+hTZl71IVu7G07DYjYcvg=; b=R7EcyNohuR+jJDOIY7V/lJM+GSlrTPWbXpyFPtyG5NPa0VZTpKnH8g6V4DUeW8tzRIzBSw4lTfuVYsnKs34ffY/bU8zolyQG8UsAhXQL6O4B1LsbE81N0z/PW2h3DpNMxZBFtbrDdTQXEpr/oOBzsi2wu8EPMd6PVro5vfGt6Qw= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; 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=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 160309424835965.71934868992184; Mon, 19 Oct 2020 00:57:28 -0700 (PDT) Received: from localhost ([::1]:34340 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kUQ2p-0001oA-9h for importer@patchew.org; Mon, 19 Oct 2020 03:57:27 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:54280) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kUPyI-0005Ch-5O for qemu-devel@nongnu.org; Mon, 19 Oct 2020 03:52:46 -0400 Received: from us-smtp-delivery-124.mimecast.com ([63.128.21.124]:46964) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1kUPyF-00086p-Mm for qemu-devel@nongnu.org; Mon, 19 Oct 2020 03:52:45 -0400 Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-476-JCxxGoJuNuSSp1kscG2O_A-1; Mon, 19 Oct 2020 03:52:41 -0400 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 404911084D93 for ; Mon, 19 Oct 2020 07:52:40 +0000 (UTC) Received: from sirius.home.kraxel.org (ovpn-112-56.ams2.redhat.com [10.36.112.56]) by smtp.corp.redhat.com (Postfix) with ESMTP id 01FD85C699; Mon, 19 Oct 2020 07:52:40 +0000 (UTC) Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id A755F9AE3; Mon, 19 Oct 2020 09:52:24 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1603093962; 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=SJWEUPkM8ov3uNRbYGGfVz+hTZl71IVu7G07DYjYcvg=; b=LfuO4bQeQ7tkMonLtfs4ZdojYQ5Qdh1VvGyKfNptg2lPb2tyu7U+xgYX5vqxZ4wEW5AG4A DCL+cbwwgm7JOU7aql/RBE/tU1f5j8rXwdjZk5QTnLPmpL5V3W6lrAgXcZZXxUC/uNYgAT AN3xTejemWbEBbN/0wZSQg9Fa1u+Jug= X-MC-Unique: JCxxGoJuNuSSp1kscG2O_A-1 From: Gerd Hoffmann To: qemu-devel@nongnu.org Subject: [PATCH 11/14] modules: add spice dependencies Date: Mon, 19 Oct 2020 09:52:21 +0200 Message-Id: <20201019075224.14803-12-kraxel@redhat.com> In-Reply-To: <20201019075224.14803-1-kraxel@redhat.com> References: <20201019075224.14803-1-kraxel@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=kraxel@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com 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=63.128.21.124; envelope-from=kraxel@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/10/19 02:32:01 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] [fuzzy] X-Spam_score_int: -30 X-Spam_score: -3.1 X-Spam_bar: --- X-Spam_report: (-3.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H5=-1, RCVD_IN_MSPIKE_WL=-0.01, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , Paolo Bonzini , Gerd Hoffmann , Markus Armbruster , "Dr. David Alan Gilbert" Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" Signed-off-by: Gerd Hoffmann Reviewed-by: Marc-Andr=C3=A9 Lureau --- util/module.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/util/module.c b/util/module.c index 0c0f258923dc..21237dcc24df 100644 --- a/util/module.c +++ b/util/module.c @@ -176,6 +176,11 @@ static const struct { const char *name; const char *dep; } module_deps[] =3D { + { "audio-spice", "ui-spice-core" }, + { "chardev-spice", "ui-spice-core" }, + { "hw-display-qxl", "ui-spice-core" }, + { "ui-spice-app", "ui-spice-core" }, + { "ui-spice-app", "chardev-spice" }, }; #endif =20 --=20 2.27.0 From nobody Sat May 18 19:12:47 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; 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=fail(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1603094380; cv=none; d=zohomail.com; s=zohoarc; b=UDt2PvvWOY/rJIh2wIQz2YnUl5d4ell0wRhnQaOOHDznnlaRbDtf7uTFN28OmCo1lZtmsZHqqUS0f7HxVQX6tVGwFVtzCDJU33qG/Q0+4F5NxDtQojITXSQLchWLXQDH3fJe+2bREoG0zs9rktQGSUprrzgOzCtutefGO2szGuM= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1603094380; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=jpBjHoJ7TJJFHT0NNFAxXbhXswV7KiWZ0nZ17TzYQcQ=; b=ZhhpJH/35bhlBl1FNAOeSRqbVbRo8Np6399GxfNoMAhJ/2VYm40oafcsSDz7GYSY57ODY0wzovIvt58huBhiAt6Ju9d7+8YBM6hasYSWK/2DPWGNEqOGQrmukXiVUK1R2vWOkyZf8Rzayh3/AEkruLM4yMSoCUNvqqUW3N5/ELg= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; 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=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1603094380862499.8755762788236; Mon, 19 Oct 2020 00:59:40 -0700 (PDT) Received: from localhost ([::1]:41202 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kUQ4x-0004gt-OE for importer@patchew.org; Mon, 19 Oct 2020 03:59:39 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:54276) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kUPyI-0005CV-2x for qemu-devel@nongnu.org; Mon, 19 Oct 2020 03:52:46 -0400 Received: from us-smtp-delivery-124.mimecast.com ([63.128.21.124]:28240) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1kUPyG-00086u-6O for qemu-devel@nongnu.org; Mon, 19 Oct 2020 03:52:45 -0400 Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-256-MgXP2-mANK2W-lEAULE5AQ-1; Mon, 19 Oct 2020 03:52:41 -0400 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 9DA12846360 for ; Mon, 19 Oct 2020 07:52:40 +0000 (UTC) Received: from sirius.home.kraxel.org (ovpn-112-56.ams2.redhat.com [10.36.112.56]) by smtp.corp.redhat.com (Postfix) with ESMTP id 5F6057B7A0; Mon, 19 Oct 2020 07:52:40 +0000 (UTC) Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id B023F9A94; Mon, 19 Oct 2020 09:52:24 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1603093963; 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=jpBjHoJ7TJJFHT0NNFAxXbhXswV7KiWZ0nZ17TzYQcQ=; b=SAXfaHgzZbqpV4YFK8x1a4aw8LoHaaSxi2m1aT4SO4uCcEIJtWoQrvsNvsl5l4pohZwLsV S53JDMXMcQHJi4v+f5ZRKsj1BAM3DPWq7Eox0V8BoSniERHtkV6zJcM8wku9+Svfj3asoY eSBODij0MgFI+CQxi3sbuOQ4RIFI4g8= X-MC-Unique: MgXP2-mANK2W-lEAULE5AQ-1 From: Gerd Hoffmann To: qemu-devel@nongnu.org Subject: [PATCH 12/14] spice: flip modules switch Date: Mon, 19 Oct 2020 09:52:22 +0200 Message-Id: <20201019075224.14803-13-kraxel@redhat.com> In-Reply-To: <20201019075224.14803-1-kraxel@redhat.com> References: <20201019075224.14803-1-kraxel@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=kraxel@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com 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=63.128.21.124; envelope-from=kraxel@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/10/19 02:32:01 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] [fuzzy] X-Spam_score_int: -30 X-Spam_score: -3.1 X-Spam_bar: --- X-Spam_report: (-3.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H5=-1, RCVD_IN_MSPIKE_WL=-0.01, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , Paolo Bonzini , Gerd Hoffmann , Markus Armbruster , "Dr. David Alan Gilbert" Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" Build spice core code as module. This removes libspice-server and a handful of indirect dependencies from core qemu. The number of shared libraries for qemu-system-x86_64 goes down from 73 to 66 on my system. Signed-off-by: Gerd Hoffmann Reviewed-by: Marc-Andr=C3=A9 Lureau --- ui/meson.build | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/ui/meson.build b/ui/meson.build index fc1b31daec47..996e1d13ab34 100644 --- a/ui/meson.build +++ b/ui/meson.build @@ -15,7 +15,6 @@ softmmu_ss.add(files( softmmu_ss.add([spice_headers, files('spice-module.c')]) =20 softmmu_ss.add(when: 'CONFIG_LINUX', if_true: files('input-linux.c')) -softmmu_ss.add(when: [spice, 'CONFIG_SPICE'], if_true: files('spice-core.c= ', 'spice-input.c', 'spice-display.c')) softmmu_ss.add(when: cocoa, if_true: files('cocoa.m')) =20 vnc_ss =3D ss.source_set() @@ -71,6 +70,16 @@ if sdl.found() ui_modules +=3D {'sdl' : sdl_ss} endif =20 +if config_host.has_key('CONFIG_SPICE') + spice_core_ss =3D ss.source_set() + spice_core_ss.add(spice, pixman, files( + 'spice-core.c', + 'spice-input.c', + 'spice-display.c' + )) + ui_modules +=3D {'spice-core' : spice_core_ss} +endif + if config_host.has_key('CONFIG_SPICE') and config_host.has_key('CONFIG_GIO= ') spice_ss =3D ss.source_set() spice_ss.add(spice, gio, pixman, files('spice-app.c')) --=20 2.27.0 From nobody Sat May 18 19:12:47 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; 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=fail(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1603094873; cv=none; d=zohomail.com; s=zohoarc; b=Ni7qe2A5UCwmSOpYv9aZfzSb5u4B2rcgas5nqigJco2J1ozhQsfq1M5DrmQFP4bQHaCj42Fyl9Yjr1g3oLCw+SGpdpQ1dwaczGE1qvJWhdMne2CJ94xsE/xiTi40HrWhGyo88lcRosjQm4Fw8I1i9HoqWW9gjaSstJxSsTyKf5I= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1603094873; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=Tm6/MNbwNq63pw9+cN47JYN39/ddzwMPceZFcEgV8sk=; b=LXUPTy4aep2oRUOni1VuyOf2hZdyAWlxce0qzfKol5IudI+6p17VliZeLBPHT/Hv5eBAD2QeL3XnILR/AVb0fdu7XBAGCPbIJ9v4DYQENmeTSe2z3k3+Tun+KeBlFXHkTEtKz5C8wiJwyNmkRvY7leM5114OGmOesD1WQuJheJk= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; 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=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 16030948735635.187004069422187; Mon, 19 Oct 2020 01:07:53 -0700 (PDT) Received: from localhost ([::1]:57484 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kUQCu-0003Zz-5z for importer@patchew.org; Mon, 19 Oct 2020 04:07:52 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:54320) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kUPyM-0005Mv-Ca for qemu-devel@nongnu.org; Mon, 19 Oct 2020 03:52:50 -0400 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:38379) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1kUPyK-00088i-JY for qemu-devel@nongnu.org; Mon, 19 Oct 2020 03:52:50 -0400 Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-261-Fg_a4wiiPDyHi7LOZLut4w-1; Mon, 19 Oct 2020 03:52:45 -0400 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 496241019630 for ; Mon, 19 Oct 2020 07:52:44 +0000 (UTC) Received: from sirius.home.kraxel.org (ovpn-112-56.ams2.redhat.com [10.36.112.56]) by smtp.corp.redhat.com (Postfix) with ESMTP id B95015D994; Mon, 19 Oct 2020 07:52:43 +0000 (UTC) Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id B8E0743BFB2; Mon, 19 Oct 2020 09:52:24 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1603093967; 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=Tm6/MNbwNq63pw9+cN47JYN39/ddzwMPceZFcEgV8sk=; b=AcobUEl2DgJck9zaSt4rHln+BREMZ6ZPGXgdp6ap+InER8f3jEqVTCD5rJTwbwfl7z2xhn q8cZFmGilQu/I3DOUqVKPLHcz8oqad8qmpjkQpa3rPm0pKKAJa57Z7sa4GW4jhr7OTs2Oe Z2DH/ch747ZxFj7F+kqO2v+e1Q7Yg0o= X-MC-Unique: Fg_a4wiiPDyHi7LOZLut4w-1 From: Gerd Hoffmann To: qemu-devel@nongnu.org Subject: [PATCH 13/14] opengl: build egl-headless display modular Date: Mon, 19 Oct 2020 09:52:23 +0200 Message-Id: <20201019075224.14803-14-kraxel@redhat.com> In-Reply-To: <20201019075224.14803-1-kraxel@redhat.com> References: <20201019075224.14803-1-kraxel@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=kraxel@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com 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=216.205.24.124; envelope-from=kraxel@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/10/19 01:44:30 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] [fuzzy] 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, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H4=-0.01, RCVD_IN_MSPIKE_WL=-0.01, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , Paolo Bonzini , Gerd Hoffmann , Markus Armbruster , "Dr. David Alan Gilbert" Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" Signed-off-by: Gerd Hoffmann Reviewed-by: Marc-Andr=C3=A9 Lureau --- ui/meson.build | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/ui/meson.build b/ui/meson.build index 996e1d13ab34..3cf03d2c297b 100644 --- a/ui/meson.build +++ b/ui/meson.build @@ -34,7 +34,6 @@ vnc_ss.add(when: sasl, if_true: files('vnc-auth-sasl.c')) softmmu_ss.add_all(when: vnc, if_true: vnc_ss) softmmu_ss.add(when: vnc, if_false: files('vnc-stubs.c')) softmmu_ss.add(when: [opengl, 'CONFIG_OPENGL'], if_true: files('shader.c',= 'console-gl.c', 'egl-helpers.c', 'egl-context.c')) -softmmu_ss.add(when: [opengl, 'CONFIG_OPENGL_DMABUF'], if_true: files('egl= -headless.c')) specific_ss.add(when: ['CONFIG_SOFTMMU'], if_true: opengl) =20 ui_modules =3D {} @@ -45,6 +44,13 @@ if curses.found() ui_modules +=3D {'curses' : curses_ss} endif =20 +if config_host.has_key('CONFIG_OPENGL_DMABUF') + egl_headless_ss =3D ss.source_set() + egl_headless_ss.add(when: [opengl, pixman, 'CONFIG_OPENGL_DMABUF'], + if_true: files('egl-headless.c')) + ui_modules +=3D {'egl-headless' : egl_headless_ss} +endif + if config_host.has_key('CONFIG_GTK') softmmu_ss.add(when: 'CONFIG_WIN32', if_true: files('win32-kbd-hook.c')) =20 --=20 2.27.0 From nobody Sat May 18 19:12:47 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; 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=fail(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1603094602; cv=none; d=zohomail.com; s=zohoarc; b=g15LwhvFPTkXUcBkzJ7O5CtO08WfSZiPgGHw0+DOcYMvgieZQBHf1alAJhlM1MAj6r64fZF+85HycU9/CatDBXvTw2Q0KALojNtG+BMF7wNPdxQIE4YXAVPXnBr0/kAyvQYM876MBpaL67zHdOs8N/WVl1St1mdz9JCuGdak55A= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1603094602; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=RKeLauqdIaclnPiWN2ZnmD0w1dLsI1Xl3FhKss0Moxs=; b=B3sc4DA9bw1KtxxwHJufcjpWYDjgwFxfEFyei9QLgfOdhBjLDNY/6nn+olAkszsC3FOnUdoblWTDCkXYMwEhvo+nisrV/ZatfaTByWtiM9gtcu5mxie3Ze4AZUPhizsoBSfCWomL3e8oFywDUHDpZ3rDj73vuTbnLbbpuzX1f6Q= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; 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=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 160309460217375.44115519488571; Mon, 19 Oct 2020 01:03:22 -0700 (PDT) Received: from localhost ([::1]:49152 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kUQ8W-0008Hc-Vt for importer@patchew.org; Mon, 19 Oct 2020 04:03:21 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:54296) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kUPyJ-0005FX-Cr for qemu-devel@nongnu.org; Mon, 19 Oct 2020 03:52:47 -0400 Received: from us-smtp-delivery-124.mimecast.com ([63.128.21.124]:36491) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1kUPyH-00087J-FZ for qemu-devel@nongnu.org; Mon, 19 Oct 2020 03:52:47 -0400 Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-478-TYUfRfMeMESmtzaYP8r0Hw-1; Mon, 19 Oct 2020 03:52:41 -0400 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id EA8261018F79 for ; Mon, 19 Oct 2020 07:52:40 +0000 (UTC) Received: from sirius.home.kraxel.org (ovpn-112-56.ams2.redhat.com [10.36.112.56]) by smtp.corp.redhat.com (Postfix) with ESMTP id AECC25C662; Mon, 19 Oct 2020 07:52:40 +0000 (UTC) Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id C35781FCE5; Mon, 19 Oct 2020 09:52:24 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1603093964; 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=RKeLauqdIaclnPiWN2ZnmD0w1dLsI1Xl3FhKss0Moxs=; b=ZBV2LIosQLcQdpUIo78bx63Sz+AKKSnQcu87VY9IBzCJfFVzCa9hpP+xiaEIk4fr+yCrSt FYAQpU2KyeEb5+lUwapy/2kCgjY2paZzYf79wJ8ncDFIRhRACzT4KomQPu4c1Jk/o76Ftt QSNb1U3KXez5tXMXMVkI1Tqx4pGq7Mk= X-MC-Unique: TYUfRfMeMESmtzaYP8r0Hw-1 From: Gerd Hoffmann To: qemu-devel@nongnu.org Subject: [PATCH 14/14] opengl: build opengl helper code modular Date: Mon, 19 Oct 2020 09:52:24 +0200 Message-Id: <20201019075224.14803-15-kraxel@redhat.com> In-Reply-To: <20201019075224.14803-1-kraxel@redhat.com> References: <20201019075224.14803-1-kraxel@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=kraxel@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com 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=63.128.21.124; envelope-from=kraxel@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/10/19 02:32:01 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] [fuzzy] X-Spam_score_int: -30 X-Spam_score: -3.1 X-Spam_bar: --- X-Spam_report: (-3.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H5=-1, RCVD_IN_MSPIKE_WL=-0.01, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , Paolo Bonzini , Gerd Hoffmann , Markus Armbruster , "Dr. David Alan Gilbert" Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" Removes opengl dependency from core qemu. The number of shared libraries for qemu-system-x86_64 goes down from 66 to 60 on my system. Signed-off-by: Gerd Hoffmann Reviewed-by: Marc-Andr=C3=A9 Lureau --- util/module.c | 7 +++++++ ui/meson.build | 8 +++++++- 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/util/module.c b/util/module.c index 21237dcc24df..fe3b82dd4d37 100644 --- a/util/module.c +++ b/util/module.c @@ -181,6 +181,13 @@ static const struct { { "hw-display-qxl", "ui-spice-core" }, { "ui-spice-app", "ui-spice-core" }, { "ui-spice-app", "chardev-spice" }, + +#ifdef CONFIG_OPENGL + { "ui-egl-headless", "ui-opengl" }, + { "ui-gtk", "ui-opengl" }, + { "ui-sdl", "ui-opengl" }, + { "ui-spice-core", "ui-opengl" }, +#endif }; #endif =20 diff --git a/ui/meson.build b/ui/meson.build index 3cf03d2c297b..73c8dbc7c742 100644 --- a/ui/meson.build +++ b/ui/meson.build @@ -33,7 +33,6 @@ vnc_ss.add(zlib, png, jpeg) vnc_ss.add(when: sasl, if_true: files('vnc-auth-sasl.c')) softmmu_ss.add_all(when: vnc, if_true: vnc_ss) softmmu_ss.add(when: vnc, if_false: files('vnc-stubs.c')) -softmmu_ss.add(when: [opengl, 'CONFIG_OPENGL'], if_true: files('shader.c',= 'console-gl.c', 'egl-helpers.c', 'egl-context.c')) specific_ss.add(when: ['CONFIG_SOFTMMU'], if_true: opengl) =20 ui_modules =3D {} @@ -44,6 +43,13 @@ if curses.found() ui_modules +=3D {'curses' : curses_ss} endif =20 +if config_host.has_key('CONFIG_OPENGL') + opengl_ss =3D ss.source_set() + opengl_ss.add(when: [opengl, pixman, 'CONFIG_OPENGL'], + if_true: files('shader.c', 'console-gl.c', 'egl-helpers.c',= 'egl-context.c')) + ui_modules +=3D {'opengl' : opengl_ss} +endif + if config_host.has_key('CONFIG_OPENGL_DMABUF') egl_headless_ss =3D ss.source_set() egl_headless_ss.add(when: [opengl, pixman, 'CONFIG_OPENGL_DMABUF'], --=20 2.27.0