[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 52/87] pc: stubify x86 iommu
From: |
Paolo Bonzini |
Subject: |
[PULL 52/87] pc: stubify x86 iommu |
Date: |
Wed, 18 Dec 2019 13:02:18 +0100 |
Allow building microvm without x86-iommu.c.
Signed-off-by: Paolo Bonzini <address@hidden>
---
hw/i386/Kconfig | 6 ++++++
hw/i386/Makefile.objs | 3 ++-
hw/i386/x86-iommu-stub.c | 34 ++++++++++++++++++++++++++++++++++
3 files changed, 42 insertions(+), 1 deletion(-)
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
+config X86_IOMMU
+ bool
+ depends on PC
+
config VTD
bool
+ select X86_IOMMU
config AMD_IOMMU
bool
+ select X86_IOMMU
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) += pc_piix.o
obj-$(CONFIG_Q35) += pc_q35.o
obj-$(CONFIG_MICROVM) += microvm.o
obj-y += fw_cfg.o
-obj-y += x86-iommu.o
+obj-$(CONFIG_X86_IOMMU) += x86-iommu.o
+obj-$(call lnot,$(CONFIG_X86_IOMMU)) += x86-iommu-stub.o
obj-$(CONFIG_VTD) += intel_iommu.o
obj-$(CONFIG_AMD_IOMMU) += amd_iommu.o
obj-$(CONFIG_XEN) += ../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 <address@hidden>
+ *
+ * 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 <http://www.gnu.org/licenses/>.
+ */
+
+#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;
+}
+
--
1.8.3.1
- [PULL 40/87] crypto: move common bits for all emulators to libqemuutil, (continued)
- [PULL 40/87] crypto: move common bits for all emulators to libqemuutil, Paolo Bonzini, 2019/12/18
- [PULL 44/87] i386: conditionally compile more files, Paolo Bonzini, 2019/12/18
- [PULL 42/87] configure: set $PYTHON to a full path, Paolo Bonzini, 2019/12/18
- [PULL 45/87] fw_cfg: allow building without other devices, Paolo Bonzini, 2019/12/18
- [PULL 47/87] pci-stub: add more MSI functions, Paolo Bonzini, 2019/12/18
- [PULL 48/87] x86: move SMM property to X86MachineState, Paolo Bonzini, 2019/12/18
- [PULL 46/87] hw: replace hw/i386/pc.h with a header just for the i8259, Paolo Bonzini, 2019/12/18
- [PULL 49/87] hw/i386/pc: Convert DPRINTF() to trace events, Paolo Bonzini, 2019/12/18
- [PULL 50/87] x86: move more x86-generic functions out of PC files, Paolo Bonzini, 2019/12/18
- [PULL 51/87] acpi: move PC stubs out of stubs/, Paolo Bonzini, 2019/12/18
- [PULL 52/87] pc: stubify x86 iommu,
Paolo Bonzini <=
- [PULL 53/87] hw/i386: De-duplicate gsi_handler() to remove kvm_pc_gsi_handler(), Paolo Bonzini, 2019/12/18
- [PULL 55/87] hw/isa/isa-bus: cleanup irq functions, Paolo Bonzini, 2019/12/18
- [PULL 54/87] hw/i386: Simplify ioapic_init_gsi(), Paolo Bonzini, 2019/12/18
- [PULL 57/87] hw/i386/pc: Inline port92_init(), Paolo Bonzini, 2019/12/18
- [PULL 56/87] hw/i386/pc: Use TYPE_PORT92 instead of hardcoded string, Paolo Bonzini, 2019/12/18
- [PULL 58/87] hw/i386/pc: Extract the port92 device, Paolo Bonzini, 2019/12/18
- [PULL 59/87] hyperv: Use auto rcu_read macros, Paolo Bonzini, 2019/12/18
- [PULL 60/87] qsp: Use WITH_RCU_READ_LOCK_GUARD, Paolo Bonzini, 2019/12/18
- [PULL 61/87] memory: use RCU_READ_LOCK_GUARD, Paolo Bonzini, 2019/12/18
- [PULL 62/87] colo: fix return without releasing RCU, Paolo Bonzini, 2019/12/18