Skip to content

Commit

Permalink
tools: hv: Add new fcopy application based on uio driver
Browse files Browse the repository at this point in the history
New fcopy application using uio_hv_generic driver. This application
copies file from Hyper-V host to guest VM.

A big part of this code is copied from tools/hv/hv_fcopy_daemon.c
which this new application is replacing.

Signed-off-by: Saurabh Sengar <[email protected]>
Reviewed-by: Long Li <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Greg Kroah-Hartman <[email protected]>
  • Loading branch information
Saurabh Sengar authored and gregkh committed Apr 11, 2024
1 parent 45bab4d commit 82b0945
Show file tree
Hide file tree
Showing 3 changed files with 501 additions and 6 deletions.
3 changes: 2 additions & 1 deletion tools/hv/Build
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
hv_kvp_daemon-y += hv_kvp_daemon.o
hv_vss_daemon-y += hv_vss_daemon.o
hv_fcopy_daemon-y += hv_fcopy_daemon.o
hv_fcopy_uio_daemon-y += hv_fcopy_uio_daemon.o
hv_fcopy_uio_daemon-y += vmbus_bufring.o
14 changes: 9 additions & 5 deletions tools/hv/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
# Makefile for Hyper-V tools
include ../scripts/Makefile.include

ARCH := $(shell uname -m 2>/dev/null)
sbindir ?= /usr/sbin
libexecdir ?= /usr/libexec
sharedstatedir ?= /var/lib
Expand All @@ -17,7 +18,10 @@ MAKEFLAGS += -r

override CFLAGS += -O2 -Wall -g -D_GNU_SOURCE -I$(OUTPUT)include

ALL_TARGETS := hv_kvp_daemon hv_vss_daemon hv_fcopy_daemon
ALL_TARGETS := hv_kvp_daemon hv_vss_daemon
ifneq ($(ARCH), aarch64)
ALL_TARGETS += hv_fcopy_uio_daemon
endif
ALL_PROGRAMS := $(patsubst %,$(OUTPUT)%,$(ALL_TARGETS))

ALL_SCRIPTS := hv_get_dhcp_info.sh hv_get_dns_info.sh hv_set_ifconfig.sh
Expand All @@ -39,10 +43,10 @@ $(HV_VSS_DAEMON_IN): FORCE
$(OUTPUT)hv_vss_daemon: $(HV_VSS_DAEMON_IN)
$(QUIET_LINK)$(CC) $(CFLAGS) $(LDFLAGS) $< -o $@

HV_FCOPY_DAEMON_IN := $(OUTPUT)hv_fcopy_daemon-in.o
$(HV_FCOPY_DAEMON_IN): FORCE
$(Q)$(MAKE) $(build)=hv_fcopy_daemon
$(OUTPUT)hv_fcopy_daemon: $(HV_FCOPY_DAEMON_IN)
HV_FCOPY_UIO_DAEMON_IN := $(OUTPUT)hv_fcopy_uio_daemon-in.o
$(HV_FCOPY_UIO_DAEMON_IN): FORCE
$(Q)$(MAKE) $(build)=hv_fcopy_uio_daemon
$(OUTPUT)hv_fcopy_uio_daemon: $(HV_FCOPY_UIO_DAEMON_IN)
$(QUIET_LINK)$(CC) $(CFLAGS) $(LDFLAGS) $< -o $@

clean:
Expand Down
Loading

0 comments on commit 82b0945

Please sign in to comment.