From nobody Sun Nov 24 04:43:25 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; 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=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1725608309; cv=none; d=zohomail.com; s=zohoarc; b=SZFuYUDPntBIJkNg9nGFWpdXwnpN5nMTtuC+YpgopUAIoW0bxt7/0E/spJr0S3ofXSHC3sfJSRZph6to9o/7Mpka5nNoZuicVfWrX+Q9blk3WI8I9OS7wZf8Z3i/5Yl2mGHQBskvhxEOZRRNzaXdWM6S0tdgzbqhhDhfAMs8ePs= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1725608309; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=7T/GiHajNDfQrOhmjStv5lhEoWWSSNNggx/DwKqObjM=; b=emxra1ZM+JkF7q6Vm0f7p2fTqNXuISgJwwy+EFS6vo9PQF9Jt425dpGrPplOWiUUxKujYsO3tEmJK0iHjrWtSeB+LMtTQ6385bCmGPY6o5oThy8WVjER1C0uGZr44cJR1MdIWKRXYLlUfiH9WZPMkM+yXuB8dv+ZItMR0lv44Gg= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; 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=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1725608309428879.9596797355422; Fri, 6 Sep 2024 00:38:29 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1smTXR-0007mh-NI; Fri, 06 Sep 2024 03:37:49 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1smTXP-0007fW-UF for qemu-devel@nongnu.org; Fri, 06 Sep 2024 03:37:47 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1smTXO-0000hp-Fy for qemu-devel@nongnu.org; Fri, 06 Sep 2024 03:37:47 -0400 Received: from mail-wm1-f70.google.com (mail-wm1-f70.google.com [209.85.128.70]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-91-O-pD5bhBNAywD3nCdT-GIw-1; Fri, 06 Sep 2024 03:37:42 -0400 Received: by mail-wm1-f70.google.com with SMTP id 5b1f17b1804b1-428040f49f9so13566745e9.0 for ; Fri, 06 Sep 2024 00:37:42 -0700 (PDT) Received: from avogadro.local ([151.95.101.29]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-42ca05c6fb9sm11265925e9.7.2024.09.06.00.37.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 06 Sep 2024 00:37:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1725608264; 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; bh=7T/GiHajNDfQrOhmjStv5lhEoWWSSNNggx/DwKqObjM=; b=H+aXdYivYo5a9rMdHaDZ8SBS080R6mCt63XS31ZnD40WsWlrrs/8aCkhMMDRnBCJlbdEHw HHls7oU+LlsZ2d8jpa4xTyr5sYVn5v0iMTaRULQcR4ojuqsPhn5bDSF53S45h8KsYUdKfi XkeUxqvZN5j3ZIxQBr3B6eKrp6Usv74= X-MC-Unique: O-pD5bhBNAywD3nCdT-GIw-1 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1725608260; x=1726213060; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=7T/GiHajNDfQrOhmjStv5lhEoWWSSNNggx/DwKqObjM=; b=kIMNut7jnalOyT4qqxX5Pnl4E8DlHiG7xWAenlb7ACGXYN83qza77qatV9f31O0DB8 VseHcnG6MkfUniPQSScRf8N+wcrEmbNml/SxOYSpAonmhoH+dGK/SmY1GCB+JST5Ur0L a8cPjvl15LyXh4RI42b+WAmFFkO5fVOSX2DT6jfO06SevE8qRA4nPivx9O/78QYaKEpj FYVV5VQmF6gFv2DDuCHYzJVWeDxYg8rymvgXNdWh8nLLD4Gyv7bEI3BCUbv+jK/9idte MDi1Kjc0rsroDjbRRhzNFd+ptx51NafkRK4iuLJkJTDzagq4E7nDNhw4NOA+mxw8KgC3 l0aA== X-Gm-Message-State: AOJu0YwZIdn7ND0K4/bSpb1KWBk+QEv89MdvQW/FWh2YlkhlWGtJV+kK NENyd+PhhOcuB0utpcuum/ed57AjHVApCF5rCdruwkBsGc6mj7lt2i5UKvf0jp1PXpr+H8Mu6uy ZBl+kujPpIBLU3/VZ8C+SYY5ud75yn6tFrL/hlUtfBggNyNBW3jo93w44IArYk2eBdS5go6P6YF swM41I1vRgdFvNiUf3YoHZ3OQ3AsnooVIoxWdIbMs= X-Received: by 2002:a05:600c:4505:b0:426:60b8:d8ba with SMTP id 5b1f17b1804b1-42bb27a9ca8mr203560725e9.28.1725608260587; Fri, 06 Sep 2024 00:37:40 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFH5mupaTaA63fNt0hyF79YO2iO1hRDB/cB26Qbhz2WIz4zvrNRckKc6XLdRGucCeU8LEJ3eA== X-Received: by 2002:a05:600c:4505:b0:426:60b8:d8ba with SMTP id 5b1f17b1804b1-42bb27a9ca8mr203560535e9.28.1725608260036; Fri, 06 Sep 2024 00:37:40 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Cc: David Hildenbrand , Michael Tokarev Subject: [PATCH] virtio: kconfig: memory devices are PCI only Date: Fri, 6 Sep 2024 09:37:37 +0200 Message-ID: <20240906073737.493254-1-pbonzini@redhat.com> X-Mailer: git-send-email 2.46.0 MIME-Version: 1.0 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=170.10.129.124; envelope-from=pbonzini@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -21 X-Spam_score: -2.2 X-Spam_bar: -- X-Spam_report: (-2.2 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.142, 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_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham 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: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1725608311335116600 Content-Type: text/plain; charset="utf-8" Virtio memory devices rely on PCI BARs to expose the contents of memory. Because of this they cannot be used with virtio-mmio or virtio-ccw. In fact the code that is common to virtio-mem and virtio-pmem, which is in hw/virtio/virtio-md-pci.c, is only included if CONFIG_VIRTIO_PCI is set. Reproduce the same condition in the Kconfig file. Without this patch it is possible to create a configuration with CONFIG_VIRTIO_PCI=3Dn and CONFIG_VIRTIO_MEM=3Dy, but that causes a compilation failure. Cc: David Hildenbrand Reported-by: Michael Tokarev Signed-off-by: Paolo Bonzini --- hw/virtio/Kconfig | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/hw/virtio/Kconfig b/hw/virtio/Kconfig index aa63ff7fd41..7c554d230d8 100644 --- a/hw/virtio/Kconfig +++ b/hw/virtio/Kconfig @@ -37,6 +37,7 @@ config VIRTIO_CRYPTO =20 config VIRTIO_MD bool + depends on VIRTIO_PCI select MEM_DEVICE =20 config VIRTIO_PMEM_SUPPORTED @@ -45,7 +46,7 @@ config VIRTIO_PMEM_SUPPORTED config VIRTIO_PMEM bool default y - depends on VIRTIO + depends on VIRTIO_PCI depends on VIRTIO_PMEM_SUPPORTED select VIRTIO_MD =20 @@ -55,7 +56,7 @@ config VIRTIO_MEM_SUPPORTED config VIRTIO_MEM bool default y - depends on VIRTIO + depends on VIRTIO_PCI depends on LINUX depends on VIRTIO_MEM_SUPPORTED select VIRTIO_MD --=20 2.46.0