diff options
| author | Open-IOV <dev@open-iov.org> | 2026-09-23 05:44:08 -0400 |
|---|---|---|
| committer | Open-IOV <dev@open-iov.org> | 2026-09-23 05:46:43 -0400 |
| commit | 2302fc09080bad51c73f293294e19fd4db464eb0 (patch) | |
| tree | c722d186347fdef5a34131e9e143b1549b1daf8e /userspace/lib/Makefile | |
| download | open-iov-2302fc09080bad51c73f293294e19fd4db464eb0.tar.gz open-iov-2302fc09080bad51c73f293294e19fd4db464eb0.zip | |
Open-IOV: initial public release
Open-IOV virtualizes NVIDIA GPUs so that unmodified guest drivers run with
real GPU functionality - CUDA first, 3D and video to follow - on unmodified
hosts, without a proprietary vGPU license and without patching any driver,
firmware or hypervisor.
Core principle: emulate the interface, pass through the work.
kernel/ open-iov-vfio.ko - host VFIO mdev driver: virtual GPU device
(PCI config space, BAR shadows, MSI-X), GSP boot emulation,
GSP-RM message-queue/RPC emulation, memory model (GPU-VA to
guest-PA discovery) and the semaphore-completion service that
advances guest UVM progress.
userspace/ libiov.so management API and examples.
tools/ guest diagnostics, firmware analysis wrappers, RM probes.
scripts/ stack manager, VM harness, build/load/test automation.
config/ hardware/version profiles (the portability surface).
docs/ documentation tree - start at docs/README.md.
wiki/ long-form firmware and protocol deep dives.
Status: initialization works end to end for a stock 570.144 Linux guest on
Turing (TU104): driver probe, nvidia-smi, the full GSP-RM control battery,
object creation and the early CUDA/UVM start-up path. GPU work forwarding -
the step that makes CUDA kernels execute on real hardware - is the active
work item; see docs/04-implementation/01-known-knowns-and-unknowns.md.
License: BSD-3-Clause for the project; GPL-2.0 for kernel modules that link
GPL-only kernel interfaces. See LICENSE and docs/09-reference/legal-and-licensing.md.
Diffstat (limited to 'userspace/lib/Makefile')
| -rw-r--r-- | userspace/lib/Makefile | 89 |
1 files changed, 89 insertions, 0 deletions
diff --git a/userspace/lib/Makefile b/userspace/lib/Makefile new file mode 100644 index 0000000..05bb05b --- /dev/null +++ b/userspace/lib/Makefile @@ -0,0 +1,89 @@ +# libiov - Userspace library for Open-IOV vGPU +# Makefile + +PREFIX ?= /usr/local +LIBDIR ?= $(PREFIX)/lib +INCLUDEDIR ?= $(PREFIX)/include +PKGCONFIGDIR ?= $(LIBDIR)/pkgconfig + +CC ?= gcc +CFLAGS ?= -O2 -g -Wall -Wextra -fPIC -I../include +LDFLAGS ?= -shared + +LIB_NAME = libiov.so +LIB_MAJOR = 1 +LIB_MINOR = 0 +LIB_PATCH = 0 +LIB_VERSION = $(LIB_MAJOR).$(LIB_MINOR).$(LIB_PATCH) +LIB_SONAME = $(LIB_NAME).$(LIB_MAJOR) + +# Compatibility symlinks for libvgpu +COMPAT_NAMES = libvgpu.so libvgpu.so.1 libvgpu.so.1.0.0 + +SRC_DIR = . +OBJ_DIR = obj +SRC = $(SRC_DIR)/libvgpu.c $(SRC_DIR)/rpc_emulator.c +OBJ = $(OBJ_DIR)/libvgpu.o $(OBJ_DIR)/rpc_emulator.o + +HEADERS = ../include/libvgpu.h rpc_emulator.h + +all: $(OBJ_DIR) $(LIB_NAME) compat-links + +$(OBJ_DIR): + mkdir -p $(OBJ_DIR) + +$(OBJ_DIR)/%.o: $(SRC_DIR)/%.c $(HEADERS) + $(CC) $(CFLAGS) -c $< -o $@ + +$(LIB_NAME): $(OBJ) + $(CC) $(LDFLAGS) -Wl,-soname,$(LIB_SONAME) -o $@ $^ + ln -sf $(LIB_NAME) $(LIB_SONAME) + ln -sf $(LIB_NAME) $(LIB_NAME).$(LIB_VERSION) + +# Create compatibility symlinks for libvgpu +compat-links: $(LIB_NAME) + @for link in $(COMPAT_NAMES); do \ + ln -sf $(LIB_NAME) $$link; \ + done + +install: all + install -d $(DESTDIR)$(LIBDIR) + install -d $(DESTDIR)$(INCLUDEDIR) + install -d $(DESTDIR)$(PKGCONFIGDIR) + install -m 755 $(LIB_NAME) $(DESTDIR)$(LIBDIR)/$(LIB_NAME).$(LIB_VERSION) + ln -sf $(LIB_NAME).$(LIB_VERSION) $(DESTDIR)$(LIBDIR)/$(LIB_SONAME) + ln -sf $(LIB_NAME).$(LIB_VERSION) $(DESTDIR)$(LIBDIR)/$(LIB_NAME) + # Install compatibility symlinks + @for link in $(COMPAT_NAMES); do \ + ln -sf $(LIB_NAME).$(LIB_VERSION) $(DESTDIR)$(LIBDIR)/$$link; \ + done + install -m 644 $(HEADERS) $(DESTDIR)$(INCLUDEDIR)/ + sed -e "s|@PREFIX@|$(PREFIX)|g" \ + -e "s|@LIBDIR@|$(LIBDIR)|g" \ + -e "s|@INCLUDEDIR@|$(INCLUDEDIR)|g" \ + -e "s|@VERSION@|$(LIB_VERSION)|g" \ + libvgpu.pc.in > $(DESTDIR)$(PKGCONFIGDIR)/libvgpu.pc + # Also create libiov.pc + sed -e "s|@PREFIX@|$(PREFIX)|g" \ + -e "s|@LIBDIR@|$(LIBDIR)|g" \ + -e "s|@INCLUDEDIR@|$(INCLUDEDIR)|g" \ + -e "s|@VERSION@|$(LIB_VERSION)|g" \ + -e "s|libvgpu|libiov|g" \ + libvgpu.pc.in > $(DESTDIR)$(PKGCONFIGDIR)/libiov.pc + +uninstall: + rm -f $(DESTDIR)$(LIBDIR)/$(LIB_NAME) + rm -f $(DESTDIR)$(LIBDIR)/$(LIB_SONAME) + rm -f $(DESTDIR)$(LIBDIR)/$(LIB_NAME).$(LIB_VERSION) + @for link in $(COMPAT_NAMES); do \ + rm -f $(DESTDIR)$(LIBDIR)/$$link; \ + done + rm -f $(DESTDIR)$(INCLUDEDIR)/libvgpu.h + rm -f $(DESTDIR)$(INCLUDEDIR)/rpc_emulator.h + rm -f $(DESTDIR)$(PKGCONFIGDIR)/libvgpu.pc + rm -f $(DESTDIR)$(PKGCONFIGDIR)/libiov.pc + +clean: + rm -rf $(OBJ_DIR) $(LIB_NAME) $(LIB_SONAME) $(LIB_NAME).$(LIB_VERSION) $(COMPAT_NAMES) + +.PHONY: all install uninstall clean compat-links
\ No newline at end of file |
