From nobody Mon Feb 9 17:24:39 2026 Delivered-To: importer@patchew.org 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; 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=1576174317; cv=none; d=zohomail.com; s=zohoarc; b=SZiKV/ClnhkTW+7LIWLZeRr3nfKioA5O8xRP+v5EbJ0j3XZBmJr6IywQrFJEkrpcDHNGwG1MhPImIdftamHLBr84gvgecUp7wYZkwCP6rq0UMfsdzrvOo3tceREZsTjqctIiDO69w+kwKFCW43NQJ1bvy6wMCoKXIgGjMgxtPg4= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1576174317; h=Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:Message-ID:References:Sender:Subject:To; bh=IKjPCPOU0OM2BVq1ly6IsoyhMPu7gfDfI+dPATD0bf4=; b=PxTwnyzBb5i4dxzDmCJvgStNt7J1M9LwPvc4ZOWOmyY8F+KDjUVlponY6ALvlzgF91GrZi+FaDIvoxKKyLmyP0kU+bOgU8lplrMtuD97Vm8XWEGMA76u99y1lBqJtc4/L13ADK3SzE/zi1W3xvmM3evoXQCBiEUpzkxazN2xPYQ= 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 1576174317918747.1482284375154; Thu, 12 Dec 2019 10:11:57 -0800 (PST) Received: from localhost ([::1]:35358 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ifSwN-000394-IK for importer@patchew.org; Thu, 12 Dec 2019 13:11:55 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:58971) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ifSHI-0005RC-QM for qemu-devel@nongnu.org; Thu, 12 Dec 2019 12:29:30 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ifSHH-0004Bl-EW for qemu-devel@nongnu.org; Thu, 12 Dec 2019 12:29:28 -0500 Received: from mail-wr1-x441.google.com ([2a00:1450:4864:20::441]:34355) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1ifSHH-00049x-7a for qemu-devel@nongnu.org; Thu, 12 Dec 2019 12:29:27 -0500 Received: by mail-wr1-x441.google.com with SMTP id t2so3661609wrr.1 for ; Thu, 12 Dec 2019 09:29:26 -0800 (PST) Received: from 640k.lan ([93.56.166.5]) by smtp.gmail.com with ESMTPSA id 2sm6810130wrq.31.2019.12.12.09.29.24 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 12 Dec 2019 09:29:24 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references; bh=IKjPCPOU0OM2BVq1ly6IsoyhMPu7gfDfI+dPATD0bf4=; b=F2yQVm1asYrGfdb7DiIdz7llbEA7ccrCQ6NsU6Lcf134X96UzkaI4PsKAiXpxkk1nH zOBC27+uJFK5pMB1z/3vmmGNW6BCQNY6jOR7tJxsI05oJhFRnGRlGgxtZbp9D1sFtX0j RPr0a34RGNsFCCdWmszUi8BNdtBEDi9XO0qFaRjx/0mye1PEE9t0QKlNE0jfCSGZrsIg rkhPmRbtW8mYss8QeFowqS3g79Jc1THZw3F3DmK1CyIC8Ng+9WeKKENEdXh1v4BWDz9U nb+stuz0fL70yXtPkq3d7vOuHuMM1P95DDsMSRNTPQ4v7XswkduPBRuf2q8X96Jh8d54 ONOA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references; bh=IKjPCPOU0OM2BVq1ly6IsoyhMPu7gfDfI+dPATD0bf4=; b=tMu546ywJ9wMn+rmDsWqLh2EXd2f9o6LSKT8+VbggtD1DJ5BIJnF+ARiGpV7px++qm rXbAouDPz0pc/Gwhf99H3aufoKkR9cbJELRWdhusl5cLwSMSJCRu/c1N01frL0TDuRWh GUWMS+xWLc785mvkx8orsHBNbziMdcFpDlUHSbCfv8LHji/8HQUmTOsu8CNmx9ardRjX suCW9wNgI2iE1/u6N5eSSt52WlBXSm3h1UDw4NbWbTFH3ymIJbGPGevqgMT0npCvOO8I t8ZWRFZWKpmh0xfM0SIIpXNOjpdh7+/JnqYtnpu2OrBEI9cPtbKahIrWYyO9zuQUhQCY qxvQ== X-Gm-Message-State: APjAAAXt5RH4gHiokXp6qbsyR/jVWLDu1d4i7ydrTGDDPWdp4d2R8iGL GB0r367Y3TxE5W2MR2IRsrIxLdnb X-Google-Smtp-Source: APXvYqySLXxqjHUfiBg/FVdlrIXTMpxyLGW13v7Z/yEpc5tQePowgJ9ca9L5BXvjCDInpx0lnppifA== X-Received: by 2002:adf:bc87:: with SMTP id g7mr7830514wrh.121.1576171765193; Thu, 12 Dec 2019 09:29:25 -0800 (PST) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PATCH v2 8/8] pc: stubify x86 iommu Date: Thu, 12 Dec 2019 18:29:14 +0100 Message-Id: <1576171754-45138-9-git-send-email-pbonzini@redhat.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1576171754-45138-1-git-send-email-pbonzini@redhat.com> References: <1576171754-45138-1-git-send-email-pbonzini@redhat.com> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4864:20::441 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: philmd@redhat.com, slp@redhat.com Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Allow building microvm without x86-iommu.c and in turn hw/i386/pc.h. Signed-off-by: Paolo Bonzini --- hw/i386/Kconfig | 6 ++++++ hw/i386/Makefile.objs | 3 ++- hw/i386/x86-iommu-stub.c | 34 ++++++++++++++++++++++++++++++++++ 3 files changed, 42 insertions(+), 1 deletions(-) create mode 100644 hw/i386/x86-iommu-stub.c diff --git a/hw/i386/Kconfig b/hw/i386/Kconfig index 5a49434..91cf584 100644 --- a/hw/i386/Kconfig +++ b/hw/i386/Kconfig @@ -103,11 +103,17 @@ config MICROVM select MC146818RTC select VIRTIO_MMIO =20 +config X86_IOMMU + bool + depends on PC + config VTD bool + select X86_IOMMU =20 config AMD_IOMMU bool + select X86_IOMMU =20 config VMPORT bool diff --git a/hw/i386/Makefile.objs b/hw/i386/Makefile.objs index 01ae202..1236c3b 100644 --- a/hw/i386/Makefile.objs +++ b/hw/i386/Makefile.objs @@ -6,7 +6,8 @@ obj-$(CONFIG_I440FX) +=3D pc_piix.o obj-$(CONFIG_Q35) +=3D pc_q35.o obj-$(CONFIG_MICROVM) +=3D microvm.o obj-y +=3D fw_cfg.o -obj-y +=3D x86-iommu.o +obj-$(CONFIG_X86_IOMMU) +=3D x86-iommu.o +obj-$(call lnot,$(CONFIG_X86_IOMMU)) +=3D x86-iommu-stub.o obj-$(CONFIG_VTD) +=3D intel_iommu.o obj-$(CONFIG_AMD_IOMMU) +=3D amd_iommu.o obj-$(CONFIG_XEN) +=3D ../xenpv/ xen/ diff --git a/hw/i386/x86-iommu-stub.c b/hw/i386/x86-iommu-stub.c new file mode 100644 index 0000000..03576cd --- /dev/null +++ b/hw/i386/x86-iommu-stub.c @@ -0,0 +1,34 @@ +/* + * Stubs for X86 IOMMU emulation + * + * Copyright (C) 2019 Red Hat, Inc. + * + * Author: Paolo Bonzini + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + + * You should have received a copy of the GNU General Public License along + * with this program; if not, see . + */ + +#include "qemu/osdep.h" +#include "hw/i386/x86-iommu.h" + +void x86_iommu_iec_register_notifier(X86IOMMUState *iommu, + iec_notify_fn fn, void *data) +{ +} + +X86IOMMUState *x86_iommu_get_default(void) +{ + return NULL; +} + --=20 1.8.3.1