Skip to contentSkip to conversation

fix undefined kvm_vfio_ops

PATCH In review Jonas Pfoh 2 participants 2 messages Jan 24, 2014 KVM

lore
Share & tools
lore

Jonas Pfoh

author
#0 lore raw

PATCH 1/1 fix undefined kvm_vfio_ops

vfio.c is being pulled in from the submodule, but it is not being compiled/linked by the build environment, causing a "Unknown symbol in module" error when loading the resulting module.

Adding vfio.o to the kvm-objs variable in x86/Kbuild fixes this issue

---

x86/Kbuild +1 -1
index d75b756..637b3b1 100644
@@ -1,7 +1,7 @@
 obj-m := kvm.o kvm-intel.o kvm-amd.o
 kvm-objs := kvm_main.o x86.o mmu.o emulate.o irq.o i8259.o pmu.o \
         lapic.o ioapic.o preempt.o i8254.o coalesced_mmio.o irq_comm.o \
-        eventfd.o compat-x86.o async_pf.o cpuid.o irqchip.o \
+        eventfd.o compat-x86.o async_pf.o cpuid.o irqchip.o vfio.o\
         ../external-module-compat.o
 ifeq ($(CONFIG_IOMMU_API)$(CONFIG_PCI),yy)
 kvm-objs += assigned-dev.o iommu.o
#1 lore raw
Quoted 13 lines · Jonas Pfoh

vfio.c is being pulled in from the submodule, but it is not being compiled/linked by the build environment, causing a "Unknown symbol in module" error when loading the resulting module.

Adding vfio.o to the kvm-objs variable in x86/Kbuild fixes this issue

---

x86/Kbuild +0 -0
index d75b756..637b3b1 100644

x86/Kbuild line 7

Quoted 8 lines
x86/Kbuild +1 -1
@@ -1,7 +1,7 @@
 obj-m := kvm.o kvm-intel.o kvm-amd.o
 kvm-objs := kvm_main.o x86.o mmu.o emulate.o irq.o i8259.o pmu.o \
         lapic.o ioapic.o preempt.o i8254.o coalesced_mmio.o irq_comm.o \
-        eventfd.o compat-x86.o async_pf.o cpuid.o irqchip.o \
+        eventfd.o compat-x86.o async_pf.o cpuid.o irqchip.o vfio.o\
         ../external-module-compat.o
 ifeq ($(CONFIG_IOMMU_API)$(CONFIG_PCI),yy)
 kvm-objs += assigned-dev.o iommu.o

Format was almost perfect format - just your mailer mangled whitespaces. Make sure to either use git send-email then or to switch of line-wrapper etc. in the mail client when sending patches - to whichever project.

Unfortunately it broke the build for 3.11 and older kernels. I merged a variant to next that passed build tests here.

Thanks,
Jan

Signature · 2 lines
Siemens AG, Corporate Technology, CT RTC ITP SES-DE
Corporate Competence Center Embedded Linux