From nobody Mon Feb 9 09:01:02 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 Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1648478119430532.8360132678613; Mon, 28 Mar 2022 07:35:19 -0700 (PDT) Received: from localhost ([::1]:37744 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nYqSk-00054T-CQ for importer@patchew.org; Mon, 28 Mar 2022 10:35:18 -0400 Received: from eggs.gnu.org ([209.51.188.92]:46806) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nYqO5-0007B2-9X; Mon, 28 Mar 2022 10:30:29 -0400 Received: from [2a00:1450:4864:20::635] (port=33376 helo=mail-ej1-x635.google.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nYqO2-0000uW-MZ; Mon, 28 Mar 2022 10:30:27 -0400 Received: by mail-ej1-x635.google.com with SMTP id pv16so29141104ejb.0; Mon, 28 Mar 2022 07:30:26 -0700 (PDT) Received: from avogadro.lan ([2001:b07:6468:f312:8ca6:a836:a237:fed1]) by smtp.gmail.com with ESMTPSA id b21-20020a1709062b5500b006e10152162asm1982310ejg.222.2022.03.28.07.30.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 28 Mar 2022 07:30:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=j2ok0yF7eJVHzP1VeskyrGyUFS14B8x0AbHqrWAdE7U=; b=C9mSbF9sou4+iNPXKrkNM8hQU817oLzFwl/6B0QRBVE8lX4TZptvc+B7jzCRIKDYhE z7uQtwRK08zSLDGPkHx6RbfLsqxa8D7nSZeK/HQ+0sAl3NdPi4qBZ0fprrxQ4Rq7aEPG 725xj7NG24iKXXIHefMrktTYLpa+6iS2haNV40/iOgh5BcKvEIhVX0E0XqpFi7QdsI2f 4AXla1IxEtdYKbCDBr+TssVDRlcoM+sq7BJ4dhnczTK1woCVvgUbRpRb73PXbeIpAke3 m63yPabNf9bJV3/wtuSTFQaWFP1osfKCliSdwD+x0j75Em6eNOdGAXN2LrtxESgKeG84 Jaiw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=j2ok0yF7eJVHzP1VeskyrGyUFS14B8x0AbHqrWAdE7U=; b=54aYXOYurH1Is+crA8scuCHsqTRAWcHkkqMrZcrqq1E1L3oMHQWrcFhWHK89+a3ZT8 xkjGEpeLAPYt7cEfD+aj1178OVmEYEMu3wZ7f7pe1VZnbcc8D11+5h9Ljg6vhanoZYLU vYAYEhvFlMT4Z95VnmXMMuA8qsY+K+1AqTN1etrh2dzCnvAh0X2f1/JSZmsK3d7zlCr7 gRLHgQJF+OmCSpXug9h9QmWHT7WAlFHgZqgWF/ubTukbLHbNWnV/l87BRl6ziNGkF3UV 6Btp7jYb6rrWUzTMZCrTOI4lxPOPcU9lNUfdQeBEzEFcVEw7MO0deg35+iVX7Qeogpiy U+6w== X-Gm-Message-State: AOAM530RbSXxJ5XRwF7wVi7ayHFV/rOggxFGErZxE419P42BL/6l3L/E pEiwUrujtHTLXhaWce8ijCoVjv4rFHs= X-Google-Smtp-Source: ABdhPJwhasLF/pktD6QDb15cCmg4sH9ai6pio2+fNsAN24CqZZYAqFM2k7CiY2982UsbxY21bMYZIA== X-Received: by 2002:a17:907:3eaa:b0:6df:b058:96a with SMTP id hs42-20020a1709073eaa00b006dfb058096amr28077869ejc.368.1648477824892; Mon, 28 Mar 2022 07:30:24 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PATCH 1/4] s390x: follow qdev tree to detect SCSI device on a CCW bus Date: Mon, 28 Mar 2022 16:30:16 +0200 Message-Id: <20220328143019.682245-2-pbonzini@redhat.com> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220328143019.682245-1-pbonzini@redhat.com> References: <20220328143019.682245-1-pbonzini@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Host-Lookup-Failed: Reverse DNS lookup failed for 2a00:1450:4864:20::635 (failed) Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::635; envelope-from=paolo.bonzini@gmail.com; helo=mail-ej1-x635.google.com X-Spam_score_int: 0 X-Spam_score: -0.1 X-Spam_bar: / X-Spam_report: (-0.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FORGED_FROMDOMAIN=0.249, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.249, PDS_HP_HELO_NORDNS=0.659, RCVD_IN_DNSWL_NONE=-0.0001, RDNS_NONE=0.793, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: thuth@redhat.com, cohuck@redhat.com, farman@linux.ibm.com, pasic@linux.ibm.com, qemu-s390x@nongnu.org, borntraeger@linux.ibm.com Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1648478120332100001 Content-Type: text/plain; charset="utf-8" Do not make assumptions on the parent type of the SCSIDevice, instead use object_dynamic_cast all the way up to the CcwDevice. This is cleaner because there is no guarantee that the bus is on a virtio-scsi device; that is only the case for the default configuration of QEMU's s390x target. Signed-off-by: Paolo Bonzini Reviewed-by: Halil Pasic --- hw/s390x/ipl.c | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/hw/s390x/ipl.c b/hw/s390x/ipl.c index 84971e537b..e21776822a 100644 --- a/hw/s390x/ipl.c +++ b/hw/s390x/ipl.c @@ -375,14 +375,18 @@ static CcwDevice *s390_get_ccw_device(DeviceState *de= v_st, int *devtype) object_dynamic_cast(OBJECT(dev_st), TYPE_SCSI_DEVICE); if (sd) { - SCSIBus *bus =3D scsi_bus_from_device(sd); - VirtIOSCSI *vdev =3D container_of(bus, VirtIOSCSI, bus); - VirtIOSCSICcw *scsi_ccw =3D container_of(vdev, VirtIOSCSIC= cw, - vdev); - - ccw_dev =3D (CcwDevice *)object_dynamic_cast(OBJECT(scsi_c= cw), - TYPE_CCW_DEVICE= ); - tmp_dt =3D CCW_DEVTYPE_SCSI; + SCSIBus *sbus =3D scsi_bus_from_device(sd); + VirtIODevice *vdev =3D (VirtIODevice *) + object_dynamic_cast(OBJECT(sbus->qbus.parent), + TYPE_VIRTIO_DEVICE); + if (vdev) { + ccw_dev =3D (CcwDevice *) + object_dynamic_cast(OBJECT(qdev_get_parent_bus(DEV= ICE(vdev))->parent), + TYPE_CCW_DEVICE); + if (ccw_dev) { + tmp_dt =3D CCW_DEVTYPE_SCSI; + } + } } } } --=20 2.35.1 From nobody Mon Feb 9 09:01:02 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 Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1648479152547161.19137930869863; Mon, 28 Mar 2022 07:52:32 -0700 (PDT) Received: from localhost ([::1]:39292 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nYqjM-0000hW-RG for importer@patchew.org; Mon, 28 Mar 2022 10:52:31 -0400 Received: from eggs.gnu.org ([209.51.188.92]:46826) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nYqO7-0007BW-6S; Mon, 28 Mar 2022 10:30:31 -0400 Received: from [2a00:1450:4864:20::632] (port=45603 helo=mail-ej1-x632.google.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nYqO5-0000ul-9x; Mon, 28 Mar 2022 10:30:30 -0400 Received: by mail-ej1-x632.google.com with SMTP id qa43so29044710ejc.12; Mon, 28 Mar 2022 07:30:27 -0700 (PDT) Received: from avogadro.lan ([2001:b07:6468:f312:8ca6:a836:a237:fed1]) by smtp.gmail.com with ESMTPSA id b21-20020a1709062b5500b006e10152162asm1982310ejg.222.2022.03.28.07.30.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 28 Mar 2022 07:30:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=GF4UlC66cOwqYvu8g2O4M+mJ+YuQvyIbY5fZCyNHlHg=; b=KAyyL/rKY8OcDZj0M0YXyGsBrFX/NneXZC5+GssgkU49+gSQSvvZD6TTjwfoETsWsA FwoT4orEkRMSzri9Pp40VpizWq/YPoVdXtdh1b1F+vYCJg8ncyJRh33yVl6iOL7RVZY+ q9JA3Xzjt00SbhW/fXCboYjTjwNBHRzCUOIFym69W31fT1OYxRXv27rVdIeC+DHGBW3g UoDQ+ZEzIBkehHMaIJ+/DMwPSQuCd4rD8xxYAbBe8Bz+J3ahfy3J41nbG7A75AjQyjuy /wi8uPGtqDvXiUdKmnynAPZ36AArxc8xZ/BKIS1YHlT8HhK3ZV9bIZFTealA9hBOcUiX nRxw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=GF4UlC66cOwqYvu8g2O4M+mJ+YuQvyIbY5fZCyNHlHg=; b=xSfpXCLsOmlknNLa59C3RLcDj8L1zSx9pXwYRIRuxb+dwGky1Wr1aSd24JLMumMlr6 Z46r28vJmgahovqvnfC9w23tXjbe792IH/mMx94xqsxAzOzNKYD7cbHSKvnSpPDO1Qot ZYicfil8/CV54k1+Vu7F5FMfcXOB2+pFha3MJY44HHNOU093uiZWMSaSg0ceusKbuiKk fhCgSm4loG1SVRy3DeBzBIssSFBPzVzp0yD2RK6DFmeMcB1rcreu6naPX4LJKfujf+qV QtDnVKIdRIqMO85Jv7ujv0Yc+07asLOuVakwNu+loqfv6bWWdPDKTTQk3Iw8cFv0QpV7 LSvg== X-Gm-Message-State: AOAM533ldn8gFBVA4esGN4quZRe4tAr7A5l1+y0xTGvBI/y3CE4Wjjam RbT4GG+zbQJyN6QsqEg9vEm53tX7nVU= X-Google-Smtp-Source: ABdhPJwNhgzhjzUxX0lKm/3voDJmRM9B7U6qI2y7a+pBSAC4lrfRXBXAT8rAR8cHXwT3LCKrAk+Hag== X-Received: by 2002:a17:907:7f26:b0:6e0:3ce7:9cdd with SMTP id qf38-20020a1709077f2600b006e03ce79cddmr28649803ejc.127.1648477826414; Mon, 28 Mar 2022 07:30:26 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PATCH 2/4] virtio-ccw: move vhost_ccw_scsi to a separate file Date: Mon, 28 Mar 2022 16:30:17 +0200 Message-Id: <20220328143019.682245-3-pbonzini@redhat.com> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220328143019.682245-1-pbonzini@redhat.com> References: <20220328143019.682245-1-pbonzini@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Host-Lookup-Failed: Reverse DNS lookup failed for 2a00:1450:4864:20::632 (failed) Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::632; envelope-from=paolo.bonzini@gmail.com; helo=mail-ej1-x632.google.com X-Spam_score_int: 0 X-Spam_score: -0.1 X-Spam_bar: / X-Spam_report: (-0.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FORGED_FROMDOMAIN=0.249, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.249, PDS_HP_HELO_NORDNS=0.659, RCVD_IN_DNSWL_NONE=-0.0001, RDNS_NONE=0.793, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: thuth@redhat.com, cohuck@redhat.com, farman@linux.ibm.com, pasic@linux.ibm.com, qemu-s390x@nongnu.org, borntraeger@linux.ibm.com Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1648479153679100001 Content-Type: text/plain; charset="utf-8" Remove unecessary use of #ifdef CONFIG_VHOST_SCSI, instead just use a separate file and a separate rule in meson.build. Signed-off-by: Paolo Bonzini Reviewed-by: Eric Farman Reviewed-by: Halil Pasic Reviewed-by: Thomas Huth --- hw/s390x/meson.build | 1 + hw/s390x/vhost-scsi-ccw.c | 64 ++++++++++++++++++++++++++++++++++++++ hw/s390x/virtio-ccw-scsi.c | 47 ---------------------------- 3 files changed, 65 insertions(+), 47 deletions(-) create mode 100644 hw/s390x/vhost-scsi-ccw.c diff --git a/hw/s390x/meson.build b/hw/s390x/meson.build index 28484256ec..feefe0717e 100644 --- a/hw/s390x/meson.build +++ b/hw/s390x/meson.build @@ -44,6 +44,7 @@ virtio_ss.add(when: 'CONFIG_VIRTIO_SERIAL', if_true: file= s('virtio-ccw-serial.c' if have_virtfs virtio_ss.add(when: 'CONFIG_VIRTIO_9P', if_true: files('virtio-ccw-9p.c'= )) endif +virtio_ss.add(when: 'CONFIG_VHOST_SCSI', if_true: files('vhost-scsi-ccw.c'= )) virtio_ss.add(when: 'CONFIG_VHOST_VSOCK', if_true: files('vhost-vsock-ccw.= c')) virtio_ss.add(when: 'CONFIG_VHOST_USER_FS', if_true: files('vhost-user-fs-= ccw.c')) s390x_ss.add_all(when: 'CONFIG_VIRTIO_CCW', if_true: virtio_ss) diff --git a/hw/s390x/vhost-scsi-ccw.c b/hw/s390x/vhost-scsi-ccw.c new file mode 100644 index 0000000000..b68ddddd1c --- /dev/null +++ b/hw/s390x/vhost-scsi-ccw.c @@ -0,0 +1,64 @@ +/* + * vhost ccw scsi implementation + * + * Copyright 2012, 2015 IBM Corp. + * Author(s): Cornelia Huck + * + * This work is licensed under the terms of the GNU GPL, version 2 or (at + * your option) any later version. See the COPYING file in the top-level + * directory. + */ + +#include "qemu/osdep.h" +#include "hw/qdev-properties.h" +#include "hw/virtio/virtio.h" +#include "qapi/error.h" +#include "qemu/module.h" +#include "virtio-ccw.h" + +static void vhost_ccw_scsi_realize(VirtioCcwDevice *ccw_dev, Error **errp) +{ + VHostSCSICcw *dev =3D VHOST_SCSI_CCW(ccw_dev); + DeviceState *vdev =3D DEVICE(&dev->vdev); + + qdev_realize(vdev, BUS(&ccw_dev->bus), errp); +} + +static void vhost_ccw_scsi_instance_init(Object *obj) +{ + VHostSCSICcw *dev =3D VHOST_SCSI_CCW(obj); + + virtio_instance_init_common(obj, &dev->vdev, sizeof(dev->vdev), + TYPE_VHOST_SCSI); +} + +static Property vhost_ccw_scsi_properties[] =3D { + DEFINE_PROP_UINT32("max_revision", VirtioCcwDevice, max_rev, + VIRTIO_CCW_MAX_REV), + DEFINE_PROP_END_OF_LIST(), +}; + +static void vhost_ccw_scsi_class_init(ObjectClass *klass, void *data) +{ + DeviceClass *dc =3D DEVICE_CLASS(klass); + VirtIOCCWDeviceClass *k =3D VIRTIO_CCW_DEVICE_CLASS(klass); + + k->realize =3D vhost_ccw_scsi_realize; + device_class_set_props(dc, vhost_ccw_scsi_properties); + set_bit(DEVICE_CATEGORY_STORAGE, dc->categories); +} + +static const TypeInfo vhost_ccw_scsi =3D { + .name =3D TYPE_VHOST_SCSI_CCW, + .parent =3D TYPE_VIRTIO_CCW_DEVICE, + .instance_size =3D sizeof(VHostSCSICcw), + .instance_init =3D vhost_ccw_scsi_instance_init, + .class_init =3D vhost_ccw_scsi_class_init, +}; + +static void virtio_ccw_scsi_register(void) +{ + type_register_static(&vhost_ccw_scsi); +} + +type_init(virtio_ccw_scsi_register) diff --git a/hw/s390x/virtio-ccw-scsi.c b/hw/s390x/virtio-ccw-scsi.c index 6e4beef700..fa706eb550 100644 --- a/hw/s390x/virtio-ccw-scsi.c +++ b/hw/s390x/virtio-ccw-scsi.c @@ -70,56 +70,9 @@ static const TypeInfo virtio_ccw_scsi =3D { .class_init =3D virtio_ccw_scsi_class_init, }; =20 -#ifdef CONFIG_VHOST_SCSI - -static void vhost_ccw_scsi_realize(VirtioCcwDevice *ccw_dev, Error **errp) -{ - VHostSCSICcw *dev =3D VHOST_SCSI_CCW(ccw_dev); - DeviceState *vdev =3D DEVICE(&dev->vdev); - - qdev_realize(vdev, BUS(&ccw_dev->bus), errp); -} - -static void vhost_ccw_scsi_instance_init(Object *obj) -{ - VHostSCSICcw *dev =3D VHOST_SCSI_CCW(obj); - - virtio_instance_init_common(obj, &dev->vdev, sizeof(dev->vdev), - TYPE_VHOST_SCSI); -} - -static Property vhost_ccw_scsi_properties[] =3D { - DEFINE_PROP_UINT32("max_revision", VirtioCcwDevice, max_rev, - VIRTIO_CCW_MAX_REV), - DEFINE_PROP_END_OF_LIST(), -}; - -static void vhost_ccw_scsi_class_init(ObjectClass *klass, void *data) -{ - DeviceClass *dc =3D DEVICE_CLASS(klass); - VirtIOCCWDeviceClass *k =3D VIRTIO_CCW_DEVICE_CLASS(klass); - - k->realize =3D vhost_ccw_scsi_realize; - device_class_set_props(dc, vhost_ccw_scsi_properties); - set_bit(DEVICE_CATEGORY_STORAGE, dc->categories); -} - -static const TypeInfo vhost_ccw_scsi =3D { - .name =3D TYPE_VHOST_SCSI_CCW, - .parent =3D TYPE_VIRTIO_CCW_DEVICE, - .instance_size =3D sizeof(VHostSCSICcw), - .instance_init =3D vhost_ccw_scsi_instance_init, - .class_init =3D vhost_ccw_scsi_class_init, -}; - -#endif - static void virtio_ccw_scsi_register(void) { type_register_static(&virtio_ccw_scsi); -#ifdef CONFIG_VHOST_SCSI - type_register_static(&vhost_ccw_scsi); -#endif } =20 type_init(virtio_ccw_scsi_register) --=20 2.35.1 From nobody Mon Feb 9 09:01:02 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 Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1648479234103214.63022196893894; Mon, 28 Mar 2022 07:53:54 -0700 (PDT) Received: from localhost ([::1]:41830 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nYqki-0002QJ-MK for importer@patchew.org; Mon, 28 Mar 2022 10:53:52 -0400 Received: from eggs.gnu.org ([209.51.188.92]:46848) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nYqOB-0007Ez-OG; Mon, 28 Mar 2022 10:30:36 -0400 Received: from [2a00:1450:4864:20::52d] (port=34786 helo=mail-ed1-x52d.google.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nYqO5-0000uv-SN; Mon, 28 Mar 2022 10:30:35 -0400 Received: by mail-ed1-x52d.google.com with SMTP id h1so17173571edj.1; Mon, 28 Mar 2022 07:30:29 -0700 (PDT) Received: from avogadro.lan ([2001:b07:6468:f312:8ca6:a836:a237:fed1]) by smtp.gmail.com with ESMTPSA id b21-20020a1709062b5500b006e10152162asm1982310ejg.222.2022.03.28.07.30.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 28 Mar 2022 07:30:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=wTPdC9i3Q4wWjt66WuJlGqNgrOfoy/lw2mGnN5nJij8=; b=azsGrJG6c0EYq+sCixrI0AyPRJmz/sFV/pj63U2Dt9GgNO/nLUgupfRL90BeKQY7Ud XKIdMYuq0DTwISy9hoeVDNXY8pmHBemcopEmYimOq5IswUkUiNeHcPsPtVZMYVyg5he/ AxYckNFQskCg65+lTggQiVHKa8OJG4fQKVZkovLFuZGNRJtOfnqoWOinAtuILM+ldP2h 3ZDC9XegrtmTa6n8Xc1v4dbt7yPMfNoKMPR13xK46uinR/nizBpNkQFt66H/HRayvUNW UzyoP3K76ICM7vQc3If/Jrep94fbuExec+JKz1B9nWaqqcVzXd3ZnYOERY8WZbRE+iJM gXIQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=wTPdC9i3Q4wWjt66WuJlGqNgrOfoy/lw2mGnN5nJij8=; b=5z4Kg5DmLxYwkxiB9QvVzgKBig17DNCSFbxLGkNK1cKp0twauEDuwwC8s4YmKoRZ0E 3UszdAOwJH0PUVHBm8zZ49xk/+j7qDF3RxLfwLbzpOWcPfy6ZFK+KU18nkpGBZo6JzWx vD3oltIRybfRkWq6B1/nUes1ZekBprHr3Yq4S0LqQIQocDqe0+Y5Ua8lCdnJPHnEgqBz AhfDpwDjr8PCaAImtbRv+WiK3tYs2gghFQGj+7b5HnC3EHlhsSXf3gNserKT0pdj3Wc0 3ubOLIT+d8myi+xQvL3SSrycQY9ga/vbY3j3aOf6tzmNmHdMgzZmBhVYPeQgEYLBzOCa 6HLQ== X-Gm-Message-State: AOAM533Vt1uaZLGvPi8bx+IeZXMJbDqmfWuBQNAGECG+x3UMkXzvBTh4 XHDDU357LazpP+GXN/5FQ2P/9RL6+2k= X-Google-Smtp-Source: ABdhPJx8kF37rWBV83usfWjy5NHpsRrnySE5/UY+bz4vrQbcyvr2+1kE26CRMMbCp0vib2HNyWWgdg== X-Received: by 2002:a50:da8b:0:b0:415:a122:d7ad with SMTP id q11-20020a50da8b000000b00415a122d7admr16404591edj.123.1648477827930; Mon, 28 Mar 2022 07:30:27 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PATCH 3/4] virtio-ccw: move device type declarations to .c files Date: Mon, 28 Mar 2022 16:30:18 +0200 Message-Id: <20220328143019.682245-4-pbonzini@redhat.com> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220328143019.682245-1-pbonzini@redhat.com> References: <20220328143019.682245-1-pbonzini@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Host-Lookup-Failed: Reverse DNS lookup failed for 2a00:1450:4864:20::52d (failed) Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::52d; envelope-from=paolo.bonzini@gmail.com; helo=mail-ed1-x52d.google.com X-Spam_score_int: 0 X-Spam_score: -0.1 X-Spam_bar: / X-Spam_report: (-0.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FORGED_FROMDOMAIN=0.249, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.249, PDS_HP_HELO_NORDNS=0.659, RCVD_IN_DNSWL_NONE=-0.0001, RDNS_NONE=0.793, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: thuth@redhat.com, cohuck@redhat.com, farman@linux.ibm.com, pasic@linux.ibm.com, qemu-s390x@nongnu.org, borntraeger@linux.ibm.com Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1648479235057100001 Content-Type: text/plain; charset="utf-8" Signed-off-by: Paolo Bonzini Reviewed-by: Halil Pasic Reviewed-by: Thomas Huth --- hw/s390x/s390-virtio-ccw.c | 1 + hw/s390x/vhost-scsi-ccw.c | 9 +++ hw/s390x/vhost-vsock-ccw.c | 9 +++ hw/s390x/virtio-ccw-9p.c | 9 +++ hw/s390x/virtio-ccw-balloon.c | 9 +++ hw/s390x/virtio-ccw-blk.c | 9 +++ hw/s390x/virtio-ccw-crypto.c | 9 +++ hw/s390x/virtio-ccw-gpu.c | 9 +++ hw/s390x/virtio-ccw-input.c | 20 +++++ hw/s390x/virtio-ccw-net.c | 9 +++ hw/s390x/virtio-ccw-rng.c | 9 +++ hw/s390x/virtio-ccw-scsi.c | 9 +++ hw/s390x/virtio-ccw-serial.c | 9 +++ hw/s390x/virtio-ccw.c | 2 + hw/s390x/virtio-ccw.h | 133 ---------------------------------- 15 files changed, 122 insertions(+), 133 deletions(-) diff --git a/hw/s390x/s390-virtio-ccw.c b/hw/s390x/s390-virtio-ccw.c index 90480e7cf9..2d32647d08 100644 --- a/hw/s390x/s390-virtio-ccw.c +++ b/hw/s390x/s390-virtio-ccw.c @@ -25,6 +25,7 @@ #include "qemu/error-report.h" #include "qemu/option.h" #include "qemu/qemu-print.h" +#include "qemu/units.h" #include "hw/s390x/s390-pci-bus.h" #include "sysemu/reset.h" #include "hw/s390x/storage-keys.h" diff --git a/hw/s390x/vhost-scsi-ccw.c b/hw/s390x/vhost-scsi-ccw.c index b68ddddd1c..40dc14bbc7 100644 --- a/hw/s390x/vhost-scsi-ccw.c +++ b/hw/s390x/vhost-scsi-ccw.c @@ -15,6 +15,15 @@ #include "qapi/error.h" #include "qemu/module.h" #include "virtio-ccw.h" +#include "hw/virtio/vhost-scsi.h" + +#define TYPE_VHOST_SCSI_CCW "vhost-scsi-ccw" +OBJECT_DECLARE_SIMPLE_TYPE(VHostSCSICcw, VHOST_SCSI_CCW) + +struct VHostSCSICcw { + VirtioCcwDevice parent_obj; + VHostSCSI vdev; +}; =20 static void vhost_ccw_scsi_realize(VirtioCcwDevice *ccw_dev, Error **errp) { diff --git a/hw/s390x/vhost-vsock-ccw.c b/hw/s390x/vhost-vsock-ccw.c index 246416a8f9..07845a9a00 100644 --- a/hw/s390x/vhost-vsock-ccw.c +++ b/hw/s390x/vhost-vsock-ccw.c @@ -12,6 +12,15 @@ #include "qapi/error.h" #include "qemu/module.h" #include "virtio-ccw.h" +#include "hw/virtio/vhost-vsock.h" + +#define TYPE_VHOST_VSOCK_CCW "vhost-vsock-ccw" +OBJECT_DECLARE_SIMPLE_TYPE(VHostVSockCCWState, VHOST_VSOCK_CCW) + +struct VHostVSockCCWState { + VirtioCcwDevice parent_obj; + VHostVSock vdev; +}; =20 static Property vhost_vsock_ccw_properties[] =3D { DEFINE_PROP_UINT32("max_revision", VirtioCcwDevice, max_rev, diff --git a/hw/s390x/virtio-ccw-9p.c b/hw/s390x/virtio-ccw-9p.c index 88c8884fc5..6f931f5994 100644 --- a/hw/s390x/virtio-ccw-9p.c +++ b/hw/s390x/virtio-ccw-9p.c @@ -15,6 +15,15 @@ #include "qapi/error.h" #include "qemu/module.h" #include "virtio-ccw.h" +#include "hw/9pfs/virtio-9p.h" + +#define TYPE_VIRTIO_9P_CCW "virtio-9p-ccw" +OBJECT_DECLARE_SIMPLE_TYPE(V9fsCCWState, VIRTIO_9P_CCW) + +struct V9fsCCWState { + VirtioCcwDevice parent_obj; + V9fsVirtioState vdev; +}; =20 static void virtio_ccw_9p_realize(VirtioCcwDevice *ccw_dev, Error **errp) { diff --git a/hw/s390x/virtio-ccw-balloon.c b/hw/s390x/virtio-ccw-balloon.c index 4c7631a433..44287b9bbe 100644 --- a/hw/s390x/virtio-ccw-balloon.c +++ b/hw/s390x/virtio-ccw-balloon.c @@ -15,6 +15,15 @@ #include "qapi/error.h" #include "qemu/module.h" #include "virtio-ccw.h" +#include "hw/virtio/virtio-balloon.h" + +#define TYPE_VIRTIO_BALLOON_CCW "virtio-balloon-ccw" +OBJECT_DECLARE_SIMPLE_TYPE(VirtIOBalloonCcw, VIRTIO_BALLOON_CCW) + +struct VirtIOBalloonCcw { + VirtioCcwDevice parent_obj; + VirtIOBalloon vdev; +}; =20 static void virtio_ccw_balloon_realize(VirtioCcwDevice *ccw_dev, Error **e= rrp) { diff --git a/hw/s390x/virtio-ccw-blk.c b/hw/s390x/virtio-ccw-blk.c index 2294ce1ce4..8e0e58b77d 100644 --- a/hw/s390x/virtio-ccw-blk.c +++ b/hw/s390x/virtio-ccw-blk.c @@ -15,6 +15,15 @@ #include "qapi/error.h" #include "qemu/module.h" #include "virtio-ccw.h" +#include "hw/virtio/virtio-blk.h" + +#define TYPE_VIRTIO_BLK_CCW "virtio-blk-ccw" +OBJECT_DECLARE_SIMPLE_TYPE(VirtIOBlkCcw, VIRTIO_BLK_CCW) + +struct VirtIOBlkCcw { + VirtioCcwDevice parent_obj; + VirtIOBlock vdev; +}; =20 static void virtio_ccw_blk_realize(VirtioCcwDevice *ccw_dev, Error **errp) { diff --git a/hw/s390x/virtio-ccw-crypto.c b/hw/s390x/virtio-ccw-crypto.c index 358c74fb4b..0fa2f89443 100644 --- a/hw/s390x/virtio-ccw-crypto.c +++ b/hw/s390x/virtio-ccw-crypto.c @@ -14,6 +14,15 @@ #include "qapi/error.h" #include "qemu/module.h" #include "virtio-ccw.h" +#include "hw/virtio/virtio-crypto.h" + +#define TYPE_VIRTIO_CRYPTO_CCW "virtio-crypto-ccw" +OBJECT_DECLARE_SIMPLE_TYPE(VirtIOCryptoCcw, VIRTIO_CRYPTO_CCW) + +struct VirtIOCryptoCcw { + VirtioCcwDevice parent_obj; + VirtIOCrypto vdev; +}; =20 static void virtio_ccw_crypto_realize(VirtioCcwDevice *ccw_dev, Error **er= rp) { diff --git a/hw/s390x/virtio-ccw-gpu.c b/hw/s390x/virtio-ccw-gpu.c index 5868a2a070..8d995fcb33 100644 --- a/hw/s390x/virtio-ccw-gpu.c +++ b/hw/s390x/virtio-ccw-gpu.c @@ -14,6 +14,15 @@ #include "qapi/error.h" #include "qemu/module.h" #include "virtio-ccw.h" +#include "hw/virtio/virtio-gpu.h" + +#define TYPE_VIRTIO_GPU_CCW "virtio-gpu-ccw" +OBJECT_DECLARE_SIMPLE_TYPE(VirtIOGPUCcw, VIRTIO_GPU_CCW) + +struct VirtIOGPUCcw { + VirtioCcwDevice parent_obj; + VirtIOGPU vdev; +}; =20 static void virtio_ccw_gpu_realize(VirtioCcwDevice *ccw_dev, Error **errp) { diff --git a/hw/s390x/virtio-ccw-input.c b/hw/s390x/virtio-ccw-input.c index 83136fbba1..61a07ba38d 100644 --- a/hw/s390x/virtio-ccw-input.c +++ b/hw/s390x/virtio-ccw-input.c @@ -14,6 +14,26 @@ #include "qapi/error.h" #include "qemu/module.h" #include "virtio-ccw.h" +#include "hw/virtio/virtio-input.h" + +#define TYPE_VIRTIO_INPUT_CCW "virtio-input-ccw" +OBJECT_DECLARE_SIMPLE_TYPE(VirtIOInputCcw, VIRTIO_INPUT_CCW) + +struct VirtIOInputCcw { + VirtioCcwDevice parent_obj; + VirtIOInput vdev; +}; + +#define TYPE_VIRTIO_INPUT_HID_CCW "virtio-input-hid-ccw" +#define TYPE_VIRTIO_KEYBOARD_CCW "virtio-keyboard-ccw" +#define TYPE_VIRTIO_MOUSE_CCW "virtio-mouse-ccw" +#define TYPE_VIRTIO_TABLET_CCW "virtio-tablet-ccw" +OBJECT_DECLARE_SIMPLE_TYPE(VirtIOInputHIDCcw, VIRTIO_INPUT_HID_CCW) + +struct VirtIOInputHIDCcw { + VirtioCcwDevice parent_obj; + VirtIOInputHID vdev; +}; =20 static void virtio_ccw_input_realize(VirtioCcwDevice *ccw_dev, Error **err= p) { diff --git a/hw/s390x/virtio-ccw-net.c b/hw/s390x/virtio-ccw-net.c index 3860d4e6ea..484e617659 100644 --- a/hw/s390x/virtio-ccw-net.c +++ b/hw/s390x/virtio-ccw-net.c @@ -15,6 +15,15 @@ #include "qapi/error.h" #include "qemu/module.h" #include "virtio-ccw.h" +#include "hw/virtio/virtio-net.h" + +#define TYPE_VIRTIO_NET_CCW "virtio-net-ccw" +OBJECT_DECLARE_SIMPLE_TYPE(VirtIONetCcw, VIRTIO_NET_CCW) + +struct VirtIONetCcw { + VirtioCcwDevice parent_obj; + VirtIONet vdev; +}; =20 static void virtio_ccw_net_realize(VirtioCcwDevice *ccw_dev, Error **errp) { diff --git a/hw/s390x/virtio-ccw-rng.c b/hw/s390x/virtio-ccw-rng.c index 2e3a9da5e8..a3fffb5138 100644 --- a/hw/s390x/virtio-ccw-rng.c +++ b/hw/s390x/virtio-ccw-rng.c @@ -15,6 +15,15 @@ #include "qapi/error.h" #include "qemu/module.h" #include "virtio-ccw.h" +#include "hw/virtio/virtio-rng.h" + +#define TYPE_VIRTIO_RNG_CCW "virtio-rng-ccw" +OBJECT_DECLARE_SIMPLE_TYPE(VirtIORNGCcw, VIRTIO_RNG_CCW) + +struct VirtIORNGCcw { + VirtioCcwDevice parent_obj; + VirtIORNG vdev; +}; =20 static void virtio_ccw_rng_realize(VirtioCcwDevice *ccw_dev, Error **errp) { diff --git a/hw/s390x/virtio-ccw-scsi.c b/hw/s390x/virtio-ccw-scsi.c index fa706eb550..d003f89f43 100644 --- a/hw/s390x/virtio-ccw-scsi.c +++ b/hw/s390x/virtio-ccw-scsi.c @@ -15,6 +15,15 @@ #include "qapi/error.h" #include "qemu/module.h" #include "virtio-ccw.h" +#include "hw/virtio/virtio-scsi.h" + +#define TYPE_VIRTIO_SCSI_CCW "virtio-scsi-ccw" +OBJECT_DECLARE_SIMPLE_TYPE(VirtIOSCSICcw, VIRTIO_SCSI_CCW) + +struct VirtIOSCSICcw { + VirtioCcwDevice parent_obj; + VirtIOSCSI vdev; +}; =20 static void virtio_ccw_scsi_realize(VirtioCcwDevice *ccw_dev, Error **errp) { diff --git a/hw/s390x/virtio-ccw-serial.c b/hw/s390x/virtio-ccw-serial.c index 61958228d1..bf8057880f 100644 --- a/hw/s390x/virtio-ccw-serial.c +++ b/hw/s390x/virtio-ccw-serial.c @@ -15,6 +15,15 @@ #include "hw/qdev-properties.h" #include "hw/virtio/virtio-serial.h" #include "virtio-ccw.h" +#include "hw/virtio/virtio-serial.h" + +#define TYPE_VIRTIO_SERIAL_CCW "virtio-serial-ccw" +OBJECT_DECLARE_SIMPLE_TYPE(VirtioSerialCcw, VIRTIO_SERIAL_CCW) + +struct VirtioSerialCcw { + VirtioCcwDevice parent_obj; + VirtIOSerial vdev; +}; =20 static void virtio_ccw_serial_realize(VirtioCcwDevice *ccw_dev, Error **er= rp) { diff --git a/hw/s390x/virtio-ccw.c b/hw/s390x/virtio-ccw.c index c845a92c3a..15b458527e 100644 --- a/hw/s390x/virtio-ccw.c +++ b/hw/s390x/virtio-ccw.c @@ -12,6 +12,7 @@ =20 #include "qemu/osdep.h" #include "qapi/error.h" +#include "exec/address-spaces.h" #include "sysemu/kvm.h" #include "net/net.h" #include "hw/virtio/virtio.h" @@ -19,6 +20,7 @@ #include "hw/virtio/virtio-net.h" #include "qemu/bitops.h" #include "qemu/error-report.h" +#include "qemu/log.h" #include "qemu/module.h" #include "hw/virtio/virtio-access.h" #include "hw/virtio/virtio-bus.h" diff --git a/hw/s390x/virtio-ccw.h b/hw/s390x/virtio-ccw.h index 0168232e3b..fc131194bf 100644 --- a/hw/s390x/virtio-ccw.h +++ b/hw/s390x/virtio-ccw.h @@ -104,139 +104,6 @@ static inline int virtio_ccw_rev_max(VirtioCcwDevice = *dev) return dev->max_rev; } =20 -/* virtio-scsi-ccw */ - -#define TYPE_VIRTIO_SCSI_CCW "virtio-scsi-ccw" -OBJECT_DECLARE_SIMPLE_TYPE(VirtIOSCSICcw, VIRTIO_SCSI_CCW) - -struct VirtIOSCSICcw { - VirtioCcwDevice parent_obj; - VirtIOSCSI vdev; -}; - -#ifdef CONFIG_VHOST_SCSI -/* vhost-scsi-ccw */ - -#define TYPE_VHOST_SCSI_CCW "vhost-scsi-ccw" -OBJECT_DECLARE_SIMPLE_TYPE(VHostSCSICcw, VHOST_SCSI_CCW) - -struct VHostSCSICcw { - VirtioCcwDevice parent_obj; - VHostSCSI vdev; -}; -#endif - -/* virtio-blk-ccw */ - -#define TYPE_VIRTIO_BLK_CCW "virtio-blk-ccw" -OBJECT_DECLARE_SIMPLE_TYPE(VirtIOBlkCcw, VIRTIO_BLK_CCW) - -struct VirtIOBlkCcw { - VirtioCcwDevice parent_obj; - VirtIOBlock vdev; -}; - -/* virtio-balloon-ccw */ - -#define TYPE_VIRTIO_BALLOON_CCW "virtio-balloon-ccw" -OBJECT_DECLARE_SIMPLE_TYPE(VirtIOBalloonCcw, VIRTIO_BALLOON_CCW) - -struct VirtIOBalloonCcw { - VirtioCcwDevice parent_obj; - VirtIOBalloon vdev; -}; - -/* virtio-serial-ccw */ - -#define TYPE_VIRTIO_SERIAL_CCW "virtio-serial-ccw" -OBJECT_DECLARE_SIMPLE_TYPE(VirtioSerialCcw, VIRTIO_SERIAL_CCW) - -struct VirtioSerialCcw { - VirtioCcwDevice parent_obj; - VirtIOSerial vdev; -}; - -/* virtio-net-ccw */ - -#define TYPE_VIRTIO_NET_CCW "virtio-net-ccw" -OBJECT_DECLARE_SIMPLE_TYPE(VirtIONetCcw, VIRTIO_NET_CCW) - -struct VirtIONetCcw { - VirtioCcwDevice parent_obj; - VirtIONet vdev; -}; - -/* virtio-rng-ccw */ - -#define TYPE_VIRTIO_RNG_CCW "virtio-rng-ccw" -OBJECT_DECLARE_SIMPLE_TYPE(VirtIORNGCcw, VIRTIO_RNG_CCW) - -struct VirtIORNGCcw { - VirtioCcwDevice parent_obj; - VirtIORNG vdev; -}; - -/* virtio-crypto-ccw */ - -#define TYPE_VIRTIO_CRYPTO_CCW "virtio-crypto-ccw" -OBJECT_DECLARE_SIMPLE_TYPE(VirtIOCryptoCcw, VIRTIO_CRYPTO_CCW) - -struct VirtIOCryptoCcw { - VirtioCcwDevice parent_obj; - VirtIOCrypto vdev; -}; - VirtIODevice *virtio_ccw_get_vdev(SubchDev *sch); =20 -#ifdef CONFIG_VIRTFS -#include "hw/9pfs/virtio-9p.h" - -#define TYPE_VIRTIO_9P_CCW "virtio-9p-ccw" -OBJECT_DECLARE_SIMPLE_TYPE(V9fsCCWState, VIRTIO_9P_CCW) - -struct V9fsCCWState { - VirtioCcwDevice parent_obj; - V9fsVirtioState vdev; -}; - -#endif /* CONFIG_VIRTFS */ - -#ifdef CONFIG_VHOST_VSOCK -#define TYPE_VHOST_VSOCK_CCW "vhost-vsock-ccw" -OBJECT_DECLARE_SIMPLE_TYPE(VHostVSockCCWState, VHOST_VSOCK_CCW) - -struct VHostVSockCCWState { - VirtioCcwDevice parent_obj; - VHostVSock vdev; -}; - -#endif /* CONFIG_VHOST_VSOCK */ - -#define TYPE_VIRTIO_GPU_CCW "virtio-gpu-ccw" -OBJECT_DECLARE_SIMPLE_TYPE(VirtIOGPUCcw, VIRTIO_GPU_CCW) - -struct VirtIOGPUCcw { - VirtioCcwDevice parent_obj; - VirtIOGPU vdev; -}; - -#define TYPE_VIRTIO_INPUT_CCW "virtio-input-ccw" -OBJECT_DECLARE_SIMPLE_TYPE(VirtIOInputCcw, VIRTIO_INPUT_CCW) - -struct VirtIOInputCcw { - VirtioCcwDevice parent_obj; - VirtIOInput vdev; -}; - -#define TYPE_VIRTIO_INPUT_HID_CCW "virtio-input-hid-ccw" -#define TYPE_VIRTIO_KEYBOARD_CCW "virtio-keyboard-ccw" -#define TYPE_VIRTIO_MOUSE_CCW "virtio-mouse-ccw" -#define TYPE_VIRTIO_TABLET_CCW "virtio-tablet-ccw" -OBJECT_DECLARE_SIMPLE_TYPE(VirtIOInputHIDCcw, VIRTIO_INPUT_HID_CCW) - -struct VirtIOInputHIDCcw { - VirtioCcwDevice parent_obj; - VirtIOInputHID vdev; -}; - #endif --=20 2.35.1 From nobody Mon Feb 9 09:01:02 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 Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1648478358231561.280606950335; Mon, 28 Mar 2022 07:39:18 -0700 (PDT) Received: from localhost ([::1]:45894 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nYqWa-0002FO-Tn for importer@patchew.org; Mon, 28 Mar 2022 10:39:16 -0400 Received: from eggs.gnu.org ([209.51.188.92]:46846) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nYqO9-0007Ch-Bf; Mon, 28 Mar 2022 10:30:33 -0400 Received: from [2a00:1450:4864:20::52c] (port=45749 helo=mail-ed1-x52c.google.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nYqO7-0000v9-5Q; Mon, 28 Mar 2022 10:30:32 -0400 Received: by mail-ed1-x52c.google.com with SMTP id u26so17119900eda.12; Mon, 28 Mar 2022 07:30:30 -0700 (PDT) Received: from avogadro.lan ([2001:b07:6468:f312:8ca6:a836:a237:fed1]) by smtp.gmail.com with ESMTPSA id b21-20020a1709062b5500b006e10152162asm1982310ejg.222.2022.03.28.07.30.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 28 Mar 2022 07:30:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=o5Dpsahe7H94ZbQFbIRQjp0OIvKAgsywbBgdMmvXK6s=; b=n7+bnTPVWS7qxra9RwZ8LmNz+0c9Ukod/pmgZgDbKDs/b3oigf5HQ2zoDPV6YhpgQD bc7v7vKdR5XL0wf+s32Lb//zJSm323VsnOSKSNh+CKI5qavn38uAdC7Rs3P5JyxCCNdU QGfRhCOK8FBFPstF7apC7XNqj3Rofh77IONvYjnTOF2j0Lg5wHSwXdODs00N3NCvU2nO 5hUK1JSEh/zkXZUQN/iYvicf0o0HJQMfdWg+9RWh/PQk9XUX3YzrKPShYRXGEBrx9z2/ 3MY4OMFAoW8nwbAjJqamEaxyB8HruUsynDOXXXJgPt/Jy2RuOc7ZsDrUXKrmkv2wAvOm L1fQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=o5Dpsahe7H94ZbQFbIRQjp0OIvKAgsywbBgdMmvXK6s=; b=ucZcWoXTtRXJAnvnvHVCyQ7QXsM0deheZtwrDLaK3I1UDmlMBlPoHuVxBEa6SRg0WS 9JQB4Mb5wLdaLOR0cGFlXhqThWWMz6vsaH+dhx6NA0MyUyFSBLZVUSM3kreoRESOhasV kKTb2SZR0uYnXL6NIerSJBzDpbscbrlNOe+7OekZePYNB0KcLfkc5eS+tsTqo+KdBPX6 N3SQr1i38fcfPrDt1zdO91Rx+mz1VgUb18FKxILx66TeWjehoQ0Fc88YIerdJyhOLdZU 6HEcmVzGLX5stzei9a4LhrXZd8uXSTAHa06xvcYm/UZy+g2sqyHHsCnO/20E0PBw0dfV pqog== X-Gm-Message-State: AOAM530exxlOfJ6jTi3UnBrcOxop8kJPbWDq7caQmfYqzX19rhd2/Q1C qPOix7H8+xE1Ee9dqSMPOfkm0P8inDQ= X-Google-Smtp-Source: ABdhPJyy3uCWkoGTMSwueu2Y/JBSwatJZp6mNEIiAyuTGo/ku+PQbCF0CTlLv+aVpW8djc0m760jCA== X-Received: by 2002:a05:6402:4388:b0:419:4457:27a6 with SMTP id o8-20020a056402438800b00419445727a6mr16378163edc.80.1648477829552; Mon, 28 Mar 2022 07:30:29 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PATCH 4/4] virtio-ccw: do not include headers for all virtio devices Date: Mon, 28 Mar 2022 16:30:19 +0200 Message-Id: <20220328143019.682245-5-pbonzini@redhat.com> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220328143019.682245-1-pbonzini@redhat.com> References: <20220328143019.682245-1-pbonzini@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Host-Lookup-Failed: Reverse DNS lookup failed for 2a00:1450:4864:20::52c (failed) Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::52c; envelope-from=paolo.bonzini@gmail.com; helo=mail-ed1-x52c.google.com X-Spam_score_int: 0 X-Spam_score: -0.1 X-Spam_bar: / X-Spam_report: (-0.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FORGED_FROMDOMAIN=0.249, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.249, PDS_HP_HELO_NORDNS=0.659, RCVD_IN_DNSWL_NONE=-0.0001, RDNS_NONE=0.793, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: thuth@redhat.com, cohuck@redhat.com, farman@linux.ibm.com, pasic@linux.ibm.com, qemu-s390x@nongnu.org, borntraeger@linux.ibm.com Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1648478358991100001 Content-Type: text/plain; charset="utf-8" Signed-off-by: Paolo Bonzini Reviewed-by: Halil Pasic Reviewed-by: Thomas Huth --- hw/s390x/ipl.c | 3 +++ hw/s390x/virtio-ccw.h | 16 ---------------- 2 files changed, 3 insertions(+), 16 deletions(-) diff --git a/hw/s390x/ipl.c b/hw/s390x/ipl.c index e21776822a..ca56a1b29a 100644 --- a/hw/s390x/ipl.c +++ b/hw/s390x/ipl.c @@ -27,11 +27,14 @@ #include "hw/s390x/css.h" #include "hw/s390x/ebcdic.h" #include "hw/s390x/pv.h" +#include "hw/scsi/scsi.h" +#include "hw/virtio/virtio-net.h" #include "ipl.h" #include "qemu/error-report.h" #include "qemu/config-file.h" #include "qemu/cutils.h" #include "qemu/option.h" +#include "standard-headers/linux/virtio_ids.h" #include "exec/exec-all.h" =20 #define KERN_IMAGE_START 0x010000UL diff --git a/hw/s390x/virtio-ccw.h b/hw/s390x/virtio-ccw.h index fc131194bf..fac186c8f6 100644 --- a/hw/s390x/virtio-ccw.h +++ b/hw/s390x/virtio-ccw.h @@ -13,24 +13,8 @@ #ifndef HW_S390X_VIRTIO_CCW_H #define HW_S390X_VIRTIO_CCW_H =20 -#include "hw/virtio/virtio-blk.h" -#include "hw/virtio/virtio-net.h" -#include "hw/virtio/virtio-serial.h" -#include "hw/virtio/virtio-scsi.h" #include "qom/object.h" -#ifdef CONFIG_VHOST_SCSI -#include "hw/virtio/vhost-scsi.h" -#endif -#include "hw/virtio/virtio-balloon.h" -#include "hw/virtio/virtio-rng.h" -#include "hw/virtio/virtio-crypto.h" #include "hw/virtio/virtio-bus.h" -#ifdef CONFIG_VHOST_VSOCK -#include "hw/virtio/vhost-vsock.h" -#endif /* CONFIG_VHOST_VSOCK */ -#include "hw/virtio/virtio-gpu.h" -#include "hw/virtio/virtio-input.h" - #include "hw/s390x/s390_flic.h" #include "hw/s390x/css.h" #include "ccw-device.h" --=20 2.35.1