Thread (55 messages) 55 messages, 7 authors, 2024-06-24

Re: [PATCH 03/26] virt: Declare and define vfio_file_set_kvm() iff CONFIG_KVM is enabled

From: Jason Gunthorpe <jgg@ziepe.ca>
Date: 2023-09-18 15:20:22
Also in: kvm, kvm-riscv, kvmarm, linux-mips, linux-perf-users, linux-riscv, linux-s390, linuxppc-dev, lkml

On Fri, Sep 15, 2023 at 05:30:55PM -0700, Sean Christopherson wrote:
Hide vfio_file_set_kvm() and its unique helpers if KVM is not enabled,
nothing else in the kernel (or out of the kernel) should be using a
KVM specific helper.

Signed-off-by: Sean Christopherson <seanjc@google.com>
---
 drivers/vfio/vfio_main.c | 2 +-
 include/linux/vfio.h     | 2 ++
 2 files changed, 3 insertions(+), 1 deletion(-)
Patch subject should be vfio not virt

Reviewed-by: Jason Gunthorpe <jgg@nvidia.com>
quoted hunk ↗ jump to hunk
@@ -1388,6 +1387,7 @@ void vfio_file_set_kvm(struct file *file, struct kvm *kvm)
 		vfio_device_file_set_kvm(file, kvm);
 }
 EXPORT_SYMBOL_GPL(vfio_file_set_kvm);
+#endif
We could even put this in a symbol namespace..

Jason

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help