From patchwork Thu Nov 5 12:43:51 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 318537 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-12.5 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id B7D90C00A89 for ; Thu, 5 Nov 2020 12:48:51 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 26AD02083B for ; Thu, 5 Nov 2020 12:48:51 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="TejuTH99" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 26AD02083B Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:49292 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kaeh8-0000Og-4J for qemu-devel@archiver.kernel.org; Thu, 05 Nov 2020 07:48:50 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:47032) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kaece-0003PY-BU for qemu-devel@nongnu.org; Thu, 05 Nov 2020 07:44:12 -0500 Received: from us-smtp-delivery-124.mimecast.com ([63.128.21.124]:43387) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1kaecb-0000o1-Jx for qemu-devel@nongnu.org; Thu, 05 Nov 2020 07:44:11 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1604580248; 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=QbMTJ3ao+EWjH5At6//uqbDIysge1ZWepFJJby54Ojc=; b=TejuTH9920bcI7T+xcFaDVuWStu4stW0pKpoeEuDTbJL9OuNMHUShwug78YHqxeb0qzws+ KjmHMYmkkbeJ1CQjWdkAAzMLYQ4qTYvOFerT24v5QvQWwdHKT09blqDcCIWEkdXiWlkGpM vw7P/jaCpKRlqkmRflJxnLqQZoiWux4= Received: from mail-wr1-f69.google.com (mail-wr1-f69.google.com [209.85.221.69]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-228-1wHUrP3KO2K2t2iaEqwpLQ-1; Thu, 05 Nov 2020 07:44:03 -0500 X-MC-Unique: 1wHUrP3KO2K2t2iaEqwpLQ-1 Received: by mail-wr1-f69.google.com with SMTP id w6so683436wrk.1 for ; Thu, 05 Nov 2020 04:44:03 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=QbMTJ3ao+EWjH5At6//uqbDIysge1ZWepFJJby54Ojc=; b=o7ZURse8V3HaZl8REv1rI2s5ODJZzQKtyl4LdCUyo/4zcyNmUSkv1k2Ob4TH5K6htZ gHF1LRv0zk41p0PKZpY33BDDU/lNpsP1eliDmmseIq4IPbbxIbiBXkT5WcbrU8fcs6BG JyTPEYMSm2/LPZen/TFdbTfMV0GqKyc+uwaJduqiA3ANAllnapmvAqXc2vKHjuXGpGRr KdbgQwue51tT3I+sHo+kzqaptQEGVoInQJSMdARORVZSXO++QZWXh5Abj2Idk1PpJWK+ fW0WlFyfq/aFd+URKKaKJxwqZz/MODJsooZeoQG+1eTqefKP4QHSiCJI01GsZt76vWq6 gWCQ== X-Gm-Message-State: AOAM5301nvd6v+eoiN9CWvx7n3AEZ3sIPrZrCDN0sp0EMeLuu/SN2d8z Ylci8QejnXdo20UvpNKGtJNSulliEG/SeTlMtqRnddfTPUVLnf3BP9MNJ+T+MsB8GYCEfwSkwHY Q+NW8F4WHyWLNhFU= X-Received: by 2002:adf:f285:: with SMTP id k5mr2710331wro.299.1604580241680; Thu, 05 Nov 2020 04:44:01 -0800 (PST) X-Google-Smtp-Source: ABdhPJzDBKXqoZGV6QVR06D/ZHdIYvVnb7Xr/YHMllDCX1Blc96HXFdWLgRfsrKSWKsSK/e2UxC/qA== X-Received: by 2002:adf:f285:: with SMTP id k5mr2710301wro.299.1604580241450; Thu, 05 Nov 2020 04:44:01 -0800 (PST) Received: from x1w.redhat.com (234.red-83-42-66.dynamicip.rima-tde.net. [83.42.66.234]) by smtp.gmail.com with ESMTPSA id e5sm2170548wrw.93.2020.11.05.04.43.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 05 Nov 2020 04:44:00 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PATCH-for-6.0 1/3] hw/virtio: Add configure switch to disable legacy VIRTIO Date: Thu, 5 Nov 2020 13:43:51 +0100 Message-Id: <20201105124353.3680057-2-philmd@redhat.com> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20201105124353.3680057-1-philmd@redhat.com> References: <20201105124353.3680057-1-philmd@redhat.com> MIME-Version: 1.0 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=philmd@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Received-SPF: pass client-ip=63.128.21.124; envelope-from=philmd@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/11/04 22:46:30 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] [fuzzy] X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H5=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: Elena Ufimtseva , Fam Zheng , Thomas Huth , Jagannathan Raman , qemu-block@nongnu.org, "Michael S. Tsirkin" , =?utf-8?q?Alex_Benn=C3=A9e?= , Jason Wang , Cornelia Huck , Christian Schoenebeck , Greg Kurz , Wainer dos Santos Moschetta , Max Reitz , Stefan Hajnoczi , Paolo Bonzini , =?utf-8?q?Marc-Andr=C3=A9_Lureau?= , Kevin Wolf , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" Per [1] (Terminology): Legacy interfaces are not required; ie. don’t implement them unless you have a need for backwards compatibility! [2] (Version 1.0): The device configuration space uses the little-endian format for multi-byte fields. and [3] (Legacy Interface): for legacy interfaces, device configuration space is generally the guest’s native endian, rather than PCI’s little-endian. The correct endian-ness is documented for each device. Add the --disable-virtio-legacy configure flag to produce builds with VIRTIO 1.0 only, and the --enable-virtio-legacy to include legacy VIRTIO support (supporting legacy VIRTIO is the default). [1] http://docs.oasis-open.org/virtio/virtio/v1.0/cs04/virtio-v1.0-cs04.html#x1-60001 [2] http://docs.oasis-open.org/virtio/virtio/v1.0/cs04/virtio-v1.0-cs04.html#x1-170003 [3] http://docs.oasis-open.org/virtio/virtio/v1.0/cs04/virtio-v1.0-cs04.html#x1-200003 Signed-off-by: Philippe Mathieu-Daudé --- configure | 10 ++++++++++ meson.build | 1 + include/hw/virtio/virtio-access.h | 19 +++++-------------- hw/virtio/virtio-legacy.c | 29 +++++++++++++++++++++++++++++ hw/virtio/meson.build | 1 + 5 files changed, 46 insertions(+), 14 deletions(-) create mode 100644 hw/virtio/virtio-legacy.c diff --git a/configure b/configure index 2c3c69f1188..f46216b3788 100755 --- a/configure +++ b/configure @@ -302,6 +302,7 @@ fdt="auto" netmap="no" sdl="auto" sdl_image="auto" +virtio_legacy="enabled" virtiofsd="auto" virtfs="" libudev="auto" @@ -1001,6 +1002,10 @@ for opt do ;; --enable-libudev) libudev="enabled" ;; + --disable-virtio-legacy) virtio_legacy="disabled" + ;; + --enable-virtio-legacy) virtio_legacy="enabled" + ;; --disable-virtiofsd) virtiofsd="disabled" ;; --enable-virtiofsd) virtiofsd="enabled" @@ -1764,6 +1769,7 @@ disabled with --disable-FEATURE, default is enabled if available: vnc-png PNG compression for VNC server cocoa Cocoa UI (Mac OS X only) virtfs VirtFS + virtio-legacy enable support for legacy virtio (before VIRTIO 1.0) virtiofsd build virtiofs daemon (virtiofsd) libudev Use libudev to enumerate host devices mpath Multipath persistent reservation passthrough @@ -6816,6 +6822,10 @@ if test "$safe_stack" = "yes"; then echo "CONFIG_SAFESTACK=y" >> $config_host_mak fi +if test "$virtio_legacy" = "enabled"; then + echo "CONFIG_VIRTIO_LEGACY=y" >> $config_host_mak +fi + # If we're using a separate build tree, set it up now. # DIRS are directories which we simply mkdir in the build tree; # LINKS are things to symlink back into the source tree diff --git a/meson.build b/meson.build index 39ac5cf6d8a..51406c28c6e 100644 --- a/meson.build +++ b/meson.build @@ -2061,6 +2061,7 @@ summary_info += {'Block whitelist (rw)': config_host['CONFIG_BDRV_RW_WHITELIST']} summary_info += {'Block whitelist (ro)': config_host['CONFIG_BDRV_RO_WHITELIST']} summary_info += {'VirtFS support': config_host.has_key('CONFIG_VIRTFS')} +summary_info += {'Legacy VIRTIO support': config_host.has_key('CONFIG_VIRTIO_LEGACY')} summary_info += {'build virtiofs daemon': have_virtiofsd} summary_info += {'Multipath support': mpathpersist.found()} summary_info += {'VNC support': vnc.found()} diff --git a/include/hw/virtio/virtio-access.h b/include/hw/virtio/virtio-access.h index 6818a23a2d3..b6c060f8cc6 100644 --- a/include/hw/virtio/virtio-access.h +++ b/include/hw/virtio/virtio-access.h @@ -20,24 +20,15 @@ #include "hw/virtio/virtio.h" #include "hw/virtio/virtio-bus.h" -#if defined(TARGET_PPC64) || defined(TARGET_ARM) -#define LEGACY_VIRTIO_IS_BIENDIAN 1 -#endif - +#ifdef CONFIG_VIRTIO_LEGACY +bool virtio_access_is_big_endian(VirtIODevice *vdev); +#else static inline bool virtio_access_is_big_endian(VirtIODevice *vdev) { -#if defined(LEGACY_VIRTIO_IS_BIENDIAN) - return virtio_is_big_endian(vdev); -#elif defined(TARGET_WORDS_BIGENDIAN) - if (virtio_vdev_has_feature(vdev, VIRTIO_F_VERSION_1)) { - /* Devices conforming to VIRTIO 1.0 or later are always LE. */ - return false; - } - return true; -#else + /* Devices conforming to VIRTIO 1.0 or later are always LE. */ return false; -#endif } +#endif static inline uint16_t virtio_lduw_phys(VirtIODevice *vdev, hwaddr pa) { diff --git a/hw/virtio/virtio-legacy.c b/hw/virtio/virtio-legacy.c new file mode 100644 index 00000000000..bf28c824a25 --- /dev/null +++ b/hw/virtio/virtio-legacy.c @@ -0,0 +1,29 @@ +/* + * Legacy virtio endian helpers. + * + * Copyright Red Hat, Inc. 2020 + * + * SPDX-License-Identifier: GPL-2.0-or-later + */ +#include "qemu/osdep.h" +#include "hw/virtio/virtio.h" +#include "hw/virtio/virtio-access.h" + +#if defined(TARGET_PPC64) || defined(TARGET_ARM) +# define LEGACY_VIRTIO_IS_BIENDIAN 1 +#endif + +bool virtio_access_is_big_endian(VirtIODevice *vdev) +{ +#if defined(LEGACY_VIRTIO_IS_BIENDIAN) + return virtio_is_big_endian(vdev); +#elif defined(TARGET_WORDS_BIGENDIAN) + if (virtio_vdev_has_feature(vdev, VIRTIO_F_VERSION_1)) { + /* Devices conforming to VIRTIO 1.0 or later are always LE. */ + return false; + } + return true; +#else + return false; +#endif +} diff --git a/hw/virtio/meson.build b/hw/virtio/meson.build index fbff9bc9d4d..95415913a9a 100644 --- a/hw/virtio/meson.build +++ b/hw/virtio/meson.build @@ -11,6 +11,7 @@ virtio_ss = ss.source_set() virtio_ss.add(files('virtio.c')) +virtio_ss.add(when: 'CONFIG_VIRTIO_LEGACY', if_true: files('virtio-legacy.c')) virtio_ss.add(when: 'CONFIG_VHOST', if_true: files('vhost.c', 'vhost-backend.c')) virtio_ss.add(when: 'CONFIG_VHOST_USER', if_true: files('vhost-user.c')) virtio_ss.add(when: 'CONFIG_VHOST_VDPA', if_true: files('vhost-vdpa.c')) From patchwork Thu Nov 5 12:43:52 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 319898 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-12.6 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id D12CAC00A89 for ; Thu, 5 Nov 2020 12:49:23 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 46AB12083B for ; Thu, 5 Nov 2020 12:49:23 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="KN87+4XU" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 46AB12083B Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:50856 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kaehe-00013j-9f for qemu-devel@archiver.kernel.org; Thu, 05 Nov 2020 07:49:22 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:47054) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kaecg-0003Rp-Gm for qemu-devel@nongnu.org; Thu, 05 Nov 2020 07:44:14 -0500 Received: from us-smtp-delivery-124.mimecast.com ([63.128.21.124]:46321) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1kaecd-0000q9-UN for qemu-devel@nongnu.org; Thu, 05 Nov 2020 07:44:14 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1604580250; 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=qnXFKvPT1o0VTR2smUlGauG0ibfVMGznfVlfrMUGLE8=; b=KN87+4XUdzBxpZlEsBLYqQI/vr5QO6DrlXd83AUZP6ELUYZNGIQomt0jbULh5GiQT44m6m F2q98FXgK8N73lOPlBeWXtREiL1oD0qc64Y8VS60D4doLJKKNBPB20brbv5agZDUKjU0FR /dzvK8gBzQJVp3kVk1MLi0mzQUS1faA= Received: from mail-wr1-f70.google.com (mail-wr1-f70.google.com [209.85.221.70]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-464-yw1GPmpfOHeMT5vHWnoGCQ-1; Thu, 05 Nov 2020 07:44:09 -0500 X-MC-Unique: yw1GPmpfOHeMT5vHWnoGCQ-1 Received: by mail-wr1-f70.google.com with SMTP id t17so657286wrm.13 for ; Thu, 05 Nov 2020 04:44:08 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=qnXFKvPT1o0VTR2smUlGauG0ibfVMGznfVlfrMUGLE8=; b=DjZTSrrm2eYmbJcANQ3GrzIiiJsLvLvMyWxWAFaTqUTzhPVbEJJTYKiiGc775WDLNn DGniypY2KqF8tDyBEhkBiczunZXM7i4BS9WTqhOjY/l0muHWokVsDKGxbReLkBL20BCD /lOB5yWnVPOaaE19Cw+oW5fHcUUb8CuMoLZP2q61nedRbzs8uevBUNqzhKPFn1wrYvUr 1RmgsAzacTlFRzx3YbXfTlTNorUd67UGPgindk4Y58QvoKhzxH6vHxuZXdwGwt+NYFIR 2yOT/R7c8rNHXykNcFD/wv6kwZPRRrw9L9mNmxIuTm6xOWSIhGPkIPL+50BkAyRrVH4f eujg== X-Gm-Message-State: AOAM533Cm/BUQuFjzw3kefypwHhmNCir6x5bzSnI0qJtvEvlNgLpdT2L jkuy20iitxvQRsOvCiBokjsmf3t0y/3FoTJWQ9Qcsz3FtOY8Uv0r2HbOBBDatBiLzV2IU/xBql2 5XahSvQaoFanZl2E= X-Received: by 2002:a1c:c912:: with SMTP id f18mr2602444wmb.150.1604580247354; Thu, 05 Nov 2020 04:44:07 -0800 (PST) X-Google-Smtp-Source: ABdhPJycMZGYAqkWvUm4ti0KNbj3uR1qWoZk8mAAoVfJIvz+XFcQUGZxVsgOrCv+hbJC5AhUxiCYWQ== X-Received: by 2002:a1c:c912:: with SMTP id f18mr2602420wmb.150.1604580247183; Thu, 05 Nov 2020 04:44:07 -0800 (PST) Received: from x1w.redhat.com (234.red-83-42-66.dynamicip.rima-tde.net. [83.42.66.234]) by smtp.gmail.com with ESMTPSA id o3sm2341584wru.15.2020.11.05.04.44.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 05 Nov 2020 04:44:06 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PATCH-for-6.0 2/3] hw/virtio: Build most of virtio devices as arch-independent objects Date: Thu, 5 Nov 2020 13:43:52 +0100 Message-Id: <20201105124353.3680057-3-philmd@redhat.com> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20201105124353.3680057-1-philmd@redhat.com> References: <20201105124353.3680057-1-philmd@redhat.com> MIME-Version: 1.0 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=philmd@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Received-SPF: pass client-ip=63.128.21.124; envelope-from=philmd@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/11/04 22:46:30 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] [fuzzy] X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H5=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=unavailable 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: Elena Ufimtseva , Fam Zheng , Thomas Huth , Jagannathan Raman , qemu-block@nongnu.org, "Michael S. Tsirkin" , Stefan Hajnoczi , =?utf-8?q?Alex_Benn=C3=A9e?= , Jason Wang , Cornelia Huck , Christian Schoenebeck , Greg Kurz , Wainer dos Santos Moschetta , Max Reitz , Stefan Hajnoczi , Paolo Bonzini , =?utf-8?q?Marc-Andr=C3=A9_Lureau?= , Kevin Wolf , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" VirtIO devices shouldn't be arch-specific. Some device have to use PAGE_SIZE definition or access to CPUState. Keep building them as arch-specific objects. Move all we can to libcommon.fa. Suggested-by: Stefan Hajnoczi Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Paolo Bonzini --- hw/9pfs/meson.build | 2 +- hw/block/dataplane/meson.build | 2 +- hw/block/meson.build | 2 +- hw/char/meson.build | 2 +- hw/net/meson.build | 2 +- hw/scsi/meson.build | 2 +- hw/virtio/meson.build | 15 +++++++++------ 7 files changed, 15 insertions(+), 12 deletions(-) diff --git a/hw/9pfs/meson.build b/hw/9pfs/meson.build index cc094262122..ac964be15ce 100644 --- a/hw/9pfs/meson.build +++ b/hw/9pfs/meson.build @@ -17,4 +17,4 @@ fs_ss.add(when: 'CONFIG_XEN', if_true: files('xen-9p-backend.c')) softmmu_ss.add_all(when: 'CONFIG_9PFS', if_true: fs_ss) -specific_ss.add(when: 'CONFIG_VIRTIO_9P', if_true: files('virtio-9p-device.c')) +softmmu_ss.add(when: 'CONFIG_VIRTIO_9P', if_true: files('virtio-9p-device.c')) diff --git a/hw/block/dataplane/meson.build b/hw/block/dataplane/meson.build index 12c6a264f10..e2f3721ce24 100644 --- a/hw/block/dataplane/meson.build +++ b/hw/block/dataplane/meson.build @@ -1,2 +1,2 @@ -specific_ss.add(when: 'CONFIG_VIRTIO_BLK', if_true: files('virtio-blk.c')) +softmmu_ss.add(when: 'CONFIG_VIRTIO_BLK', if_true: files('virtio-blk.c')) specific_ss.add(when: 'CONFIG_XEN', if_true: files('xen-block.c')) diff --git a/hw/block/meson.build b/hw/block/meson.build index 602ca6c8541..497592c33ac 100644 --- a/hw/block/meson.build +++ b/hw/block/meson.build @@ -15,7 +15,7 @@ softmmu_ss.add(when: 'CONFIG_SH4', if_true: files('tc58128.c')) softmmu_ss.add(when: 'CONFIG_NVME_PCI', if_true: files('nvme.c', 'nvme-ns.c')) -specific_ss.add(when: 'CONFIG_VIRTIO_BLK', if_true: files('virtio-blk.c')) +softmmu_ss.add(when: 'CONFIG_VIRTIO_BLK', if_true: files('virtio-blk.c')) specific_ss.add(when: 'CONFIG_VHOST_USER_BLK', if_true: files('vhost-user-blk.c')) subdir('dataplane') diff --git a/hw/char/meson.build b/hw/char/meson.build index 196ac91fa29..7496594ea07 100644 --- a/hw/char/meson.build +++ b/hw/char/meson.build @@ -37,5 +37,5 @@ specific_ss.add(when: 'CONFIG_HTIF', if_true: files('riscv_htif.c')) specific_ss.add(when: 'CONFIG_TERMINAL3270', if_true: files('terminal3270.c')) -specific_ss.add(when: 'CONFIG_VIRTIO', if_true: files('virtio-serial-bus.c')) +softmmu_ss.add(when: 'CONFIG_VIRTIO', if_true: files('virtio-serial-bus.c')) specific_ss.add(when: 'CONFIG_PSERIES', if_true: files('spapr_vty.c')) diff --git a/hw/net/meson.build b/hw/net/meson.build index 4a7051b54a0..c795af23eee 100644 --- a/hw/net/meson.build +++ b/hw/net/meson.build @@ -43,7 +43,7 @@ specific_ss.add(when: 'CONFIG_XILINX_ETHLITE', if_true: files('xilinx_ethlite.c')) softmmu_ss.add(when: 'CONFIG_VIRTIO_NET', if_true: files('net_rx_pkt.c')) -specific_ss.add(when: 'CONFIG_VIRTIO_NET', if_true: files('virtio-net.c')) +softmmu_ss.add(when: 'CONFIG_VIRTIO_NET', if_true: files('virtio-net.c')) softmmu_ss.add(when: ['CONFIG_VIRTIO_NET', 'CONFIG_VHOST_NET'], if_true: files('vhost_net.c'), if_false: files('vhost_net-stub.c')) softmmu_ss.add(when: 'CONFIG_ALL', if_true: files('vhost_net-stub.c')) diff --git a/hw/scsi/meson.build b/hw/scsi/meson.build index 923a34f344c..fdf27156f6a 100644 --- a/hw/scsi/meson.build +++ b/hw/scsi/meson.build @@ -19,7 +19,7 @@ virtio_scsi_ss.add(files('virtio-scsi.c', 'virtio-scsi-dataplane.c')) virtio_scsi_ss.add(when: 'CONFIG_VHOST_SCSI', if_true: files('vhost-scsi-common.c', 'vhost-scsi.c')) virtio_scsi_ss.add(when: 'CONFIG_VHOST_USER_SCSI', if_true: files('vhost-scsi-common.c', 'vhost-user-scsi.c')) -specific_scsi_ss.add_all(when: 'CONFIG_VIRTIO_SCSI', if_true: virtio_scsi_ss) +softmmu_ss.add_all(when: 'CONFIG_VIRTIO_SCSI', if_true: virtio_scsi_ss) specific_scsi_ss.add(when: 'CONFIG_SPAPR_VSCSI', if_true: files('spapr_vscsi.c')) diff --git a/hw/virtio/meson.build b/hw/virtio/meson.build index 95415913a9a..40df99f1a48 100644 --- a/hw/virtio/meson.build +++ b/hw/virtio/meson.build @@ -9,12 +9,15 @@ softmmu_ss.add(when: 'CONFIG_ALL', if_true: files('vhost-stub.c')) +virtio_arch_ss = ss.source_set() +virtio_arch_ss.add(files('virtio.c')) +virtio_arch_ss.add(when: 'CONFIG_VIRTIO_LEGACY', if_true: files('virtio-legacy.c')) +virtio_arch_ss.add(when: 'CONFIG_VHOST_USER', if_true: files('vhost-user.c')) +virtio_arch_ss.add(when: 'CONFIG_VHOST_VDPA', if_true: files('vhost-vdpa.c')) +virtio_arch_ss.add(when: 'CONFIG_VIRTIO_IOMMU', if_true: files('virtio-iommu.c')) + virtio_ss = ss.source_set() -virtio_ss.add(files('virtio.c')) -virtio_ss.add(when: 'CONFIG_VIRTIO_LEGACY', if_true: files('virtio-legacy.c')) virtio_ss.add(when: 'CONFIG_VHOST', if_true: files('vhost.c', 'vhost-backend.c')) -virtio_ss.add(when: 'CONFIG_VHOST_USER', if_true: files('vhost-user.c')) -virtio_ss.add(when: 'CONFIG_VHOST_VDPA', if_true: files('vhost-vdpa.c')) virtio_ss.add(when: 'CONFIG_VIRTIO_BALLOON', if_true: files('virtio-balloon.c')) virtio_ss.add(when: 'CONFIG_VIRTIO_CRYPTO', if_true: files('virtio-crypto.c')) virtio_ss.add(when: ['CONFIG_VIRTIO_CRYPTO', 'CONFIG_VIRTIO_PCI'], if_true: files('virtio-crypto-pci.c')) @@ -24,7 +27,6 @@ virtio_ss.add(when: 'CONFIG_VHOST_VSOCK', if_true: files('vhost-vsock.c', 'vhost-vsock-common.c')) virtio_ss.add(when: 'CONFIG_VHOST_USER_VSOCK', if_true: files('vhost-user-vsock.c', 'vhost-vsock-common.c')) virtio_ss.add(when: 'CONFIG_VIRTIO_RNG', if_true: files('virtio-rng.c')) -virtio_ss.add(when: 'CONFIG_VIRTIO_IOMMU', if_true: files('virtio-iommu.c')) virtio_ss.add(when: 'CONFIG_VIRTIO_MEM', if_true: files('virtio-mem.c')) virtio_pci_ss = ss.source_set() @@ -49,4 +51,5 @@ virtio_ss.add_all(when: 'CONFIG_VIRTIO_PCI', if_true: virtio_pci_ss) -specific_ss.add_all(when: 'CONFIG_VIRTIO', if_true: virtio_ss) +softmmu_ss.add_all(when: 'CONFIG_VIRTIO', if_true: virtio_ss) +specific_ss.add_all(when: 'CONFIG_VIRTIO', if_true: virtio_arch_ss) From patchwork Thu Nov 5 12:43:53 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 319897 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-12.6 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 87042C00A89 for ; Thu, 5 Nov 2020 12:51:02 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id C971720867 for ; Thu, 5 Nov 2020 12:51:01 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="ABb02oU6" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org C971720867 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:55698 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kaejE-000371-Hq for qemu-devel@archiver.kernel.org; Thu, 05 Nov 2020 07:51:00 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:47104) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kaeck-0003Zt-K6 for qemu-devel@nongnu.org; Thu, 05 Nov 2020 07:44:18 -0500 Received: from us-smtp-delivery-124.mimecast.com ([63.128.21.124]:59387) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1kaeci-0000rL-EP for qemu-devel@nongnu.org; Thu, 05 Nov 2020 07:44:18 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1604580255; 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=bepWcvGQ0bfdYX/qi1p2dH7ehIvF5dT/hahyqVRGcmk=; b=ABb02oU6NvrkVfEorQEE7x0uQsxnzXRmPzmbTN69PXH9109h3piGCsMWApM0zwaPJtwzER KQSQo3z6a6pByPaGfTYkqGDwAlAiMSvpDDW1K79813Yht0C/pgYOQQ1Aioyx7kjUpclvLG VHXaQxRxh3LTEVnhEsvi4mpBJP+tu7w= Received: from mail-wr1-f70.google.com (mail-wr1-f70.google.com [209.85.221.70]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-578-ijN_tnedNcyHQyTj3EtTdg-1; Thu, 05 Nov 2020 07:44:14 -0500 X-MC-Unique: ijN_tnedNcyHQyTj3EtTdg-1 Received: by mail-wr1-f70.google.com with SMTP id t17so657367wrm.13 for ; Thu, 05 Nov 2020 04:44:13 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=bepWcvGQ0bfdYX/qi1p2dH7ehIvF5dT/hahyqVRGcmk=; b=hS+unIv4q5uzGHpm0ZVLxlsIWtfj4tRBwN+9nHEnqWULF3SENv0lthrBcNk6LI7pN6 jv0n1LMjfSfWFjvVqTMgU3JKxcWwT04xlj4xVyVaBByyn1q2aHMcjxPT4J/C194FYy2V 646M31bf8Yic8jiDUNVlsE51Domlvn+zmZUss0D6XlIPkKR9AhtTT/lRG09nIN75/Axo RZQfpnUnE/ZfQFvQh+UYAc2be4Ib/cyj4n6fGS2dpC86yLmuIfLLzA5snK3t0LMhsT/a Ky9/epQaefnyl5BKJizYKHEd7A8WPmXEs1JCakR7cdwbuT09vtBV8Xo06aaMMpFJexUL 6v+Q== X-Gm-Message-State: AOAM533Gqj2KRpTsoXtVdAD0flXttB6O5M5VUcT80eBnsI6cnAEuCvO/ i7inXj3rN7NKcPYN8oBnEYFKw17IhP0wTTrzXiGGQsXaxX14owuspsjmlmdxavBgSIZ95sexQQH TSRfJt4mb8/d8cyc= X-Received: by 2002:a7b:cbcf:: with SMTP id n15mr2506104wmi.156.1604580252671; Thu, 05 Nov 2020 04:44:12 -0800 (PST) X-Google-Smtp-Source: ABdhPJzdmkvAKcvdYqrzbh8740WVd9v1CEuWQdEjPg1sNnohA4LgmpX4vw1ZWRgvfgh9g25KqCR38w== X-Received: by 2002:a7b:cbcf:: with SMTP id n15mr2506070wmi.156.1604580252496; Thu, 05 Nov 2020 04:44:12 -0800 (PST) Received: from x1w.redhat.com (234.red-83-42-66.dynamicip.rima-tde.net. [83.42.66.234]) by smtp.gmail.com with ESMTPSA id u3sm2431544wro.33.2020.11.05.04.44.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 05 Nov 2020 04:44:11 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PATCH-for-6.0 3/3] gitlab-ci: Test the --disable-virtio-legacy option Date: Thu, 5 Nov 2020 13:43:53 +0100 Message-Id: <20201105124353.3680057-4-philmd@redhat.com> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20201105124353.3680057-1-philmd@redhat.com> References: <20201105124353.3680057-1-philmd@redhat.com> MIME-Version: 1.0 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=philmd@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Received-SPF: pass client-ip=63.128.21.124; envelope-from=philmd@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/11/04 22:46:30 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] [fuzzy] X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H5=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: Elena Ufimtseva , Fam Zheng , Thomas Huth , Jagannathan Raman , qemu-block@nongnu.org, "Michael S. Tsirkin" , =?utf-8?q?Alex_Benn=C3=A9e?= , Jason Wang , Cornelia Huck , Christian Schoenebeck , Greg Kurz , Wainer dos Santos Moschetta , Max Reitz , Stefan Hajnoczi , Paolo Bonzini , =?utf-8?q?Marc-Andr=C3=A9_Lureau?= , Kevin Wolf , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" Add the recently introduced '--disable-virtio-legacy' configuration to the 'build-disabled' job. Signed-off-by: Philippe Mathieu-Daudé Acked-by: Thomas Huth --- .gitlab-ci.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 3b15ae5c302..21fa1a459fd 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -218,6 +218,7 @@ build-disabled: --disable-strip --disable-tpm --disable-usb-redir --disable-vdi --disable-vhost-crypto --disable-vhost-net --disable-vhost-scsi --disable-vhost-user --disable-vhost-vdpa --disable-vhost-vsock + --disable-virtio-legacy --disable-virglrenderer --disable-vnc --disable-vte --disable-vvfat --disable-xen --disable-zstd TARGETS: arm-softmmu i386-softmmu ppc64-softmmu mips64-softmmu