From nobody Sat Feb 7 04:40:16 2026 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=1616763432; cv=none; d=zohomail.com; s=zohoarc; b=E+MWAu8WE6A4oSl6t+bbWx35UbA3zcDJ8QA2X4Zy4+vMvLOBTP2CAqzIRvnbcUR3EKXrmiUcTLH+ra2zO3mHDyRWF2+AY6etLlLcT6OqEWLg/1BLVuLns8Qi9UEy9CT4y/ozL+47Q/NKP1eSbgEFKULDNIG5KEUA00yartm7RNA= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1616763432; 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=HrOjiFbElUI1UPiY3wTVIe5o3LRk5qFEdbWDNQIibHU=; b=ap93HIFAeeMt7ITAaeo6emN1LIq5o0yVruLrWI4PVOyTOkv5OCgX5rDxocpY1mWIh3sfkfyhn2+xEkQeX1cVgaTxKEf0oEzTggIeTL0DGI6vSlx7i4YsHox5zBuXktx4fSNNgkBAcMHB0krxl/JKtglKicsdiuB0NAHzXgUYAyc= 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 1616763432438531.6689133177714; Fri, 26 Mar 2021 05:57:12 -0700 (PDT) Received: from localhost ([::1]:58610 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lPm1X-00055G-E9 for importer@patchew.org; Fri, 26 Mar 2021 08:57:11 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:59214) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lPlvN-00064Y-DX for qemu-devel@nongnu.org; Fri, 26 Mar 2021 08:50:54 -0400 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:31998) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lPlvF-00048F-Ks for qemu-devel@nongnu.org; Fri, 26 Mar 2021 08:50:49 -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-163-15rlRJHjOhi52YCkfIDJtg-1; Fri, 26 Mar 2021 08:50:34 -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 E1ED581627; Fri, 26 Mar 2021 12:50:31 +0000 (UTC) Received: from sirius.home.kraxel.org (ovpn-112-102.ams2.redhat.com [10.36.112.102]) by smtp.corp.redhat.com (Postfix) with ESMTPS id BFFB51B5C0; Fri, 26 Mar 2021 12:50:18 +0000 (UTC) Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id 1BFA71800393; Fri, 26 Mar 2021 13:49:33 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1616763037; 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=HrOjiFbElUI1UPiY3wTVIe5o3LRk5qFEdbWDNQIibHU=; b=YWOMzIl1PsYohh+NNkLKWYOvyhq3lVkRr2jdVWrSr1cGvGUk+LC3Ik0exNxjH9uiT6WqB3 FsFExMTD/l4G457WwrKhVX3nAa211GRQgaDANHLkLJbkqePn3GhJp23uoINdrj3nTcaLvk GWHofpURJTkJPjGqFLCPIHFJ3MHnCGk= X-MC-Unique: 15rlRJHjOhi52YCkfIDJtg-1 From: Gerd Hoffmann To: qemu-devel@nongnu.org Subject: [PULL 8/9] s390x: modularize virtio-gpu-ccw Date: Fri, 26 Mar 2021 13:49:31 +0100 Message-Id: <20210326124932.481942-9-kraxel@redhat.com> In-Reply-To: <20210326124932.481942-1-kraxel@redhat.com> References: <20210326124932.481942-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-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 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_LOW=-0.7, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, 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: Thomas Huth , David Hildenbrand , Cornelia Huck , Richard Henderson , Halil Pasic , Christian Borntraeger , qemu-s390x@nongnu.org, "Michael S. Tsirkin" , Gerd Hoffmann , =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= 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" Since the virtio-gpu-ccw device depends on the hw-display-virtio-gpu module, which provides the type virtio-gpu-device, packaging the hw-display-virtio-gpu module as a separate package that may or may not be installed along with the qemu package leads to problems. Namely if the hw-display-virtio-gpu is absent, qemu continues to advertise virtio-gpu-ccw, but it aborts not only when one attempts using virtio-gpu-ccw, but also when libvirtd's capability probing tries to instantiate the type to introspect it. Let us thus introduce a module named hw-s390x-virtio-gpu-ccw that is going to provide the virtio-gpu-ccw device. The hw-s390x prefix was chosen because it is not a portable device. With virtio-gpu-ccw built as a module, the correct way to package a modularized qemu is to require that hw-display-virtio-gpu must be installed whenever the module hw-s390x-virtio-gpu-ccw. Signed-off-by: Halil Pasic Signed-off-by: Gerd Hoffmann Reviewed-by: Halil Pasic Tested-by: Halil Pasic Message-Id: <20210317095622.2839895-4-kraxel@redhat.com> Signed-off-by: Gerd Hoffmann --- hw/s390x/virtio-ccw-gpu.c | 4 +++- util/module.c | 1 + hw/s390x/meson.build | 8 +++++++- 3 files changed, 11 insertions(+), 2 deletions(-) diff --git a/hw/s390x/virtio-ccw-gpu.c b/hw/s390x/virtio-ccw-gpu.c index c301e2586bde..75a9e4bb3908 100644 --- a/hw/s390x/virtio-ccw-gpu.c +++ b/hw/s390x/virtio-ccw-gpu.c @@ -62,7 +62,9 @@ static const TypeInfo virtio_ccw_gpu =3D { =20 static void virtio_ccw_gpu_register(void) { - type_register_static(&virtio_ccw_gpu); + if (have_virtio_ccw) { + type_register_static(&virtio_ccw_gpu); + } } =20 type_init(virtio_ccw_gpu_register) diff --git a/util/module.c b/util/module.c index c65060c167df..cbe89fede628 100644 --- a/util/module.c +++ b/util/module.c @@ -304,6 +304,7 @@ static struct { { "virtio-gpu-pci-base", "hw-", "display-virtio-gpu-pci" }, { "virtio-gpu-pci", "hw-", "display-virtio-gpu-pci" }, { "vhost-user-gpu-pci", "hw-", "display-virtio-gpu-pci" }, + { "virtio-gpu-ccw", "hw-", "s390x-virtio-gpu-ccw" }, { "virtio-vga-base", "hw-", "display-virtio-vga" }, { "virtio-vga", "hw-", "display-virtio-vga" }, { "vhost-user-vga", "hw-", "display-virtio-vga" }, diff --git a/hw/s390x/meson.build b/hw/s390x/meson.build index 91495b563146..327e9c93afa9 100644 --- a/hw/s390x/meson.build +++ b/hw/s390x/meson.build @@ -34,7 +34,6 @@ virtio_ss.add(files('virtio-ccw.c')) virtio_ss.add(when: 'CONFIG_VIRTIO_BALLOON', if_true: files('virtio-ccw-ba= lloon.c')) virtio_ss.add(when: 'CONFIG_VIRTIO_BLK', if_true: files('virtio-ccw-blk.c'= )) virtio_ss.add(when: 'CONFIG_VIRTIO_CRYPTO', if_true: files('virtio-ccw-cry= pto.c')) -virtio_ss.add(when: 'CONFIG_VIRTIO_GPU', if_true: files('virtio-ccw-gpu.c'= )) virtio_ss.add(when: 'CONFIG_VIRTIO_INPUT', if_true: files('virtio-ccw-inpu= t.c')) virtio_ss.add(when: 'CONFIG_VIRTIO_NET', if_true: files('virtio-ccw-net.c'= )) virtio_ss.add(when: 'CONFIG_VIRTIO_RNG', if_true: files('virtio-ccw-rng.c'= )) @@ -48,3 +47,10 @@ virtio_ss.add(when: 'CONFIG_VHOST_USER_FS', if_true: fil= es('vhost-user-fs-ccw.c' s390x_ss.add_all(when: 'CONFIG_VIRTIO_CCW', if_true: virtio_ss) =20 hw_arch +=3D {'s390x': s390x_ss} + +hw_s390x_modules =3D {} +virtio_gpu_ccw_ss =3D ss.source_set() +virtio_gpu_ccw_ss.add(when: ['CONFIG_VIRTIO_GPU', 'CONFIG_VIRTIO_CCW'], + if_true: [files('virtio-ccw-gpu.c'), pixman]) +hw_s390x_modules +=3D {'virtio-gpu-ccw': virtio_gpu_ccw_ss} +modules +=3D {'hw-s390x': hw_s390x_modules} --=20 2.30.2