From nobody Sun May 19 10:38:48 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=1595526544; cv=none; d=zohomail.com; s=zohoarc; b=SmPyh/KMWQsDyG8hfdHLygqcxOTgCoZ6r949vsscXKqGYmsJWGGVn7pUQ1DEPiIxzjPsai4K59wAD7QzY8uQkEqA0N25P9XVMVHX8MUU4jl6Ko9e5RLYQKKukSucsqbcYW/piuDGiYTE08N7ACg85Kqg3MOwjVJJY1q4PlQF1j0= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1595526544; 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=txsvG1Xp5ORtHBO3Fw0NSNNLQye/tWThgKOM1E2vDYs=; b=TX9HURtfOXrN9zEeB5p4uao0D+NDTn1vpMiKXTvZEq+o5tjJ/QMonlZ9hqAQnBMG9EqCoQDCWzJOSFbwuMRmHNosRN1UPmEVvVG9R1pbHkv82M7Qv9ILav6KmYmJc71aPuAeS0HFbJA3M4KacHPpevz83Xso0enKMmI/2Fnfc0E= 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 1595526544782686.4503541326638; Thu, 23 Jul 2020 10:49:04 -0700 (PDT) Received: from localhost ([::1]:49568 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jyfL5-0000f3-H0 for importer@patchew.org; Thu, 23 Jul 2020 13:49:03 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:43300) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jyfIo-000567-00 for qemu-devel@nongnu.org; Thu, 23 Jul 2020 13:46:42 -0400 Received: from us-smtp-2.mimecast.com ([205.139.110.61]:53651 helo=us-smtp-delivery-1.mimecast.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1jyfIl-00049h-NC for qemu-devel@nongnu.org; Thu, 23 Jul 2020 13:46:41 -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-468-hhc-bxO4MZO-kQR9mqZBzg-1; Thu, 23 Jul 2020 13:46:36 -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 D02FB800685; Thu, 23 Jul 2020 17:46:35 +0000 (UTC) Received: from turbo.com (ovpn-113-141.ams2.redhat.com [10.36.113.141]) by smtp.corp.redhat.com (Postfix) with ESMTP id B462569316; Thu, 23 Jul 2020 17:46:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1595526399; 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=txsvG1Xp5ORtHBO3Fw0NSNNLQye/tWThgKOM1E2vDYs=; b=DRLPSLMVhO08SfySC7edZ5b7lYCNXLZtxHCFDqzc5Wo7Xl2M0VRX2Wn7wcWt3TaE3dm+0/ KnF9n7AsbgQ6N3rCpNfT4KgrWKH9E4MqlsPvlS/lrItRirGNNcH1NkoS86mc7A/csN5ZJT 8oUQghupvezFWklxwCgX4OfHVe6TbGQ= X-MC-Unique: hhc-bxO4MZO-kQR9mqZBzg-1 From: Christophe de Dinechin To: qemu-devel@nongnu.org, kraxel@redhat.com Subject: [PATCH 1/7] spice: simplify chardev setup Date: Thu, 23 Jul 2020 19:46:09 +0200 Message-Id: <20200723174615.2370096-2-dinechin@redhat.com> In-Reply-To: <20200723174615.2370096-1-dinechin@redhat.com> References: <20200723174615.2370096-1-dinechin@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 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=205.139.110.61; envelope-from=dinechin@redhat.com; helo=us-smtp-delivery-1.mimecast.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/07/23 02:33:29 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] [fuzzy] X-Spam_score_int: -40 X-Spam_score: -4.1 X-Spam_bar: ---- X-Spam_report: (-4.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-1, 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_H2=-1, 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: Eduardo Habkost , "Michael S. Tsirkin" , "Dr. David Alan Gilbert" , Markus Armbruster , Paolo Bonzini , Cleber Rosa , =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , Richard Henderson 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" From: Gerd Hoffmann Initialize spice before chardevs. That allows to register the spice chardevs directly in the init function and removes the need to maintain a linked list of chardevs just for registration. Signed-off-by: Gerd Hoffmann Signed-off-by: Christophe de Dinechin --- chardev/spice.c | 29 ++++++----------------------- include/chardev/spice.h | 1 - include/ui/qemu-spice.h | 1 - softmmu/vl.c | 9 +++++---- ui/spice-app.c | 17 +++++++++-------- ui/spice-core.c | 2 -- 6 files changed, 20 insertions(+), 39 deletions(-) diff --git a/chardev/spice.c b/chardev/spice.c index bf7ea1e294..9733f06716 100644 --- a/chardev/spice.c +++ b/chardev/spice.c @@ -14,9 +14,6 @@ typedef struct SpiceCharSource { SpiceChardev *scd; } SpiceCharSource; =20 -static QLIST_HEAD(, SpiceChardev) spice_chars =3D - QLIST_HEAD_INITIALIZER(spice_chars); - static int vmc_write(SpiceCharDeviceInstance *sin, const uint8_t *buf, int= len) { SpiceChardev *scd =3D container_of(sin, SpiceChardev, sin); @@ -216,8 +213,6 @@ static void char_spice_finalize(Object *obj) =20 vmc_unregister_interface(s); =20 - QLIST_SAFE_REMOVE(s, next); - g_free((char *)s->sin.subtype); g_free((char *)s->sin.portname); } @@ -256,8 +251,6 @@ static void chr_open(Chardev *chr, const char *subtype) =20 s->active =3D false; s->sin.subtype =3D g_strdup(subtype); - - QLIST_INSERT_HEAD(&spice_chars, s, next); } =20 static void qemu_chr_open_spice_vmc(Chardev *chr, @@ -310,28 +303,18 @@ void qemu_chr_open_spice_port(Chardev *chr, return; } =20 + if (!using_spice) { + error_setg(errp, "spice not enabled"); + return; + } + chr_open(chr, "port"); =20 *be_opened =3D false; s =3D SPICE_CHARDEV(chr); s->sin.portname =3D g_strdup(name); =20 - if (using_spice) { - /* spice server already created */ - vmc_register_interface(s); - } -} - -void qemu_spice_register_ports(void) -{ - SpiceChardev *s; - - QLIST_FOREACH(s, &spice_chars, next) { - if (s->sin.portname =3D=3D NULL) { - continue; - } - vmc_register_interface(s); - } + vmc_register_interface(s); } =20 static void qemu_chr_parse_spice_vmc(QemuOpts *opts, ChardevBackend *backe= nd, diff --git a/include/chardev/spice.h b/include/chardev/spice.h index 1f7339b649..2013255f34 100644 --- a/include/chardev/spice.h +++ b/include/chardev/spice.h @@ -12,7 +12,6 @@ typedef struct SpiceChardev { bool blocked; const uint8_t *datapos; int datalen; - QLIST_ENTRY(SpiceChardev) next; } SpiceChardev; =20 #define TYPE_CHARDEV_SPICE "chardev-spice" diff --git a/include/ui/qemu-spice.h b/include/ui/qemu-spice.h index 8c23dfe717..d34cea2e0f 100644 --- a/include/ui/qemu-spice.h +++ b/include/ui/qemu-spice.h @@ -46,7 +46,6 @@ int qemu_spice_migrate_info(const char *hostname, int por= t, int tls_port, #else #define SPICE_NEEDS_SET_MM_TIME 0 #endif -void qemu_spice_register_ports(void); =20 #else /* CONFIG_SPICE */ =20 diff --git a/softmmu/vl.c b/softmmu/vl.c index f476ef89ed..bc0dcc4f58 100644 --- a/softmmu/vl.c +++ b/softmmu/vl.c @@ -4125,6 +4125,11 @@ void qemu_init(int argc, char **argv, char **envp) page_size_init(); socket_init(); =20 + /* 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_opts_foreach(qemu_find_opts("object"), user_creatable_add_opts_foreach, object_create_initial, &error_fatal); @@ -4139,10 +4144,6 @@ void qemu_init(int argc, char **argv, char **envp) fsdev_init_func, NULL, &error_fatal); #endif =20 - /* spice needs the timers to be initialized by this point */ - /* spice must initialize before audio as it changes the default auiode= v */ - qemu_spice_init(); - /* * Note: we need to create audio and block backends before * machine_set_property(), so machine properties can refer to diff --git a/ui/spice-app.c b/ui/spice-app.c index 40fb2ef573..03d971b15f 100644 --- a/ui/spice-app.c +++ b/ui/spice-app.c @@ -117,7 +117,6 @@ static void spice_app_atexit(void) static void spice_app_display_early_init(DisplayOptions *opts) { QemuOpts *qopts; - ChardevBackend *be =3D chr_spice_backend_new(); GError *err =3D NULL; =20 if (opts->has_full_screen) { @@ -162,6 +161,15 @@ static void spice_app_display_early_init(DisplayOption= s *opts) qemu_opt_set(qopts, "gl", opts->has_gl ? "on" : "off", &error_abort); display_opengl =3D opts->has_gl; #endif +} + +static void spice_app_display_init(DisplayState *ds, DisplayOptions *opts) +{ + ChardevBackend *be =3D chr_spice_backend_new(); + QemuOpts *qopts; + GError *err =3D NULL; + gchar *uri; + be->u.spiceport.data->fqdn =3D g_strdup("org.qemu.monitor.qmp.0"); qemu_chardev_new("org.qemu.monitor.qmp", TYPE_CHARDEV_SPICEPORT, be, NULL, &error_abort); @@ -171,13 +179,6 @@ static void spice_app_display_early_init(DisplayOption= s *opts) qemu_opt_set(qopts, "mode", "control", &error_abort); =20 qapi_free_ChardevBackend(be); -} - -static void spice_app_display_init(DisplayState *ds, DisplayOptions *opts) -{ - GError *err =3D NULL; - gchar *uri; - uri =3D g_strjoin("", "spice+unix://", app_dir, "/", "spice.sock", NUL= L); info_report("Launching display with URI: %s", uri); g_app_info_launch_default_for_uri(uri, NULL, &err); diff --git a/ui/spice-core.c b/ui/spice-core.c index ecc2ec2c55..37dd68f2ab 100644 --- a/ui/spice-core.c +++ b/ui/spice-core.c @@ -813,8 +813,6 @@ void qemu_spice_init(void) g_free(x509_cert_file); g_free(x509_cacert_file); =20 - qemu_spice_register_ports(); - #ifdef HAVE_SPICE_GL if (qemu_opt_get_bool(opts, "gl", 0)) { if ((port !=3D 0) || (tls_port !=3D 0)) { --=20 2.26.2 From nobody Sun May 19 10:38:48 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=1595526624; cv=none; d=zohomail.com; s=zohoarc; b=mkTBWuHCzwYSPsTD71LKElW+44BlBvJzlHAOl5LUFUQARQ4uRzdjbtNto2V0JGo9l5Y7lpE6DOBKX+KtkpfOMyr4h8Ij0LXuQUcIKcrWWx8HHx6wIK8OQv0Zy7acfY49ZQcQOQhX21QqA6btdDlajy89Pb+hnUclBaW4e9IVOdE= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1595526624; 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=Vh5y6IxFHd1mghC1947BBUvp4rrSDNgO8cJkedJIYaE=; b=Gw62zf0KJBpA1t9+fjV27aVg5VOP53XATFEJ1e97hoEu3zYALJ/Ai36Ee6hyPkskS8jsjsRVN3hLeEwlWnptAWMPwAEXx9Nj2ybrBj21uvl9/PL4hsA8dDbkmFpSNulq85woumvkqwivwSVvLfSq/CBDHQWwZz8AQap6k1ComHA= 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 1595526624987309.8211107710364; Thu, 23 Jul 2020 10:50:24 -0700 (PDT) Received: from localhost ([::1]:54134 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jyfMN-0002Va-ON for importer@patchew.org; Thu, 23 Jul 2020 13:50:23 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:43426) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jyfJ3-0005Kq-7x for qemu-devel@nongnu.org; Thu, 23 Jul 2020 13:46:57 -0400 Received: from us-smtp-delivery-1.mimecast.com ([205.139.110.120]:21639 helo=us-smtp-1.mimecast.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1jyfJ1-0004Bc-Dr for qemu-devel@nongnu.org; Thu, 23 Jul 2020 13:46:56 -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-76-yUFXwX8qMN6cqWRTQ9Qgug-1; Thu, 23 Jul 2020 13:46:50 -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 C86C480183C; Thu, 23 Jul 2020 17:46:49 +0000 (UTC) Received: from turbo.com (ovpn-113-141.ams2.redhat.com [10.36.113.141]) by smtp.corp.redhat.com (Postfix) with ESMTP id 4071E69316; Thu, 23 Jul 2020 17:46:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1595526414; 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=Vh5y6IxFHd1mghC1947BBUvp4rrSDNgO8cJkedJIYaE=; b=h+0KgDzXtJi2Vo8l+NCfDFvUuCNWGSjAIjtZjuCR2KlAhFhLeHQY61ggorgsVuY1FX05To +sMVUEAf36MrLsaH3EWWfykybfGbPIJdXt9Kw0JdcKlpQgUH9H63d9YhkqgWXIYdvV3K5D 3wRV75ROm5PDGeldNC5z2w1PBlsAFv0= X-MC-Unique: yUFXwX8qMN6cqWRTQ9Qgug-1 From: Christophe de Dinechin To: qemu-devel@nongnu.org, kraxel@redhat.com Subject: [PATCH 2/7] build: fix device module builds Date: Thu, 23 Jul 2020 19:46:10 +0200 Message-Id: <20200723174615.2370096-3-dinechin@redhat.com> In-Reply-To: <20200723174615.2370096-1-dinechin@redhat.com> References: <20200723174615.2370096-1-dinechin@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=dinechin@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=205.139.110.120; envelope-from=dinechin@redhat.com; helo=us-smtp-1.mimecast.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/07/23 06:04:25 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] [fuzzy] X-Spam_score_int: -40 X-Spam_score: -4.1 X-Spam_bar: ---- X-Spam_report: (-4.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-1, 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_H2=-1, 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: Eduardo Habkost , "Michael S. Tsirkin" , "Dr. David Alan Gilbert" , Markus Armbruster , Paolo Bonzini , Cleber Rosa , =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , Richard Henderson 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" From: Gerd Hoffmann See comment. Feels quite hackish. Better ideas anyone? Signed-off-by: Gerd Hoffmann Signed-off-by: Christophe de Dinechin --- dtc | 2 +- roms/SLOF | 2 +- roms/openbios | 2 +- roms/opensbi | 2 +- roms/seabios | 2 +- slirp | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/dtc b/dtc index 85e5d83984..88f18909db 160000 --- a/dtc +++ b/dtc @@ -1 +1 @@ -Subproject commit 85e5d839847af54efab170f2b1331b2a6421e647 +Subproject commit 88f18909db731a627456f26d779445f84e449536 diff --git a/roms/SLOF b/roms/SLOF index e18ddad851..9546892a80 160000 --- a/roms/SLOF +++ b/roms/SLOF @@ -1 +1 @@ -Subproject commit e18ddad8516ff2cfe36ec130200318f7251aa78c +Subproject commit 9546892a80d5a4c73deea6719de46372f007f4a6 diff --git a/roms/openbios b/roms/openbios index 75fbb41d28..7e5b89e429 160000 --- a/roms/openbios +++ b/roms/openbios @@ -1 +1 @@ -Subproject commit 75fbb41d2857d93208c74a8e0228b29fd7bf04c0 +Subproject commit 7e5b89e4295063d8eba55b9c8ce8bc681c2d129a diff --git a/roms/opensbi b/roms/opensbi index 9f1b72ce66..be92da280d 160000 --- a/roms/opensbi +++ b/roms/opensbi @@ -1 +1 @@ -Subproject commit 9f1b72ce66d659e91013b358939e832fb27223f5 +Subproject commit be92da280d87c38a2e0adc5d3f43bab7b5468f09 diff --git a/roms/seabios b/roms/seabios index 88ab0c1552..f21b5a4aeb 160000 --- a/roms/seabios +++ b/roms/seabios @@ -1 +1 @@ -Subproject commit 88ab0c15525ced2eefe39220742efe4769089ad8 +Subproject commit f21b5a4aeb020f2a5e2c6503f906a9349dd2f069 diff --git a/slirp b/slirp index 2faae0f778..126c04acba 160000 --- a/slirp +++ b/slirp @@ -1 +1 @@ -Subproject commit 2faae0f778f818fadc873308f983289df697eb93 +Subproject commit 126c04acbabd7ad32c2b018fe10dfac2a3bc1210 --=20 2.26.2 From nobody Sun May 19 10:38:48 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=1595526490; cv=none; d=zohomail.com; s=zohoarc; b=BbBMFxaeHJJ7YBnqaoqhP3BWKYbfkZHV+zOHLvOwhnw7mXb0q8sQNHbpAwpIUjXaBDTrv61uzVGSW7t9Dwu1oSkVU3yNnF/TLEY696BpwSeOR+22N6iSFl3ibQ8THnrkSN6gCdZ3nT8z2kuvGXU9hRuHkrEH/os9o7Mg4Fbpu0w= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1595526490; 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=GJX9oFYWeI2gJAGUHHop5bfOVja0UQenPIRkX5m0vFQ=; b=hYO8W0hVy0qszTU3bQ+J0gyrMFxw/N3zOE9Kp3gv/idbOMbXaABX+QtuIyphf6M4DcJ1+Mv/fvyxEBmElCMJjRbhsH4hHpkpiMqnvwizqRoNipktsOJZrBESGonKOAVZmCACv/GV2YUEv/6mBgjvgsQCFc4i1d4p5BsAhzAHk+Y= 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 1595526490897455.5302855864511; Thu, 23 Jul 2020 10:48:10 -0700 (PDT) Received: from localhost ([::1]:44440 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jyfKD-0006z7-Ji for importer@patchew.org; Thu, 23 Jul 2020 13:48:09 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:43450) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jyfJ4-0005M9-KN for qemu-devel@nongnu.org; Thu, 23 Jul 2020 13:46:58 -0400 Received: from us-smtp-delivery-1.mimecast.com ([207.211.31.120]:39844 helo=us-smtp-1.mimecast.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1jyfJ2-0004Bp-Ko for qemu-devel@nongnu.org; Thu, 23 Jul 2020 13:46:58 -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-411-qFoEvPjcM9uRs-Qxuiwezg-1; Thu, 23 Jul 2020 13:46:53 -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 8D0F88015F3; Thu, 23 Jul 2020 17:46:52 +0000 (UTC) Received: from turbo.com (ovpn-113-141.ams2.redhat.com [10.36.113.141]) by smtp.corp.redhat.com (Postfix) with ESMTP id 223786972F; Thu, 23 Jul 2020 17:46:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1595526415; 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=GJX9oFYWeI2gJAGUHHop5bfOVja0UQenPIRkX5m0vFQ=; b=TejynlmmOLTUNLitkdjnVQOdiuSc9h0lTnhujUILdlppqzKqaNz32UwVo3NEGlJq16rH83 ULz5bkKW6RDd9ZKz8WVyPglN1JgAInL9VMhiH4en3+22Ogq9qfJMTkaFOLj02D7Dgb4YTn vJTf9YQVpTIadSnbQS/BEVlSI4Lzico= X-MC-Unique: qFoEvPjcM9uRs-Qxuiwezg-1 From: Christophe de Dinechin To: qemu-devel@nongnu.org, kraxel@redhat.com Subject: [PATCH 3/7] minikconf: Pass variables for modules Date: Thu, 23 Jul 2020 19:46:11 +0200 Message-Id: <20200723174615.2370096-4-dinechin@redhat.com> In-Reply-To: <20200723174615.2370096-1-dinechin@redhat.com> References: <20200723174615.2370096-1-dinechin@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 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=207.211.31.120; envelope-from=dinechin@redhat.com; helo=us-smtp-1.mimecast.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/07/22 22:13:02 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=-1, 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, URIBL_BLOCKED=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: Eduardo Habkost , "Michael S. Tsirkin" , "Dr. David Alan Gilbert" , Markus Armbruster , Paolo Bonzini , Cleber Rosa , =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , Richard Henderson 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: Christophe de Dinechin --- scripts/minikconf.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/minikconf.py b/scripts/minikconf.py index bcd91015d3..d60add97f6 100755 --- a/scripts/minikconf.py +++ b/scripts/minikconf.py @@ -690,10 +690,10 @@ if __name__ =3D=3D '__main__': parser =3D KconfigParser(data) external_vars =3D set() for arg in argv[3:]: - m =3D re.match(r'^(CONFIG_[A-Z0-9_]+)=3D([yn]?)$', arg) + m =3D re.match(r'^(CONFIG_[A-Z0-9_]+)=3D([ymn]?)$', arg) if m is not None: name, value =3D m.groups() - parser.do_assignment(name, value =3D=3D 'y') + parser.do_assignment(name, value =3D=3D 'y' or value =3D=3D 'm= ') external_vars.add(name[7:]) else: fp =3D open(arg, 'rt', encoding=3D'utf-8') --=20 2.26.2 From nobody Sun May 19 10:38:48 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=1595526496; cv=none; d=zohomail.com; s=zohoarc; b=kE70rT6dQsS1FayqUqao0sLG0Ld5gb5qxHOwiTuLoHfCzyLCs6A4UE+ThZVNAwY/4VKyxFB3iz1uoVU00b0L2Au90OSycUOvuxj+fMjypoZZM2eTc8b/x8KJiZut7S7WuMnPXboZoQDzPQoDcRPfXm/K2fIOZiImFVVVC5kqquA= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1595526496; 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=5hDiABnSVTJmwW4/l6/BO7SmKArZXogC39VD0mu6opk=; b=nOo8s2s6fXFHRXqQpOxnJ3WdLLwA67iJBouy9R+XJHOBK3my3sOoB0E6EBwl+nNwHLLoX0gLIaUwzErVMvjpBaipGxqIY7mA0ZhuaoHZ9PQw06aUyxcw2fRiADhxVpfpVY0UU7gO4/qO9gx+Fb4ZKBhD/icyLKkZeil8OMwYYio= 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 1595526496872780.2128957692076; Thu, 23 Jul 2020 10:48:16 -0700 (PDT) Received: from localhost ([::1]:44984 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jyfKJ-0007CQ-K9 for importer@patchew.org; Thu, 23 Jul 2020 13:48:15 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:43490) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jyfJA-0005T3-UE for qemu-devel@nongnu.org; Thu, 23 Jul 2020 13:47:04 -0400 Received: from us-smtp-delivery-1.mimecast.com ([207.211.31.120]:51598 helo=us-smtp-1.mimecast.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1jyfJ6-0004CX-VR for qemu-devel@nongnu.org; Thu, 23 Jul 2020 13:47: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-509-6J5YDb7lNaGUX6z4QPcitw-1; Thu, 23 Jul 2020 13:46:56 -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 3D84A100AA51; Thu, 23 Jul 2020 17:46:55 +0000 (UTC) Received: from turbo.com (ovpn-113-141.ams2.redhat.com [10.36.113.141]) by smtp.corp.redhat.com (Postfix) with ESMTP id D9FA469316; Thu, 23 Jul 2020 17:46:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1595526420; 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=5hDiABnSVTJmwW4/l6/BO7SmKArZXogC39VD0mu6opk=; b=Y7JrLfWxtPTqWH9DrkTQEty8y/iV9r5tl624jxeLn5nTaq3H22jRl881BQg8nqFa2tn0At /4pISEzZZ1PZqMGxFCO6PyabvbFljLXBuEoLqqxRm8nSPOlTyIwuNaUa7M4GAO6Psl6mDx HezHfx7wDjzg/dtEXxZ8Sssl8dxLp4U= X-MC-Unique: 6J5YDb7lNaGUX6z4QPcitw-1 From: Christophe de Dinechin To: qemu-devel@nongnu.org, kraxel@redhat.com Subject: [PATCH 4/7] spice: Make spice a module configuration Date: Thu, 23 Jul 2020 19:46:12 +0200 Message-Id: <20200723174615.2370096-5-dinechin@redhat.com> In-Reply-To: <20200723174615.2370096-1-dinechin@redhat.com> References: <20200723174615.2370096-1-dinechin@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 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=207.211.31.120; envelope-from=dinechin@redhat.com; helo=us-smtp-1.mimecast.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/07/22 22:13:02 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=-1, 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, URIBL_BLOCKED=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: Eduardo Habkost , "Michael S. Tsirkin" , "Dr. David Alan Gilbert" , Markus Armbruster , Paolo Bonzini , Cleber Rosa , =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , Richard Henderson 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" This commit changes the spice configuration 'm' by default, and moves the spice components to obj-m variables. It is sufficient to build without modules enable, but does not link correctly yet, since no shims have been created for the missing functions yet. Signed-off-by: Christophe de Dinechin --- chardev/Makefile.objs | 3 ++- configure | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/chardev/Makefile.objs b/chardev/Makefile.objs index 3783dadc4c..7cf05c9541 100644 --- a/chardev/Makefile.objs +++ b/chardev/Makefile.objs @@ -26,4 +26,5 @@ baum.o-cflags :=3D $(SDL_CFLAGS) baum.o-libs :=3D $(BRLAPI_LIBS) endif =20 -common-obj-$(CONFIG_SPICE) +=3D spice.o +common-obj-$(CONFIG_SPICE) +=3D spice.mo +spice.mo-objs :=3D spice.o diff --git a/configure b/configure index 4bd80ed507..054aab31be 100755 --- a/configure +++ b/configure @@ -7534,7 +7534,7 @@ if test "$posix_memalign" =3D "yes" ; then fi =20 if test "$spice" =3D "yes" ; then - echo "CONFIG_SPICE=3Dy" >> $config_host_mak + echo "CONFIG_SPICE=3Dm" >> $config_host_mak fi =20 if test "$smartcard" =3D "yes" ; then --=20 2.26.2 From nobody Sun May 19 10:38:48 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=1595526515; cv=none; d=zohomail.com; s=zohoarc; b=KFEKlfkGb0pGt7DLb10vszG/tiD1smGjL50nt5wgxaezNeGngCxjND0vpIi5CWU4NJQ+LV5Dx0AHscmfJ/3FMZCHUkOpJ1/0IDapsKMQt+BKjwa5VaevhK8bVAU3ptKh8e5Gt1keBzOaCsRx1wmoXxRhGaeUUhDtMGSN7ZxeuNk= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1595526515; 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=QVdscPRd6imQsOABcuv9gyX+RdOmajO1F+PXzm8/OCE=; b=DgemQc/nr0Hwox4BLoKzLZ4fbS7HRfIkk+qQSKOBFCcUTiajTd/okFPIsv3f5KHqvfDED1k1s/L8prPcnevwnGOPQLokgsJAQ0Bvg9N4dQzsC+mMLZhTQuc4XWOFW/Cen5jk62ql2Tl9xTnPsdgtXMYywpEPTPuSLj04f5ZP7iw= 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 1595526515896330.9922234308907; Thu, 23 Jul 2020 10:48:35 -0700 (PDT) Received: from localhost ([::1]:46628 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jyfKc-0007qz-Jg for importer@patchew.org; Thu, 23 Jul 2020 13:48:34 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:43596) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jyfJL-0005gL-4B for qemu-devel@nongnu.org; Thu, 23 Jul 2020 13:47:15 -0400 Received: from us-smtp-delivery-1.mimecast.com ([207.211.31.120]:58988 helo=us-smtp-1.mimecast.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1jyfJF-0004Dp-CW for qemu-devel@nongnu.org; Thu, 23 Jul 2020 13:47:14 -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-213-MB_heOcnPpKha69IQlc-gQ-1; Thu, 23 Jul 2020 13:47:04 -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 8034E193248F; Thu, 23 Jul 2020 17:47:03 +0000 (UTC) Received: from turbo.com (ovpn-113-141.ams2.redhat.com [10.36.113.141]) by smtp.corp.redhat.com (Postfix) with ESMTP id 8CCB369316; Thu, 23 Jul 2020 17:46:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1595526428; 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=QVdscPRd6imQsOABcuv9gyX+RdOmajO1F+PXzm8/OCE=; b=cSKEf6mMMLXhOBAdCl2i2OJJp1hs4OEChHler+3yFacxd1ioFIi7Qv0yceGj8IWQi+Cq9l knk6rlw8POrHni9s901nxYwcOMooVJnVFQ4e4V3v7XUW5HCK+i69xNGwWGH5W9ZvIv3C9/ y2/jRDpcBTOlI1GsSj+zIILGCU1wefI= X-MC-Unique: MB_heOcnPpKha69IQlc-gQ-1 From: Christophe de Dinechin To: qemu-devel@nongnu.org, kraxel@redhat.com Subject: [PATCH 5/7] spice: Move all the spice-related code in spice-app.so Date: Thu, 23 Jul 2020 19:46:13 +0200 Message-Id: <20200723174615.2370096-6-dinechin@redhat.com> In-Reply-To: <20200723174615.2370096-1-dinechin@redhat.com> References: <20200723174615.2370096-1-dinechin@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 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=207.211.31.120; envelope-from=dinechin@redhat.com; helo=us-smtp-1.mimecast.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/07/22 22:13:02 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=-1, 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, URIBL_BLOCKED=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: Eduardo Habkost , "Michael S. Tsirkin" , "Dr. David Alan Gilbert" , Markus Armbruster , Paolo Bonzini , Cleber Rosa , =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , Richard Henderson 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" If we want to build spice as a separately loadable module, we need to put all the spice code in one loadable module, because the build system does not know how to deal with dependencies yet. Signed-off-by: Christophe de Dinechin --- audio/Makefile.objs | 2 +- chardev/Makefile.objs | 3 +-- ui/Makefile.objs | 8 ++++---- 3 files changed, 6 insertions(+), 7 deletions(-) diff --git a/audio/Makefile.objs b/audio/Makefile.objs index b4a4c11f31..298c895ff5 100644 --- a/audio/Makefile.objs +++ b/audio/Makefile.objs @@ -1,5 +1,5 @@ common-obj-y =3D audio.o audio_legacy.o noaudio.o wavaudio.o mixeng.o -common-obj-$(CONFIG_SPICE) +=3D spiceaudio.o +spice-app.mo-objs +=3D ../audio/spiceaudio.o common-obj-$(CONFIG_AUDIO_COREAUDIO) +=3D coreaudio.o common-obj-$(CONFIG_AUDIO_DSOUND) +=3D dsoundaudio.o common-obj-$(CONFIG_AUDIO_WIN_INT) +=3D audio_win_int.o diff --git a/chardev/Makefile.objs b/chardev/Makefile.objs index 7cf05c9541..2add4319a9 100644 --- a/chardev/Makefile.objs +++ b/chardev/Makefile.objs @@ -26,5 +26,4 @@ baum.o-cflags :=3D $(SDL_CFLAGS) baum.o-libs :=3D $(BRLAPI_LIBS) endif =20 -common-obj-$(CONFIG_SPICE) +=3D spice.mo -spice.mo-objs :=3D spice.o +spice-app.mo-objs +=3D ../chardev/spice.o diff --git a/ui/Makefile.objs b/ui/Makefile.objs index 504b196479..1ab515e23d 100644 --- a/ui/Makefile.objs +++ b/ui/Makefile.objs @@ -11,7 +11,6 @@ common-obj-y +=3D keymaps.o console.o cursor.o qemu-pixma= n.o common-obj-y +=3D input.o input-keymap.o input-legacy.o kbd-state.o common-obj-y +=3D input-barrier.o common-obj-$(CONFIG_LINUX) +=3D input-linux.o -common-obj-$(CONFIG_SPICE) +=3D spice-core.o spice-input.o spice-display.o common-obj-$(CONFIG_COCOA) +=3D cocoa.o common-obj-$(CONFIG_VNC) +=3D $(vnc-obj-y) common-obj-$(call lnot,$(CONFIG_VNC)) +=3D vnc-stubs.o @@ -53,10 +52,11 @@ curses.mo-objs :=3D curses.o curses.mo-cflags :=3D $(CURSES_CFLAGS) $(ICONV_CFLAGS) curses.mo-libs :=3D $(CURSES_LIBS) $(ICONV_LIBS) =20 -ifeq ($(CONFIG_GIO)$(CONFIG_SPICE),yy) -common-obj-$(if $(CONFIG_MODULES),m,y) +=3D spice-app.mo +common-obj-$(CONFIG_SPICE) +=3D spice-app.mo +spice-app.mo-objs +=3D spice-core.o spice-input.o spice-display.o +ifeq ($(CONFIG_GIO)$(CONFIG_SPICE),ym) +spice-app.mo-objs +=3D spice-app.o endif -spice-app.mo-objs :=3D spice-app.o spice-app.mo-cflags :=3D $(GIO_CFLAGS) spice-app.mo-libs :=3D $(GIO_LIBS) =20 --=20 2.26.2 From nobody Sun May 19 10:38:48 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=1595526667; cv=none; d=zohomail.com; s=zohoarc; b=j8msYFigCvLqjZqgZWUaItPkrMGPLYmFlgIX3EZsekj/qwsUyAFPESx71XZTDPoueQWLynLLGs3NCV6grfifZX+s3I6BEg2oaD0cYTsBqEf6uL+AS8blLJBRtijaeMhr2wZoSZCklowcX89FA8rqtAWnanc6c1LPHu480h+cuU0= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1595526667; 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=cuN2A5nVv8qvcFglG8w7xF0+KQS4lEX4mWOf4HwsCvo=; b=ndIsm6vNrnFM7C0ymZ0e6sJ962VKmzgu5CBv4cReR90znj+84+C9bMAef80lcP2u3ULFnFkED+PVmmm/Rz58Ya8OkbBfg91n2oXLR4m8w+oxLlOTnAEaHl0zGO7ZjaCjJD/E5jSRjLS2gnZMq/JNifttyTOdSLJZN2nMPeyNFI4= 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 159552666721429.638233513836667; Thu, 23 Jul 2020 10:51:07 -0700 (PDT) Received: from localhost ([::1]:56240 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jyfN4-0003SV-3d for importer@patchew.org; Thu, 23 Jul 2020 13:51:06 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:43642) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jyfJT-00061L-Bj for qemu-devel@nongnu.org; Thu, 23 Jul 2020 13:47:23 -0400 Received: from us-smtp-delivery-1.mimecast.com ([207.211.31.120]:34929 helo=us-smtp-1.mimecast.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1jyfJR-0004Er-Bu for qemu-devel@nongnu.org; Thu, 23 Jul 2020 13:47:22 -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-171-maXPm4E5NV2dFEmUye3rgw-1; Thu, 23 Jul 2020 13:47:12 -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 B4A64106B204; Thu, 23 Jul 2020 17:47:11 +0000 (UTC) Received: from turbo.com (ovpn-113-141.ams2.redhat.com [10.36.113.141]) by smtp.corp.redhat.com (Postfix) with ESMTP id CF39769327; Thu, 23 Jul 2020 17:47:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1595526440; 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=cuN2A5nVv8qvcFglG8w7xF0+KQS4lEX4mWOf4HwsCvo=; b=Q0e8UqC1k7Qbv2ZA5ZatGxI+ZEwgdolnTZDcJMMybyInaSWWwg+8l/dR9ggF8sjemZUzcK H5bvvjLRU/1mR1SqPFj1xstzKW+CAWeN4RkTab9x4OnzwoXMm67hINvjkrDo6yfBogHSbn VBimd1xdxLQogXQkH5PWLfj4SbzyxDc= X-MC-Unique: maXPm4E5NV2dFEmUye3rgw-1 From: Christophe de Dinechin To: qemu-devel@nongnu.org, kraxel@redhat.com Subject: [PATCH 6/7] build: Add SPICE_CFLAGS and SPICE_LIBS to relevant files Date: Thu, 23 Jul 2020 19:46:14 +0200 Message-Id: <20200723174615.2370096-7-dinechin@redhat.com> In-Reply-To: <20200723174615.2370096-1-dinechin@redhat.com> References: <20200723174615.2370096-1-dinechin@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 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=207.211.31.120; envelope-from=dinechin@redhat.com; helo=us-smtp-1.mimecast.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/07/22 22:13:02 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=-1, 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, URIBL_BLOCKED=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: Eduardo Habkost , "Michael S. Tsirkin" , "Dr. David Alan Gilbert" , Markus Armbruster , Paolo Bonzini , Cleber Rosa , =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , Richard Henderson 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" Instead of adding the spice build flags to the top-level build options, add them where they are necessary. This is a step to move the burden of linking with spice libraries away from the top-level qemu. Signed-off-by: Christophe de Dinechin Reviewed-by: Gerd Hoffmann --- configure | 4 ++-- hw/display/Makefile.objs | 1 + hw/i386/pc.c | 1 - monitor/Makefile.objs | 3 +++ softmmu/Makefile.objs | 2 +- ui/Makefile.objs | 4 ++-- 6 files changed, 9 insertions(+), 6 deletions(-) diff --git a/configure b/configure index 054aab31be..86fc03699a 100755 --- a/configure +++ b/configure @@ -5223,8 +5223,6 @@ EOF $pkg_config --atleast-version=3D0.12.3 spice-protocol && \ compile_prog "$spice_cflags" "$spice_libs" ; then spice=3D"yes" - libs_softmmu=3D"$libs_softmmu $spice_libs" - QEMU_CFLAGS=3D"$QEMU_CFLAGS $spice_cflags" spice_protocol_version=3D$($pkg_config --modversion spice-protocol) spice_server_version=3D$($pkg_config --modversion spice-server) else @@ -7535,6 +7533,8 @@ fi =20 if test "$spice" =3D "yes" ; then echo "CONFIG_SPICE=3Dm" >> $config_host_mak + echo "SPICE_CFLAGS=3D$spice_cflags" >> $config_host_mak + echo "SPICE_LIBS=3D$spice_libs" >> $config_host_mak fi =20 if test "$smartcard" =3D "yes" ; then diff --git a/hw/display/Makefile.objs b/hw/display/Makefile.objs index d619594ad4..3963fd1dcd 100644 --- a/hw/display/Makefile.objs +++ b/hw/display/Makefile.objs @@ -47,6 +47,7 @@ obj-$(CONFIG_VGA) +=3D vga.o ifeq ($(CONFIG_QXL),y) common-obj-m +=3D qxl.mo qxl.mo-objs =3D qxl.o qxl-logger.o qxl-render.o +qxl.mo-cflags +=3D $(SPICE_CFLAGS) endif =20 common-obj-$(CONFIG_VIRTIO_GPU) +=3D virtio-gpu-base.o virtio-gpu.o virtio= -gpu-3d.o diff --git a/hw/i386/pc.c b/hw/i386/pc.c index 3d419d5991..9f28a91df9 100644 --- a/hw/i386/pc.c +++ b/hw/i386/pc.c @@ -64,7 +64,6 @@ #include "kvm_i386.h" #include "hw/xen/xen.h" #include "hw/xen/start_info.h" -#include "ui/qemu-spice.h" #include "exec/memory.h" #include "exec/address-spaces.h" #include "sysemu/arch_init.h" diff --git a/monitor/Makefile.objs b/monitor/Makefile.objs index a8533c9dd7..fd58d80195 100644 --- a/monitor/Makefile.objs +++ b/monitor/Makefile.objs @@ -2,5 +2,8 @@ obj-y +=3D misc.o common-obj-y +=3D monitor.o qmp.o hmp.o common-obj-y +=3D qmp-cmds.o qmp-cmds-control.o common-obj-y +=3D hmp-cmds.o +qmp-cmds.o-cflags +=3D $(SPICE_CFLAGS) +hmp-cmds.o-cflags +=3D $(SPICE_CFLAGS) +misc.o-cflags +=3D $(SPICE_CFLAGS) =20 storage-daemon-obj-y +=3D monitor.o qmp.o qmp-cmds-control.o diff --git a/softmmu/Makefile.objs b/softmmu/Makefile.objs index a414a74c50..4e36ff47a2 100644 --- a/softmmu/Makefile.objs +++ b/softmmu/Makefile.objs @@ -11,4 +11,4 @@ obj-y +=3D memory_mapping.o obj-y +=3D qtest.o =20 obj-y +=3D vl.o -vl.o-cflags :=3D $(GPROF_CFLAGS) $(SDL_CFLAGS) +vl.o-cflags :=3D $(GPROF_CFLAGS) $(SDL_CFLAGS) $(SPICE_CFLAGS) diff --git a/ui/Makefile.objs b/ui/Makefile.objs index 1ab515e23d..6a6fda2f06 100644 --- a/ui/Makefile.objs +++ b/ui/Makefile.objs @@ -57,8 +57,8 @@ spice-app.mo-objs +=3D spice-core.o spice-input.o spice-d= isplay.o ifeq ($(CONFIG_GIO)$(CONFIG_SPICE),ym) spice-app.mo-objs +=3D spice-app.o endif -spice-app.mo-cflags :=3D $(GIO_CFLAGS) -spice-app.mo-libs :=3D $(GIO_LIBS) +spice-app.mo-cflags :=3D $(GIO_CFLAGS) $(SPICE_CFLAGS) +spice-app.mo-libs :=3D $(GIO_LIBS) $(SPICE_LIBS) =20 common-obj-$(CONFIG_OPENGL) +=3D shader.o common-obj-$(CONFIG_OPENGL) +=3D console-gl.o --=20 2.26.2 From nobody Sun May 19 10:38:48 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=1595526581; cv=none; d=zohomail.com; s=zohoarc; b=Inu+Hn6gQCyf+IyMMbSB+s9as+uKqTkElgopS+stSx5weJ/FsMzgMu3gqN7dWiVzv/ytdNeUa8I6Ba1VSuknS861QUV6oVMazwCjj/UZ7OdGdoKeI988E9lyoY1B78TYj0jZZhes/WqHm533Hl6mxlsIWYeXJvYmMkO3jAcOjeU= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1595526581; 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=4s0E4sntKbvJMM+adqRledjO1J+SAgFxPLSD8U8vZXM=; b=fJJQgSlipHgYauRvlPu0waRjHYWqjxVn645V6IkSGQ0Amj8xObTx49/zmDbtoI47ktjNYfTReaocmJIMM120ggabRArnKcCqI6kuXDQexGNU5dKlK9X5122frDoBubQzmF6swl59lX9qkIt6fPuwff+O6RCdmB6oUl4dJQYxqWM= 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 1595526581149204.8484400795145; Thu, 23 Jul 2020 10:49:41 -0700 (PDT) Received: from localhost ([::1]:51560 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jyfLf-0001SQ-Ma for importer@patchew.org; Thu, 23 Jul 2020 13:49:39 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:43636) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jyfJS-0005zX-Jz for qemu-devel@nongnu.org; Thu, 23 Jul 2020 13:47:22 -0400 Received: from us-smtp-2.mimecast.com ([205.139.110.61]:46499 helo=us-smtp-delivery-1.mimecast.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1jyfJQ-0004Em-AN for qemu-devel@nongnu.org; Thu, 23 Jul 2020 13:47:22 -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-130-8ZLwz8RLMt6xsq9PwCW5kA-1; Thu, 23 Jul 2020 13:47:15 -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 773B0800688; Thu, 23 Jul 2020 17:47:14 +0000 (UTC) Received: from turbo.com (ovpn-113-141.ams2.redhat.com [10.36.113.141]) by smtp.corp.redhat.com (Postfix) with ESMTP id 10CBB69325; Thu, 23 Jul 2020 17:47:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1595526439; 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=4s0E4sntKbvJMM+adqRledjO1J+SAgFxPLSD8U8vZXM=; b=ZHSyvRTVmKIHDo1lmOLePToy7M59NaYCch2YUwSi5VYdCEMa6Bsja32O85zB7CFAsVjM4Y TfAqZ6u3329w7ukC8/sHOqbaLusxftDupvRuP7LgsU08gsUGjpXQ17FmSN7nOOAjYzzQab FbfFDFOIoEBy9oxR0p6k6mX+2C/3GDs= X-MC-Unique: 8ZLwz8RLMt6xsq9PwCW5kA-1 From: Christophe de Dinechin To: qemu-devel@nongnu.org, kraxel@redhat.com Subject: [PATCH 7/7] spice: Call qemu spice functions indirectly Date: Thu, 23 Jul 2020 19:46:15 +0200 Message-Id: <20200723174615.2370096-8-dinechin@redhat.com> In-Reply-To: <20200723174615.2370096-1-dinechin@redhat.com> References: <20200723174615.2370096-1-dinechin@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 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=205.139.110.61; envelope-from=dinechin@redhat.com; helo=us-smtp-delivery-1.mimecast.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/07/23 02:33:29 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] [fuzzy] X-Spam_score_int: -40 X-Spam_score: -4.1 X-Spam_bar: ---- X-Spam_report: (-4.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-1, 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_H2=-1, 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: Eduardo Habkost , "Michael S. Tsirkin" , "Dr. David Alan Gilbert" , Markus Armbruster , Paolo Bonzini , Cleber Rosa , =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , Richard Henderson 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 order to be able to move all of spice in a shared library that is loaded dynamically only on demand, this commit puts the functions called by the main binary in a QemuSpiceOps structure, and use static inline stubs to preserve the call sites. With these changes, the following shared libraries are no longer necessary in the top-level qemu binary when building with CONFIG_MDULES: libspice-server.so.1 =3D> /lib64/libspice-server.so.1 (HEX) libopus.so.0 =3D> /lib64/libopus.so.0 (HEX) liblz4.so.1 =3D> /lib64/liblz4.so.1 (HEX) libgstapp-1.0.so.0 =3D> /lib64/libgstapp-1.0.so.0 (HEX) libgstvideo-1.0.so.0 =3D> /lib64/libgstvideo-1.0.so.0 (HEX) libgstbase-1.0.so.0 =3D> /lib64/libgstbase-1.0.so.0 (HEX) libgstreamer-1.0.so.0 =3D> /lib64/libgstreamer-1.0.so.0 (HEX) libssl.so.1.1 =3D> /lib64/libssl.so.1.1 (HEX) liborc-0.4.so.0 =3D> /lib64/liborc-0.4.so.0 (HEX) Signed-off-by: Christophe de Dinechin --- include/ui/qemu-spice.h | 74 +++++++++++++++++++---------------------- monitor/hmp-cmds.c | 13 ++++++++ monitor/misc.c | 2 +- monitor/qmp-cmds.c | 6 ++-- softmmu/vl.c | 28 ++++++++++++++-- ui/spice-core.c | 33 ++++++++++++++++-- 6 files changed, 107 insertions(+), 49 deletions(-) diff --git a/include/ui/qemu-spice.h b/include/ui/qemu-spice.h index d34cea2e0f..9721d8817e 100644 --- a/include/ui/qemu-spice.h +++ b/include/ui/qemu-spice.h @@ -25,21 +25,28 @@ #include #include "qemu/config-file.h" =20 -extern int using_spice; +#define using_spice (qemu_spice.in_use()) =20 -void qemu_spice_init(void); void qemu_spice_input_init(void); void qemu_spice_audio_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); + +#if !defined(CONFIG_MODULES) || defined(BUILD_DSO) +bool qemu_is_using_spice(void); +void qemu_start_using_spice(void); +void qemu_spice_init(void); +void qemu_spice_display_init(void); +int qemu_spice_display_add_client(int csock, int skipauth, int tls); 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); +struct SpiceInfo *qemu_spice_query(Error **errp); +#endif /* !CONFIG_MODULES || BUILD_DSO */ + =20 #if !defined(SPICE_SERVER_VERSION) || (SPICE_SERVER_VERSION < 0xc06) #define SPICE_NEEDS_SET_MM_TIME 1 @@ -47,46 +54,33 @@ int qemu_spice_migrate_info(const char *hostname, int p= ort, int tls_port, #define SPICE_NEEDS_SET_MM_TIME 0 #endif =20 -#else /* CONFIG_SPICE */ - -#include "qemu/error-report.h" - -#define using_spice 0 -#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_migrate_info(const char *h, int p, int t, - const char *s) -{ - return -1; -} +#else /* !CONFIG_SPICE */ =20 -static inline int qemu_spice_display_add_client(int csock, int skipauth, - int tls) -{ - return -1; -} +#define using_spice 0 =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 void qemu_spice_init(void) +/* Module high-level inteface for SPICE */ +struct QemuSpiceOps { -} - -#endif /* CONFIG_SPICE */ + bool (*in_use)(void); + void (*init)(void); + void (*display_init)(void); + int (*display_add_client)(int csock, int skipauth, int tls); + + int (*set_passwd)(const char *passwd, + bool fail_if_connected, + bool disconnect_if_connected); + int (*set_pw_expire)(time_t expires); + int (*migrate_info)(const char *hostname, + int port, int tls_port, + const char *subject); + struct SpiceInfo * (*query)(Error **errp); +}; +typedef struct QemuSpiceOps QemuSpiceOps; +void qemu_spice_ops_register(QemuSpiceOps *ops); + +extern struct QemuSpiceOps qemu_spice; =20 static inline bool qemu_using_spice(Error **errp) { diff --git a/monitor/hmp-cmds.c b/monitor/hmp-cmds.c index ae4b6a4246..8e10af188f 100644 --- a/monitor/hmp-cmds.c +++ b/monitor/hmp-cmds.c @@ -57,6 +57,7 @@ =20 #ifdef CONFIG_SPICE #include +#include "ui/qemu-spice.h" #endif =20 void hmp_handle_error(Monitor *mon, Error *err) @@ -573,6 +574,14 @@ void hmp_info_vnc(Monitor *mon, const QDict *qdict) #endif =20 #ifdef CONFIG_SPICE +SpiceInfo *qmp_query_spice(Error **errp) +{ + if (!using_spice) { + return NULL; + } + return qemu_spice.query(errp); +} + void hmp_info_spice(Monitor *mon, const QDict *qdict) { SpiceChannelList *chan; @@ -599,6 +608,10 @@ void hmp_info_spice(Monitor *mon, const QDict *qdict) =20 info =3D qmp_query_spice(NULL); =20 + if (!info) { + monitor_printf(mon, "Server: not started\n"); + goto out; + } if (!info->enabled) { monitor_printf(mon, "Server: disabled\n"); goto out; diff --git a/monitor/misc.c b/monitor/misc.c index e847b58a8c..88f8915734 100644 --- a/monitor/misc.c +++ b/monitor/misc.c @@ -443,7 +443,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/monitor/qmp-cmds.c b/monitor/qmp-cmds.c index 864cbfa32e..9f9822b3f3 100644 --- a/monitor/qmp-cmds.c +++ b/monitor/qmp-cmds.c @@ -196,7 +196,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); @@ -242,7 +242,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); } @@ -339,7 +339,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/softmmu/vl.c b/softmmu/vl.c index bc0dcc4f58..8defda56c9 100644 --- a/softmmu/vl.c +++ b/softmmu/vl.c @@ -173,6 +173,30 @@ int icount_align_option; QemuUUID qemu_uuid; bool qemu_uuid_set; =20 +static bool qemu_is_not_using_spice(void) +{ + return 0; +} + +static void qemu_spice_init_no_op(void) +{ +} + +/* + * Only two fields are initialized, that can be used even when SPICE + * is not configured or not loaded. Other functions are protected by + * checking if using_spice. + */ +QemuSpiceOps qemu_spice =3D { + .in_use =3D qemu_is_not_using_spice, + .init =3D qemu_spice_init_no_op, +}; + +void qemu_spice_ops_register(QemuSpiceOps *ops) +{ + memcpy(&qemu_spice, ops, sizeof(qemu_spice)); +} + static NotifierList exit_notifiers =3D NOTIFIER_LIST_INITIALIZER(exit_notifiers); =20 @@ -4128,7 +4152,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("object"), user_creatable_add_opts_foreach, @@ -4424,7 +4448,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 37dd68f2ab..9d7ac70d92 100644 --- a/ui/spice-core.c +++ b/ui/spice-core.c @@ -48,7 +48,7 @@ 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; +static int is_using_spice; =20 static QemuThread me; =20 @@ -503,7 +503,7 @@ static QemuOptsList qemu_spice_opts =3D { }, }; =20 -SpiceInfo *qmp_query_spice(Error **errp) +SpiceInfo *qemu_spice_query(Error **errp) { QemuOpts *opts =3D QTAILQ_FIRST(&qemu_spice_opts.head); int port, tls_port; @@ -634,6 +634,16 @@ static void vm_change_state_handler(void *opaque, int = running, } } =20 +bool qemu_is_using_spice(void) +{ + return is_using_spice; +} + +void qemu_start_using_spice(void) +{ + is_using_spice =3D 1; +} + void qemu_spice_init(void) { QemuOpts *opts =3D QTAILQ_FIRST(&qemu_spice_opts.head); @@ -796,7 +806,7 @@ void qemu_spice_init(void) error_report("failed to initialize spice server"); exit(1); }; - using_spice =3D 1; + qemu_start_using_spice(); =20 migration_state.notify =3D migration_state_notifier; add_migration_state_change_notifier(&migration_state); @@ -1000,3 +1010,20 @@ static void spice_register_config(void) qemu_add_opts(&qemu_spice_opts); } opts_init(spice_register_config); + +static QemuSpiceOps qemu_spice_ops =3D { + .in_use =3D qemu_is_using_spice, + .init =3D qemu_spice_init, + .display_init =3D qemu_spice_display_init, + .display_add_client =3D qemu_spice_display_add_client, + .set_passwd =3D qemu_spice_set_passwd, + .set_pw_expire =3D qemu_spice_set_pw_expire, + .migrate_info =3D qemu_spice_migrate_info, + .query =3D qemu_spice_query, +}; + +static void spice_register_ops(void) +{ + qemu_spice_ops_register(&qemu_spice_ops); +} +type_init(spice_register_ops); --=20 2.26.2