From patchwork Mon Apr 6 12:12:44 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Michael S. Tsirkin" X-Patchwork-Id: 221410 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=-10.0 required=3.0 tests=DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, 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 681C7C2BA19 for ; Mon, 6 Apr 2020 12:12:55 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 36D2E215A4 for ; Mon, 6 Apr 2020 12:12:55 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="FL/Hz1sY" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727980AbgDFMMy (ORCPT ); Mon, 6 Apr 2020 08:12:54 -0400 Received: from us-smtp-2.mimecast.com ([205.139.110.61]:32903 "EHLO us-smtp-delivery-1.mimecast.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1727930AbgDFMMv (ORCPT ); Mon, 6 Apr 2020 08:12:51 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1586175170; 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: in-reply-to:in-reply-to:references:references; bh=dQAEJjJ23njMAMzpYV3TzkQNiOgjGmbglBN46bPRZ/k=; b=FL/Hz1sYb5fZql6/Fw1IbPDUj7GjcUk7wl/0uMI2lk4fOixhHzpKkZK0i5ieH4xOiRtKBD gWUrnf6ZODujrN0nUvj/XI1mbagBckJ6MEzSTpk3t5OvMFZ8gSTReAruTMljcPYAr5pKoj mgBhuh41G9opgLqiFR5EQRpVqfu9YWY= 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-338-iS_EP_-WNaK9CCebR_Xo2g-1; Mon, 06 Apr 2020 08:12:49 -0400 X-MC-Unique: iS_EP_-WNaK9CCebR_Xo2g-1 Received: by mail-wr1-f69.google.com with SMTP id n7so4254767wru.9 for ; Mon, 06 Apr 2020 05:12:48 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=dQAEJjJ23njMAMzpYV3TzkQNiOgjGmbglBN46bPRZ/k=; b=CnTWBlifIoua9imIiC6yXAmBKZ1HDXpY/KaEiHxPHeIZuVWhQLLhDHpXaqPqyjW03a V41c4TaHAvLpaviTg+CC1r91w+Yz46wInVslMTKtPe2bmtSk2SPEQceWGy4PwxBXtrP1 jOdLs9VHsCUUoKkB5XtrF+8rNHIxlJ2qEUUPGJVCBjgQnlJMyuiniFLVILjsXLyodMoY 7etKXu7LDbBZe4TYzmfY2Uq+7E+5qWVmevOkLRsD/2s0nkgOgSqVeWlLTq4CEZ0RMQ0g Op1xnmrpQ6DsmSAP6QsSdFYKyNd6+DF+HosAUfSVNHECxYf6BvQmOrftynQgLzngLY8H 1xEw== X-Gm-Message-State: AGi0PuYFnX8Gz9ettsiDBtYpzn6aR7rYZt3ahG50odI1cV5MLlUzARXd URi/RT5xy9m2ROHAlWFvfKOUI/eEaFzoPkQkP8MXGQEOxnhyqiIXS+3mydqhQo5BnzGOdHBplUt EnH/9oiR5lMeiNoHc X-Received: by 2002:adf:bc12:: with SMTP id s18mr25165008wrg.220.1586175167831; Mon, 06 Apr 2020 05:12:47 -0700 (PDT) X-Google-Smtp-Source: APiQypLwgTks29i/561QCQdpKOflCqiUKEhbZa/gBiQmA5aq0hS0WhmnIdFdpGtSrxr+GiRrPLsSEg== X-Received: by 2002:adf:bc12:: with SMTP id s18mr25164995wrg.220.1586175167620; Mon, 06 Apr 2020 05:12:47 -0700 (PDT) Received: from redhat.com (bzq-79-176-51-222.red.bezeqint.net. [79.176.51.222]) by smtp.gmail.com with ESMTPSA id c20sm11334886wmd.36.2020.04.06.05.12.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 06 Apr 2020 05:12:47 -0700 (PDT) Date: Mon, 6 Apr 2020 08:12:44 -0400 From: "Michael S. Tsirkin" To: linux-kernel@vger.kernel.org Cc: Ard Biesheuvel , "richard.henderson@linaro.org" , "christophe.lyon@st.com" , kbuild test robot , "daniel.santos@pobox.com" , Jason Wang , "kbuild-all@lists.01.org" , Russell King , Linux ARM , Richard Earnshaw , Sudeep Dutt , Ashutosh Dixit , Arnd Bergmann , Greg Kroah-Hartman , "David S. Miller" , netdev@vger.kernel.org, virtualization@lists.linux-foundation.org, kvm@vger.kernel.org Subject: [PATCH v2 2/2] vhost: disable for OABI Message-ID: <20200406121233.109889-3-mst@redhat.com> References: <20200406121233.109889-1-mst@redhat.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20200406121233.109889-1-mst@redhat.com> X-Mailer: git-send-email 2.24.1.751.gd10ce2899c X-Mutt-Fcc: =sent Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org vhost is currently broken on the default ARM config. The reason is that that uses apcs-gnu which is the ancient OABI that is been deprecated for a long time. Given that virtio support on such ancient systems is not needed in the first place, let's just add something along the lines of depends on !ARM || AEABI to the virtio Kconfig declaration, and add a comment that it has to do with struct member alignment. Note: we can't make VHOST and VHOST_RING themselves have a dependency since these are selected. Add a new symbol for that. Suggested-by: Ard Biesheuvel Siggested-by: Richard Earnshaw Signed-off-by: Michael S. Tsirkin --- drivers/misc/mic/Kconfig | 2 +- drivers/net/caif/Kconfig | 2 +- drivers/vdpa/Kconfig | 2 +- drivers/vhost/Kconfig | 17 +++++++++++++---- 4 files changed, 16 insertions(+), 7 deletions(-) diff --git a/drivers/misc/mic/Kconfig b/drivers/misc/mic/Kconfig index 8f201d019f5a..3bfe72c59864 100644 --- a/drivers/misc/mic/Kconfig +++ b/drivers/misc/mic/Kconfig @@ -116,7 +116,7 @@ config MIC_COSM config VOP tristate "VOP Driver" - depends on VOP_BUS + depends on VOP_BUS && VHOST_DPN select VHOST_RING select VIRTIO help diff --git a/drivers/net/caif/Kconfig b/drivers/net/caif/Kconfig index 9db0570c5beb..661c25eb1c46 100644 --- a/drivers/net/caif/Kconfig +++ b/drivers/net/caif/Kconfig @@ -50,7 +50,7 @@ config CAIF_HSI config CAIF_VIRTIO tristate "CAIF virtio transport driver" - depends on CAIF && HAS_DMA + depends on CAIF && HAS_DMA && VHOST_DPN select VHOST_RING select VIRTIO select GENERIC_ALLOCATOR diff --git a/drivers/vdpa/Kconfig b/drivers/vdpa/Kconfig index d0cb0e583a5d..aee28def466b 100644 --- a/drivers/vdpa/Kconfig +++ b/drivers/vdpa/Kconfig @@ -14,7 +14,7 @@ if VDPA_MENU config VDPA_SIM tristate "vDPA device simulator" - depends on RUNTIME_TESTING_MENU && HAS_DMA + depends on RUNTIME_TESTING_MENU && HAS_DMA && VHOST_DPN select VDPA select VHOST_RING select VHOST_IOTLB diff --git a/drivers/vhost/Kconfig b/drivers/vhost/Kconfig index cb6b17323eb2..b3486e218f62 100644 --- a/drivers/vhost/Kconfig +++ b/drivers/vhost/Kconfig @@ -12,6 +12,15 @@ config VHOST_RING This option is selected by any driver which needs to access the host side of a virtio ring. +config VHOST_DPN + bool "VHOST dependencies" + depends on !ARM || AEABI + default y + help + Anything selecting VHOST or VHOST_RING must depend on VHOST_DPN. + This excludes the deprecated ARM ABI since that forces a 4 byte + alignment on all structs - incompatible with virtio spec requirements. + config VHOST tristate select VHOST_IOTLB @@ -27,7 +36,7 @@ if VHOST_MENU config VHOST_NET tristate "Host kernel accelerator for virtio net" - depends on NET && EVENTFD && (TUN || !TUN) && (TAP || !TAP) + depends on NET && EVENTFD && (TUN || !TUN) && (TAP || !TAP) && VHOST_DPN select VHOST ---help--- This kernel module can be loaded in host kernel to accelerate @@ -39,7 +48,7 @@ config VHOST_NET config VHOST_SCSI tristate "VHOST_SCSI TCM fabric driver" - depends on TARGET_CORE && EVENTFD + depends on TARGET_CORE && EVENTFD && VHOST_DPN select VHOST default n ---help--- @@ -48,7 +57,7 @@ config VHOST_SCSI config VHOST_VSOCK tristate "vhost virtio-vsock driver" - depends on VSOCKETS && EVENTFD + depends on VSOCKETS && EVENTFD && VHOST_DPN select VHOST select VIRTIO_VSOCKETS_COMMON default n @@ -62,7 +71,7 @@ config VHOST_VSOCK config VHOST_VDPA tristate "Vhost driver for vDPA-based backend" - depends on EVENTFD + depends on EVENTFD && VHOST_DPN select VHOST select VDPA help