summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Cooper <andrew.cooper3@citrix.com>2021-01-12 18:37:53 +0000
committerAndrew Cooper <andrew.cooper3@citrix.com>2021-01-13 19:30:50 +0000
commit2de267435687b9ee73f9a89213d13d647ba01689 (patch)
tree8893512eba3e69bb701559d0c25b174e624f38b9
parentec6c5d39982f230851278a2512e04bad6397f6ce (diff)
tools: Move xen-access from tests/ to misc/
xen-access is a tool for a human to use, rather than a test. Move it into misc/ as a more appropriate location to live. Move the -DXC_WANT_COMPAT_DEVICEMODEL_API from CFLAGS into xen-access.c itself to avoid adding Makefile complexity. Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com> Acked-by: Ian Jackson <ian.jackson@eu.citrix.com> Acked-by: Tamas K Lengyel <tamas@tklengyel.com>
-rw-r--r--.gitignore1
-rw-r--r--MAINTAINERS2
-rw-r--r--tools/misc/.gitignore1
-rw-r--r--tools/misc/Makefile4
-rw-r--r--tools/misc/xen-access.c (renamed from tools/tests/xen-access/xen-access.c)1
-rw-r--r--tools/tests/Makefile1
-rw-r--r--tools/tests/xen-access/Makefile33
7 files changed, 7 insertions, 36 deletions
diff --git a/.gitignore b/.gitignore
index 1b54ea3111..630bdf5b99 100644
--- a/.gitignore
+++ b/.gitignore
@@ -272,7 +272,6 @@ tools/tests/x86_emulator/*sse*.[ch]
tools/tests/x86_emulator/test_x86_emulator
tools/tests/x86_emulator/x86_emulate
tools/tests/x86_emulator/xop*.[ch]
-tools/tests/xen-access/xen-access
tools/tests/xenstore/xs-test
tools/tests/mem-sharing/memshrtool
tools/tests/mce-test/tools/xen-mceinj
diff --git a/MAINTAINERS b/MAINTAINERS
index 6dbd99aff4..5079b834c2 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -486,7 +486,7 @@ M: Tamas K Lengyel <tamas@tklengyel.com>
R: Alexandru Isaila <aisaila@bitdefender.com>
R: Petre Pircalabu <ppircalabu@bitdefender.com>
S: Supported
-F: tools/tests/xen-access
+F: tools/misc/xen-access.c
F: xen/arch/*/monitor.c
F: xen/arch/*/vm_event.c
F: xen/arch/arm/mem_access.c
diff --git a/tools/misc/.gitignore b/tools/misc/.gitignore
index c5fe2cfccd..e332ed4ec7 100644
--- a/tools/misc/.gitignore
+++ b/tools/misc/.gitignore
@@ -1 +1,2 @@
+xen-access
xen-ucode
diff --git a/tools/misc/Makefile b/tools/misc/Makefile
index 7d37f297a9..612b7002e5 100644
--- a/tools/misc/Makefile
+++ b/tools/misc/Makefile
@@ -30,6 +30,7 @@ INSTALL_SBIN += xenlockprof
INSTALL_SBIN += xenperf
INSTALL_SBIN += xenpm
INSTALL_SBIN += xenwatchdogd
+INSTALL_SBIN += xen-access
INSTALL_SBIN += xen-livepatch
INSTALL_SBIN += xen-diag
INSTALL_SBIN += $(INSTALL_SBIN-y)
@@ -73,6 +74,9 @@ clean:
.PHONY: distclean
distclean: clean
+xen-access: xen-access.o
+ $(CC) $(LDFLAGS) -o $@ $< $(LDLIBS_libxenctrl) $(LDLIBS_libxenguest) $(LDLIBS_libxenevtchn) $(APPEND_LDFLAGS)
+
xen-cpuid: xen-cpuid.o
$(CC) $(LDFLAGS) -o $@ $< $(LDLIBS_libxenctrl) $(LDLIBS_libxenguest) $(APPEND_LDFLAGS)
diff --git a/tools/tests/xen-access/xen-access.c b/tools/misc/xen-access.c
index 1ab4f6705f..4bbef0bd2e 100644
--- a/tools/tests/xen-access/xen-access.c
+++ b/tools/misc/xen-access.c
@@ -38,6 +38,7 @@
#include <sys/mman.h>
#include <poll.h>
+#define XC_WANT_COMPAT_DEVICEMODEL_API
#include <xenctrl.h>
#include <xenevtchn.h>
#include <xen/vm_event.h>
diff --git a/tools/tests/Makefile b/tools/tests/Makefile
index 9077fa14d3..771715be0f 100644
--- a/tools/tests/Makefile
+++ b/tools/tests/Makefile
@@ -8,7 +8,6 @@ SUBDIRS-y += mem-sharing
ifneq ($(clang),y)
SUBDIRS-$(CONFIG_X86) += x86_emulator
endif
-SUBDIRS-y += xen-access
SUBDIRS-y += xenstore
SUBDIRS-y += depriv
SUBDIRS-$(CONFIG_HAS_PCI) += vpci
diff --git a/tools/tests/xen-access/Makefile b/tools/tests/xen-access/Makefile
deleted file mode 100644
index 131c9f375d..0000000000
--- a/tools/tests/xen-access/Makefile
+++ /dev/null
@@ -1,33 +0,0 @@
-XEN_ROOT=$(CURDIR)/../../..
-include $(XEN_ROOT)/tools/Rules.mk
-
-CFLAGS += -Werror
-CFLAGS += -DXC_WANT_COMPAT_DEVICEMODEL_API
-
-CFLAGS += $(CFLAGS_libxenctrl)
-CFLAGS += $(CFLAGS_libxenguest)
-CFLAGS += $(CFLAGS_libxenevtchn)
-CFLAGS += $(CFLAGS_xeninclude)
-
-TARGETS-y := xen-access
-TARGETS := $(TARGETS-y)
-
-.PHONY: all
-all: build
-
-.PHONY: build
-build: $(TARGETS)
-
-.PHONY: clean
-clean:
- $(RM) *.o $(TARGETS) *~ $(DEPS_RM)
-
-.PHONY: distclean
-distclean: clean
-
-xen-access: xen-access.o Makefile
- $(CC) -o $@ $< $(LDFLAGS) $(LDLIBS_libxenctrl) $(LDLIBS_libxenguest) $(LDLIBS_libxenevtchn)
-
-install uninstall:
-
--include $(DEPS_INCLUDE)