From nobody Sun May 5 08:17:05 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org ARC-Seal: i=1; a=rsa-sha256; t=1597657792; cv=none; d=zohomail.com; s=zohoarc; b=Qhi8oPrgfGGkAmppSkzXPwnFPU2enaOl9P5YQGIH6q29oXXaloEcIFPWyXX5CP3YUWPd1zHBwBbk/VyZxZdWpu2ySYyvJHxKtPEXSjeJEthtNBvowotGLdSz3WOLgl+B15e2xUKwU6/cRKKILvNJDaRs9qtJ9embkhmi1ekjmTA= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1597657792; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=Wvl5/bPkjM3EboqyFVm4JV/qe0Y8yoGzacIhHN0SbC4=; b=GDtpdwxTO4Erufd8xRn+07ZokJnblY/mq4ynjDWtFSbQZyhz3DeKIPdpVMax93YsdvODKUo8MNqv0F6KoQ4COu41fFiPVsfc/VJFPvY4xMc7oHTbcSz0cFDnlnvzXSTtmXaHJVFMApgj9LheGeCzvU+7S355yDP0R3wG1wqWOyA= ARC-Authentication-Results: i=1; mx.zohomail.com; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1597657792045263.9284892182277; Mon, 17 Aug 2020 02:49:52 -0700 (PDT) Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1k7bln-00049E-P5; Mon, 17 Aug 2020 09:49:35 +0000 Received: from all-amaz-eas1.inumbo.com ([34.197.232.57] helo=us1-amaz-eas2.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1k7bln-00046Z-Ag for xen-devel@lists.xenproject.org; Mon, 17 Aug 2020 09:49:35 +0000 Received: from mx2.suse.de (unknown [195.135.220.15]) by us1-amaz-eas2.inumbo.com (Halon) with ESMTPS id 139dff61-47d5-4f91-a80b-415f49bd0e3a; Mon, 17 Aug 2020 09:49:26 +0000 (UTC) Received: from relay2.suse.de (unknown [195.135.221.27]) by mx2.suse.de (Postfix) with ESMTP id 38F71AD77; Mon, 17 Aug 2020 09:49:50 +0000 (UTC) X-Inumbo-ID: 139dff61-47d5-4f91-a80b-415f49bd0e3a X-Virus-Scanned: by amavisd-new at test-mx.suse.de From: Juergen Gross To: xen-devel@lists.xenproject.org Cc: Juergen Gross , Ian Jackson , Wei Liu , Samuel Thibault Subject: [PATCH II v2 01/17] stubdom: add correct dependencies for Xen libraries Date: Mon, 17 Aug 2020 11:49:06 +0200 Message-Id: <20200817094922.15768-2-jgross@suse.com> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20200817094922.15768-1-jgross@suse.com> References: <20200817094922.15768-1-jgross@suse.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-BeenThere: xen-devel@lists.xenproject.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Sender: "Xen-devel" Content-Type: text/plain; charset="utf-8" The stubdom Makefile is missing several dependencies between Xen libraries. Add them. Signed-off-by: Juergen Gross --- stubdom/Makefile | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/stubdom/Makefile b/stubdom/Makefile index af8cde41b9..6fcecadeb9 100644 --- a/stubdom/Makefile +++ b/stubdom/Makefile @@ -405,6 +405,7 @@ libs-$(XEN_TARGET_ARCH)/toollog/libxentoollog.a: mk-hea= ders-$(XEN_TARGET_ARCH) $ =20 .PHONY: libxenevtchn libxenevtchn: libs-$(XEN_TARGET_ARCH)/evtchn/libxenevtchn.a +libs-$(XEN_TARGET_ARCH)/evtchn/libxenevtchn.a: libxentoolcore libs-$(XEN_TARGET_ARCH)/evtchn/libxenevtchn.a: mk-headers-$(XEN_TARGET_ARC= H) $(NEWLIB_STAMPFILE) CPPFLAGS=3D"$(TARGET_CPPFLAGS)" CFLAGS=3D"$(TARGET_CFLAGS)" $(MAKE) DESTD= IR=3D -C libs-$(XEN_TARGET_ARCH)/evtchn =20 @@ -414,6 +415,7 @@ libs-$(XEN_TARGET_ARCH)/evtchn/libxenevtchn.a: mk-heade= rs-$(XEN_TARGET_ARCH) $(N =20 .PHONY: libxengnttab libxengnttab: libs-$(XEN_TARGET_ARCH)/gnttab/libxengnttab.a +libs-$(XEN_TARGET_ARCH)/gnttab/libxengnttab.a: libxentoolcore libxentoollog libs-$(XEN_TARGET_ARCH)/gnttab/libxengnttab.a: mk-headers-$(XEN_TARGET_ARC= H) $(NEWLIB_STAMPFILE) CPPFLAGS=3D"$(TARGET_CPPFLAGS)" CFLAGS=3D"$(TARGET_CFLAGS)" $(MAKE) DESTD= IR=3D -C libs-$(XEN_TARGET_ARCH)/gnttab =20 @@ -423,6 +425,7 @@ libs-$(XEN_TARGET_ARCH)/gnttab/libxengnttab.a: mk-heade= rs-$(XEN_TARGET_ARCH) $(N =20 .PHONY: libxencall libxencall: libs-$(XEN_TARGET_ARCH)/call/libxencall.a +libs-$(XEN_TARGET_ARCH)/call/libxencall.a: libxentoolcore libs-$(XEN_TARGET_ARCH)/call/libxencall.a: mk-headers-$(XEN_TARGET_ARCH) $= (NEWLIB_STAMPFILE) CPPFLAGS=3D"$(TARGET_CPPFLAGS)" CFLAGS=3D"$(TARGET_CFLAGS)" $(MAKE) DESTD= IR=3D -C libs-$(XEN_TARGET_ARCH)/call =20 @@ -432,6 +435,7 @@ libs-$(XEN_TARGET_ARCH)/call/libxencall.a: mk-headers-$= (XEN_TARGET_ARCH) $(NEWLI =20 .PHONY: libxenforeignmemory libxenforeignmemory: libs-$(XEN_TARGET_ARCH)/foreignmemory/libxenforeignme= mory.a +libs-$(XEN_TARGET_ARCH)/foreignmemory/libxenforeignmemory.a: libxentoolcore libs-$(XEN_TARGET_ARCH)/foreignmemory/libxenforeignmemory.a: mk-headers-$(= XEN_TARGET_ARCH) $(NEWLIB_STAMPFILE) CPPFLAGS=3D"$(TARGET_CPPFLAGS)" CFLAGS=3D"$(TARGET_CFLAGS)" $(MAKE) DESTD= IR=3D -C libs-$(XEN_TARGET_ARCH)/foreignmemory =20 @@ -441,6 +445,7 @@ libs-$(XEN_TARGET_ARCH)/foreignmemory/libxenforeignmemo= ry.a: mk-headers-$(XEN_TA =20 .PHONY: libxendevicemodel libxendevicemodel: libs-$(XEN_TARGET_ARCH)/devicemodel/libxendevicemodel.a +libs-$(XEN_TARGET_ARCH)/devicemodel/libxendevicemodel.a: libxentoolcore li= bxentoollog libxencall libs-$(XEN_TARGET_ARCH)/devicemodel/libxendevicemodel.a: mk-headers-$(XEN_= TARGET_ARCH) $(NEWLIB_STAMPFILE) CPPFLAGS=3D"$(TARGET_CPPFLAGS)" CFLAGS=3D"$(TARGET_CFLAGS)" $(MAKE) DESTD= IR=3D -C libs-$(XEN_TARGET_ARCH)/devicemodel =20 --=20 2.26.2 From nobody Sun May 5 08:17:05 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org ARC-Seal: i=1; a=rsa-sha256; t=1597657786; cv=none; d=zohomail.com; s=zohoarc; b=jGMKBL+y2I79s+n+BK1j7+40DIiaKQWvX7ZKr589zYYFoYdYCHivYVtU3zoDd7wemeobhqCfQNOAbOro7J/QVUKC+pwaJ6/wDPpDDcmoP89qM2DL7LTtl59Z7z6Mw/0qnf94Pq51FaepugdJ1E17qX59/1aUemWJHKsQNQ1v3QA= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1597657786; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=/GkKirk9KO8j55281BuLxYs3h3ulbuqiR6Xjl8zN0/g=; b=WcN38O+BkSJQt/OqUMTBt/kJXyLLKIIbk1oazfevD4DffkMrxoTyAcCV0OgGLOJGbyfLZUooP+xnaAu8GnwRCgaghd6quPrmTIT5ZhCAGq8YOlfGPi5Qi1HVB1WWjrA/sAqm76Uzk5LZybtdZWziUpvXTyGmRuldbozslO4tfPI= ARC-Authentication-Results: i=1; mx.zohomail.com; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1597657786084766.897383072629; Mon, 17 Aug 2020 02:49:46 -0700 (PDT) Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1k7blf-00046q-VY; Mon, 17 Aug 2020 09:49:27 +0000 Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1k7blf-00046j-17 for xen-devel@lists.xenproject.org; Mon, 17 Aug 2020 09:49:27 +0000 Received: from mx2.suse.de (unknown [195.135.220.15]) by us1-rack-iad1.inumbo.com (Halon) with ESMTPS id fcf56dec-4d10-4b5e-977a-bf1aebd524a4; Mon, 17 Aug 2020 09:49:26 +0000 (UTC) Received: from relay2.suse.de (unknown [195.135.221.27]) by mx2.suse.de (Postfix) with ESMTP id 5794CAD33; Mon, 17 Aug 2020 09:49:50 +0000 (UTC) X-Inumbo-ID: fcf56dec-4d10-4b5e-977a-bf1aebd524a4 X-Virus-Scanned: by amavisd-new at test-mx.suse.de From: Juergen Gross To: xen-devel@lists.xenproject.org Cc: Juergen Gross , Ian Jackson , Wei Liu Subject: [PATCH II v2 02/17] tools: drop explicit path specifications for qemu build Date: Mon, 17 Aug 2020 11:49:07 +0200 Message-Id: <20200817094922.15768-3-jgross@suse.com> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20200817094922.15768-1-jgross@suse.com> References: <20200817094922.15768-1-jgross@suse.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-BeenThere: xen-devel@lists.xenproject.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Sender: "Xen-devel" Content-Type: text/plain; charset="utf-8" Since more than three years now qemu is capable to set the needed include and library paths for the Xen libraries via pkg-config. So drop the specification of those paths in tools/Makefile. This will enable to move libxenctrl away from tools/libxc, as qemu's configure script has special treatment of this path. Signed-off-by: Juergen Gross --- tools/Makefile | 26 +------------------------- 1 file changed, 1 insertion(+), 25 deletions(-) diff --git a/tools/Makefile b/tools/Makefile index 198b239edc..7c9f9fc900 100644 --- a/tools/Makefile +++ b/tools/Makefile @@ -245,32 +245,8 @@ subdir-all-qemu-xen-dir: qemu-xen-dir-find -DXC_WANT_COMPAT_GNTTAB_API=3D1 \ -DXC_WANT_COMPAT_MAP_FOREIGN_API=3D1 \ -DXC_WANT_COMPAT_DEVICEMODEL_API=3D1 \ - -I$(XEN_ROOT)/tools/include \ - -I$(XEN_ROOT)/tools/libs/toolcore/include \ - -I$(XEN_ROOT)/tools/libs/toollog/include \ - -I$(XEN_ROOT)/tools/libs/evtchn/include \ - -I$(XEN_ROOT)/tools/libs/gnttab/include \ - -I$(XEN_ROOT)/tools/libs/foreignmemory/include \ - -I$(XEN_ROOT)/tools/libs/devicemodel/include \ - -I$(XEN_ROOT)/tools/libxc/include \ - -I$(XEN_ROOT)/tools/xenstore/include \ - -I$(XEN_ROOT)/tools/xenstore/compat/include \ $(EXTRA_CFLAGS_QEMU_XEN)" \ - --extra-ldflags=3D"-L$(XEN_ROOT)/tools/libxc \ - -L$(XEN_ROOT)/tools/xenstore \ - -L$(XEN_ROOT)/tools/libs/toolcore \ - -L$(XEN_ROOT)/tools/libs/evtchn \ - -L$(XEN_ROOT)/tools/libs/gnttab \ - -L$(XEN_ROOT)/tools/libs/foreignmemory \ - -L$(XEN_ROOT)/tools/libs/devicemodel \ - -Wl,-rpath-link=3D$(XEN_ROOT)/tools/libs/toolcore \ - -Wl,-rpath-link=3D$(XEN_ROOT)/tools/libs/toollog \ - -Wl,-rpath-link=3D$(XEN_ROOT)/tools/libs/evtchn \ - -Wl,-rpath-link=3D$(XEN_ROOT)/tools/libs/gnttab \ - -Wl,-rpath-link=3D$(XEN_ROOT)/tools/libs/call \ - -Wl,-rpath-link=3D$(XEN_ROOT)/tools/libs/foreignmemory \ - -Wl,-rpath-link=3D$(XEN_ROOT)/tools/libs/devicemodel \ - $(QEMU_UPSTREAM_RPATH)" \ + --extra-ldflags=3D"$(QEMU_UPSTREAM_RPATH)" \ --bindir=3D$(LIBEXEC_BIN) \ --datadir=3D$(SHAREDIR)/qemu-xen \ --localstatedir=3D$(localstatedir) \ --=20 2.26.2 From nobody Sun May 5 08:17:05 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org ARC-Seal: i=1; a=rsa-sha256; t=1597657792; cv=none; d=zohomail.com; s=zohoarc; b=PIKcafQwuXcGtT5pegk1MRif31g7z14ZzyeWrOeVKD/LR/111i0zoXKpEy0bB08nan6SOFStXcWaS09KSal5YtcrizKgPSRwa8OysfsZ4itr9vOVyt4UDYGz6zNEBtoICFh+taQOuISJZ/BoZ+csgi+VxwTMA2eQ8comA9eKqXE= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1597657792; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=K16RvEXO8PITvDHUN1su+E/U6V0jwv2bXbZ6mPJMC0U=; b=GG9jjSsh2YoYX+zp1iT4cg1oWN6UbdRVgrNOjx7H8vQzXc3U0LRJ950pdkVYza/Kv6sEHV/x4dGAt92J/pXX6h7Eyj4nCC6J2IVC+Pp8un1xkiE+gl5De1A8rRmDnl6734/SJjjNaWVdUvdS4eFHNAOl76YP4ftsarScDwF6MxU= ARC-Authentication-Results: i=1; mx.zohomail.com; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1597657792349137.5116965633133; Mon, 17 Aug 2020 02:49:52 -0700 (PDT) Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1k7blj-00047K-7N; Mon, 17 Aug 2020 09:49:31 +0000 Received: from all-amaz-eas1.inumbo.com ([34.197.232.57] helo=us1-amaz-eas2.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1k7bli-00046Z-Aq for xen-devel@lists.xenproject.org; Mon, 17 Aug 2020 09:49:30 +0000 Received: from mx2.suse.de (unknown [195.135.220.15]) by us1-amaz-eas2.inumbo.com (Halon) with ESMTPS id 429207ea-7ee0-4f56-8c83-37559f9c4f86; Mon, 17 Aug 2020 09:49:26 +0000 (UTC) Received: from relay2.suse.de (unknown [195.135.221.27]) by mx2.suse.de (Postfix) with ESMTP id 7B22DAE3A; Mon, 17 Aug 2020 09:49:50 +0000 (UTC) X-Inumbo-ID: 429207ea-7ee0-4f56-8c83-37559f9c4f86 X-Virus-Scanned: by amavisd-new at test-mx.suse.de From: Juergen Gross To: xen-devel@lists.xenproject.org Cc: Juergen Gross , Ian Jackson , Wei Liu Subject: [PATCH II v2 03/17] tools: tweak tools/libs/libs.mk for being able to support libxenctrl Date: Mon, 17 Aug 2020 11:49:08 +0200 Message-Id: <20200817094922.15768-4-jgross@suse.com> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20200817094922.15768-1-jgross@suse.com> References: <20200817094922.15768-1-jgross@suse.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-BeenThere: xen-devel@lists.xenproject.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Sender: "Xen-devel" Content-Type: text/plain; charset="utf-8" tools/libs/libs.mk needs to be modified for being able to support building libxenctrl, as the pkg-config file of that library is not following the same conventions as those of the other libraries. So add support for specifying PKG_CONFIG before including libs.mk. In order to make life easier for unstable libraries like libxenctrl set MAJOR and MINOR automatically to the Xen-version and 0 when not specified. This removes the need to bump the versions of unstable libraries when switching to a new Xen version. As all libraries built via libs.mk require a map file generate a dummy one in case there is none existing. This again will help avoiding the need to bump the libarary version in the map file of an unstable library in case it is exporting all symbols. The clean target is missing the removal of _paths.h. Finally drop the foreach loop when setting PKG_CONFIG_LOCAL, as there is always only one element in PKG_CONFIG. Signed-off-by: Juergen Gross --- tools/libs/libs.mk | 21 ++++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-) diff --git a/tools/libs/libs.mk b/tools/libs/libs.mk index 19efc5e743..8b1ca2aa62 100644 --- a/tools/libs/libs.mk +++ b/tools/libs/libs.mk @@ -1,10 +1,13 @@ # Common Makefile for building a lib. # # Variables taken as input: -# MAJOR: major version of lib -# MINOR: minor version of lib +# PKG_CONFIG: name of pkg-config file (xen$(LIBNAME).pc if empty) +# MAJOR: major version of lib (Xen version if empty) +# MINOR: minor version of lib (0 if empty) =20 LIBNAME :=3D $(notdir $(CURDIR)) +MAJOR ?=3D $(shell $(XEN_ROOT)/version.sh $(XEN_ROOT)/xen/Makefile) +MINOR ?=3D 0 =20 SHLIB_LDFLAGS +=3D -Wl,--version-script=3Dlibxen$(LIBNAME).map =20 @@ -22,7 +25,7 @@ ifneq ($(nosharedlibs),y) LIB +=3D libxen$(LIBNAME).so endif =20 -PKG_CONFIG :=3D xen$(LIBNAME).pc +PKG_CONFIG ?=3D xen$(LIBNAME).pc PKG_CONFIG_VERSION :=3D $(MAJOR).$(MINOR) =20 ifneq ($(CONFIG_LIBXC_MINIOS),y) @@ -32,7 +35,7 @@ $(PKG_CONFIG_INST): PKG_CONFIG_INCDIR =3D $(includedir) $(PKG_CONFIG_INST): PKG_CONFIG_LIBDIR =3D $(libdir) endif =20 -PKG_CONFIG_LOCAL :=3D $(foreach pc,$(PKG_CONFIG),$(PKG_CONFIG_DIR)/$(pc)) +PKG_CONFIG_LOCAL :=3D $(PKG_CONFIG_DIR)/$(PKG_CONFIG) =20 LIBHEADER ?=3D xen$(LIBNAME).h LIBHEADERS =3D $(foreach h, $(LIBHEADER), include/$(h)) @@ -45,7 +48,7 @@ $(PKG_CONFIG_LOCAL): PKG_CONFIG_LIBDIR =3D $(CURDIR) all: build =20 .PHONY: build -build: libs +build: libs libxen$(LIBNAME).map =20 .PHONY: libs libs: headers.chk $(LIB) $(PKG_CONFIG_INST) $(PKG_CONFIG_LOCAL) @@ -64,6 +67,9 @@ endif =20 headers.chk: $(LIBHEADERSGLOB) $(AUTOINCS) =20 +libxen$(LIBNAME).map: + echo 'VERS_$(MAJOR).$(MINOR) { global: *; };' >$@ + $(LIBHEADERSGLOB): $(LIBHEADERS) for i in $(realpath $(LIBHEADERS)); do ln -sf $$i $(XEN_ROOT)/tools/inclu= de; done =20 @@ -87,7 +93,7 @@ install: build $(SYMLINK_SHLIB) libxen$(LIBNAME).so.$(MAJOR).$(MINOR) $(DESTDIR)$(libdir= )/libxen$(LIBNAME).so.$(MAJOR) $(SYMLINK_SHLIB) libxen$(LIBNAME).so.$(MAJOR) $(DESTDIR)$(libdir)/libxen$= (LIBNAME).so for i in $(LIBHEADERS); do $(INSTALL_DATA) $$i $(DESTDIR)$(includedir); d= one - $(INSTALL_DATA) xen$(LIBNAME).pc $(DESTDIR)$(PKG_INSTALLDIR) + $(INSTALL_DATA) $(PKG_CONFIG) $(DESTDIR)$(PKG_INSTALLDIR) =20 .PHONY: uninstall uninstall: @@ -107,8 +113,9 @@ clean: rm -rf *.rpm $(LIB) *~ $(DEPS_RM) $(LIB_OBJS) $(PIC_OBJS) rm -f libxen$(LIBNAME).so.$(MAJOR).$(MINOR) libxen$(LIBNAME).so.$(MAJOR) rm -f headers.chk - rm -f xen$(LIBNAME).pc + rm -f $(PKG_CONFIG) rm -f $(LIBHEADERSGLOB) + rm -f _paths.h =20 .PHONY: distclean distclean: clean --=20 2.26.2 From nobody Sun May 5 08:17:05 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org ARC-Seal: i=1; a=rsa-sha256; t=1597657790; cv=none; d=zohomail.com; s=zohoarc; b=Z725IPJyhIFC3esm+NeGsKgKnKF6iq2Cx8thFiS/1trPYVr2Jnyh0RQ7jdktQiAw3vpQxvWBvPd/0ClYNmpBw/EgxLMB3IMDqSFFZ9CRr/JGDYzHuBVYWxqsFOyZYOQlzgg1XnmI83LmjqpGRYRucp28akfCLgZm+0Yfvi94/ms= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1597657790; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=8AsBksVRSUwvfcRzWOPbrMwet+B9dBCIEglygjd6vG0=; b=ggXqGy01fv4/aX9Z+07uiexrHtNySzSso+hrUYVFRePdr7EhDpCouMiwIyQNVi7MyjteWq3ZYcF3lpn5UM0YIwqiFQJMPr8cdR0tf90krgk285m/BK9DTpiLZG24z4VbDF8VheeA+82/05+CDsSF2e12U/5NleJYego3lt2MENE= ARC-Authentication-Results: i=1; mx.zohomail.com; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1597657790754564.4578092983975; Mon, 17 Aug 2020 02:49:50 -0700 (PDT) Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1k7bll-00048D-Gg; Mon, 17 Aug 2020 09:49:33 +0000 Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1k7blj-00046j-WD for xen-devel@lists.xenproject.org; Mon, 17 Aug 2020 09:49:32 +0000 Received: from mx2.suse.de (unknown [195.135.220.15]) by us1-rack-iad1.inumbo.com (Halon) with ESMTPS id 29b05635-06e4-4b40-b5af-d39399d8bad3; Mon, 17 Aug 2020 09:49:26 +0000 (UTC) Received: from relay2.suse.de (unknown [195.135.221.27]) by mx2.suse.de (Postfix) with ESMTP id A44D2AE63; Mon, 17 Aug 2020 09:49:50 +0000 (UTC) X-Inumbo-ID: 29b05635-06e4-4b40-b5af-d39399d8bad3 X-Virus-Scanned: by amavisd-new at test-mx.suse.de From: Juergen Gross To: xen-devel@lists.xenproject.org Cc: Juergen Gross , =?UTF-8?q?Marek=20Marczykowski-G=C3=B3recki?= , Ian Jackson , Wei Liu Subject: [PATCH II v2 04/17] tools/python: drop libxenguest from setup.py Date: Mon, 17 Aug 2020 11:49:09 +0200 Message-Id: <20200817094922.15768-5-jgross@suse.com> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20200817094922.15768-1-jgross@suse.com> References: <20200817094922.15768-1-jgross@suse.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-BeenThere: xen-devel@lists.xenproject.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Sender: "Xen-devel" Content-Type: text/plain; charset="utf-8" There is not a single wrapper for a libxenguest function defined. So drop libxenguest from tools/python/setup.py. Signed-off-by: Juergen Gross --- tools/python/setup.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/python/setup.py b/tools/python/setup.py index 8faf1c0ddc..44696b3998 100644 --- a/tools/python/setup.py +++ b/tools/python/setup.py @@ -21,8 +21,8 @@ xc =3D Extension("xc", PATH_LIBXC + "/include", "xen/lowlevel/xc" ], library_dirs =3D [ PATH_LIBXC ], - libraries =3D [ "xenctrl", "xenguest" ], - depends =3D [ PATH_LIBXC + "/libxenctrl.so", PAT= H_LIBXC + "/libxenguest.so" ], + libraries =3D [ "xenctrl" ], + depends =3D [ PATH_LIBXC + "/libxenctrl.so" ], extra_link_args =3D [ "-Wl,-rpath-link=3D"+PATH_LIBXENTO= OLLOG ], sources =3D [ "xen/lowlevel/xc/xc.c" ]) =20 --=20 2.26.2 From nobody Sun May 5 08:17:05 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org ARC-Seal: i=1; a=rsa-sha256; t=1597657799; cv=none; d=zohomail.com; s=zohoarc; b=bsblMA5OJ8sCoGPsUUwyrTHCr9mH9H1eezIcHsKF8lvxgy9WXpl+ehXgtqKkALE+6EebjXWgoGZaLvA+VRq9Y32Wl0HI775B74IURB/+eZzLtIgwX+BFKtQdg5H9nIH2g+gJ76IzP7ulnIltoThNNG7yI2xwF22U1mErzPDjPSo= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1597657799; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=lDRKxQZe8l/mUv0XEURed8nCd0aOhtaxt2bJ9/M95Xo=; b=QTUeebzCDKoRUWSlhsU0WYcxq94Go3aytlipgqts1Sw06VreORqgQqXajMBYx9lPhHbuu9MR8ndlm8k45Ksasi34BPWXpM94FLFrCZDmfeV09Zj9VmlYrjCiJmoLKerWcptWUqC8cy36CTJFiiVGucTrOMpjGzvPyMnALnsnL9Y= ARC-Authentication-Results: i=1; mx.zohomail.com; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1597657799804881.902014783091; Mon, 17 Aug 2020 02:49:59 -0700 (PDT) Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1k7blt-0004Cs-Hp; Mon, 17 Aug 2020 09:49:41 +0000 Received: from all-amaz-eas1.inumbo.com ([34.197.232.57] helo=us1-amaz-eas2.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1k7bls-00046Z-Ao for xen-devel@lists.xenproject.org; Mon, 17 Aug 2020 09:49:40 +0000 Received: from mx2.suse.de (unknown [195.135.220.15]) by us1-amaz-eas2.inumbo.com (Halon) with ESMTPS id a8a6fc10-f60b-4a0d-8a2b-b05a507178fb; Mon, 17 Aug 2020 09:49:27 +0000 (UTC) Received: from relay2.suse.de (unknown [195.135.221.27]) by mx2.suse.de (Postfix) with ESMTP id D4418AEE8; Mon, 17 Aug 2020 09:49:50 +0000 (UTC) X-Inumbo-ID: a8a6fc10-f60b-4a0d-8a2b-b05a507178fb X-Virus-Scanned: by amavisd-new at test-mx.suse.de From: Juergen Gross To: xen-devel@lists.xenproject.org Cc: Juergen Gross , Ian Jackson , Wei Liu Subject: [PATCH II v2 05/17] tools: fix pkg-config file for libxenguest Date: Mon, 17 Aug 2020 11:49:10 +0200 Message-Id: <20200817094922.15768-6-jgross@suse.com> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20200817094922.15768-1-jgross@suse.com> References: <20200817094922.15768-1-jgross@suse.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-BeenThere: xen-devel@lists.xenproject.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Sender: "Xen-devel" Content-Type: text/plain; charset="utf-8" The pkg-config file for libxenguest is missing the private dependency on libxenctrl. Signed-off-by: Juergen Gross --- tools/libxc/xenguest.pc.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/libxc/xenguest.pc.in b/tools/libxc/xenguest.pc.in index 225ac0b9c8..6b43b67e63 100644 --- a/tools/libxc/xenguest.pc.in +++ b/tools/libxc/xenguest.pc.in @@ -7,4 +7,4 @@ Description: The Xenguest library for Xen hypervisor Version: @@version@@ Cflags: -I${includedir} Libs: @@libsflag@@${libdir} -lxenguest -Requires.private: xentoollog,xencall,xenforeignmemory,xenevtchn +Requires.private: xentoollog,xencall,xenforeignmemory,xenevtchn,xencontrol --=20 2.26.2 From nobody Sun May 5 08:17:05 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org ARC-Seal: i=1; a=rsa-sha256; t=1597657804; cv=none; d=zohomail.com; s=zohoarc; b=HbVjLNdi4/bErKiEzdz9oiQ4jEhWCE2djqlb9skltQvIFydOGJ/f9Cuq3vCyMitI44uH9K8pQU7hNClcoLbkVVEXvdmWuRtOjEsvNnhCw2Gj7LTbxoHEqm8oPe4gyRoil/POQfAP7LBYz4kMsSW93MX/pE5U+eXHdbrbhtCMYMQ= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1597657804; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=8VNvs6o9amnK4h7rqq6bNVDKDnbd6VUDakJbQvGwoV4=; b=IaZ3SR/xwVbT2i1ncFJUMg8KdVwqCGzyVgm5Ee0T4YBz0Ur766dquK6IWVd2Bd58giGdjmE/wlsgtIgwIrmKHdD3QgDbThKj/1c8q4WCGkZpDWUmnhFQFMoLshhV6UrXjPm3+U/ZJGQV7BNWdtf//TtR5Ocd3xIw5zF9c005hE8= ARC-Authentication-Results: i=1; mx.zohomail.com; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1597657804410505.0059493674172; Mon, 17 Aug 2020 02:50:04 -0700 (PDT) Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1k7bly-0004Fq-5X; Mon, 17 Aug 2020 09:49:46 +0000 Received: from all-amaz-eas1.inumbo.com ([34.197.232.57] helo=us1-amaz-eas2.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1k7blx-00046Z-B1 for xen-devel@lists.xenproject.org; Mon, 17 Aug 2020 09:49:45 +0000 Received: from mx2.suse.de (unknown [195.135.220.15]) by us1-amaz-eas2.inumbo.com (Halon) with ESMTPS id a4a209fa-a2ef-49bd-a9a4-5c0979521f78; Mon, 17 Aug 2020 09:49:27 +0000 (UTC) Received: from relay2.suse.de (unknown [195.135.221.27]) by mx2.suse.de (Postfix) with ESMTP id 0C72CAEF6; Mon, 17 Aug 2020 09:49:51 +0000 (UTC) X-Inumbo-ID: a4a209fa-a2ef-49bd-a9a4-5c0979521f78 X-Virus-Scanned: by amavisd-new at test-mx.suse.de From: Juergen Gross To: xen-devel@lists.xenproject.org Cc: Juergen Gross , Ian Jackson , Wei Liu , Anthony PERARD Subject: [PATCH II v2 06/17] tools: don't assume libxenguest and libxenctrl to be in same directory Date: Mon, 17 Aug 2020 11:49:11 +0200 Message-Id: <20200817094922.15768-7-jgross@suse.com> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20200817094922.15768-1-jgross@suse.com> References: <20200817094922.15768-1-jgross@suse.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-BeenThere: xen-devel@lists.xenproject.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Sender: "Xen-devel" Content-Type: text/plain; charset="utf-8" There are quite some places in Makefiles assuming libxenguest and libxenctrl being built in the same directory via a single Makefile. Drop this assumption by specifying the dependencies and path variables for both libraries correctly. Signed-off-by: Juergen Gross --- tools/Rules.mk | 7 +++---- tools/libxl/Makefile | 2 +- tools/misc/Makefile | 1 + 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/tools/Rules.mk b/tools/Rules.mk index b36818bcaa..35d237bba6 100644 --- a/tools/Rules.mk +++ b/tools/Rules.mk @@ -31,8 +31,7 @@ LIBS_LIBS +=3D hypfs USELIBS_hypfs :=3D toollog toolcore call =20 XEN_libxenctrl =3D $(XEN_ROOT)/tools/libxc -# Currently libxenguest lives in the same directory as libxenctrl -XEN_libxenguest =3D $(XEN_libxenctrl) +XEN_libxenguest =3D $(XEN_ROOT)/tools/libxc XEN_libxenlight =3D $(XEN_ROOT)/tools/libxl # Currently libxlutil lives in the same directory as libxenlight XEN_libxlutil =3D $(XEN_libxenlight) @@ -132,7 +131,7 @@ LDLIBS_libxenguest =3D $(SHDEPS_libxenguest) $(XEN_libx= enguest)/libxenguest$(libex SHLIB_libxenguest =3D $(SHDEPS_libxenguest) -Wl,-rpath-link=3D$(XEN_libxe= nguest) =20 CFLAGS_libxenstore =3D -I$(XEN_libxenstore)/include $(CFLAGS_xeninclude) -SHDEPS_libxenstore =3D $(SHLIB_libxentoolcore) +SHDEPS_libxenstore =3D $(SHLIB_libxentoolcore) $(SHLIB_libxenctrl) LDLIBS_libxenstore =3D $(SHDEPS_libxenstore) $(XEN_libxenstore)/libxenstor= e$(libextension) SHLIB_libxenstore =3D $(SHDEPS_libxenstore) -Wl,-rpath-link=3D$(XEN_libxe= nstore) ifeq ($(CONFIG_Linux),y) @@ -159,7 +158,7 @@ CFLAGS +=3D -O2 -fomit-frame-pointer endif =20 CFLAGS_libxenlight =3D -I$(XEN_libxenlight) $(CFLAGS_libxenctrl) $(CFLAGS_= xeninclude) -SHDEPS_libxenlight =3D $(SHLIB_libxenctrl) $(SHLIB_libxenstore) $(SHLIB_li= bxenhypfs) +SHDEPS_libxenlight =3D $(SHLIB_libxenctrl) $(SHLIB_libxenstore) $(SHLIB_li= bxenhypfs) $(SHLIB_libxenguest) LDLIBS_libxenlight =3D $(SHDEPS_libxenlight) $(XEN_libxenlight)/libxenligh= t$(libextension) SHLIB_libxenlight =3D $(SHDEPS_libxenlight) -Wl,-rpath-link=3D$(XEN_libxe= nlight) =20 diff --git a/tools/libxl/Makefile b/tools/libxl/Makefile index 0e8dfc6193..65f3968947 100644 --- a/tools/libxl/Makefile +++ b/tools/libxl/Makefile @@ -188,7 +188,7 @@ libxl_dom.o: CFLAGS +=3D -I$(XEN_ROOT)/tools # include= libacpi/x86.h libxl_x86_acpi.o: CFLAGS +=3D -I$(XEN_ROOT)/tools =20 SAVE_HELPER_OBJS =3D libxl_save_helper.o _libxl_save_msgs_helper.o -$(SAVE_HELPER_OBJS): CFLAGS +=3D $(CFLAGS_libxenctrl) $(CFLAGS_libxenevtch= n) +$(SAVE_HELPER_OBJS): CFLAGS +=3D $(CFLAGS_libxenctrl) $(CFLAGS_libxenevtch= n) $(CFLAGS_libxenguest) =20 PKG_CONFIG =3D xenlight.pc xlutil.pc PKG_CONFIG_VERSION :=3D $(MAJOR).$(MINOR) diff --git a/tools/misc/Makefile b/tools/misc/Makefile index 9fdb13597f..e7e74db85f 100644 --- a/tools/misc/Makefile +++ b/tools/misc/Makefile @@ -6,6 +6,7 @@ CFLAGS +=3D -Werror CFLAGS +=3D -include $(XEN_ROOT)/tools/config.h CFLAGS +=3D $(CFLAGS_libxenevtchn) CFLAGS +=3D $(CFLAGS_libxenctrl) +CFLAGS +=3D $(CFLAGS_libxenguest) CFLAGS +=3D $(CFLAGS_xeninclude) CFLAGS +=3D $(CFLAGS_libxenstore) =20 --=20 2.26.2 From nobody Sun May 5 08:17:05 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org ARC-Seal: i=1; a=rsa-sha256; t=1597657799; cv=none; d=zohomail.com; s=zohoarc; b=aTfolR+9Et+4T3GVrbLqnsgaDSl+5qc1psnRqgiIRkvssFO6VjISvdRWv9Z5j1gdoLYC7sp5Ylt7fS0Xknh3UCT3Xl9V00bpr72zG1hiZTz0Vem3EXTomJGpb6IGylpEMlN8gROOP5XAIUdqFWcLAvc7WBFQW0BsvAA4FgD2JtU= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1597657799; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=7kOskGKYiPW1o6MhBYvH8K7COYD4fMjsS8yCeK7DAvI=; b=etNTu8bd6cHGY5Mns0/w/Vn5oR2VWvBG8tPw80CEsbOPKgNIol9qq8REgWx8AX9AjLtmJA1DJF2NubKeSZ7UwzxXpE/ARlAh7/lrkp1BCHgZr4ZXYyHlymgscQTIubx3SJA85srUmcHmTRH3at54mPvo9arMPrAYSBryZ5RGuKE= ARC-Authentication-Results: i=1; mx.zohomail.com; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1597657799133203.9731789152993; Mon, 17 Aug 2020 02:49:59 -0700 (PDT) Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1k7blv-0004EI-S3; Mon, 17 Aug 2020 09:49:43 +0000 Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1k7blu-00046j-0K for xen-devel@lists.xenproject.org; Mon, 17 Aug 2020 09:49:42 +0000 Received: from mx2.suse.de (unknown [195.135.220.15]) by us1-rack-iad1.inumbo.com (Halon) with ESMTPS id 0e5f0fea-52e3-43c4-8ee5-14a64c775b06; Mon, 17 Aug 2020 09:49:28 +0000 (UTC) Received: from relay2.suse.de (unknown [195.135.221.27]) by mx2.suse.de (Postfix) with ESMTP id 31A2FAEF8; Mon, 17 Aug 2020 09:49:51 +0000 (UTC) X-Inumbo-ID: 0e5f0fea-52e3-43c4-8ee5-14a64c775b06 X-Virus-Scanned: by amavisd-new at test-mx.suse.de From: Juergen Gross To: xen-devel@lists.xenproject.org Cc: Juergen Gross , Ian Jackson , Wei Liu Subject: [PATCH II v2 07/17] tools/misc: don't use libxenctrl internals from xen-hptool Date: Mon, 17 Aug 2020 11:49:12 +0200 Message-Id: <20200817094922.15768-8-jgross@suse.com> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20200817094922.15768-1-jgross@suse.com> References: <20200817094922.15768-1-jgross@suse.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-BeenThere: xen-devel@lists.xenproject.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Sender: "Xen-devel" Content-Type: text/plain; charset="utf-8" xen-hptool is including private headers from tools/libxc without any need. Switch it to use official headers only. Signed-off-by: Juergen Gross --- tools/misc/Makefile | 2 -- tools/misc/xen-hptool.c | 8 +++++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/tools/misc/Makefile b/tools/misc/Makefile index e7e74db85f..2a7f2ec42d 100644 --- a/tools/misc/Makefile +++ b/tools/misc/Makefile @@ -94,8 +94,6 @@ xenhypfs: xenhypfs.o xenlockprof: xenlockprof.o $(CC) $(LDFLAGS) -o $@ $< $(LDLIBS_libxenctrl) $(APPEND_LDFLAGS) =20 -# xen-hptool incorrectly uses libxc internals -xen-hptool.o: CFLAGS +=3D -I$(XEN_ROOT)/tools/libxc $(CFLAGS_libxencall) xen-hptool: xen-hptool.o $(CC) $(LDFLAGS) -o $@ $< $(LDLIBS_libxenevtchn) $(LDLIBS_libxenctrl) $(L= DLIBS_libxenguest) $(LDLIBS_libxenstore) $(APPEND_LDFLAGS) =20 diff --git a/tools/misc/xen-hptool.c b/tools/misc/xen-hptool.c index 6e27d9cf43..7f17f24942 100644 --- a/tools/misc/xen-hptool.c +++ b/tools/misc/xen-hptool.c @@ -1,9 +1,11 @@ +#include +#include +#include #include #include -#include -#include +#include #include -#include +#include =20 static xc_interface *xch; =20 --=20 2.26.2 From nobody Sun May 5 08:17:05 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org ARC-Seal: i=1; a=rsa-sha256; t=1597657813; cv=none; d=zohomail.com; s=zohoarc; b=YI7yMgPnIMmfxiCPaxVBdTOA8YuAHvojOMd9QbSRIaYvm8RFh06kMpVgQVyHQnqxidZmfJUtCqY06O1L1/tnij4uJ9bEpWX9gjqJYW7gnVxOCyR2SCFZxEO9ClbTdAc0uXogjcMynOzCnX5cZzBybRoixRzc49AOm6aZ5ILWSGk= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1597657813; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=SB2isXFnz4po1/bZ0UOUa+xaFvFGYHTJlbOdtdRlnIc=; b=MMstv6BmGgM3iG2hLuyASNfiEnInNBTpeTvQWK5FwmIR2X9EhjUIWQtkW1QIn2XnHeGF6DqS2UW9b4fBTZKTgPIwNuGP7+60OkgeQrB8UIwRcfNNM5Yv2V9SwFAjT0BJV/crcv9f0Lf4ElSHOYse6GFKbhhlqwPPbJ0CTs4fQqw= ARC-Authentication-Results: i=1; mx.zohomail.com; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1597657813758758.027814311189; Mon, 17 Aug 2020 02:50:13 -0700 (PDT) Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1k7bm8-0004QV-OD; Mon, 17 Aug 2020 09:49:56 +0000 Received: from all-amaz-eas1.inumbo.com ([34.197.232.57] helo=us1-amaz-eas2.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1k7bm7-00046Z-BW for xen-devel@lists.xenproject.org; Mon, 17 Aug 2020 09:49:55 +0000 Received: from mx2.suse.de (unknown [195.135.220.15]) by us1-amaz-eas2.inumbo.com (Halon) with ESMTPS id 3aaad613-d3e2-4ead-bebb-35a69a30ab5d; Mon, 17 Aug 2020 09:49:28 +0000 (UTC) Received: from relay2.suse.de (unknown [195.135.221.27]) by mx2.suse.de (Postfix) with ESMTP id 551CAAEF9; Mon, 17 Aug 2020 09:49:51 +0000 (UTC) X-Inumbo-ID: 3aaad613-d3e2-4ead-bebb-35a69a30ab5d X-Virus-Scanned: by amavisd-new at test-mx.suse.de From: Juergen Gross To: xen-devel@lists.xenproject.org Cc: Juergen Gross , Ian Jackson , Wei Liu Subject: [PATCH II v2 08/17] tools/misc: don't include xg_save_restore.h from xen-mfndump.c Date: Mon, 17 Aug 2020 11:49:13 +0200 Message-Id: <20200817094922.15768-9-jgross@suse.com> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20200817094922.15768-1-jgross@suse.com> References: <20200817094922.15768-1-jgross@suse.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-BeenThere: xen-devel@lists.xenproject.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Sender: "Xen-devel" Content-Type: text/plain; charset="utf-8" xen-mfndump.c is including the libxc private header xg_save_restore.h. Avoid that by moving the definition of is_mapped() to xen-mfndump.c (it is used there only) and by duplicating the definition of M2P_SIZE() in xen-mfndump.c. Signed-off-by: Juergen Gross --- tools/libxc/xg_save_restore.h | 4 ---- tools/misc/xen-mfndump.c | 5 ++++- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/tools/libxc/xg_save_restore.h b/tools/libxc/xg_save_restore.h index 303081df0d..b904296997 100644 --- a/tools/libxc/xg_save_restore.h +++ b/tools/libxc/xg_save_restore.h @@ -109,10 +109,6 @@ static inline int get_platform_info(xc_interface *xch,= uint32_t dom, #define M2P_SIZE(_m) ROUNDUP(((_m) * sizeof(xen_pfn_t)), M2P_SHIFT) #define M2P_CHUNKS(_m) (M2P_SIZE((_m)) >> M2P_SHIFT) =20 -/* Returns TRUE if the PFN is currently mapped */ -#define is_mapped(pfn_type) (!((pfn_type) & 0x80000000UL)) - - #define GET_FIELD(_p, _f, _w) (((_w) =3D=3D 8) ? ((_p)->x64._f) : ((_p)->x= 32._f)) =20 #define SET_FIELD(_p, _f, _v, _w) do { \ diff --git a/tools/misc/xen-mfndump.c b/tools/misc/xen-mfndump.c index 858bd0e26b..cb15d08c7e 100644 --- a/tools/misc/xen-mfndump.c +++ b/tools/misc/xen-mfndump.c @@ -5,7 +5,10 @@ #include #include =20 -#include "xg_save_restore.h" +#include + +#define M2P_SIZE(_m) ROUNDUP(((_m) * sizeof(xen_pfn_t)), 21) +#define is_mapped(pfn_type) (!((pfn_type) & 0x80000000UL)) =20 static xc_interface *xch; =20 --=20 2.26.2 From nobody Sun May 5 08:17:05 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org ARC-Seal: i=1; a=rsa-sha256; t=1597657803; cv=none; d=zohomail.com; s=zohoarc; b=R3RTt1j1VMC4tlpb3a33grnjhlmAQ4iwltdHm37bMGef0uvJ1BlRvJhpRurL/DWEpLGzwdw8PtnRzd9p/5lrjvU4pEHUhsHLQSW3mXO1NHwav1nYAZ82aKotb8NC8/UznINZjhAS5qOo8+cp/PXbF8ij4PIJcP9f7IBYtOo5+cs= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1597657803; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=aQJtazxgclNNr7bS2onQiiIHE/C869JO/Wmt5Va2Wj4=; b=eXGwVyZM12DVjvy0cV528iiTBfwB5N0dyFQVW1QJQHvwvxG/BJgzRTlz1lyUIupER65ynn7QmP+a1pe+Sn/kRZG4Cygu5IS0oXgoqdr5BIkjxmtubwNfshozTV3NQjSTJ1mU3W+o9sQ4klUa5lwuVJO+x/jReK4+d6HwgRXmMsE= ARC-Authentication-Results: i=1; mx.zohomail.com; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 15976578036251005.5110969565962; Mon, 17 Aug 2020 02:50:03 -0700 (PDT) Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1k7bm0-0004IY-G0; Mon, 17 Aug 2020 09:49:48 +0000 Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1k7blz-00046j-0P for xen-devel@lists.xenproject.org; Mon, 17 Aug 2020 09:49:47 +0000 Received: from mx2.suse.de (unknown [195.135.220.15]) by us1-rack-iad1.inumbo.com (Halon) with ESMTPS id 15fd8fe1-3080-47ed-947f-38b1ff40de51; Mon, 17 Aug 2020 09:49:28 +0000 (UTC) Received: from relay2.suse.de (unknown [195.135.221.27]) by mx2.suse.de (Postfix) with ESMTP id 7C47BAEFA; Mon, 17 Aug 2020 09:49:51 +0000 (UTC) X-Inumbo-ID: 15fd8fe1-3080-47ed-947f-38b1ff40de51 X-Virus-Scanned: by amavisd-new at test-mx.suse.de From: Juergen Gross To: xen-devel@lists.xenproject.org Cc: Juergen Gross , Ian Jackson , Wei Liu Subject: [PATCH II v2 09/17] tools/misc: replace PAGE_SIZE with XC_PAGE_SIZE in xen-mfndump.c Date: Mon, 17 Aug 2020 11:49:14 +0200 Message-Id: <20200817094922.15768-10-jgross@suse.com> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20200817094922.15768-1-jgross@suse.com> References: <20200817094922.15768-1-jgross@suse.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-BeenThere: xen-devel@lists.xenproject.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Sender: "Xen-devel" Content-Type: text/plain; charset="utf-8" The definition of PAGE_SIZE comes from xc_private.h, which shouldn't be used by xen-mfndump.c. Replace PAGE_SIZE by XC_PAGE_SIZE, as xc_private.h contains: #define PAGE_SIZE XC_PAGE_SIZE For the same reason PAGE_SHIFT_X86 needs to replaced with XC_PAGE_SHIFT. Signed-off-by: Juergen Gross --- tools/misc/xen-mfndump.c | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/tools/misc/xen-mfndump.c b/tools/misc/xen-mfndump.c index cb15d08c7e..92bc954ce0 100644 --- a/tools/misc/xen-mfndump.c +++ b/tools/misc/xen-mfndump.c @@ -207,7 +207,7 @@ int dump_ptes_func(int argc, char *argv[]) goto out; } =20 - page =3D xc_map_foreign_range(xch, domid, PAGE_SIZE, PROT_READ, + page =3D xc_map_foreign_range(xch, domid, XC_PAGE_SIZE, PROT_READ, minfo.p2m_table[pfn]); if ( !page ) { @@ -216,7 +216,7 @@ int dump_ptes_func(int argc, char *argv[]) goto out; } =20 - pte_num =3D PAGE_SIZE / 8; + pte_num =3D XC_PAGE_SIZE / 8; =20 printf(" --- Dumping %d PTEs for domain %d ---\n", pte_num, domid); printf(" Guest Width: %u, PT Levels: %u P2M size: =3D %lu\n", @@ -252,7 +252,7 @@ int dump_ptes_func(int argc, char *argv[]) =20 out: if ( page ) - munmap(page, PAGE_SIZE); + munmap(page, XC_PAGE_SIZE); xc_unmap_domain_meminfo(xch, &minfo); munmap(m2p_table, M2P_SIZE(max_mfn)); return rc; @@ -290,7 +290,7 @@ int lookup_pte_func(int argc, char *argv[]) return -1; } =20 - pte_num =3D PAGE_SIZE / 8; + pte_num =3D XC_PAGE_SIZE / 8; =20 printf(" --- Lookig for PTEs mapping mfn 0x%lx for domain %d ---\n", mfn, domid); @@ -302,7 +302,7 @@ int lookup_pte_func(int argc, char *argv[]) if ( !(minfo.pfn_type[i] & XEN_DOMCTL_PFINFO_LTABTYPE_MASK) ) continue; =20 - page =3D xc_map_foreign_range(xch, domid, PAGE_SIZE, PROT_READ, + page =3D xc_map_foreign_range(xch, domid, XC_PAGE_SIZE, PROT_READ, minfo.p2m_table[i]); if ( !page ) continue; @@ -312,15 +312,15 @@ int lookup_pte_func(int argc, char *argv[]) uint64_t pte =3D ((const uint64_t*)page)[j]; =20 #define __MADDR_BITS_X86 ((minfo.guest_width =3D=3D 8) ? 52 : 44) -#define __MFN_MASK_X86 ((1ULL << (__MADDR_BITS_X86 - PAGE_SHIFT_X86)) -= 1) - if ( ((pte >> PAGE_SHIFT_X86) & __MFN_MASK_X86) =3D=3D mfn) +#define __MFN_MASK_X86 ((1ULL << (__MADDR_BITS_X86 - XC_PAGE_SHIFT)) - = 1) + if ( ((pte >> XC_PAGE_SHIFT) & __MFN_MASK_X86) =3D=3D mfn) printf(" 0x%lx <-- [0x%lx][%lu]: 0x%"PRIx64"\n", mfn, minfo.p2m_table[i], j, pte); #undef __MADDR_BITS_X86 #undef __MFN_MASK_X8 } =20 - munmap(page, PAGE_SIZE); + munmap(page, XC_PAGE_SIZE); page =3D NULL; } =20 @@ -355,8 +355,8 @@ int memcmp_mfns_func(int argc, char *argv[]) return -1; } =20 - page1 =3D xc_map_foreign_range(xch, domid1, PAGE_SIZE, PROT_READ, mfn1= ); - page2 =3D xc_map_foreign_range(xch, domid2, PAGE_SIZE, PROT_READ, mfn2= ); + page1 =3D xc_map_foreign_range(xch, domid1, XC_PAGE_SIZE, PROT_READ, m= fn1); + page2 =3D xc_map_foreign_range(xch, domid2, XC_PAGE_SIZE, PROT_READ, m= fn2); if ( !page1 || !page2 ) { ERROR("Failed to map either 0x%lx[dom %d] or 0x%lx[dom %d]\n", @@ -368,13 +368,13 @@ int memcmp_mfns_func(int argc, char *argv[]) printf(" --- Comparing the content of 2 MFNs ---\n"); printf(" 1: 0x%lx[dom %d], 2: 0x%lx[dom %d]\n", mfn1, domid1, mfn2, domid2); - printf(" memcpy(1, 2) =3D %d\n", memcmp(page1, page2, PAGE_SIZE)); + printf(" memcpy(1, 2) =3D %d\n", memcmp(page1, page2, XC_PAGE_SIZE)); =20 out: if ( page1 ) - munmap(page1, PAGE_SIZE); + munmap(page1, XC_PAGE_SIZE); if ( page2 ) - munmap(page2, PAGE_SIZE); + munmap(page2, XC_PAGE_SIZE); return rc; } =20 --=20 2.26.2 From nobody Sun May 5 08:17:05 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org ARC-Seal: i=1; a=rsa-sha256; t=1597657811; cv=none; d=zohomail.com; s=zohoarc; b=Mz6QDZYr7l9Eoxsooip7oWfUzSk271orQ6cshfcJ0jxBpcB1O1VlTIZutQC7Mk/068M0EUPldbWr7HyN7G6TDenxSB28fZwONjOsONQTFGG0KUX5xqJVAIpCOOzIdHPavX5KFZgnaRIa3s9lFEnXaigYXLTWTYfrl/Gvv8hxeKA= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1597657811; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=iZuY8vyPtR4/esueGu0+EH8hJEJBzL/Z5NjQ6Opfxfs=; b=a4OTjoMUYN7/OToh9McNMjU1ghXOV3k7O8WR+WSEupl7fPJVWQbfyPL/xZbEh2q+3/myUt16/IRcg/fahjAMfVei6VFVsH6gL42jkEnZXABeRbRzGkE0vcTVL993cvSG1n42SOBjy39lgNv9oYT8ziSWfQeR9l4r0a5G8QHk2Eo= ARC-Authentication-Results: i=1; mx.zohomail.com; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1597657811223364.74583507804846; Mon, 17 Aug 2020 02:50:11 -0700 (PDT) Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1k7bm4-0004Lf-24; Mon, 17 Aug 2020 09:49:52 +0000 Received: from all-amaz-eas1.inumbo.com ([34.197.232.57] helo=us1-amaz-eas2.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1k7bm2-00046Z-BL for xen-devel@lists.xenproject.org; Mon, 17 Aug 2020 09:49:50 +0000 Received: from mx2.suse.de (unknown [195.135.220.15]) by us1-amaz-eas2.inumbo.com (Halon) with ESMTPS id 99723c6a-fbd4-42c3-862d-3f217b257151; Mon, 17 Aug 2020 09:49:28 +0000 (UTC) Received: from relay2.suse.de (unknown [195.135.221.27]) by mx2.suse.de (Postfix) with ESMTP id 9ED6BAEFB; Mon, 17 Aug 2020 09:49:51 +0000 (UTC) X-Inumbo-ID: 99723c6a-fbd4-42c3-862d-3f217b257151 X-Virus-Scanned: by amavisd-new at test-mx.suse.de From: Juergen Gross To: xen-devel@lists.xenproject.org Cc: Juergen Gross , Ian Jackson , Wei Liu Subject: [PATCH II v2 10/17] tools/misc: drop all libxc internals from xen-mfndump.c Date: Mon, 17 Aug 2020 11:49:15 +0200 Message-Id: <20200817094922.15768-11-jgross@suse.com> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20200817094922.15768-1-jgross@suse.com> References: <20200817094922.15768-1-jgross@suse.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-BeenThere: xen-devel@lists.xenproject.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Sender: "Xen-devel" Content-Type: text/plain; charset="utf-8" The last libxc internal used by xen-mfndump.c is the ERROR() macro. Add a simple definition for that macro to xen-mfndump.c and replace the libxc private header includes by official ones. Signed-off-by: Juergen Gross --- tools/misc/Makefile | 2 -- tools/misc/xen-mfndump.c | 13 +++++++++---- 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/tools/misc/Makefile b/tools/misc/Makefile index 2a7f2ec42d..7d37f297a9 100644 --- a/tools/misc/Makefile +++ b/tools/misc/Makefile @@ -99,8 +99,6 @@ xen-hptool: xen-hptool.o =20 xenhypfs.o: CFLAGS +=3D $(CFLAGS_libxenhypfs) =20 -# xen-mfndump incorrectly uses libxc internals -xen-mfndump.o: CFLAGS +=3D -I$(XEN_ROOT)/tools/libxc $(CFLAGS_libxencall) xen-mfndump: xen-mfndump.o $(CC) $(LDFLAGS) -o $@ $< $(LDLIBS_libxenevtchn) $(LDLIBS_libxenctrl) $(L= DLIBS_libxenguest) $(APPEND_LDFLAGS) =20 diff --git a/tools/misc/xen-mfndump.c b/tools/misc/xen-mfndump.c index 92bc954ce0..62121bd241 100644 --- a/tools/misc/xen-mfndump.c +++ b/tools/misc/xen-mfndump.c @@ -1,15 +1,20 @@ -#define XC_WANT_COMPAT_MAP_FOREIGN_API -#include -#include -#include +#include +#include +#include #include #include =20 +#define XC_WANT_COMPAT_MAP_FOREIGN_API +#include +#include + #include =20 #define M2P_SIZE(_m) ROUNDUP(((_m) * sizeof(xen_pfn_t)), 21) #define is_mapped(pfn_type) (!((pfn_type) & 0x80000000UL)) =20 +#define ERROR(msg, args...) fprintf(stderr, msg, ## args) + static xc_interface *xch; =20 int help_func(int argc, char *argv[]) --=20 2.26.2 From nobody Sun May 5 08:17:05 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org ARC-Seal: i=1; a=rsa-sha256; t=1597657812; cv=none; d=zohomail.com; s=zohoarc; b=aZGxacV9muMUka7O2M0CHxowUEg3i5eCJgA6SBXx17WHpPYbDggHCk8ak1+y3+ZrbbO7Ins3zhbW6kU6IRojZMa8ZU80QxbAfciwNBolfo21ebaFPnFj7CJTgjP23J1u6EekRNIGHL9mXA/2CBo4TVr3hRioLdK0yHB/bv3iJgY= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1597657812; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=EuCe4zx0RW/Ul35UQ9dbMvm/oWgQ8CsKGdJEgoheSBs=; b=F+nmqQ0rpka0P4TNdqoUjxqaadkQ1t+NVW5FUHni83oelnG9xLbiEUN0+IkpVgcBPmYg8nGK0/f2K7/4K7+p17j0SaiKhjLI/7/EF+YApE1UXPdM2IEwjPX0GBIPGaHwhV5Z6v0ayc7duu8NuyuM1F6wQHF06l/ConJUiIKu4Vg= ARC-Authentication-Results: i=1; mx.zohomail.com; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1597657812854817.1552881380405; Mon, 17 Aug 2020 02:50:12 -0700 (PDT) Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1k7bm5-0004NF-Cj; Mon, 17 Aug 2020 09:49:53 +0000 Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1k7bm4-00046j-0a for xen-devel@lists.xenproject.org; Mon, 17 Aug 2020 09:49:52 +0000 Received: from mx2.suse.de (unknown [195.135.220.15]) by us1-rack-iad1.inumbo.com (Halon) with ESMTPS id 5f272095-182e-4e55-86b1-8e9556abf5a2; Mon, 17 Aug 2020 09:49:28 +0000 (UTC) Received: from relay2.suse.de (unknown [195.135.221.27]) by mx2.suse.de (Postfix) with ESMTP id C313AAEFD; Mon, 17 Aug 2020 09:49:51 +0000 (UTC) X-Inumbo-ID: 5f272095-182e-4e55-86b1-8e9556abf5a2 X-Virus-Scanned: by amavisd-new at test-mx.suse.de From: Juergen Gross To: xen-devel@lists.xenproject.org Cc: Juergen Gross , Ian Jackson , Wei Liu Subject: [PATCH II v2 11/17] tools/libxc: remove unused headers xc_efi.h and xc_elf.h Date: Mon, 17 Aug 2020 11:49:16 +0200 Message-Id: <20200817094922.15768-12-jgross@suse.com> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20200817094922.15768-1-jgross@suse.com> References: <20200817094922.15768-1-jgross@suse.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-BeenThere: xen-devel@lists.xenproject.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Sender: "Xen-devel" Content-Type: text/plain; charset="utf-8" Remove xc_efi.h and xc_elf.h as they aren't used anywhere. Signed-off-by: Juergen Gross --- tools/libxc/xc_efi.h | 158 ------------------------------------------- tools/libxc/xc_elf.h | 16 ----- 2 files changed, 174 deletions(-) delete mode 100644 tools/libxc/xc_efi.h delete mode 100644 tools/libxc/xc_elf.h diff --git a/tools/libxc/xc_efi.h b/tools/libxc/xc_efi.h deleted file mode 100644 index dbe105be8f..0000000000 --- a/tools/libxc/xc_efi.h +++ /dev/null @@ -1,158 +0,0 @@ -/* - * Extensible Firmware Interface - * Based on 'Extensible Firmware Interface Specification' version 0.9, Apr= il 30, 1999 - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; - * version 2.1 of the License. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; If not, see . - * - * Copyright (C) 1999 VA Linux Systems - * Copyright (C) 1999 Walt Drummond - * Copyright (C) 1999, 2002-2003 Hewlett-Packard Co. - * David Mosberger-Tang - * Stephane Eranian - */ - -#ifndef XC_EFI_H -#define XC_EFI_H - -/* definitions from xen/include/asm-ia64/linux-xen/linux/efi.h */ - -typedef struct { - uint8_t b[16]; -} efi_guid_t; - -#define EFI_GUID(a,b,c,d0,d1,d2,d3,d4,d5,d6,d7) \ -((efi_guid_t) \ -{{ (a) & 0xff, ((a) >> 8) & 0xff, ((a) >> 16) & 0xff, ((a) >> 24) & 0xff, \ - (b) & 0xff, ((b) >> 8) & 0xff, \ - (c) & 0xff, ((c) >> 8) & 0xff, \ - (d0), (d1), (d2), (d3), (d4), (d5), (d6), (d7) }}) - -/* - * Generic EFI table header - */ -typedef struct { - uint64_t signature; - uint32_t revision; - uint32_t headersize; - uint32_t crc32; - uint32_t reserved; -} efi_table_hdr_t; - -/* - * Memory map descriptor: - */ - -/* Memory types: */ -#define EFI_RESERVED_TYPE 0 -#define EFI_LOADER_CODE 1 -#define EFI_LOADER_DATA 2 -#define EFI_BOOT_SERVICES_CODE 3 -#define EFI_BOOT_SERVICES_DATA 4 -#define EFI_RUNTIME_SERVICES_CODE 5 -#define EFI_RUNTIME_SERVICES_DATA 6 -#define EFI_CONVENTIONAL_MEMORY 7 -#define EFI_UNUSABLE_MEMORY 8 -#define EFI_ACPI_RECLAIM_MEMORY 9 -#define EFI_ACPI_MEMORY_NVS 10 -#define EFI_MEMORY_MAPPED_IO 11 -#define EFI_MEMORY_MAPPED_IO_PORT_SPACE 12 -#define EFI_PAL_CODE 13 -#define EFI_MAX_MEMORY_TYPE 14 - -/* Attribute values: */ -#define EFI_MEMORY_UC ((uint64_t)0x0000000000000001ULL) /* un= cached */ -#define EFI_MEMORY_WC ((uint64_t)0x0000000000000002ULL) /* wr= ite-coalescing */ -#define EFI_MEMORY_WT ((uint64_t)0x0000000000000004ULL) /* wr= ite-through */ -#define EFI_MEMORY_WB ((uint64_t)0x0000000000000008ULL) /* wr= ite-back */ -#define EFI_MEMORY_WP ((uint64_t)0x0000000000001000ULL) /* wr= ite-protect */ -#define EFI_MEMORY_RP ((uint64_t)0x0000000000002000ULL) /* re= ad-protect */ -#define EFI_MEMORY_XP ((uint64_t)0x0000000000004000ULL) /* ex= ecute-protect */ -#define EFI_MEMORY_RUNTIME ((uint64_t)0x8000000000000000ULL) /* ra= nge requires runtime mapping */ -#define EFI_MEMORY_DESCRIPTOR_VERSION 1 - -#define EFI_PAGE_SHIFT 12 - -/* - * For current x86 implementations of EFI, there is - * additional padding in the mem descriptors. This is not - * the case in ia64. Need to have this fixed in the f/w. - */ -typedef struct { - uint32_t type; - uint32_t pad; - uint64_t phys_addr; - uint64_t virt_addr; - uint64_t num_pages; - uint64_t attribute; -#if defined (__i386__) - uint64_t pad1; -#endif -} efi_memory_desc_t; - -/* - * EFI Runtime Services table - */ -#define EFI_RUNTIME_SERVICES_SIGNATURE ((uint64_t)0x5652453544e5552ULL) -#define EFI_RUNTIME_SERVICES_REVISION 0x00010000 - -typedef struct { - efi_table_hdr_t hdr; - unsigned long get_time; - unsigned long set_time; - unsigned long get_wakeup_time; - unsigned long set_wakeup_time; - unsigned long set_virtual_address_map; - unsigned long convert_pointer; - unsigned long get_variable; - unsigned long get_next_variable; - unsigned long set_variable; - unsigned long get_next_high_mono_count; - unsigned long reset_system; -} efi_runtime_services_t; - -/* - * EFI Configuration Table and GUID definitions - */ -#define NULL_GUID \ - EFI_GUID( 0x00000000, 0x0000, 0x0000, 0x00, 0x00, 0x00, 0x00, 0x00, 0= x00, 0x00, 0x00 ) -#define ACPI_20_TABLE_GUID \ - EFI_GUID( 0x8868e871, 0xe4f1, 0x11d3, 0xbc, 0x22, 0x0, 0x80, 0xc7, 0x= 3c, 0x88, 0x81 ) -#define SAL_SYSTEM_TABLE_GUID \ - EFI_GUID( 0xeb9d2d32, 0x2d88, 0x11d3, 0x9a, 0x16, 0x0, 0x90, 0x27, 0x= 3f, 0xc1, 0x4d ) - -typedef struct { - efi_guid_t guid; - unsigned long table; -} efi_config_table_t; - -#define EFI_SYSTEM_TABLE_SIGNATURE ((uint64_t)0x5453595320494249ULL) -#define EFI_SYSTEM_TABLE_REVISION ((1 << 16) | 00) - -typedef struct { - efi_table_hdr_t hdr; - unsigned long fw_vendor; /* physical addr of CHAR16 vendor string */ - uint32_t fw_revision; - unsigned long con_in_handle; - unsigned long con_in; - unsigned long con_out_handle; - unsigned long con_out; - unsigned long stderr_handle; - unsigned long stderr; - efi_runtime_services_t *runtime; - unsigned long boottime; - unsigned long nr_tables; - unsigned long tables; -} efi_system_table_t; - -#endif /* XC_EFI_H */ diff --git a/tools/libxc/xc_elf.h b/tools/libxc/xc_elf.h deleted file mode 100644 index acbc0280bd..0000000000 --- a/tools/libxc/xc_elf.h +++ /dev/null @@ -1,16 +0,0 @@ -/* - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; - * version 2.1 of the License. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; If not, see . - */ - -#include --=20 2.26.2 From nobody Sun May 5 08:17:05 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org ARC-Seal: i=1; a=rsa-sha256; t=1597657816; cv=none; d=zohomail.com; s=zohoarc; b=Ay3ga78LbmUJ3mYUlC7ZYSvq5PqFd/dV+LeOq/9DoBWmD03YBi6ilsBV+ja3r9LB8GJVrDhxVYGb2ahUeiD0azPYaqEV7L89TutkG+Yjwem/6/sUhi96UgdZp03ak5+pwE0gp/lU8duLp1nyFzHFUDGLUoMDs7m2uS8dQ5dolUc= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1597657816; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=tslHyzoOR96G9lJ3Iu/2aLB3BRHC53voCl4enqeBkPk=; b=ea7HsQ3SKpJLwvcW6mn1mo103hWHp1+QLm0TItpZbic9oMWn3WnO2Wduuge7A6C3Z7+KRyt2vuUS5Qoe8KdMu0+z1dYXhafEA26MSG7OtuqmzsHHx37rGn+PIQwNDDraudoakFGJpw9o+rOpOcG2ZjKX+vtNhxcV8uniqUtiIbw= ARC-Authentication-Results: i=1; mx.zohomail.com; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1597657816307798.6640604056246; Mon, 17 Aug 2020 02:50:16 -0700 (PDT) Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1k7bmA-0004S3-2E; Mon, 17 Aug 2020 09:49:58 +0000 Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1k7bm9-00046j-0e for xen-devel@lists.xenproject.org; Mon, 17 Aug 2020 09:49:57 +0000 Received: from mx2.suse.de (unknown [195.135.220.15]) by us1-rack-iad1.inumbo.com (Halon) with ESMTPS id 5ba70a82-228c-4aea-b628-3c6574037f79; Mon, 17 Aug 2020 09:49:28 +0000 (UTC) Received: from relay2.suse.de (unknown [195.135.221.27]) by mx2.suse.de (Postfix) with ESMTP id E8EA0AF01; Mon, 17 Aug 2020 09:49:51 +0000 (UTC) X-Inumbo-ID: 5ba70a82-228c-4aea-b628-3c6574037f79 X-Virus-Scanned: by amavisd-new at test-mx.suse.de From: Juergen Gross To: xen-devel@lists.xenproject.org Cc: Juergen Gross , Ian Jackson , Wei Liu Subject: [PATCH II v2 12/17] tools/libxc: move xc_[un]map_domain_meminfo() into new source xg_domain.c Date: Mon, 17 Aug 2020 11:49:17 +0200 Message-Id: <20200817094922.15768-13-jgross@suse.com> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20200817094922.15768-1-jgross@suse.com> References: <20200817094922.15768-1-jgross@suse.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-BeenThere: xen-devel@lists.xenproject.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Sender: "Xen-devel" Content-Type: text/plain; charset="utf-8" Move xc_[un]map_domain_meminfo() functions to new source xg_domain.c as they are defined in include/xenguest.h and should be in libxenguest. Signed-off-by: Juergen Gross --- tools/libxc/Makefile | 4 +- tools/libxc/xc_domain.c | 126 --------------------------------- tools/libxc/xg_domain.c | 149 ++++++++++++++++++++++++++++++++++++++++ 3 files changed, 152 insertions(+), 127 deletions(-) create mode 100644 tools/libxc/xg_domain.c diff --git a/tools/libxc/Makefile b/tools/libxc/Makefile index c1e41a8ee9..f3f1edc07b 100644 --- a/tools/libxc/Makefile +++ b/tools/libxc/Makefile @@ -52,7 +52,9 @@ CTRL_SRCS-y +=3D xc_gnttab_compat.c CTRL_SRCS-y +=3D xc_devicemodel_compat.c =20 GUEST_SRCS-y :=3D -GUEST_SRCS-y +=3D xg_private.c xc_suspend.c +GUEST_SRCS-y +=3D xg_private.c +GUEST_SRCS-y +=3D xg_domain.c +GUEST_SRCS-y +=3D xc_suspend.c ifeq ($(CONFIG_MIGRATE),y) GUEST_SRCS-y +=3D xc_sr_common.c GUEST_SRCS-$(CONFIG_X86) +=3D xc_sr_common_x86.c diff --git a/tools/libxc/xc_domain.c b/tools/libxc/xc_domain.c index 71829c2bce..fbc22c4df6 100644 --- a/tools/libxc/xc_domain.c +++ b/tools/libxc/xc_domain.c @@ -1892,132 +1892,6 @@ int xc_domain_unbind_pt_spi_irq(xc_interface *xch, PT_IRQ_TYPE_SPI, 0, 0, 0, 0, spi)); } =20 -int xc_unmap_domain_meminfo(xc_interface *xch, struct xc_domain_meminfo *m= info) -{ - struct domain_info_context _di =3D { .guest_width =3D minfo->guest_wid= th, - .p2m_size =3D minfo->p2m_size}; - struct domain_info_context *dinfo =3D &_di; - - free(minfo->pfn_type); - if ( minfo->p2m_table ) - munmap(minfo->p2m_table, P2M_FL_ENTRIES * PAGE_SIZE); - minfo->p2m_table =3D NULL; - - return 0; -} - -int xc_map_domain_meminfo(xc_interface *xch, uint32_t domid, - struct xc_domain_meminfo *minfo) -{ - struct domain_info_context _di; - struct domain_info_context *dinfo =3D &_di; - - xc_dominfo_t info; - shared_info_any_t *live_shinfo; - xen_capabilities_info_t xen_caps =3D ""; - int i; - - /* Only be initialized once */ - if ( minfo->pfn_type || minfo->p2m_table ) - { - errno =3D EINVAL; - return -1; - } - - if ( xc_domain_getinfo(xch, domid, 1, &info) !=3D 1 ) - { - PERROR("Could not get domain info"); - return -1; - } - - if ( xc_domain_get_guest_width(xch, domid, &minfo->guest_width) ) - { - PERROR("Could not get domain address size"); - return -1; - } - _di.guest_width =3D minfo->guest_width; - - /* Get page table levels (see get_platform_info() in xg_save_restore.h= */ - if ( xc_version(xch, XENVER_capabilities, &xen_caps) ) - { - PERROR("Could not get Xen capabilities (for page table levels)"); - return -1; - } - if ( strstr(xen_caps, "xen-3.0-x86_64") ) - /* Depends on whether it's a compat 32-on-64 guest */ - minfo->pt_levels =3D ( (minfo->guest_width =3D=3D 8) ? 4 : 3 ); - else if ( strstr(xen_caps, "xen-3.0-x86_32p") ) - minfo->pt_levels =3D 3; - else if ( strstr(xen_caps, "xen-3.0-x86_32") ) - minfo->pt_levels =3D 2; - else - { - errno =3D EFAULT; - return -1; - } - - /* We need the shared info page for mapping the P2M */ - live_shinfo =3D xc_map_foreign_range(xch, domid, PAGE_SIZE, PROT_READ, - info.shared_info_frame); - if ( !live_shinfo ) - { - PERROR("Could not map the shared info frame (MFN 0x%lx)", - info.shared_info_frame); - return -1; - } - - if ( xc_core_arch_map_p2m_writable(xch, minfo->guest_width, &info, - live_shinfo, &minfo->p2m_table, - &minfo->p2m_size) ) - { - PERROR("Could not map the P2M table"); - munmap(live_shinfo, PAGE_SIZE); - return -1; - } - munmap(live_shinfo, PAGE_SIZE); - _di.p2m_size =3D minfo->p2m_size; - - /* Make space and prepare for getting the PFN types */ - minfo->pfn_type =3D calloc(sizeof(*minfo->pfn_type), minfo->p2m_size); - if ( !minfo->pfn_type ) - { - PERROR("Could not allocate memory for the PFN types"); - goto failed; - } - for ( i =3D 0; i < minfo->p2m_size; i++ ) - minfo->pfn_type[i] =3D xc_pfn_to_mfn(i, minfo->p2m_table, - minfo->guest_width); - - /* Retrieve PFN types in batches */ - for ( i =3D 0; i < minfo->p2m_size ; i+=3D1024 ) - { - int count =3D ((minfo->p2m_size - i ) > 1024 ) ? - 1024: (minfo->p2m_size - i); - - if ( xc_get_pfn_type_batch(xch, domid, count, minfo->pfn_type + i)= ) - { - PERROR("Could not get %d-eth batch of PFN types", (i+1)/1024); - goto failed; - } - } - - return 0; - -failed: - if ( minfo->pfn_type ) - { - free(minfo->pfn_type); - minfo->pfn_type =3D NULL; - } - if ( minfo->p2m_table ) - { - munmap(minfo->p2m_table, P2M_FL_ENTRIES * PAGE_SIZE); - minfo->p2m_table =3D NULL; - } - - return -1; -} - int xc_domain_memory_mapping( xc_interface *xch, uint32_t domid, diff --git a/tools/libxc/xg_domain.c b/tools/libxc/xg_domain.c new file mode 100644 index 0000000000..58713cd35d --- /dev/null +++ b/tools/libxc/xg_domain.c @@ -0,0 +1,149 @@ +/*************************************************************************= ***** + * xg_domain.c + * + * API for manipulating and obtaining information on domains. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; + * version 2.1 of the License. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; If not, see . + * + * Copyright (c) 2003, K A Fraser. + */ + +#include "xg_private.h" +#include "xc_core.h" + +int xc_unmap_domain_meminfo(xc_interface *xch, struct xc_domain_meminfo *m= info) +{ + struct domain_info_context _di =3D { .guest_width =3D minfo->guest_wid= th, + .p2m_size =3D minfo->p2m_size}; + struct domain_info_context *dinfo =3D &_di; + + free(minfo->pfn_type); + if ( minfo->p2m_table ) + munmap(minfo->p2m_table, P2M_FL_ENTRIES * PAGE_SIZE); + minfo->p2m_table =3D NULL; + + return 0; +} + +int xc_map_domain_meminfo(xc_interface *xch, uint32_t domid, + struct xc_domain_meminfo *minfo) +{ + struct domain_info_context _di; + struct domain_info_context *dinfo =3D &_di; + + xc_dominfo_t info; + shared_info_any_t *live_shinfo; + xen_capabilities_info_t xen_caps =3D ""; + int i; + + /* Only be initialized once */ + if ( minfo->pfn_type || minfo->p2m_table ) + { + errno =3D EINVAL; + return -1; + } + + if ( xc_domain_getinfo(xch, domid, 1, &info) !=3D 1 ) + { + PERROR("Could not get domain info"); + return -1; + } + + if ( xc_domain_get_guest_width(xch, domid, &minfo->guest_width) ) + { + PERROR("Could not get domain address size"); + return -1; + } + _di.guest_width =3D minfo->guest_width; + + /* Get page table levels (see get_platform_info() in xg_save_restore.h= */ + if ( xc_version(xch, XENVER_capabilities, &xen_caps) ) + { + PERROR("Could not get Xen capabilities (for page table levels)"); + return -1; + } + if ( strstr(xen_caps, "xen-3.0-x86_64") ) + /* Depends on whether it's a compat 32-on-64 guest */ + minfo->pt_levels =3D ( (minfo->guest_width =3D=3D 8) ? 4 : 3 ); + else if ( strstr(xen_caps, "xen-3.0-x86_32p") ) + minfo->pt_levels =3D 3; + else if ( strstr(xen_caps, "xen-3.0-x86_32") ) + minfo->pt_levels =3D 2; + else + { + errno =3D EFAULT; + return -1; + } + + /* We need the shared info page for mapping the P2M */ + live_shinfo =3D xc_map_foreign_range(xch, domid, PAGE_SIZE, PROT_READ, + info.shared_info_frame); + if ( !live_shinfo ) + { + PERROR("Could not map the shared info frame (MFN 0x%lx)", + info.shared_info_frame); + return -1; + } + + if ( xc_core_arch_map_p2m_writable(xch, minfo->guest_width, &info, + live_shinfo, &minfo->p2m_table, + &minfo->p2m_size) ) + { + PERROR("Could not map the P2M table"); + munmap(live_shinfo, PAGE_SIZE); + return -1; + } + munmap(live_shinfo, PAGE_SIZE); + _di.p2m_size =3D minfo->p2m_size; + + /* Make space and prepare for getting the PFN types */ + minfo->pfn_type =3D calloc(sizeof(*minfo->pfn_type), minfo->p2m_size); + if ( !minfo->pfn_type ) + { + PERROR("Could not allocate memory for the PFN types"); + goto failed; + } + for ( i =3D 0; i < minfo->p2m_size; i++ ) + minfo->pfn_type[i] =3D xc_pfn_to_mfn(i, minfo->p2m_table, + minfo->guest_width); + + /* Retrieve PFN types in batches */ + for ( i =3D 0; i < minfo->p2m_size ; i+=3D1024 ) + { + int count =3D ((minfo->p2m_size - i ) > 1024 ) ? + 1024: (minfo->p2m_size - i); + + if ( xc_get_pfn_type_batch(xch, domid, count, minfo->pfn_type + i)= ) + { + PERROR("Could not get %d-eth batch of PFN types", (i+1)/1024); + goto failed; + } + } + + return 0; + +failed: + if ( minfo->pfn_type ) + { + free(minfo->pfn_type); + minfo->pfn_type =3D NULL; + } + if ( minfo->p2m_table ) + { + munmap(minfo->p2m_table, P2M_FL_ENTRIES * PAGE_SIZE); + minfo->p2m_table =3D NULL; + } + + return -1; +} --=20 2.26.2 From nobody Sun May 5 08:17:05 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org ARC-Seal: i=1; a=rsa-sha256; t=1597657826; cv=none; d=zohomail.com; s=zohoarc; b=ZyW5Y/BLvYIfe1RpPHqHE+f2QXhXbpydfI/vvv+CyBB9//qL0S8cTyHdCGWr0Jc/ZqDaHxs8tZLgix3Mj/C7zWZLPjmY5iczPbEu259VVmqBHknzYyGAXSYRPbq+lVo9Qc83RQX9hJ5Zf69cafORAz7YCTRWQQYD5S9xqza7YuY= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1597657826; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=Ctg2dhYc+bWTWN7FxvBv9udCZtfzKD9eBNeUa9rg3PA=; b=DHx+gh0Yt3VxNhtQgcPqt5ePEEH9d1FWQk9iUQ4T2nCPM67ddCDNp1xkdys+kQu8aXrJqV4AElAmAIxxICLUr+pOZYKeQdcd+ccn5RI405AzvSkifBBRrinrJBEwjOVnFlkqg3htLOui4PBqeYntvCedZyCqyEQhSenkjfioSic= ARC-Authentication-Results: i=1; mx.zohomail.com; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1597657826651799.8472273620447; Mon, 17 Aug 2020 02:50:26 -0700 (PDT) Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1k7bmK-0005FX-0P; Mon, 17 Aug 2020 09:50:08 +0000 Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1k7bmJ-00046j-0z for xen-devel@lists.xenproject.org; Mon, 17 Aug 2020 09:50:07 +0000 Received: from mx2.suse.de (unknown [195.135.220.15]) by us1-rack-iad1.inumbo.com (Halon) with ESMTPS id a8619b2a-2e46-4991-9c8d-01785a01a443; Mon, 17 Aug 2020 09:49:28 +0000 (UTC) Received: from relay2.suse.de (unknown [195.135.221.27]) by mx2.suse.de (Postfix) with ESMTP id 1990EAF06; Mon, 17 Aug 2020 09:49:52 +0000 (UTC) X-Inumbo-ID: a8619b2a-2e46-4991-9c8d-01785a01a443 X-Virus-Scanned: by amavisd-new at test-mx.suse.de From: Juergen Gross To: xen-devel@lists.xenproject.org Cc: Juergen Gross , Ian Jackson , Wei Liu Subject: [PATCH II v2 13/17] tools/libxc: rename all libxenguest sources to xg_* Date: Mon, 17 Aug 2020 11:49:18 +0200 Message-Id: <20200817094922.15768-14-jgross@suse.com> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20200817094922.15768-1-jgross@suse.com> References: <20200817094922.15768-1-jgross@suse.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-BeenThere: xen-devel@lists.xenproject.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Sender: "Xen-devel" Content-Type: text/plain; charset="utf-8" Some sources of libxenguest are named xg_*.c and some xc_*.c. Rename the xc_*.c files to xg_*.c. Signed-off-by: Juergen Gross --- tools/libxc/Makefile | 59 ++++++++++--------- .../libxc/{xc_cpuid_x86.c =3D> xg_cpuid_x86.c} | 0 tools/libxc/{xc_dom_arm.c =3D> xg_dom_arm.c} | 0 ...imageloader.c =3D> xg_dom_armzimageloader.c} | 0 ...{xc_dom_binloader.c =3D> xg_dom_binloader.c} | 0 tools/libxc/{xc_dom_boot.c =3D> xg_dom_boot.c} | 0 ...bzimageloader.c =3D> xg_dom_bzimageloader.c} | 0 ...m_compat_linux.c =3D> xg_dom_compat_linux.c} | 0 tools/libxc/{xc_dom_core.c =3D> xg_dom_core.c} | 0 ...compress_lz4.c =3D> xg_dom_decompress_lz4.c} | 0 ...ss_unsafe.c =3D> xg_dom_decompress_unsafe.c} | 0 ...ip2.c =3D> xg_dom_decompress_unsafe_bzip2.c} | 0 ...lzma.c =3D> xg_dom_decompress_unsafe_lzma.c} | 0 ...o1x.c =3D> xg_dom_decompress_unsafe_lzo1x.c} | 0 ...afe_xz.c =3D> xg_dom_decompress_unsafe_xz.c} | 0 ...{xc_dom_elfloader.c =3D> xg_dom_elfloader.c} | 0 ...{xc_dom_hvmloader.c =3D> xg_dom_hvmloader.c} | 0 tools/libxc/{xc_dom_x86.c =3D> xg_dom_x86.c} | 0 .../libxc/{xc_nomigrate.c =3D> xg_nomigrate.c} | 0 .../{xc_offline_page.c =3D> xg_offline_page.c} | 0 .../libxc/{xc_sr_common.c =3D> xg_sr_common.c} | 0 ...{xc_sr_common_x86.c =3D> xg_sr_common_x86.c} | 0 ..._common_x86_pv.c =3D> xg_sr_common_x86_pv.c} | 0 .../{xc_sr_restore.c =3D> xg_sr_restore.c} | 0 ...tore_x86_hvm.c =3D> xg_sr_restore_x86_hvm.c} | 0 ...estore_x86_pv.c =3D> xg_sr_restore_x86_pv.c} | 0 tools/libxc/{xc_sr_save.c =3D> xg_sr_save.c} | 0 ...sr_save_x86_hvm.c =3D> xg_sr_save_x86_hvm.c} | 0 ...c_sr_save_x86_pv.c =3D> xg_sr_save_x86_pv.c} | 0 tools/libxc/{xc_suspend.c =3D> xg_suspend.c} | 0 30 files changed, 30 insertions(+), 29 deletions(-) rename tools/libxc/{xc_cpuid_x86.c =3D> xg_cpuid_x86.c} (100%) rename tools/libxc/{xc_dom_arm.c =3D> xg_dom_arm.c} (100%) rename tools/libxc/{xc_dom_armzimageloader.c =3D> xg_dom_armzimageloader.c= } (100%) rename tools/libxc/{xc_dom_binloader.c =3D> xg_dom_binloader.c} (100%) rename tools/libxc/{xc_dom_boot.c =3D> xg_dom_boot.c} (100%) rename tools/libxc/{xc_dom_bzimageloader.c =3D> xg_dom_bzimageloader.c} (1= 00%) rename tools/libxc/{xc_dom_compat_linux.c =3D> xg_dom_compat_linux.c} (100= %) rename tools/libxc/{xc_dom_core.c =3D> xg_dom_core.c} (100%) rename tools/libxc/{xc_dom_decompress_lz4.c =3D> xg_dom_decompress_lz4.c} = (100%) rename tools/libxc/{xc_dom_decompress_unsafe.c =3D> xg_dom_decompress_unsa= fe.c} (100%) rename tools/libxc/{xc_dom_decompress_unsafe_bzip2.c =3D> xg_dom_decompres= s_unsafe_bzip2.c} (100%) rename tools/libxc/{xc_dom_decompress_unsafe_lzma.c =3D> xg_dom_decompress= _unsafe_lzma.c} (100%) rename tools/libxc/{xc_dom_decompress_unsafe_lzo1x.c =3D> xg_dom_decompres= s_unsafe_lzo1x.c} (100%) rename tools/libxc/{xc_dom_decompress_unsafe_xz.c =3D> xg_dom_decompress_u= nsafe_xz.c} (100%) rename tools/libxc/{xc_dom_elfloader.c =3D> xg_dom_elfloader.c} (100%) rename tools/libxc/{xc_dom_hvmloader.c =3D> xg_dom_hvmloader.c} (100%) rename tools/libxc/{xc_dom_x86.c =3D> xg_dom_x86.c} (100%) rename tools/libxc/{xc_nomigrate.c =3D> xg_nomigrate.c} (100%) rename tools/libxc/{xc_offline_page.c =3D> xg_offline_page.c} (100%) rename tools/libxc/{xc_sr_common.c =3D> xg_sr_common.c} (100%) rename tools/libxc/{xc_sr_common_x86.c =3D> xg_sr_common_x86.c} (100%) rename tools/libxc/{xc_sr_common_x86_pv.c =3D> xg_sr_common_x86_pv.c} (100= %) rename tools/libxc/{xc_sr_restore.c =3D> xg_sr_restore.c} (100%) rename tools/libxc/{xc_sr_restore_x86_hvm.c =3D> xg_sr_restore_x86_hvm.c} = (100%) rename tools/libxc/{xc_sr_restore_x86_pv.c =3D> xg_sr_restore_x86_pv.c} (1= 00%) rename tools/libxc/{xc_sr_save.c =3D> xg_sr_save.c} (100%) rename tools/libxc/{xc_sr_save_x86_hvm.c =3D> xg_sr_save_x86_hvm.c} (100%) rename tools/libxc/{xc_sr_save_x86_pv.c =3D> xg_sr_save_x86_pv.c} (100%) rename tools/libxc/{xc_suspend.c =3D> xg_suspend.c} (100%) diff --git a/tools/libxc/Makefile b/tools/libxc/Makefile index f3f1edc07b..e1b2c24106 100644 --- a/tools/libxc/Makefile +++ b/tools/libxc/Makefile @@ -54,20 +54,20 @@ CTRL_SRCS-y +=3D xc_devicemodel_compat.c GUEST_SRCS-y :=3D GUEST_SRCS-y +=3D xg_private.c GUEST_SRCS-y +=3D xg_domain.c -GUEST_SRCS-y +=3D xc_suspend.c +GUEST_SRCS-y +=3D xg_suspend.c ifeq ($(CONFIG_MIGRATE),y) -GUEST_SRCS-y +=3D xc_sr_common.c -GUEST_SRCS-$(CONFIG_X86) +=3D xc_sr_common_x86.c -GUEST_SRCS-$(CONFIG_X86) +=3D xc_sr_common_x86_pv.c -GUEST_SRCS-$(CONFIG_X86) +=3D xc_sr_restore_x86_pv.c -GUEST_SRCS-$(CONFIG_X86) +=3D xc_sr_restore_x86_hvm.c -GUEST_SRCS-$(CONFIG_X86) +=3D xc_sr_save_x86_pv.c -GUEST_SRCS-$(CONFIG_X86) +=3D xc_sr_save_x86_hvm.c -GUEST_SRCS-y +=3D xc_sr_restore.c -GUEST_SRCS-y +=3D xc_sr_save.c -GUEST_SRCS-y +=3D xc_offline_page.c +GUEST_SRCS-y +=3D xg_sr_common.c +GUEST_SRCS-$(CONFIG_X86) +=3D xg_sr_common_x86.c +GUEST_SRCS-$(CONFIG_X86) +=3D xg_sr_common_x86_pv.c +GUEST_SRCS-$(CONFIG_X86) +=3D xg_sr_restore_x86_pv.c +GUEST_SRCS-$(CONFIG_X86) +=3D xg_sr_restore_x86_hvm.c +GUEST_SRCS-$(CONFIG_X86) +=3D xg_sr_save_x86_pv.c +GUEST_SRCS-$(CONFIG_X86) +=3D xg_sr_save_x86_hvm.c +GUEST_SRCS-y +=3D xg_sr_restore.c +GUEST_SRCS-y +=3D xg_sr_save.c +GUEST_SRCS-y +=3D xg_offline_page.c else -GUEST_SRCS-y +=3D xc_nomigrate.c +GUEST_SRCS-y +=3D xg_nomigrate.c endif =20 vpath %.c ../../xen/common/libelf @@ -88,25 +88,26 @@ GUEST_SRCS-y +=3D cpuid.c msr.c endif =20 # new domain builder -GUEST_SRCS-y +=3D xc_dom_core.c xc_dom_boot.c -GUEST_SRCS-y +=3D xc_dom_elfloader.c -GUEST_SRCS-$(CONFIG_X86) +=3D xc_dom_bzimageloader.c -GUEST_SRCS-$(CONFIG_X86) +=3D xc_dom_decompress_lz4.c -GUEST_SRCS-$(CONFIG_X86) +=3D xc_dom_hvmloader.c -GUEST_SRCS-$(CONFIG_ARM) +=3D xc_dom_armzimageloader.c -GUEST_SRCS-y +=3D xc_dom_binloader.c -GUEST_SRCS-y +=3D xc_dom_compat_linux.c - -GUEST_SRCS-$(CONFIG_X86) +=3D xc_dom_x86.c -GUEST_SRCS-$(CONFIG_X86) +=3D xc_cpuid_x86.c -GUEST_SRCS-$(CONFIG_ARM) +=3D xc_dom_arm.c +GUEST_SRCS-y +=3D xg_dom_core.c +GUEST_SRCS-y +=3D xg_dom_boot.c +GUEST_SRCS-y +=3D xg_dom_elfloader.c +GUEST_SRCS-$(CONFIG_X86) +=3D xg_dom_bzimageloader.c +GUEST_SRCS-$(CONFIG_X86) +=3D xg_dom_decompress_lz4.c +GUEST_SRCS-$(CONFIG_X86) +=3D xg_dom_hvmloader.c +GUEST_SRCS-$(CONFIG_ARM) +=3D xg_dom_armzimageloader.c +GUEST_SRCS-y +=3D xg_dom_binloader.c +GUEST_SRCS-y +=3D xg_dom_compat_linux.c + +GUEST_SRCS-$(CONFIG_X86) +=3D xg_dom_x86.c +GUEST_SRCS-$(CONFIG_X86) +=3D xg_cpuid_x86.c +GUEST_SRCS-$(CONFIG_ARM) +=3D xg_dom_arm.c =20 ifeq ($(CONFIG_LIBXC_MINIOS),y) -GUEST_SRCS-y +=3D xc_dom_decompress_unsafe.c -GUEST_SRCS-y +=3D xc_dom_decompress_unsafe_bzip2.c -GUEST_SRCS-y +=3D xc_dom_decompress_unsafe_lzma.c -GUEST_SRCS-y +=3D xc_dom_decompress_unsafe_lzo1x.c -GUEST_SRCS-y +=3D xc_dom_decompress_unsafe_xz.c +GUEST_SRCS-y +=3D xg_dom_decompress_unsafe.c +GUEST_SRCS-y +=3D xg_dom_decompress_unsafe_bzip2.c +GUEST_SRCS-y +=3D xg_dom_decompress_unsafe_lzma.c +GUEST_SRCS-y +=3D xg_dom_decompress_unsafe_lzo1x.c +GUEST_SRCS-y +=3D xg_dom_decompress_unsafe_xz.c endif =20 -include $(XEN_TARGET_ARCH)/Makefile diff --git a/tools/libxc/xc_cpuid_x86.c b/tools/libxc/xg_cpuid_x86.c similarity index 100% rename from tools/libxc/xc_cpuid_x86.c rename to tools/libxc/xg_cpuid_x86.c diff --git a/tools/libxc/xc_dom_arm.c b/tools/libxc/xg_dom_arm.c similarity index 100% rename from tools/libxc/xc_dom_arm.c rename to tools/libxc/xg_dom_arm.c diff --git a/tools/libxc/xc_dom_armzimageloader.c b/tools/libxc/xg_dom_armz= imageloader.c similarity index 100% rename from tools/libxc/xc_dom_armzimageloader.c rename to tools/libxc/xg_dom_armzimageloader.c diff --git a/tools/libxc/xc_dom_binloader.c b/tools/libxc/xg_dom_binloader.c similarity index 100% rename from tools/libxc/xc_dom_binloader.c rename to tools/libxc/xg_dom_binloader.c diff --git a/tools/libxc/xc_dom_boot.c b/tools/libxc/xg_dom_boot.c similarity index 100% rename from tools/libxc/xc_dom_boot.c rename to tools/libxc/xg_dom_boot.c diff --git a/tools/libxc/xc_dom_bzimageloader.c b/tools/libxc/xg_dom_bzimag= eloader.c similarity index 100% rename from tools/libxc/xc_dom_bzimageloader.c rename to tools/libxc/xg_dom_bzimageloader.c diff --git a/tools/libxc/xc_dom_compat_linux.c b/tools/libxc/xg_dom_compat_= linux.c similarity index 100% rename from tools/libxc/xc_dom_compat_linux.c rename to tools/libxc/xg_dom_compat_linux.c diff --git a/tools/libxc/xc_dom_core.c b/tools/libxc/xg_dom_core.c similarity index 100% rename from tools/libxc/xc_dom_core.c rename to tools/libxc/xg_dom_core.c diff --git a/tools/libxc/xc_dom_decompress_lz4.c b/tools/libxc/xg_dom_decom= press_lz4.c similarity index 100% rename from tools/libxc/xc_dom_decompress_lz4.c rename to tools/libxc/xg_dom_decompress_lz4.c diff --git a/tools/libxc/xc_dom_decompress_unsafe.c b/tools/libxc/xg_dom_de= compress_unsafe.c similarity index 100% rename from tools/libxc/xc_dom_decompress_unsafe.c rename to tools/libxc/xg_dom_decompress_unsafe.c diff --git a/tools/libxc/xc_dom_decompress_unsafe_bzip2.c b/tools/libxc/xg_= dom_decompress_unsafe_bzip2.c similarity index 100% rename from tools/libxc/xc_dom_decompress_unsafe_bzip2.c rename to tools/libxc/xg_dom_decompress_unsafe_bzip2.c diff --git a/tools/libxc/xc_dom_decompress_unsafe_lzma.c b/tools/libxc/xg_d= om_decompress_unsafe_lzma.c similarity index 100% rename from tools/libxc/xc_dom_decompress_unsafe_lzma.c rename to tools/libxc/xg_dom_decompress_unsafe_lzma.c diff --git a/tools/libxc/xc_dom_decompress_unsafe_lzo1x.c b/tools/libxc/xg_= dom_decompress_unsafe_lzo1x.c similarity index 100% rename from tools/libxc/xc_dom_decompress_unsafe_lzo1x.c rename to tools/libxc/xg_dom_decompress_unsafe_lzo1x.c diff --git a/tools/libxc/xc_dom_decompress_unsafe_xz.c b/tools/libxc/xg_dom= _decompress_unsafe_xz.c similarity index 100% rename from tools/libxc/xc_dom_decompress_unsafe_xz.c rename to tools/libxc/xg_dom_decompress_unsafe_xz.c diff --git a/tools/libxc/xc_dom_elfloader.c b/tools/libxc/xg_dom_elfloader.c similarity index 100% rename from tools/libxc/xc_dom_elfloader.c rename to tools/libxc/xg_dom_elfloader.c diff --git a/tools/libxc/xc_dom_hvmloader.c b/tools/libxc/xg_dom_hvmloader.c similarity index 100% rename from tools/libxc/xc_dom_hvmloader.c rename to tools/libxc/xg_dom_hvmloader.c diff --git a/tools/libxc/xc_dom_x86.c b/tools/libxc/xg_dom_x86.c similarity index 100% rename from tools/libxc/xc_dom_x86.c rename to tools/libxc/xg_dom_x86.c diff --git a/tools/libxc/xc_nomigrate.c b/tools/libxc/xg_nomigrate.c similarity index 100% rename from tools/libxc/xc_nomigrate.c rename to tools/libxc/xg_nomigrate.c diff --git a/tools/libxc/xc_offline_page.c b/tools/libxc/xg_offline_page.c similarity index 100% rename from tools/libxc/xc_offline_page.c rename to tools/libxc/xg_offline_page.c diff --git a/tools/libxc/xc_sr_common.c b/tools/libxc/xg_sr_common.c similarity index 100% rename from tools/libxc/xc_sr_common.c rename to tools/libxc/xg_sr_common.c diff --git a/tools/libxc/xc_sr_common_x86.c b/tools/libxc/xg_sr_common_x86.c similarity index 100% rename from tools/libxc/xc_sr_common_x86.c rename to tools/libxc/xg_sr_common_x86.c diff --git a/tools/libxc/xc_sr_common_x86_pv.c b/tools/libxc/xg_sr_common_x= 86_pv.c similarity index 100% rename from tools/libxc/xc_sr_common_x86_pv.c rename to tools/libxc/xg_sr_common_x86_pv.c diff --git a/tools/libxc/xc_sr_restore.c b/tools/libxc/xg_sr_restore.c similarity index 100% rename from tools/libxc/xc_sr_restore.c rename to tools/libxc/xg_sr_restore.c diff --git a/tools/libxc/xc_sr_restore_x86_hvm.c b/tools/libxc/xg_sr_restor= e_x86_hvm.c similarity index 100% rename from tools/libxc/xc_sr_restore_x86_hvm.c rename to tools/libxc/xg_sr_restore_x86_hvm.c diff --git a/tools/libxc/xc_sr_restore_x86_pv.c b/tools/libxc/xg_sr_restore= _x86_pv.c similarity index 100% rename from tools/libxc/xc_sr_restore_x86_pv.c rename to tools/libxc/xg_sr_restore_x86_pv.c diff --git a/tools/libxc/xc_sr_save.c b/tools/libxc/xg_sr_save.c similarity index 100% rename from tools/libxc/xc_sr_save.c rename to tools/libxc/xg_sr_save.c diff --git a/tools/libxc/xc_sr_save_x86_hvm.c b/tools/libxc/xg_sr_save_x86_= hvm.c similarity index 100% rename from tools/libxc/xc_sr_save_x86_hvm.c rename to tools/libxc/xg_sr_save_x86_hvm.c diff --git a/tools/libxc/xc_sr_save_x86_pv.c b/tools/libxc/xg_sr_save_x86_p= v.c similarity index 100% rename from tools/libxc/xc_sr_save_x86_pv.c rename to tools/libxc/xg_sr_save_x86_pv.c diff --git a/tools/libxc/xc_suspend.c b/tools/libxc/xg_suspend.c similarity index 100% rename from tools/libxc/xc_suspend.c rename to tools/libxc/xg_suspend.c --=20 2.26.2 From nobody Sun May 5 08:17:05 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org ARC-Seal: i=1; a=rsa-sha256; t=1597657820; cv=none; d=zohomail.com; s=zohoarc; b=io/MHASlNACDRm/AnFNcZ2AE1DDb6uzaYB9TBradCPzMfv8EWE087+8HpmvS/0a8fGT8jKeKdrQ16+G/E5b/Sd5nO5aUokq85RrHWQ5HDUu/me6QF24vF275pPwRVa6LCfJLUGgk2HIQO37syuHrTQ1o483TdrwwcrD/wZOiG8Y= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1597657820; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=AXefY59FQZF8Ev1Ed4JTJjANRnTUU2q+zt4eXa8OGYI=; b=RPn8oe4oLQ0wJpDXh4Wx7x1uxBiZD5HLoGKbVXV4ETBq1rN2naAxxCTUe/42GqULWzdQ0oqKl3+DC7uTc47wHqGJ/FEdmzLFgnlCi7goMLLRVJlwv0YFEq9vV9W7Knk9qO4huILZyDGeYezNiWmZiHnrCvKhZD7/3wDtJIYZZKc= ARC-Authentication-Results: i=1; mx.zohomail.com; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1597657820717342.44387442663515; Mon, 17 Aug 2020 02:50:20 -0700 (PDT) Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1k7bmE-0004eF-EO; Mon, 17 Aug 2020 09:50:02 +0000 Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1k7bmE-00046j-0v for xen-devel@lists.xenproject.org; Mon, 17 Aug 2020 09:50:02 +0000 Received: from mx2.suse.de (unknown [195.135.220.15]) by us1-rack-iad1.inumbo.com (Halon) with ESMTPS id c495a367-0ebd-40d4-a65a-ab916c5567d6; Mon, 17 Aug 2020 09:49:28 +0000 (UTC) Received: from relay2.suse.de (unknown [195.135.221.27]) by mx2.suse.de (Postfix) with ESMTP id 405B1AF0B; Mon, 17 Aug 2020 09:49:52 +0000 (UTC) X-Inumbo-ID: c495a367-0ebd-40d4-a65a-ab916c5567d6 X-Virus-Scanned: by amavisd-new at test-mx.suse.de From: Juergen Gross To: xen-devel@lists.xenproject.org Cc: Juergen Gross , Ian Jackson , Wei Liu Subject: [PATCH II v2 14/17] tools/libxc: rename libxenguest internal headers Date: Mon, 17 Aug 2020 11:49:19 +0200 Message-Id: <20200817094922.15768-15-jgross@suse.com> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20200817094922.15768-1-jgross@suse.com> References: <20200817094922.15768-1-jgross@suse.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-BeenThere: xen-devel@lists.xenproject.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Sender: "Xen-devel" Content-Type: text/plain; charset="utf-8" Rename the header files private to libxenguest from xc_*.h to xg_*.h. Signed-off-by: Juergen Gross --- tools/libxc/xg_dom_bzimageloader.c | 2 +- tools/libxc/{xc_dom_decompress.h =3D> xg_dom_decompress.h} | 2 +- tools/libxc/xg_dom_decompress_lz4.c | 2 +- tools/libxc/xg_dom_decompress_unsafe.c | 2 +- .../{xc_dom_decompress_unsafe.h =3D> xg_dom_decompress_unsafe.h} | 0 tools/libxc/xg_dom_decompress_unsafe_bzip2.c | 2 +- tools/libxc/xg_dom_decompress_unsafe_lzma.c | 2 +- tools/libxc/xg_dom_decompress_unsafe_lzo1x.c | 2 +- tools/libxc/xg_dom_decompress_unsafe_xz.c | 2 +- tools/libxc/xg_sr_common.c | 2 +- tools/libxc/{xc_sr_common.h =3D> xg_sr_common.h} | 2 +- tools/libxc/xg_sr_common_x86.c | 2 +- tools/libxc/{xc_sr_common_x86.h =3D> xg_sr_common_x86.h} | 2 +- tools/libxc/xg_sr_common_x86_pv.c | 2 +- tools/libxc/{xc_sr_common_x86_pv.h =3D> xg_sr_common_x86_pv.h} | 2 +- tools/libxc/xg_sr_restore.c | 2 +- tools/libxc/xg_sr_restore_x86_hvm.c | 2 +- tools/libxc/xg_sr_restore_x86_pv.c | 2 +- tools/libxc/xg_sr_save.c | 2 +- tools/libxc/xg_sr_save_x86_hvm.c | 2 +- tools/libxc/xg_sr_save_x86_pv.c | 2 +- tools/libxc/{xc_sr_stream_format.h =3D> xg_sr_stream_format.h} | 0 22 files changed, 20 insertions(+), 20 deletions(-) rename tools/libxc/{xc_dom_decompress.h =3D> xg_dom_decompress.h} (77%) rename tools/libxc/{xc_dom_decompress_unsafe.h =3D> xg_dom_decompress_unsa= fe.h} (100%) rename tools/libxc/{xc_sr_common.h =3D> xg_sr_common.h} (99%) rename tools/libxc/{xc_sr_common_x86.h =3D> xg_sr_common_x86.h} (98%) rename tools/libxc/{xc_sr_common_x86_pv.h =3D> xg_sr_common_x86_pv.h} (98%) rename tools/libxc/{xc_sr_stream_format.h =3D> xg_sr_stream_format.h} (100= %) diff --git a/tools/libxc/xg_dom_bzimageloader.c b/tools/libxc/xg_dom_bzimag= eloader.c index a7d70cc7c6..f959a77602 100644 --- a/tools/libxc/xg_dom_bzimageloader.c +++ b/tools/libxc/xg_dom_bzimageloader.c @@ -32,7 +32,7 @@ #include =20 #include "xg_private.h" -#include "xc_dom_decompress.h" +#include "xg_dom_decompress.h" =20 #include =20 diff --git a/tools/libxc/xc_dom_decompress.h b/tools/libxc/xg_dom_decompres= s.h similarity index 77% rename from tools/libxc/xc_dom_decompress.h rename to tools/libxc/xg_dom_decompress.h index 42cefa3f0e..d9a21cf297 100644 --- a/tools/libxc/xc_dom_decompress.h +++ b/tools/libxc/xg_dom_decompress.h @@ -1,7 +1,7 @@ #ifndef __MINIOS__ # include "xc_dom.h" #else -# include "xc_dom_decompress_unsafe.h" +# include "xg_dom_decompress_unsafe.h" #endif =20 int xc_try_lz4_decode(struct xc_dom_image *dom, void **blob, size_t *size); diff --git a/tools/libxc/xg_dom_decompress_lz4.c b/tools/libxc/xg_dom_decom= press_lz4.c index b6a33f27a8..97ba620d86 100644 --- a/tools/libxc/xg_dom_decompress_lz4.c +++ b/tools/libxc/xg_dom_decompress_lz4.c @@ -4,7 +4,7 @@ #include =20 #include "xg_private.h" -#include "xc_dom_decompress.h" +#include "xg_dom_decompress.h" =20 #define CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS =20 diff --git a/tools/libxc/xg_dom_decompress_unsafe.c b/tools/libxc/xg_dom_de= compress_unsafe.c index 164e35558f..21d964787d 100644 --- a/tools/libxc/xg_dom_decompress_unsafe.c +++ b/tools/libxc/xg_dom_decompress_unsafe.c @@ -3,7 +3,7 @@ #include =20 #include "xg_private.h" -#include "xc_dom_decompress_unsafe.h" +#include "xg_dom_decompress_unsafe.h" =20 static struct xc_dom_image *unsafe_dom; static unsigned char *output_blob; diff --git a/tools/libxc/xc_dom_decompress_unsafe.h b/tools/libxc/xg_dom_de= compress_unsafe.h similarity index 100% rename from tools/libxc/xc_dom_decompress_unsafe.h rename to tools/libxc/xg_dom_decompress_unsafe.h diff --git a/tools/libxc/xg_dom_decompress_unsafe_bzip2.c b/tools/libxc/xg_= dom_decompress_unsafe_bzip2.c index 4dcabe4061..9d3709e6cc 100644 --- a/tools/libxc/xg_dom_decompress_unsafe_bzip2.c +++ b/tools/libxc/xg_dom_decompress_unsafe_bzip2.c @@ -3,7 +3,7 @@ #include =20 #include "xg_private.h" -#include "xc_dom_decompress_unsafe.h" +#include "xg_dom_decompress_unsafe.h" =20 #include "../../xen/common/bunzip2.c" =20 diff --git a/tools/libxc/xg_dom_decompress_unsafe_lzma.c b/tools/libxc/xg_d= om_decompress_unsafe_lzma.c index 4ee8cdbab1..5d178f0c43 100644 --- a/tools/libxc/xg_dom_decompress_unsafe_lzma.c +++ b/tools/libxc/xg_dom_decompress_unsafe_lzma.c @@ -3,7 +3,7 @@ #include =20 #include "xg_private.h" -#include "xc_dom_decompress_unsafe.h" +#include "xg_dom_decompress_unsafe.h" =20 #include "../../xen/common/unlzma.c" =20 diff --git a/tools/libxc/xg_dom_decompress_unsafe_lzo1x.c b/tools/libxc/xg_= dom_decompress_unsafe_lzo1x.c index 59888b9da2..a4f8ebd42d 100644 --- a/tools/libxc/xg_dom_decompress_unsafe_lzo1x.c +++ b/tools/libxc/xg_dom_decompress_unsafe_lzo1x.c @@ -5,7 +5,7 @@ #include =20 #include "xg_private.h" -#include "xc_dom_decompress_unsafe.h" +#include "xg_dom_decompress_unsafe.h" =20 typedef uint8_t u8; typedef uint32_t u32; diff --git a/tools/libxc/xg_dom_decompress_unsafe_xz.c b/tools/libxc/xg_dom= _decompress_unsafe_xz.c index fe7a7f49b4..ff6824b38d 100644 --- a/tools/libxc/xg_dom_decompress_unsafe_xz.c +++ b/tools/libxc/xg_dom_decompress_unsafe_xz.c @@ -6,7 +6,7 @@ #include =20 #include "xg_private.h" -#include "xc_dom_decompress_unsafe.h" +#include "xg_dom_decompress_unsafe.h" =20 // TODO #define XZ_DEC_X86 diff --git a/tools/libxc/xg_sr_common.c b/tools/libxc/xg_sr_common.c index 7c54b03414..17567ab133 100644 --- a/tools/libxc/xg_sr_common.c +++ b/tools/libxc/xg_sr_common.c @@ -1,6 +1,6 @@ #include =20 -#include "xc_sr_common.h" +#include "xg_sr_common.h" =20 #include =20 diff --git a/tools/libxc/xc_sr_common.h b/tools/libxc/xg_sr_common.h similarity index 99% rename from tools/libxc/xc_sr_common.h rename to tools/libxc/xg_sr_common.h index f3bdea8006..35f23fabb5 100644 --- a/tools/libxc/xc_sr_common.h +++ b/tools/libxc/xg_sr_common.h @@ -8,7 +8,7 @@ #include "xc_dom.h" #include "xc_bitops.h" =20 -#include "xc_sr_stream_format.h" +#include "xg_sr_stream_format.h" =20 /* String representation of Domain Header types. */ const char *dhdr_type_to_str(uint32_t type); diff --git a/tools/libxc/xg_sr_common_x86.c b/tools/libxc/xg_sr_common_x86.c index 77ea044a74..6f12483907 100644 --- a/tools/libxc/xg_sr_common_x86.c +++ b/tools/libxc/xg_sr_common_x86.c @@ -1,4 +1,4 @@ -#include "xc_sr_common_x86.h" +#include "xg_sr_common_x86.h" =20 int write_x86_tsc_info(struct xc_sr_context *ctx) { diff --git a/tools/libxc/xc_sr_common_x86.h b/tools/libxc/xg_sr_common_x86.h similarity index 98% rename from tools/libxc/xc_sr_common_x86.h rename to tools/libxc/xg_sr_common_x86.h index e08d81e0e7..b55758c96d 100644 --- a/tools/libxc/xc_sr_common_x86.h +++ b/tools/libxc/xg_sr_common_x86.h @@ -1,7 +1,7 @@ #ifndef __COMMON_X86__H #define __COMMON_X86__H =20 -#include "xc_sr_common.h" +#include "xg_sr_common.h" =20 /* * Obtains a domains TSC information from Xen and writes a X86_TSC_INFO re= cord diff --git a/tools/libxc/xg_sr_common_x86_pv.c b/tools/libxc/xg_sr_common_x= 86_pv.c index d3d425cb82..cd33406aab 100644 --- a/tools/libxc/xg_sr_common_x86_pv.c +++ b/tools/libxc/xg_sr_common_x86_pv.c @@ -1,6 +1,6 @@ #include =20 -#include "xc_sr_common_x86_pv.h" +#include "xg_sr_common_x86_pv.h" =20 xen_pfn_t mfn_to_pfn(struct xc_sr_context *ctx, xen_pfn_t mfn) { diff --git a/tools/libxc/xc_sr_common_x86_pv.h b/tools/libxc/xg_sr_common_x= 86_pv.h similarity index 98% rename from tools/libxc/xc_sr_common_x86_pv.h rename to tools/libxc/xg_sr_common_x86_pv.h index 2ed03309af..953b5bfb8d 100644 --- a/tools/libxc/xc_sr_common_x86_pv.h +++ b/tools/libxc/xg_sr_common_x86_pv.h @@ -1,7 +1,7 @@ #ifndef __COMMON_X86_PV_H #define __COMMON_X86_PV_H =20 -#include "xc_sr_common_x86.h" +#include "xg_sr_common_x86.h" =20 /* Virtual address ranges reserved for hypervisor. */ #define HYPERVISOR_VIRT_START_X86_64 0xFFFF800000000000ULL diff --git a/tools/libxc/xg_sr_restore.c b/tools/libxc/xg_sr_restore.c index bc811e6e3a..b57a787519 100644 --- a/tools/libxc/xg_sr_restore.c +++ b/tools/libxc/xg_sr_restore.c @@ -2,7 +2,7 @@ =20 #include =20 -#include "xc_sr_common.h" +#include "xg_sr_common.h" =20 /* * Read and validate the Image and Domain headers. diff --git a/tools/libxc/xg_sr_restore_x86_hvm.c b/tools/libxc/xg_sr_restor= e_x86_hvm.c index a77624cc9d..d6ea6f3012 100644 --- a/tools/libxc/xg_sr_restore_x86_hvm.c +++ b/tools/libxc/xg_sr_restore_x86_hvm.c @@ -1,7 +1,7 @@ #include #include =20 -#include "xc_sr_common_x86.h" +#include "xg_sr_common_x86.h" =20 /* * Process an HVM_CONTEXT record from the stream. diff --git a/tools/libxc/xg_sr_restore_x86_pv.c b/tools/libxc/xg_sr_restore= _x86_pv.c index d086271efb..dc50b0f5a8 100644 --- a/tools/libxc/xg_sr_restore_x86_pv.c +++ b/tools/libxc/xg_sr_restore_x86_pv.c @@ -1,6 +1,6 @@ #include =20 -#include "xc_sr_common_x86_pv.h" +#include "xg_sr_common_x86_pv.h" =20 static xen_pfn_t pfn_to_mfn(const struct xc_sr_context *ctx, xen_pfn_t pfn) { diff --git a/tools/libxc/xg_sr_save.c b/tools/libxc/xg_sr_save.c index 80b1d5de1f..d74c72cba6 100644 --- a/tools/libxc/xg_sr_save.c +++ b/tools/libxc/xg_sr_save.c @@ -1,7 +1,7 @@ #include #include =20 -#include "xc_sr_common.h" +#include "xg_sr_common.h" =20 /* * Writes an Image header and Domain header into the stream. diff --git a/tools/libxc/xg_sr_save_x86_hvm.c b/tools/libxc/xg_sr_save_x86_= hvm.c index 0b2abb26bd..1634a7bc43 100644 --- a/tools/libxc/xg_sr_save_x86_hvm.c +++ b/tools/libxc/xg_sr_save_x86_hvm.c @@ -1,6 +1,6 @@ #include =20 -#include "xc_sr_common_x86.h" +#include "xg_sr_common_x86.h" =20 #include =20 diff --git a/tools/libxc/xg_sr_save_x86_pv.c b/tools/libxc/xg_sr_save_x86_p= v.c index c7e246ef4f..4964f1f7b8 100644 --- a/tools/libxc/xg_sr_save_x86_pv.c +++ b/tools/libxc/xg_sr_save_x86_pv.c @@ -1,7 +1,7 @@ #include #include =20 -#include "xc_sr_common_x86_pv.h" +#include "xg_sr_common_x86_pv.h" =20 /* Check a 64 bit virtual address for being canonical. */ static inline bool is_canonical_address(xen_vaddr_t vaddr) diff --git a/tools/libxc/xc_sr_stream_format.h b/tools/libxc/xg_sr_stream_f= ormat.h similarity index 100% rename from tools/libxc/xc_sr_stream_format.h rename to tools/libxc/xg_sr_stream_format.h --=20 2.26.2 From nobody Sun May 5 08:17:05 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org ARC-Seal: i=1; a=rsa-sha256; t=1597658230; cv=none; d=zohomail.com; s=zohoarc; b=DVDQsvJYxcZBQEffIfRHialQQd0QnCYMmPBEogaSR7KFeqsmcHbnsnepmk0/Q1mlj8L3F6iWNFkRl/AkRUqsxdMSsMt6t9doV/gJvO0ymmRpIqhyDT0mweebdcR6LfAoIn9uh1mh/JD362OLXDTnynavwjZSeiOgopiIRqhqs+k= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1597658230; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=1tugrXFQlqXv5CxNynrCIL7xDg9Phv+l8/5ssDYgs5Y=; b=cHz4blL8SNwlZu4lIDHFQZsflZBv69I/2VMtqjOIVgtuapOIlD6RKmhf7rt7QJ4i0DPfqqqwD309N8hNlE/5urwRRakBybUpToGY5GzlIbUMDjXgYJN6fnMqaBMZfRRsneRPxJBDs1Gy0YdPb17vau2Bz69SF7U8iHlcJD7oBQI= ARC-Authentication-Results: i=1; mx.zohomail.com; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1597658230823709.7088089637899; Mon, 17 Aug 2020 02:57:10 -0700 (PDT) Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1k7bsr-0006n6-Rr; Mon, 17 Aug 2020 09:56:53 +0000 Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1k7bmT-00046j-1M for xen-devel@lists.xenproject.org; Mon, 17 Aug 2020 09:50:17 +0000 Received: from mx2.suse.de (unknown [195.135.220.15]) by us1-rack-iad1.inumbo.com (Halon) with ESMTPS id 6fbcaa63-1b30-4132-b980-518286e87702; Mon, 17 Aug 2020 09:49:28 +0000 (UTC) Received: from relay2.suse.de (unknown [195.135.221.27]) by mx2.suse.de (Postfix) with ESMTP id 751CBAD33; Mon, 17 Aug 2020 09:49:52 +0000 (UTC) X-Inumbo-ID: 6fbcaa63-1b30-4132-b980-518286e87702 X-Virus-Scanned: by amavisd-new at test-mx.suse.de From: Juergen Gross To: xen-devel@lists.xenproject.org Cc: Juergen Gross , Samuel Thibault , Ian Jackson , Wei Liu , Anthony PERARD , =?UTF-8?q?Marek=20Marczykowski-G=C3=B3recki?= Subject: [PATCH II v2 15/17] tools/misc: rename xc_dom.h do xenctrl_dom.h Date: Mon, 17 Aug 2020 11:49:20 +0200 Message-Id: <20200817094922.15768-16-jgross@suse.com> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20200817094922.15768-1-jgross@suse.com> References: <20200817094922.15768-1-jgross@suse.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-BeenThere: xen-devel@lists.xenproject.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Sender: "Xen-devel" Content-Type: text/plain; charset="utf-8" For being able to disentangle lixenctrl and libxenguest headers xc_dom.h will need to be public. Prepare that by renaming xc_dom.h to xenctrl_dom.h. Signed-off-by: Juergen Gross --- stubdom/grub/kexec.c | 2 +- tools/helpers/init-xenstore-domain.c | 2 +- tools/libxc/include/{xc_dom.h =3D> xenctrl_dom.h} | 0 tools/libxc/xc_core.c | 2 +- tools/libxc/xc_private.c | 2 +- tools/libxc/xg_dom_arm.c | 2 +- tools/libxc/xg_dom_armzimageloader.c | 2 +- tools/libxc/xg_dom_binloader.c | 2 +- tools/libxc/xg_dom_boot.c | 2 +- tools/libxc/xg_dom_compat_linux.c | 2 +- tools/libxc/xg_dom_core.c | 2 +- tools/libxc/xg_dom_decompress.h | 2 +- tools/libxc/xg_dom_decompress_unsafe.h | 2 +- tools/libxc/xg_dom_elfloader.c | 2 +- tools/libxc/xg_dom_hvmloader.c | 2 +- tools/libxc/xg_dom_x86.c | 2 +- tools/libxc/xg_offline_page.c | 2 +- tools/libxc/xg_sr_common.h | 2 +- tools/libxl/libxl_arm.c | 2 +- tools/libxl/libxl_arm.h | 2 +- tools/libxl/libxl_create.c | 2 +- tools/libxl/libxl_dm.c | 2 +- tools/libxl/libxl_dom.c | 2 +- tools/libxl/libxl_internal.h | 2 +- tools/libxl/libxl_vnuma.c | 2 +- tools/libxl/libxl_x86.c | 2 +- tools/libxl/libxl_x86_acpi.c | 2 +- tools/python/xen/lowlevel/xc/xc.c | 2 +- tools/xcutils/readnotes.c | 2 +- 29 files changed, 28 insertions(+), 28 deletions(-) rename tools/libxc/include/{xc_dom.h =3D> xenctrl_dom.h} (100%) diff --git a/stubdom/grub/kexec.c b/stubdom/grub/kexec.c index 0e68b969a2..24001220a9 100644 --- a/stubdom/grub/kexec.c +++ b/stubdom/grub/kexec.c @@ -20,7 +20,7 @@ #include =20 #include -#include +#include =20 #include #include diff --git a/tools/helpers/init-xenstore-domain.c b/tools/helpers/init-xens= tore-domain.c index 4ce8299c3c..5bdb48dc80 100644 --- a/tools/helpers/init-xenstore-domain.c +++ b/tools/helpers/init-xenstore-domain.c @@ -8,7 +8,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/tools/libxc/include/xc_dom.h b/tools/libxc/include/xenctrl_dom= .h similarity index 100% rename from tools/libxc/include/xc_dom.h rename to tools/libxc/include/xenctrl_dom.h diff --git a/tools/libxc/xc_core.c b/tools/libxc/xc_core.c index 2ee1d205b4..7df1fccd62 100644 --- a/tools/libxc/xc_core.c +++ b/tools/libxc/xc_core.c @@ -62,7 +62,7 @@ =20 #include "xg_private.h" #include "xc_core.h" -#include "xc_dom.h" +#include "xenctrl_dom.h" #include #include =20 diff --git a/tools/libxc/xc_private.c b/tools/libxc/xc_private.c index 90974d572e..6ecdf6953f 100644 --- a/tools/libxc/xc_private.c +++ b/tools/libxc/xc_private.c @@ -19,7 +19,7 @@ =20 #include "xc_private.h" #include "xg_private.h" -#include "xc_dom.h" +#include "xenctrl_dom.h" #include #include #include diff --git a/tools/libxc/xg_dom_arm.c b/tools/libxc/xg_dom_arm.c index 931404c222..3f66f1d890 100644 --- a/tools/libxc/xg_dom_arm.c +++ b/tools/libxc/xg_dom_arm.c @@ -24,7 +24,7 @@ #include =20 #include "xg_private.h" -#include "xc_dom.h" +#include "xenctrl_dom.h" =20 #define NR_MAGIC_PAGES 4 #define CONSOLE_PFN_OFFSET 0 diff --git a/tools/libxc/xg_dom_armzimageloader.c b/tools/libxc/xg_dom_armz= imageloader.c index 0df8c2a4b1..4246c8e5fa 100644 --- a/tools/libxc/xg_dom_armzimageloader.c +++ b/tools/libxc/xg_dom_armzimageloader.c @@ -25,7 +25,7 @@ #include =20 #include "xg_private.h" -#include "xc_dom.h" +#include "xenctrl_dom.h" =20 #include /* XXX ntohl is not the right function... */ =20 diff --git a/tools/libxc/xg_dom_binloader.c b/tools/libxc/xg_dom_binloader.c index d6f7f2a500..870a921427 100644 --- a/tools/libxc/xg_dom_binloader.c +++ b/tools/libxc/xg_dom_binloader.c @@ -83,7 +83,7 @@ #include =20 #include "xg_private.h" -#include "xc_dom.h" +#include "xenctrl_dom.h" =20 #define round_pgup(_p) (((_p)+(PAGE_SIZE_X86-1))&PAGE_MASK_X86) #define round_pgdown(_p) ((_p)&PAGE_MASK_X86) diff --git a/tools/libxc/xg_dom_boot.c b/tools/libxc/xg_dom_boot.c index bb599b33ba..1e31e92244 100644 --- a/tools/libxc/xg_dom_boot.c +++ b/tools/libxc/xg_dom_boot.c @@ -31,7 +31,7 @@ #include =20 #include "xg_private.h" -#include "xc_dom.h" +#include "xenctrl_dom.h" #include "xc_core.h" #include #include diff --git a/tools/libxc/xg_dom_compat_linux.c b/tools/libxc/xg_dom_compat_= linux.c index b3d43feed9..b645f0b14b 100644 --- a/tools/libxc/xg_dom_compat_linux.c +++ b/tools/libxc/xg_dom_compat_linux.c @@ -30,7 +30,7 @@ =20 #include "xenctrl.h" #include "xg_private.h" -#include "xc_dom.h" +#include "xenctrl_dom.h" =20 /* -----------------------------------------------------------------------= - */ =20 diff --git a/tools/libxc/xg_dom_core.c b/tools/libxc/xg_dom_core.c index 327c8a8575..1c91cce315 100644 --- a/tools/libxc/xg_dom_core.c +++ b/tools/libxc/xg_dom_core.c @@ -32,7 +32,7 @@ #include =20 #include "xg_private.h" -#include "xc_dom.h" +#include "xenctrl_dom.h" #include "_paths.h" =20 /* -----------------------------------------------------------------------= - */ diff --git a/tools/libxc/xg_dom_decompress.h b/tools/libxc/xg_dom_decompres= s.h index d9a21cf297..c5ab2e59eb 100644 --- a/tools/libxc/xg_dom_decompress.h +++ b/tools/libxc/xg_dom_decompress.h @@ -1,5 +1,5 @@ #ifndef __MINIOS__ -# include "xc_dom.h" +# include "xenctrl_dom.h" #else # include "xg_dom_decompress_unsafe.h" #endif diff --git a/tools/libxc/xg_dom_decompress_unsafe.h b/tools/libxc/xg_dom_de= compress_unsafe.h index 64f68864b1..fb84b6add8 100644 --- a/tools/libxc/xg_dom_decompress_unsafe.h +++ b/tools/libxc/xg_dom_decompress_unsafe.h @@ -1,4 +1,4 @@ -#include "xc_dom.h" +#include "xenctrl_dom.h" =20 typedef int decompress_fn(unsigned char *inbuf, unsigned int len, int (*fill)(void*, unsigned int), diff --git a/tools/libxc/xg_dom_elfloader.c b/tools/libxc/xg_dom_elfloader.c index b327db219d..7043c3bbba 100644 --- a/tools/libxc/xg_dom_elfloader.c +++ b/tools/libxc/xg_dom_elfloader.c @@ -26,7 +26,7 @@ #include =20 #include "xg_private.h" -#include "xc_dom.h" +#include "xenctrl_dom.h" #include "xc_bitops.h" =20 #define XEN_VER "xen-3.0" diff --git a/tools/libxc/xg_dom_hvmloader.c b/tools/libxc/xg_dom_hvmloader.c index 3f0bd65547..995a0f3dc3 100644 --- a/tools/libxc/xg_dom_hvmloader.c +++ b/tools/libxc/xg_dom_hvmloader.c @@ -26,7 +26,7 @@ #include =20 #include "xg_private.h" -#include "xc_dom.h" +#include "xenctrl_dom.h" #include "xc_bitops.h" =20 /* -----------------------------------------------------------------------= - */ diff --git a/tools/libxc/xg_dom_x86.c b/tools/libxc/xg_dom_x86.c index 9439805eaa..842dbcccdd 100644 --- a/tools/libxc/xg_dom_x86.c +++ b/tools/libxc/xg_dom_x86.c @@ -38,7 +38,7 @@ #include =20 #include "xg_private.h" -#include "xc_dom.h" +#include "xenctrl_dom.h" #include "xenctrl.h" =20 /* -----------------------------------------------------------------------= - */ diff --git a/tools/libxc/xg_offline_page.c b/tools/libxc/xg_offline_page.c index 19538fc436..77e8889b11 100644 --- a/tools/libxc/xg_offline_page.c +++ b/tools/libxc/xg_offline_page.c @@ -28,7 +28,7 @@ #include =20 #include "xc_private.h" -#include "xc_dom.h" +#include "xenctrl_dom.h" #include "xg_private.h" #include "xg_save_restore.h" =20 diff --git a/tools/libxc/xg_sr_common.h b/tools/libxc/xg_sr_common.h index 35f23fabb5..13fcc47420 100644 --- a/tools/libxc/xg_sr_common.h +++ b/tools/libxc/xg_sr_common.h @@ -5,7 +5,7 @@ =20 #include "xg_private.h" #include "xg_save_restore.h" -#include "xc_dom.h" +#include "xenctrl_dom.h" #include "xc_bitops.h" =20 #include "xg_sr_stream_format.h" diff --git a/tools/libxl/libxl_arm.c b/tools/libxl/libxl_arm.c index 34f8a29056..975a4d730a 100644 --- a/tools/libxl/libxl_arm.c +++ b/tools/libxl/libxl_arm.c @@ -3,7 +3,7 @@ #include "libxl_libfdt_compat.h" #include "libxl_arm.h" =20 -#include +#include #include #include #include diff --git a/tools/libxl/libxl_arm.h b/tools/libxl/libxl_arm.h index 8aef210d4c..52c2ab5e3a 100644 --- a/tools/libxl/libxl_arm.h +++ b/tools/libxl/libxl_arm.h @@ -17,7 +17,7 @@ #include "libxl_internal.h" #include "libxl_arch.h" =20 -#include +#include =20 _hidden int libxl__prepare_acpi(libxl__gc *gc, libxl_domain_build_info *info, diff --git a/tools/libxl/libxl_create.c b/tools/libxl/libxl_create.c index 2814818e34..1031b75159 100644 --- a/tools/libxl/libxl_create.c +++ b/tools/libxl/libxl_create.c @@ -20,7 +20,7 @@ #include "libxl_internal.h" #include "libxl_arch.h" =20 -#include +#include #include #include #include diff --git a/tools/libxl/libxl_dm.c b/tools/libxl/libxl_dm.c index f2dc5696b9..fec4e0fbe5 100644 --- a/tools/libxl/libxl_dm.c +++ b/tools/libxl/libxl_dm.c @@ -19,7 +19,7 @@ =20 #include "libxl_internal.h" =20 -#include +#include #include #include #include diff --git a/tools/libxl/libxl_dom.c b/tools/libxl/libxl_dom.c index f8661e90d4..e2dca64aa1 100644 --- a/tools/libxl/libxl_dom.c +++ b/tools/libxl/libxl_dom.c @@ -20,7 +20,7 @@ #include "libxl_internal.h" #include "libxl_arch.h" =20 -#include +#include #include #include #include diff --git a/tools/libxl/libxl_internal.h b/tools/libxl/libxl_internal.h index c63d0686fd..e16ae9630b 100644 --- a/tools/libxl/libxl_internal.h +++ b/tools/libxl/libxl_internal.h @@ -57,7 +57,7 @@ #include #include #include -#include +#include =20 #include =20 diff --git a/tools/libxl/libxl_vnuma.c b/tools/libxl/libxl_vnuma.c index 8ec2abb2e6..c2e144ceae 100644 --- a/tools/libxl/libxl_vnuma.c +++ b/tools/libxl/libxl_vnuma.c @@ -17,7 +17,7 @@ #include "libxl_arch.h" #include =20 -#include +#include =20 bool libxl__vnuma_configured(const libxl_domain_build_info *b_info) { diff --git a/tools/libxl/libxl_x86.c b/tools/libxl/libxl_x86.c index e57f63282e..7d95506e00 100644 --- a/tools/libxl/libxl_x86.c +++ b/tools/libxl/libxl_x86.c @@ -1,7 +1,7 @@ #include "libxl_internal.h" #include "libxl_arch.h" =20 -#include +#include =20 int libxl__arch_domain_prepare_config(libxl__gc *gc, libxl_domain_config *d_config, diff --git a/tools/libxl/libxl_x86_acpi.c b/tools/libxl/libxl_x86_acpi.c index ed6610c84e..3df86c7be5 100644 --- a/tools/libxl/libxl_x86_acpi.c +++ b/tools/libxl/libxl_x86_acpi.c @@ -18,7 +18,7 @@ #include #include "libacpi/libacpi.h" =20 -#include +#include =20 /* Number of pages holding ACPI tables */ #define NUM_ACPI_PAGES 16 diff --git a/tools/python/xen/lowlevel/xc/xc.c b/tools/python/xen/lowlevel/= xc/xc.c index 8fde5f311f..8c7b184f0b 100644 --- a/tools/python/xen/lowlevel/xc/xc.c +++ b/tools/python/xen/lowlevel/xc/xc.c @@ -17,7 +17,7 @@ #include =20 #include -#include "xc_dom.h" +#include "xenctrl_dom.h" #include #include =20 diff --git a/tools/xcutils/readnotes.c b/tools/xcutils/readnotes.c index e682dd1a21..a6b7358e70 100644 --- a/tools/xcutils/readnotes.c +++ b/tools/xcutils/readnotes.c @@ -12,7 +12,7 @@ #include =20 #include -#include /* gunzip bits */ +#include /* gunzip bits */ =20 #include =20 --=20 2.26.2 From nobody Sun May 5 08:17:05 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org ARC-Seal: i=1; a=rsa-sha256; t=1597657832; cv=none; d=zohomail.com; s=zohoarc; b=QVPIti1SgkpGFfYb7vdjoF5Z6jeWpoETdZUp+ILZ59YNe6oOro03Ka450tThNf2xzA3Q5M4bcYVWHJ5W07fmXf1P3pInwotkwKvc/t4BR9KRlA3DCP712kuIkjzRkdeSDrmezDG0EZhHvnhpxu0lk5Y6GdZav65nOdcolWcSWUc= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1597657832; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=1VTz6xh4z4dfcJGz3ZgAjYKWZY1RflYfexpffIQeZ5c=; b=IV2vx148oY+h7Vk0LDxY0tT3PoOJzL+oF/VgO0lzmDCYbUSplZG/H5iM51PFrkavtSBwuhE8KlHOt5+DpQLitnEqSXxO1wknDLbv4ZmFWoHDrWxEW1I31yfvwE3h5AmaKb66iL/G+BJi3Yrv72H9daukhqP3n5GrO0FWq85YsHg= ARC-Authentication-Results: i=1; mx.zohomail.com; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1597657832574631.4031955853056; Mon, 17 Aug 2020 02:50:32 -0700 (PDT) Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1k7bmP-0005NK-E5; Mon, 17 Aug 2020 09:50:13 +0000 Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1k7bmO-00046j-17 for xen-devel@lists.xenproject.org; Mon, 17 Aug 2020 09:50:12 +0000 Received: from mx2.suse.de (unknown [195.135.220.15]) by us1-rack-iad1.inumbo.com (Halon) with ESMTPS id f97d99fb-a893-4fff-aaa2-ba33cd806984; Mon, 17 Aug 2020 09:49:28 +0000 (UTC) Received: from relay2.suse.de (unknown [195.135.221.27]) by mx2.suse.de (Postfix) with ESMTP id 989FCAF0D; Mon, 17 Aug 2020 09:49:52 +0000 (UTC) X-Inumbo-ID: f97d99fb-a893-4fff-aaa2-ba33cd806984 X-Virus-Scanned: by amavisd-new at test-mx.suse.de From: Juergen Gross To: xen-devel@lists.xenproject.org Cc: Juergen Gross , Ian Jackson , Wei Liu Subject: [PATCH II v2 16/17] tools/libxc: untangle libxenctrl from libxenguest Date: Mon, 17 Aug 2020 11:49:21 +0200 Message-Id: <20200817094922.15768-17-jgross@suse.com> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20200817094922.15768-1-jgross@suse.com> References: <20200817094922.15768-1-jgross@suse.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-BeenThere: xen-devel@lists.xenproject.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Sender: "Xen-devel" Content-Type: text/plain; charset="utf-8" Sources of libxenctrl and libxenguest are completely entangled. In practice libxenguest is a user of libxenctrl, so don't let any source libxenctrl include xg_private.h. This can be achieved by moving all definitions used by libxenctrl from xg_private.h to xc_private.h. Export xenctrl_dom.h as it will now be included by other public headers. Signed-off-by: Juergen Gross --- tools/libxc/Makefile | 3 ++- tools/libxc/include/xenctrl_dom.h | 10 +++++++-- tools/libxc/include/xenguest.h | 8 ++----- tools/libxc/xc_core.c | 5 +++-- tools/libxc/xc_core.h | 2 +- tools/libxc/xc_core_arm.c | 2 +- tools/libxc/xc_core_x86.c | 6 ++---- tools/libxc/xc_domain.c | 3 +-- tools/libxc/xc_hcall_buf.c | 1 - tools/libxc/xc_private.c | 1 - tools/libxc/xc_private.h | 36 +++++++++++++++++++++++++++++++ tools/libxc/xc_resume.c | 2 -- tools/libxc/xg_private.h | 22 ------------------- tools/libxc/xg_save_restore.h | 9 -------- 14 files changed, 56 insertions(+), 54 deletions(-) diff --git a/tools/libxc/Makefile b/tools/libxc/Makefile index e1b2c24106..1e4065f87c 100644 --- a/tools/libxc/Makefile +++ b/tools/libxc/Makefile @@ -193,7 +193,7 @@ install: build $(INSTALL_DATA) libxenctrl.a $(DESTDIR)$(libdir) $(SYMLINK_SHLIB) libxenctrl.so.$(MAJOR).$(MINOR) $(DESTDIR)$(libdir)/libx= enctrl.so.$(MAJOR) $(SYMLINK_SHLIB) libxenctrl.so.$(MAJOR) $(DESTDIR)$(libdir)/libxenctrl.so - $(INSTALL_DATA) include/xenctrl.h include/xenctrl_compat.h $(DESTDIR)$(in= cludedir) + $(INSTALL_DATA) include/xenctrl.h include/xenctrl_compat.h include/xenctr= l_dom.h $(DESTDIR)$(includedir) $(INSTALL_SHLIB) libxenguest.so.$(MAJOR).$(MINOR) $(DESTDIR)$(libdir) $(INSTALL_DATA) libxenguest.a $(DESTDIR)$(libdir) $(SYMLINK_SHLIB) libxenguest.so.$(MAJOR).$(MINOR) $(DESTDIR)$(libdir)/lib= xenguest.so.$(MAJOR) @@ -213,6 +213,7 @@ uninstall: rm -f $(DESTDIR)$(PKG_INSTALLDIR)/xencontrol.pc rm -f $(DESTDIR)$(includedir)/xenctrl.h rm -f $(DESTDIR)$(includedir)/xenctrl_compat.h + rm -f $(DESTDIR)$(includedir)/xenctrl_dom.h rm -f $(DESTDIR)$(libdir)/libxenctrl.so rm -f $(DESTDIR)$(libdir)/libxenctrl.so.$(MAJOR) rm -f $(DESTDIR)$(libdir)/libxenctrl.so.$(MAJOR).$(MINOR) diff --git a/tools/libxc/include/xenctrl_dom.h b/tools/libxc/include/xenctr= l_dom.h index 52a4d6c8c0..40b85b7755 100644 --- a/tools/libxc/include/xenctrl_dom.h +++ b/tools/libxc/include/xenctrl_dom.h @@ -17,9 +17,7 @@ #define _XC_DOM_H =20 #include -#include =20 -#define INVALID_PFN ((xen_pfn_t)-1) #define X86_HVM_NR_SPECIAL_PAGES 8 #define X86_HVM_END_SPECIAL_REGION 0xff000u #define XG_MAX_MODULES 2 @@ -38,6 +36,12 @@ struct xc_dom_seg { xen_pfn_t pages; }; =20 +struct xc_hvm_firmware_module { + uint8_t *data; + uint32_t length; + uint64_t guest_addr_out; +}; + struct xc_dom_mem { struct xc_dom_mem *next; void *ptr; @@ -255,6 +259,8 @@ struct xc_dom_arch { int (*setup_pgtables) (struct xc_dom_image * dom); =20 /* arch-specific data structs setup */ + /* in Mini-OS environment start_info might be a macro, avoid collision= . */ +#undef start_info int (*start_info) (struct xc_dom_image * dom); int (*shared_info) (struct xc_dom_image * dom, void *shared_info); int (*vcpu) (struct xc_dom_image * dom); diff --git a/tools/libxc/include/xenguest.h b/tools/libxc/include/xenguest.h index 7a12d21ff2..4643384790 100644 --- a/tools/libxc/include/xenguest.h +++ b/tools/libxc/include/xenguest.h @@ -22,6 +22,8 @@ #ifndef XENGUEST_H #define XENGUEST_H =20 +#include + #define XC_NUMA_NO_NODE (~0U) =20 #define XCFLAGS_LIVE (1 << 0) @@ -249,12 +251,6 @@ int xc_linux_build(xc_interface *xch, unsigned int console_evtchn, unsigned long *console_mfn); =20 -struct xc_hvm_firmware_module { - uint8_t *data; - uint32_t length; - uint64_t guest_addr_out; -}; - /* * Sets *lockfd to -1. * Has deallocated everything even on error. diff --git a/tools/libxc/xc_core.c b/tools/libxc/xc_core.c index 7df1fccd62..e8c6fb96f9 100644 --- a/tools/libxc/xc_core.c +++ b/tools/libxc/xc_core.c @@ -60,12 +60,13 @@ * */ =20 -#include "xg_private.h" +#include "xc_private.h" #include "xc_core.h" -#include "xenctrl_dom.h" #include #include =20 +#include + /* number of pages to write at a time */ #define DUMP_INCREMENT (4 * 1024) =20 diff --git a/tools/libxc/xc_core.h b/tools/libxc/xc_core.h index ed7ed53ca5..36fb755da2 100644 --- a/tools/libxc/xc_core.h +++ b/tools/libxc/xc_core.h @@ -21,7 +21,7 @@ #define XC_CORE_H =20 #include "xen/version.h" -#include "xg_private.h" +#include "xc_private.h" #include "xen/libelf/elfstructs.h" =20 /* section names */ diff --git a/tools/libxc/xc_core_arm.c b/tools/libxc/xc_core_arm.c index c3c492c971..7b587b4cc5 100644 --- a/tools/libxc/xc_core_arm.c +++ b/tools/libxc/xc_core_arm.c @@ -16,7 +16,7 @@ * */ =20 -#include "xg_private.h" +#include "xc_private.h" #include "xc_core.h" =20 #include diff --git a/tools/libxc/xc_core_x86.c b/tools/libxc/xc_core_x86.c index 54852a2d1a..cb76e6207b 100644 --- a/tools/libxc/xc_core_x86.c +++ b/tools/libxc/xc_core_x86.c @@ -17,12 +17,10 @@ * */ =20 -#include "xg_private.h" +#include "xc_private.h" #include "xc_core.h" #include =20 -#define GET_FIELD(_p, _f) ((dinfo->guest_width=3D=3D8) ? ((_p)->x64._f) : = ((_p)->x32._f)) - int xc_core_arch_gpfn_may_present(struct xc_core_arch_context *arch_ctxt, unsigned long pfn) @@ -98,7 +96,7 @@ xc_core_arch_map_p2m_rw(xc_interface *xch, struct domain_= info_context *dinfo, xc =20 live_p2m_frame_list_list =3D xc_map_foreign_range(xch, dom, PAGE_SIZE, PROT_READ, - GET_FIELD(live_shinfo, arch.pfn_to_mfn_frame_= list_list)); + GET_FIELD(live_shinfo, arch.pfn_to_mfn_frame_= list_list, dinfo->guest_width)); =20 if ( !live_p2m_frame_list_list ) { diff --git a/tools/libxc/xc_domain.c b/tools/libxc/xc_domain.c index fbc22c4df6..43fab50c06 100644 --- a/tools/libxc/xc_domain.c +++ b/tools/libxc/xc_domain.c @@ -21,8 +21,7 @@ =20 #include "xc_private.h" #include "xc_core.h" -#include "xg_private.h" -#include "xg_save_restore.h" +#include "xc_private.h" #include #include =20 diff --git a/tools/libxc/xc_hcall_buf.c b/tools/libxc/xc_hcall_buf.c index c1230a1e2b..200671f36f 100644 --- a/tools/libxc/xc_hcall_buf.c +++ b/tools/libxc/xc_hcall_buf.c @@ -19,7 +19,6 @@ #include =20 #include "xc_private.h" -#include "xg_private.h" =20 xc_hypercall_buffer_t XC__HYPERCALL_BUFFER_NAME(HYPERCALL_BUFFER_NULL) =3D= { .hbuf =3D NULL, diff --git a/tools/libxc/xc_private.c b/tools/libxc/xc_private.c index 6ecdf6953f..8af96b1b7e 100644 --- a/tools/libxc/xc_private.c +++ b/tools/libxc/xc_private.c @@ -18,7 +18,6 @@ */ =20 #include "xc_private.h" -#include "xg_private.h" #include "xenctrl_dom.h" #include #include diff --git a/tools/libxc/xc_private.h b/tools/libxc/xc_private.h index c77edb3c4c..f0b5f83ac8 100644 --- a/tools/libxc/xc_private.h +++ b/tools/libxc/xc_private.h @@ -26,6 +26,7 @@ #include #include #include +#include #include =20 #include "_paths.h" @@ -62,6 +63,39 @@ struct iovec { #include #endif =20 +#define ROUNDUP(_x,_w) (((unsigned long)(_x)+(1UL<<(_w))-1) & ~((1UL<<(_w)= )-1)) + +#define GET_FIELD(_p, _f, _w) (((_w) =3D=3D 8) ? ((_p)->x64._f) : ((_p)->x= 32._f)) + +#define SET_FIELD(_p, _f, _v, _w) do { \ + if ((_w) =3D=3D 8) \ + (_p)->x64._f =3D (_v); \ + else \ + (_p)->x32._f =3D (_v); \ +} while (0) + +/* XXX SMH: following skanky macros rely on variable p2m_size being set */ +/* XXX TJD: also, "guest_width" should be the guest's sizeof(unsigned long= ) */ + +struct domain_info_context { + unsigned int guest_width; + unsigned long p2m_size; +}; + +/* Number of xen_pfn_t in a page */ +#define FPP (PAGE_SIZE/(dinfo->guest_width)) + +/* Number of entries in the pfn_to_mfn_frame_list_list */ +#define P2M_FLL_ENTRIES (((dinfo->p2m_size)+(FPP*FPP)-1)/(FPP*FPP)) + +/* Number of entries in the pfn_to_mfn_frame_list */ +#define P2M_FL_ENTRIES (((dinfo->p2m_size)+FPP-1)/FPP) + +/* Size in bytes of the pfn_to_mfn_frame_list */ +#define P2M_GUEST_FL_SIZE ((P2M_FL_ENTRIES) * (dinfo->guest_width)) +#define P2M_TOOLS_FL_SIZE ((P2M_FL_ENTRIES) * \ + max_t(size_t, sizeof(xen_pfn_t), dinfo->guest_w= idth)) + #define DECLARE_DOMCTL struct xen_domctl domctl #define DECLARE_SYSCTL struct xen_sysctl sysctl #define DECLARE_PHYSDEV_OP struct physdev_op physdev_op @@ -75,6 +109,8 @@ struct iovec { #define PAGE_SIZE XC_PAGE_SIZE #define PAGE_MASK XC_PAGE_MASK =20 +#define INVALID_PFN ((xen_pfn_t)-1) + /* ** Define max dirty page cache to permit during save/restore -- need to ba= lance=20 ** keeping cache usage down with CPU impact of invalidating too often. diff --git a/tools/libxc/xc_resume.c b/tools/libxc/xc_resume.c index c169204fac..94c6c9fb31 100644 --- a/tools/libxc/xc_resume.c +++ b/tools/libxc/xc_resume.c @@ -14,8 +14,6 @@ */ =20 #include "xc_private.h" -#include "xg_private.h" -#include "xg_save_restore.h" =20 #if defined(__i386__) || defined(__x86_64__) =20 diff --git a/tools/libxc/xg_private.h b/tools/libxc/xg_private.h index 40b5baecde..0000b2b9b6 100644 --- a/tools/libxc/xg_private.h +++ b/tools/libxc/xg_private.h @@ -97,15 +97,6 @@ typedef uint64_t x86_pgentry_t; =20 #define NRPAGES(x) (ROUNDUP(x, PAGE_SHIFT) >> PAGE_SHIFT) =20 - -/* XXX SMH: following skanky macros rely on variable p2m_size being set */ -/* XXX TJD: also, "guest_width" should be the guest's sizeof(unsigned long= ) */ - -struct domain_info_context { - unsigned int guest_width; - unsigned long p2m_size; -}; - static inline xen_pfn_t xc_pfn_to_mfn(xen_pfn_t pfn, xen_pfn_t *p2m, unsigned gwidth) { @@ -121,19 +112,6 @@ static inline xen_pfn_t xc_pfn_to_mfn(xen_pfn_t pfn, x= en_pfn_t *p2m, } } =20 -/* Number of xen_pfn_t in a page */ -#define FPP (PAGE_SIZE/(dinfo->guest_width)) - -/* Number of entries in the pfn_to_mfn_frame_list_list */ -#define P2M_FLL_ENTRIES (((dinfo->p2m_size)+(FPP*FPP)-1)/(FPP*FPP)) - -/* Number of entries in the pfn_to_mfn_frame_list */ -#define P2M_FL_ENTRIES (((dinfo->p2m_size)+FPP-1)/FPP) - -/* Size in bytes of the pfn_to_mfn_frame_list */ -#define P2M_GUEST_FL_SIZE ((P2M_FL_ENTRIES) * (dinfo->guest_width)) -#define P2M_TOOLS_FL_SIZE ((P2M_FL_ENTRIES) * \ - max_t(size_t, sizeof(xen_pfn_t), dinfo->guest_w= idth)) =20 /* Masks for PTE<->PFN conversions */ #define MADDR_BITS_X86 ((dinfo->guest_width =3D=3D 8) ? 52 : 44) diff --git a/tools/libxc/xg_save_restore.h b/tools/libxc/xg_save_restore.h index b904296997..88120eb54b 100644 --- a/tools/libxc/xg_save_restore.h +++ b/tools/libxc/xg_save_restore.h @@ -109,15 +109,6 @@ static inline int get_platform_info(xc_interface *xch,= uint32_t dom, #define M2P_SIZE(_m) ROUNDUP(((_m) * sizeof(xen_pfn_t)), M2P_SHIFT) #define M2P_CHUNKS(_m) (M2P_SIZE((_m)) >> M2P_SHIFT) =20 -#define GET_FIELD(_p, _f, _w) (((_w) =3D=3D 8) ? ((_p)->x64._f) : ((_p)->x= 32._f)) - -#define SET_FIELD(_p, _f, _v, _w) do { \ - if ((_w) =3D=3D 8) \ - (_p)->x64._f =3D (_v); \ - else \ - (_p)->x32._f =3D (_v); \ -} while (0) - #define UNFOLD_CR3(_c) \ ((uint64_t)((dinfo->guest_width =3D=3D 8) = \ ? ((_c) >> 12) \ --=20 2.26.2 From nobody Sun May 5 08:17:05 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org ARC-Seal: i=1; a=rsa-sha256; t=1597658231; cv=none; d=zohomail.com; s=zohoarc; b=isMXkoaAFnWzE6H6MfOe32sEMhbLpBPYjpAwyLt5zU+7IUyBufJ8N2Uiymf0TLDeJHMxjaCdXUNefOdVWzQ+skxWkKb9fBoN/Mrh7tLKnO0jGQdVzUK/e4/A+nnUk5S3OGBXpGLS237MiAhhJXEdAhY0FkP8km730t6IiyYTdAo= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1597658231; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=kdqqZwx1q+2naQyyMUdGCOso3bljhjLtQ2V7zdmO3I0=; b=RJDPxNgo3QiwI90G3rwDEGNlomfY1DbPoVIzkRwQPCX0O6fKp8Lz0ozFGc6Pl20XMN3sMLWtFX6RADGAJ9vLdjnUs7jahBW5pNZYW808UMHvvKFhdcGJQKVRok7ynEfLrb4ruVBtKNvCw+ka45/V0D3gAl+eyuEdoR2dMs78pBo= ARC-Authentication-Results: i=1; mx.zohomail.com; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1597658231113373.9105542857178; Mon, 17 Aug 2020 02:57:11 -0700 (PDT) Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1k7bsm-0006kQ-DN; Mon, 17 Aug 2020 09:56:48 +0000 Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1k7bmY-00046j-1e for xen-devel@lists.xenproject.org; Mon, 17 Aug 2020 09:50:22 +0000 Received: from mx2.suse.de (unknown [195.135.220.15]) by us1-rack-iad1.inumbo.com (Halon) with ESMTPS id b9e5717c-c3bb-43af-b72e-7fc9c71bc232; Mon, 17 Aug 2020 09:49:28 +0000 (UTC) Received: from relay2.suse.de (unknown [195.135.221.27]) by mx2.suse.de (Postfix) with ESMTP id 02CABAE3A; Mon, 17 Aug 2020 09:49:53 +0000 (UTC) X-Inumbo-ID: b9e5717c-c3bb-43af-b72e-7fc9c71bc232 X-Virus-Scanned: by amavisd-new at test-mx.suse.de From: Juergen Gross To: xen-devel@lists.xenproject.org, xen-devel@dornerworks.com Cc: Juergen Gross , Andrew Cooper , George Dunlap , Ian Jackson , Jan Beulich , Julien Grall , Stefano Stabellini , Wei Liu , Samuel Thibault , Josh Whitehead , Stewart Hildebrand , =?UTF-8?q?Marek=20Marczykowski-G=C3=B3recki?= Subject: [PATCH II v2 17/17] tools: move libxenctrl below tools/libs Date: Mon, 17 Aug 2020 11:49:22 +0200 Message-Id: <20200817094922.15768-18-jgross@suse.com> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20200817094922.15768-1-jgross@suse.com> References: <20200817094922.15768-1-jgross@suse.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-BeenThere: xen-devel@lists.xenproject.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Sender: "Xen-devel" Content-Type: text/plain; charset="utf-8" Today tools/libxc needs to be built after tools/libs as libxenctrl is depending on some libraries in tools/libs. This in turn blocks moving other libraries depending on libxenctrl below tools/libs. So carve out libxenctrl from tools/libxc and move it into tools/libs/ctrl. Signed-off-by: Juergen Gross Reviewed-by: Samuel Thibault --- .gitignore | 8 ++ MAINTAINERS | 2 +- stubdom/Makefile | 23 ++++- stubdom/mini-os.mk | 2 +- tools/Rules.mk | 10 +- tools/libs/Makefile | 1 + tools/libs/ctrl/Makefile | 68 +++++++++++++ tools/{libxc =3D> libs/ctrl}/include/xenctrl.h | 0 .../ctrl}/include/xenctrl_compat.h | 0 .../ctrl}/include/xenctrl_dom.h | 0 tools/{libxc =3D> libs/ctrl}/xc_altp2m.c | 0 tools/{libxc =3D> libs/ctrl}/xc_arinc653.c | 0 tools/{libxc =3D> libs/ctrl}/xc_bitops.h | 0 tools/{libxc =3D> libs/ctrl}/xc_core.c | 0 tools/{libxc =3D> libs/ctrl}/xc_core.h | 0 tools/{libxc =3D> libs/ctrl}/xc_core_arm.c | 0 tools/{libxc =3D> libs/ctrl}/xc_core_arm.h | 0 tools/{libxc =3D> libs/ctrl}/xc_core_x86.c | 0 tools/{libxc =3D> libs/ctrl}/xc_core_x86.h | 0 tools/{libxc =3D> libs/ctrl}/xc_cpu_hotplug.c | 0 tools/{libxc =3D> libs/ctrl}/xc_cpupool.c | 0 tools/{libxc =3D> libs/ctrl}/xc_csched.c | 0 tools/{libxc =3D> libs/ctrl}/xc_csched2.c | 0 .../ctrl}/xc_devicemodel_compat.c | 0 tools/{libxc =3D> libs/ctrl}/xc_domain.c | 0 tools/{libxc =3D> libs/ctrl}/xc_evtchn.c | 0 tools/{libxc =3D> libs/ctrl}/xc_evtchn_compat.c | 0 tools/{libxc =3D> libs/ctrl}/xc_flask.c | 0 .../{libxc =3D> libs/ctrl}/xc_foreign_memory.c | 0 tools/{libxc =3D> libs/ctrl}/xc_freebsd.c | 0 tools/{libxc =3D> libs/ctrl}/xc_gnttab.c | 0 tools/{libxc =3D> libs/ctrl}/xc_gnttab_compat.c | 0 tools/{libxc =3D> libs/ctrl}/xc_hcall_buf.c | 0 tools/{libxc =3D> libs/ctrl}/xc_kexec.c | 0 tools/{libxc =3D> libs/ctrl}/xc_linux.c | 0 tools/{libxc =3D> libs/ctrl}/xc_mem_access.c | 0 tools/{libxc =3D> libs/ctrl}/xc_mem_paging.c | 0 tools/{libxc =3D> libs/ctrl}/xc_memshr.c | 0 tools/{libxc =3D> libs/ctrl}/xc_minios.c | 0 tools/{libxc =3D> libs/ctrl}/xc_misc.c | 0 tools/{libxc =3D> libs/ctrl}/xc_monitor.c | 0 tools/{libxc =3D> libs/ctrl}/xc_msr_x86.h | 0 tools/{libxc =3D> libs/ctrl}/xc_netbsd.c | 0 tools/{libxc =3D> libs/ctrl}/xc_pagetab.c | 0 tools/{libxc =3D> libs/ctrl}/xc_physdev.c | 0 tools/{libxc =3D> libs/ctrl}/xc_pm.c | 0 tools/{libxc =3D> libs/ctrl}/xc_private.c | 0 tools/{libxc =3D> libs/ctrl}/xc_private.h | 0 tools/{libxc =3D> libs/ctrl}/xc_psr.c | 0 tools/{libxc =3D> libs/ctrl}/xc_resource.c | 0 tools/{libxc =3D> libs/ctrl}/xc_resume.c | 0 tools/{libxc =3D> libs/ctrl}/xc_rt.c | 0 tools/{libxc =3D> libs/ctrl}/xc_solaris.c | 0 tools/{libxc =3D> libs/ctrl}/xc_tbuf.c | 0 tools/{libxc =3D> libs/ctrl}/xc_vm_event.c | 0 tools/{libxc =3D> libs/ctrl}/xencontrol.pc.in | 0 tools/libxc/Makefile | 99 +++---------------- tools/python/Makefile | 2 +- tools/python/setup.py | 8 +- 59 files changed, 117 insertions(+), 106 deletions(-) create mode 100644 tools/libs/ctrl/Makefile rename tools/{libxc =3D> libs/ctrl}/include/xenctrl.h (100%) rename tools/{libxc =3D> libs/ctrl}/include/xenctrl_compat.h (100%) rename tools/{libxc =3D> libs/ctrl}/include/xenctrl_dom.h (100%) rename tools/{libxc =3D> libs/ctrl}/xc_altp2m.c (100%) rename tools/{libxc =3D> libs/ctrl}/xc_arinc653.c (100%) rename tools/{libxc =3D> libs/ctrl}/xc_bitops.h (100%) rename tools/{libxc =3D> libs/ctrl}/xc_core.c (100%) rename tools/{libxc =3D> libs/ctrl}/xc_core.h (100%) rename tools/{libxc =3D> libs/ctrl}/xc_core_arm.c (100%) rename tools/{libxc =3D> libs/ctrl}/xc_core_arm.h (100%) rename tools/{libxc =3D> libs/ctrl}/xc_core_x86.c (100%) rename tools/{libxc =3D> libs/ctrl}/xc_core_x86.h (100%) rename tools/{libxc =3D> libs/ctrl}/xc_cpu_hotplug.c (100%) rename tools/{libxc =3D> libs/ctrl}/xc_cpupool.c (100%) rename tools/{libxc =3D> libs/ctrl}/xc_csched.c (100%) rename tools/{libxc =3D> libs/ctrl}/xc_csched2.c (100%) rename tools/{libxc =3D> libs/ctrl}/xc_devicemodel_compat.c (100%) rename tools/{libxc =3D> libs/ctrl}/xc_domain.c (100%) rename tools/{libxc =3D> libs/ctrl}/xc_evtchn.c (100%) rename tools/{libxc =3D> libs/ctrl}/xc_evtchn_compat.c (100%) rename tools/{libxc =3D> libs/ctrl}/xc_flask.c (100%) rename tools/{libxc =3D> libs/ctrl}/xc_foreign_memory.c (100%) rename tools/{libxc =3D> libs/ctrl}/xc_freebsd.c (100%) rename tools/{libxc =3D> libs/ctrl}/xc_gnttab.c (100%) rename tools/{libxc =3D> libs/ctrl}/xc_gnttab_compat.c (100%) rename tools/{libxc =3D> libs/ctrl}/xc_hcall_buf.c (100%) rename tools/{libxc =3D> libs/ctrl}/xc_kexec.c (100%) rename tools/{libxc =3D> libs/ctrl}/xc_linux.c (100%) rename tools/{libxc =3D> libs/ctrl}/xc_mem_access.c (100%) rename tools/{libxc =3D> libs/ctrl}/xc_mem_paging.c (100%) rename tools/{libxc =3D> libs/ctrl}/xc_memshr.c (100%) rename tools/{libxc =3D> libs/ctrl}/xc_minios.c (100%) rename tools/{libxc =3D> libs/ctrl}/xc_misc.c (100%) rename tools/{libxc =3D> libs/ctrl}/xc_monitor.c (100%) rename tools/{libxc =3D> libs/ctrl}/xc_msr_x86.h (100%) rename tools/{libxc =3D> libs/ctrl}/xc_netbsd.c (100%) rename tools/{libxc =3D> libs/ctrl}/xc_pagetab.c (100%) rename tools/{libxc =3D> libs/ctrl}/xc_physdev.c (100%) rename tools/{libxc =3D> libs/ctrl}/xc_pm.c (100%) rename tools/{libxc =3D> libs/ctrl}/xc_private.c (100%) rename tools/{libxc =3D> libs/ctrl}/xc_private.h (100%) rename tools/{libxc =3D> libs/ctrl}/xc_psr.c (100%) rename tools/{libxc =3D> libs/ctrl}/xc_resource.c (100%) rename tools/{libxc =3D> libs/ctrl}/xc_resume.c (100%) rename tools/{libxc =3D> libs/ctrl}/xc_rt.c (100%) rename tools/{libxc =3D> libs/ctrl}/xc_solaris.c (100%) rename tools/{libxc =3D> libs/ctrl}/xc_tbuf.c (100%) rename tools/{libxc =3D> libs/ctrl}/xc_vm_event.c (100%) rename tools/{libxc =3D> libs/ctrl}/xencontrol.pc.in (100%) diff --git a/.gitignore b/.gitignore index 5ea48af818..3e1008e372 100644 --- a/.gitignore +++ b/.gitignore @@ -114,6 +114,9 @@ tools/libs/hypfs/headers.chk tools/libs/hypfs/xenhypfs.pc tools/libs/call/headers.chk tools/libs/call/xencall.pc +tools/libs/ctrl/_paths.h +tools/libs/ctrl/libxenctrl.map +tools/libs/ctrl/xencontrol.pc tools/libs/foreignmemory/headers.chk tools/libs/foreignmemory/xenforeignmemory.pc tools/libs/devicemodel/headers.chk @@ -195,6 +198,11 @@ tools/include/xen-foreign/*.(c|h|size) tools/include/xen-foreign/checker tools/libvchan/xenvchan.pc tools/libxc/*.pc +tools/libxc/xc_bitops.h +tools/libxc/xc_core.h +tools/libxc/xc_core_arm.h +tools/libxc/xc_core_x86.h +tools/libxc/xc_private.h tools/libxl/_libxl.api-for-check tools/libxl/*.api-ok tools/libxl/*.pc diff --git a/MAINTAINERS b/MAINTAINERS index 33fe51324e..91ca2c9c40 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -226,7 +226,7 @@ M: Stewart Hildebrand S: Supported L: xen-devel@dornerworks.com F: xen/common/sched/arinc653.c -F: tools/libxc/xc_arinc653.c +F: tools/libs/ctrl/xc_arinc653.c =20 ARM (W/ VIRTUALISATION EXTENSIONS) ARCHITECTURE M: Stefano Stabellini diff --git a/stubdom/Makefile b/stubdom/Makefile index 6fcecadeb9..440adc2eb4 100644 --- a/stubdom/Makefile +++ b/stubdom/Makefile @@ -351,13 +351,16 @@ libs-$(XEN_TARGET_ARCH)/foreignmemory/stamp: $(XEN_RO= OT)/tools/libs/foreignmemor libs-$(XEN_TARGET_ARCH)/devicemodel/stamp: $(XEN_ROOT)/tools/libs/devicemo= del/Makefile $(do_links) =20 +libs-$(XEN_TARGET_ARCH)/ctrl/stamp: $(XEN_ROOT)/tools/libs/ctrl/Makefile + $(do_links) + libxc-$(XEN_TARGET_ARCH)/stamp: $(XEN_ROOT)/tools/libxc/Makefile $(do_links) =20 xenstore/stamp: $(XEN_ROOT)/tools/xenstore/Makefile $(do_links) =20 -LINK_LIBS_DIRS :=3D toolcore toollog evtchn gnttab call foreignmemory devi= cemodel +LINK_LIBS_DIRS :=3D toolcore toollog evtchn gnttab call foreignmemory devi= cemodel ctrl LINK_DIRS :=3D libxc-$(XEN_TARGET_ARCH) xenstore $(foreach dir,$(LINK_LIBS= _DIRS),libs-$(XEN_TARGET_ARCH)/$(dir)) LINK_STAMPS :=3D $(foreach dir,$(LINK_DIRS),$(dir)/stamp) =20 @@ -449,17 +452,26 @@ libs-$(XEN_TARGET_ARCH)/devicemodel/libxendevicemodel= .a: libxentoolcore libxento libs-$(XEN_TARGET_ARCH)/devicemodel/libxendevicemodel.a: mk-headers-$(XEN_= TARGET_ARCH) $(NEWLIB_STAMPFILE) CPPFLAGS=3D"$(TARGET_CPPFLAGS)" CFLAGS=3D"$(TARGET_CFLAGS)" $(MAKE) DESTD= IR=3D -C libs-$(XEN_TARGET_ARCH)/devicemodel =20 +####### +# libxenctrl +####### + +.PHONY: libxenctrl +libxenctrl: libs-$(XEN_TARGET_ARCH)/ctrl/libxenctrl.a +libs-$(XEN_TARGET_ARCH)/ctrl/libxenctrl.a: libxentoollog libxencall libxen= evtchn libxengnttab libxenforeignmemory libxendevicemodel +libs-$(XEN_TARGET_ARCH)/ctrl/libxenctrl.a: mk-headers-$(XEN_TARGET_ARCH) $= (NEWLIB_STAMPFILE) + CPPFLAGS=3D"$(TARGET_CPPFLAGS)" CFLAGS=3D"$(TARGET_CFLAGS)" $(MAKE) DESTD= IR=3D CONFIG_LIBXC_MINIOS=3Dy -C libs-$(XEN_TARGET_ARCH)/ctrl + ####### # libxc ####### =20 .PHONY: libxc -libxc: libxc-$(XEN_TARGET_ARCH)/libxenctrl.a libxc-$(XEN_TARGET_ARCH)/libx= enguest.a -libxc-$(XEN_TARGET_ARCH)/libxenctrl.a: mk-headers-$(XEN_TARGET_ARCH) libxe= ntoolcore libxentoollog libxenevtchn libxengnttab libxencall libxenforeignm= emory libxendevicemodel cross-zlib +libxc: libxc-$(XEN_TARGET_ARCH)/libxenguest.a +libxc-$(XEN_TARGET_ARCH)/libxenguest.a: libxenevtchn libxenctrl cross-zlib +libxc-$(XEN_TARGET_ARCH)/libxenguest.a: mk-headers-$(XEN_TARGET_ARCH) $(NE= WLIB_STAMPFILE) CPPFLAGS=3D"$(TARGET_CPPFLAGS)" CFLAGS=3D"$(TARGET_CFLAGS)" $(MAKE) DESTD= IR=3D CONFIG_LIBXC_MINIOS=3Dy -C libxc-$(XEN_TARGET_ARCH) =20 - libxc-$(XEN_TARGET_ARCH)/libxenguest.a: libxc-$(XEN_TARGET_ARCH)/libxenct= rl.a - ####### # ioemu ####### @@ -686,6 +698,7 @@ clean: [ ! -e libs-$(XEN_TARGET_ARCH)/call/Makefile ] || $(MAKE) DESTDIR=3D -C l= ibs-$(XEN_TARGET_ARCH)/call clean [ ! -e libs-$(XEN_TARGET_ARCH)/foreignmemory/Makefile ] || $(MAKE) DESTDI= R=3D -C libs-$(XEN_TARGET_ARCH)/foreignmemory clean [ ! -e libs-$(XEN_TARGET_ARCH)/devicemodel/Makefile ] || $(MAKE) DESTDIR= =3D -C libs-$(XEN_TARGET_ARCH)/devicemodel clean + [ ! -e libs-$(XEN_TARGET_ARCH)/ctrl/Makefile ] || $(MAKE) DESTDIR=3D -C l= ibs-$(XEN_TARGET_ARCH)/ctrl clean [ ! -e libxc-$(XEN_TARGET_ARCH)/Makefile ] || $(MAKE) DESTDIR=3D -C libxc= -$(XEN_TARGET_ARCH) clean -[ ! -d ioemu ] || $(MAKE) DESTDIR=3D -C ioemu clean -[ ! -d xenstore ] || $(MAKE) DESTDIR=3D -C xenstore clean diff --git a/stubdom/mini-os.mk b/stubdom/mini-os.mk index 32528bb91f..b1387df3f8 100644 --- a/stubdom/mini-os.mk +++ b/stubdom/mini-os.mk @@ -13,5 +13,5 @@ GNTTAB_PATH =3D $(XEN_ROOT)/stubdom/libs-$(MINIOS_TARGET_= ARCH)/gnttab CALL_PATH =3D $(XEN_ROOT)/stubdom/libs-$(MINIOS_TARGET_ARCH)/call FOREIGNMEMORY_PATH =3D $(XEN_ROOT)/stubdom/libs-$(MINIOS_TARGET_ARCH)/fore= ignmemory DEVICEMODEL_PATH =3D $(XEN_ROOT)/stubdom/libs-$(MINIOS_TARGET_ARCH)/device= model -CTRL_PATH =3D $(XEN_ROOT)/stubdom/libxc-$(MINIOS_TARGET_ARCH) +CTRL_PATH =3D $(XEN_ROOT)/stubdom/libs-$(MINIOS_TARGET_ARCH)/ctrl GUEST_PATH =3D $(XEN_ROOT)/stubdom/libxc-$(MINIOS_TARGET_ARCH) diff --git a/tools/Rules.mk b/tools/Rules.mk index 35d237bba6..cf992b480f 100644 --- a/tools/Rules.mk +++ b/tools/Rules.mk @@ -29,8 +29,9 @@ LIBS_LIBS +=3D devicemodel USELIBS_devicemodel :=3D toollog toolcore call LIBS_LIBS +=3D hypfs USELIBS_hypfs :=3D toollog toolcore call +LIBS_LIBS +=3D ctrl +USELIBS_ctrl :=3D toollog call evtchn gnttab foreignmemory devicemodel =20 -XEN_libxenctrl =3D $(XEN_ROOT)/tools/libxc XEN_libxenguest =3D $(XEN_ROOT)/tools/libxc XEN_libxenlight =3D $(XEN_ROOT)/tools/libxl # Currently libxlutil lives in the same directory as libxenlight @@ -120,13 +121,10 @@ $(foreach lib,$(LIBS_LIBS),$(eval $(call LIB_defs,$(l= ib)))) =20 # code which compiles against libxenctrl get __XEN_TOOLS__ and # therefore sees the unstable hypercall interfaces. -CFLAGS_libxenctrl =3D -I$(XEN_libxenctrl)/include $(CFLAGS_libxentoollog) = $(CFLAGS_libxenforeignmemory) $(CFLAGS_libxendevicemodel) $(CFLAGS_xeninclu= de) -D__XEN_TOOLS__ -SHDEPS_libxenctrl =3D $(SHLIB_libxentoollog) $(SHLIB_libxenevtchn) $(SHLIB= _libxengnttab) $(SHLIB_libxencall) $(SHLIB_libxenforeignmemory) $(SHLIB_lib= xendevicemodel) -LDLIBS_libxenctrl =3D $(SHDEPS_libxenctrl) $(XEN_libxenctrl)/libxenctrl$(l= ibextension) -SHLIB_libxenctrl =3D $(SHDEPS_libxenctrl) -Wl,-rpath-link=3D$(XEN_libxenc= trl) +CFLAGS_libxenctrl +=3D $(CFLAGS_libxentoollog) $(CFLAGS_libxenforeignmemor= y) $(CFLAGS_libxendevicemodel) -D__XEN_TOOLS__ =20 CFLAGS_libxenguest =3D -I$(XEN_libxenguest)/include $(CFLAGS_libxenevtchn)= $(CFLAGS_libxenforeignmemory) $(CFLAGS_xeninclude) -SHDEPS_libxenguest =3D $(SHLIB_libxenevtchn) +SHDEPS_libxenguest =3D $(SHLIB_libxenevtchn) $(SHLIB_libxenctrl) LDLIBS_libxenguest =3D $(SHDEPS_libxenguest) $(XEN_libxenguest)/libxengues= t$(libextension) SHLIB_libxenguest =3D $(SHDEPS_libxenguest) -Wl,-rpath-link=3D$(XEN_libxe= nguest) =20 diff --git a/tools/libs/Makefile b/tools/libs/Makefile index 69cdfb5975..7648ea0e4c 100644 --- a/tools/libs/Makefile +++ b/tools/libs/Makefile @@ -9,6 +9,7 @@ SUBDIRS-y +=3D gnttab SUBDIRS-y +=3D call SUBDIRS-y +=3D foreignmemory SUBDIRS-y +=3D devicemodel +SUBDIRS-y +=3D ctrl SUBDIRS-y +=3D hypfs =20 ifeq ($(CONFIG_RUMP),y) diff --git a/tools/libs/ctrl/Makefile b/tools/libs/ctrl/Makefile new file mode 100644 index 0000000000..59e0dcdfd2 --- /dev/null +++ b/tools/libs/ctrl/Makefile @@ -0,0 +1,68 @@ +XEN_ROOT =3D $(CURDIR)/../../.. +include $(XEN_ROOT)/tools/Rules.mk + +SRCS-y +=3D xc_altp2m.c +SRCS-y +=3D xc_core.c +SRCS-$(CONFIG_X86) +=3D xc_core_x86.c +SRCS-$(CONFIG_ARM) +=3D xc_core_arm.c +SRCS-y +=3D xc_cpupool.c +SRCS-y +=3D xc_domain.c +SRCS-y +=3D xc_evtchn.c +SRCS-y +=3D xc_gnttab.c +SRCS-y +=3D xc_misc.c +SRCS-y +=3D xc_flask.c +SRCS-y +=3D xc_physdev.c +SRCS-y +=3D xc_private.c +SRCS-y +=3D xc_csched.c +SRCS-y +=3D xc_csched2.c +SRCS-y +=3D xc_arinc653.c +SRCS-y +=3D xc_rt.c +SRCS-y +=3D xc_tbuf.c +SRCS-y +=3D xc_pm.c +SRCS-y +=3D xc_cpu_hotplug.c +SRCS-y +=3D xc_resume.c +SRCS-y +=3D xc_vm_event.c +SRCS-y +=3D xc_monitor.c +SRCS-y +=3D xc_mem_paging.c +SRCS-y +=3D xc_mem_access.c +SRCS-y +=3D xc_memshr.c +SRCS-y +=3D xc_hcall_buf.c +SRCS-y +=3D xc_foreign_memory.c +SRCS-y +=3D xc_kexec.c +SRCS-y +=3D xc_resource.c +SRCS-$(CONFIG_X86) +=3D xc_psr.c +SRCS-$(CONFIG_X86) +=3D xc_pagetab.c +SRCS-$(CONFIG_Linux) +=3D xc_linux.c +SRCS-$(CONFIG_FreeBSD) +=3D xc_freebsd.c +SRCS-$(CONFIG_SunOS) +=3D xc_solaris.c +SRCS-$(CONFIG_NetBSD) +=3D xc_netbsd.c +SRCS-$(CONFIG_NetBSDRump) +=3D xc_netbsd.c +SRCS-$(CONFIG_MiniOS) +=3D xc_minios.c +SRCS-y +=3D xc_evtchn_compat.c +SRCS-y +=3D xc_gnttab_compat.c +SRCS-y +=3D xc_devicemodel_compat.c + +CFLAGS +=3D -D__XEN_TOOLS__ +CFLAGS +=3D $(PTHREAD_CFLAGS) +CFLAGS +=3D -include $(XEN_ROOT)/tools/config.h + +# Needed for posix_fadvise64() in xc_linux.c +CFLAGS-$(CONFIG_Linux) +=3D -D_GNU_SOURCE + +LIBHEADER :=3D xenctrl.h xenctrl_compat.h xenctrl_dom.h +PKG_CONFIG :=3D xencontrol.pc + +NO_HEADERS_CHK :=3D y + +include $(XEN_ROOT)/tools/libs/libs.mk + +genpath-target =3D $(call buildmakevars2header,_paths.h) +$(eval $(genpath-target)) + +$(LIB_OBJS) $(PIC_OBJS): _paths.h + +$(PKG_CONFIG_LOCAL): PKG_CONFIG_INCDIR =3D $(XEN_libxenctrl)/include +$(PKG_CONFIG_LOCAL): PKG_CONFIG_CFLAGS_LOCAL =3D $(CFLAGS_xeninclude) + +clean: + rm -f libxenctrl.map diff --git a/tools/libxc/include/xenctrl.h b/tools/libs/ctrl/include/xenctr= l.h similarity index 100% rename from tools/libxc/include/xenctrl.h rename to tools/libs/ctrl/include/xenctrl.h diff --git a/tools/libxc/include/xenctrl_compat.h b/tools/libs/ctrl/include= /xenctrl_compat.h similarity index 100% rename from tools/libxc/include/xenctrl_compat.h rename to tools/libs/ctrl/include/xenctrl_compat.h diff --git a/tools/libxc/include/xenctrl_dom.h b/tools/libs/ctrl/include/xe= nctrl_dom.h similarity index 100% rename from tools/libxc/include/xenctrl_dom.h rename to tools/libs/ctrl/include/xenctrl_dom.h diff --git a/tools/libxc/xc_altp2m.c b/tools/libs/ctrl/xc_altp2m.c similarity index 100% rename from tools/libxc/xc_altp2m.c rename to tools/libs/ctrl/xc_altp2m.c diff --git a/tools/libxc/xc_arinc653.c b/tools/libs/ctrl/xc_arinc653.c similarity index 100% rename from tools/libxc/xc_arinc653.c rename to tools/libs/ctrl/xc_arinc653.c diff --git a/tools/libxc/xc_bitops.h b/tools/libs/ctrl/xc_bitops.h similarity index 100% rename from tools/libxc/xc_bitops.h rename to tools/libs/ctrl/xc_bitops.h diff --git a/tools/libxc/xc_core.c b/tools/libs/ctrl/xc_core.c similarity index 100% rename from tools/libxc/xc_core.c rename to tools/libs/ctrl/xc_core.c diff --git a/tools/libxc/xc_core.h b/tools/libs/ctrl/xc_core.h similarity index 100% rename from tools/libxc/xc_core.h rename to tools/libs/ctrl/xc_core.h diff --git a/tools/libxc/xc_core_arm.c b/tools/libs/ctrl/xc_core_arm.c similarity index 100% rename from tools/libxc/xc_core_arm.c rename to tools/libs/ctrl/xc_core_arm.c diff --git a/tools/libxc/xc_core_arm.h b/tools/libs/ctrl/xc_core_arm.h similarity index 100% rename from tools/libxc/xc_core_arm.h rename to tools/libs/ctrl/xc_core_arm.h diff --git a/tools/libxc/xc_core_x86.c b/tools/libs/ctrl/xc_core_x86.c similarity index 100% rename from tools/libxc/xc_core_x86.c rename to tools/libs/ctrl/xc_core_x86.c diff --git a/tools/libxc/xc_core_x86.h b/tools/libs/ctrl/xc_core_x86.h similarity index 100% rename from tools/libxc/xc_core_x86.h rename to tools/libs/ctrl/xc_core_x86.h diff --git a/tools/libxc/xc_cpu_hotplug.c b/tools/libs/ctrl/xc_cpu_hotplug.c similarity index 100% rename from tools/libxc/xc_cpu_hotplug.c rename to tools/libs/ctrl/xc_cpu_hotplug.c diff --git a/tools/libxc/xc_cpupool.c b/tools/libs/ctrl/xc_cpupool.c similarity index 100% rename from tools/libxc/xc_cpupool.c rename to tools/libs/ctrl/xc_cpupool.c diff --git a/tools/libxc/xc_csched.c b/tools/libs/ctrl/xc_csched.c similarity index 100% rename from tools/libxc/xc_csched.c rename to tools/libs/ctrl/xc_csched.c diff --git a/tools/libxc/xc_csched2.c b/tools/libs/ctrl/xc_csched2.c similarity index 100% rename from tools/libxc/xc_csched2.c rename to tools/libs/ctrl/xc_csched2.c diff --git a/tools/libxc/xc_devicemodel_compat.c b/tools/libs/ctrl/xc_devic= emodel_compat.c similarity index 100% rename from tools/libxc/xc_devicemodel_compat.c rename to tools/libs/ctrl/xc_devicemodel_compat.c diff --git a/tools/libxc/xc_domain.c b/tools/libs/ctrl/xc_domain.c similarity index 100% rename from tools/libxc/xc_domain.c rename to tools/libs/ctrl/xc_domain.c diff --git a/tools/libxc/xc_evtchn.c b/tools/libs/ctrl/xc_evtchn.c similarity index 100% rename from tools/libxc/xc_evtchn.c rename to tools/libs/ctrl/xc_evtchn.c diff --git a/tools/libxc/xc_evtchn_compat.c b/tools/libs/ctrl/xc_evtchn_com= pat.c similarity index 100% rename from tools/libxc/xc_evtchn_compat.c rename to tools/libs/ctrl/xc_evtchn_compat.c diff --git a/tools/libxc/xc_flask.c b/tools/libs/ctrl/xc_flask.c similarity index 100% rename from tools/libxc/xc_flask.c rename to tools/libs/ctrl/xc_flask.c diff --git a/tools/libxc/xc_foreign_memory.c b/tools/libs/ctrl/xc_foreign_m= emory.c similarity index 100% rename from tools/libxc/xc_foreign_memory.c rename to tools/libs/ctrl/xc_foreign_memory.c diff --git a/tools/libxc/xc_freebsd.c b/tools/libs/ctrl/xc_freebsd.c similarity index 100% rename from tools/libxc/xc_freebsd.c rename to tools/libs/ctrl/xc_freebsd.c diff --git a/tools/libxc/xc_gnttab.c b/tools/libs/ctrl/xc_gnttab.c similarity index 100% rename from tools/libxc/xc_gnttab.c rename to tools/libs/ctrl/xc_gnttab.c diff --git a/tools/libxc/xc_gnttab_compat.c b/tools/libs/ctrl/xc_gnttab_com= pat.c similarity index 100% rename from tools/libxc/xc_gnttab_compat.c rename to tools/libs/ctrl/xc_gnttab_compat.c diff --git a/tools/libxc/xc_hcall_buf.c b/tools/libs/ctrl/xc_hcall_buf.c similarity index 100% rename from tools/libxc/xc_hcall_buf.c rename to tools/libs/ctrl/xc_hcall_buf.c diff --git a/tools/libxc/xc_kexec.c b/tools/libs/ctrl/xc_kexec.c similarity index 100% rename from tools/libxc/xc_kexec.c rename to tools/libs/ctrl/xc_kexec.c diff --git a/tools/libxc/xc_linux.c b/tools/libs/ctrl/xc_linux.c similarity index 100% rename from tools/libxc/xc_linux.c rename to tools/libs/ctrl/xc_linux.c diff --git a/tools/libxc/xc_mem_access.c b/tools/libs/ctrl/xc_mem_access.c similarity index 100% rename from tools/libxc/xc_mem_access.c rename to tools/libs/ctrl/xc_mem_access.c diff --git a/tools/libxc/xc_mem_paging.c b/tools/libs/ctrl/xc_mem_paging.c similarity index 100% rename from tools/libxc/xc_mem_paging.c rename to tools/libs/ctrl/xc_mem_paging.c diff --git a/tools/libxc/xc_memshr.c b/tools/libs/ctrl/xc_memshr.c similarity index 100% rename from tools/libxc/xc_memshr.c rename to tools/libs/ctrl/xc_memshr.c diff --git a/tools/libxc/xc_minios.c b/tools/libs/ctrl/xc_minios.c similarity index 100% rename from tools/libxc/xc_minios.c rename to tools/libs/ctrl/xc_minios.c diff --git a/tools/libxc/xc_misc.c b/tools/libs/ctrl/xc_misc.c similarity index 100% rename from tools/libxc/xc_misc.c rename to tools/libs/ctrl/xc_misc.c diff --git a/tools/libxc/xc_monitor.c b/tools/libs/ctrl/xc_monitor.c similarity index 100% rename from tools/libxc/xc_monitor.c rename to tools/libs/ctrl/xc_monitor.c diff --git a/tools/libxc/xc_msr_x86.h b/tools/libs/ctrl/xc_msr_x86.h similarity index 100% rename from tools/libxc/xc_msr_x86.h rename to tools/libs/ctrl/xc_msr_x86.h diff --git a/tools/libxc/xc_netbsd.c b/tools/libs/ctrl/xc_netbsd.c similarity index 100% rename from tools/libxc/xc_netbsd.c rename to tools/libs/ctrl/xc_netbsd.c diff --git a/tools/libxc/xc_pagetab.c b/tools/libs/ctrl/xc_pagetab.c similarity index 100% rename from tools/libxc/xc_pagetab.c rename to tools/libs/ctrl/xc_pagetab.c diff --git a/tools/libxc/xc_physdev.c b/tools/libs/ctrl/xc_physdev.c similarity index 100% rename from tools/libxc/xc_physdev.c rename to tools/libs/ctrl/xc_physdev.c diff --git a/tools/libxc/xc_pm.c b/tools/libs/ctrl/xc_pm.c similarity index 100% rename from tools/libxc/xc_pm.c rename to tools/libs/ctrl/xc_pm.c diff --git a/tools/libxc/xc_private.c b/tools/libs/ctrl/xc_private.c similarity index 100% rename from tools/libxc/xc_private.c rename to tools/libs/ctrl/xc_private.c diff --git a/tools/libxc/xc_private.h b/tools/libs/ctrl/xc_private.h similarity index 100% rename from tools/libxc/xc_private.h rename to tools/libs/ctrl/xc_private.h diff --git a/tools/libxc/xc_psr.c b/tools/libs/ctrl/xc_psr.c similarity index 100% rename from tools/libxc/xc_psr.c rename to tools/libs/ctrl/xc_psr.c diff --git a/tools/libxc/xc_resource.c b/tools/libs/ctrl/xc_resource.c similarity index 100% rename from tools/libxc/xc_resource.c rename to tools/libs/ctrl/xc_resource.c diff --git a/tools/libxc/xc_resume.c b/tools/libs/ctrl/xc_resume.c similarity index 100% rename from tools/libxc/xc_resume.c rename to tools/libs/ctrl/xc_resume.c diff --git a/tools/libxc/xc_rt.c b/tools/libs/ctrl/xc_rt.c similarity index 100% rename from tools/libxc/xc_rt.c rename to tools/libs/ctrl/xc_rt.c diff --git a/tools/libxc/xc_solaris.c b/tools/libs/ctrl/xc_solaris.c similarity index 100% rename from tools/libxc/xc_solaris.c rename to tools/libs/ctrl/xc_solaris.c diff --git a/tools/libxc/xc_tbuf.c b/tools/libs/ctrl/xc_tbuf.c similarity index 100% rename from tools/libxc/xc_tbuf.c rename to tools/libs/ctrl/xc_tbuf.c diff --git a/tools/libxc/xc_vm_event.c b/tools/libs/ctrl/xc_vm_event.c similarity index 100% rename from tools/libxc/xc_vm_event.c rename to tools/libs/ctrl/xc_vm_event.c diff --git a/tools/libxc/xencontrol.pc.in b/tools/libs/ctrl/xencontrol.pc.in similarity index 100% rename from tools/libxc/xencontrol.pc.in rename to tools/libs/ctrl/xencontrol.pc.in diff --git a/tools/libxc/Makefile b/tools/libxc/Makefile index 1e4065f87c..a52264c74c 100644 --- a/tools/libxc/Makefile +++ b/tools/libxc/Makefile @@ -9,47 +9,10 @@ ifeq ($(CONFIG_LIBXC_MINIOS),y) override CONFIG_MIGRATE :=3D n endif =20 -CTRL_SRCS-y :=3D -CTRL_SRCS-y +=3D xc_altp2m.c -CTRL_SRCS-y +=3D xc_core.c -CTRL_SRCS-$(CONFIG_X86) +=3D xc_core_x86.c -CTRL_SRCS-$(CONFIG_ARM) +=3D xc_core_arm.c -CTRL_SRCS-y +=3D xc_cpupool.c -CTRL_SRCS-y +=3D xc_domain.c -CTRL_SRCS-y +=3D xc_evtchn.c -CTRL_SRCS-y +=3D xc_gnttab.c -CTRL_SRCS-y +=3D xc_misc.c -CTRL_SRCS-y +=3D xc_flask.c -CTRL_SRCS-y +=3D xc_physdev.c -CTRL_SRCS-y +=3D xc_private.c -CTRL_SRCS-y +=3D xc_csched.c -CTRL_SRCS-y +=3D xc_csched2.c -CTRL_SRCS-y +=3D xc_arinc653.c -CTRL_SRCS-y +=3D xc_rt.c -CTRL_SRCS-y +=3D xc_tbuf.c -CTRL_SRCS-y +=3D xc_pm.c -CTRL_SRCS-y +=3D xc_cpu_hotplug.c -CTRL_SRCS-y +=3D xc_resume.c -CTRL_SRCS-y +=3D xc_vm_event.c -CTRL_SRCS-y +=3D xc_monitor.c -CTRL_SRCS-y +=3D xc_mem_paging.c -CTRL_SRCS-y +=3D xc_mem_access.c -CTRL_SRCS-y +=3D xc_memshr.c -CTRL_SRCS-y +=3D xc_hcall_buf.c -CTRL_SRCS-y +=3D xc_foreign_memory.c -CTRL_SRCS-y +=3D xc_kexec.c -CTRL_SRCS-y +=3D xc_resource.c -CTRL_SRCS-$(CONFIG_X86) +=3D xc_psr.c -CTRL_SRCS-$(CONFIG_X86) +=3D xc_pagetab.c -CTRL_SRCS-$(CONFIG_Linux) +=3D xc_linux.c -CTRL_SRCS-$(CONFIG_FreeBSD) +=3D xc_freebsd.c -CTRL_SRCS-$(CONFIG_SunOS) +=3D xc_solaris.c -CTRL_SRCS-$(CONFIG_NetBSD) +=3D xc_netbsd.c -CTRL_SRCS-$(CONFIG_NetBSDRump) +=3D xc_netbsd.c -CTRL_SRCS-$(CONFIG_MiniOS) +=3D xc_minios.c -CTRL_SRCS-y +=3D xc_evtchn_compat.c -CTRL_SRCS-y +=3D xc_gnttab_compat.c -CTRL_SRCS-y +=3D xc_devicemodel_compat.c +LINK_FILES :=3D xc_private.h xc_core.h xc_core_x86.h xc_core_arm.h xc_bito= ps.h + +$(LINK_FILES): + ln -sf $(XEN_ROOT)/tools/libs/ctrl/$(notdir $@) $@ =20 GUEST_SRCS-y :=3D GUEST_SRCS-y +=3D xg_private.c @@ -124,26 +87,14 @@ CFLAGS +=3D $(CFLAGS_libxentoollog) CFLAGS +=3D $(CFLAGS_libxenevtchn) CFLAGS +=3D $(CFLAGS_libxendevicemodel) =20 -CTRL_LIB_OBJS :=3D $(patsubst %.c,%.o,$(CTRL_SRCS-y)) -CTRL_PIC_OBJS :=3D $(patsubst %.c,%.opic,$(CTRL_SRCS-y)) - GUEST_LIB_OBJS :=3D $(patsubst %.c,%.o,$(GUEST_SRCS-y)) GUEST_PIC_OBJS :=3D $(patsubst %.c,%.opic,$(GUEST_SRCS-y)) =20 -$(CTRL_LIB_OBJS) $(GUEST_LIB_OBJS) \ -$(CTRL_PIC_OBJS) $(GUEST_PIC_OBJS): CFLAGS +=3D -include $(XEN_ROOT)/tools= /config.h +$(GUEST_LIB_OBJS) $(GUEST_PIC_OBJS): CFLAGS +=3D -include $(XEN_ROOT)/tool= s/config.h =20 # libxenguest includes xc_private.h, so needs this despite not using # this functionality directly. -$(CTRL_LIB_OBJS) $(GUEST_LIB_OBJS) \ -$(CTRL_PIC_OBJS) $(GUEST_PIC_OBJS): CFLAGS +=3D $(CFLAGS_libxencall) $(CFL= AGS_libxenforeignmemory) - -$(CTRL_LIB_OBJS) $(CTRL_PIC_OBJS): CFLAGS +=3D $(CFLAGS_libxengnttab) - -LIB :=3D libxenctrl.a -ifneq ($(nosharedlibs),y) -LIB +=3D libxenctrl.so libxenctrl.so.$(MAJOR) libxenctrl.so.$(MAJOR).$(MIN= OR) -endif +$(GUEST_LIB_OBJS) $(GUEST_PIC_OBJS): CFLAGS +=3D $(CFLAGS_libxencall) $(CF= LAGS_libxenforeignmemory) =20 LIB +=3D libxenguest.a ifneq ($(nosharedlibs),y) @@ -155,10 +106,9 @@ $(eval $(genpath-target)) =20 xc_private.h: _paths.h =20 -$(CTRL_LIB_OBJS) $(GUEST_LIB_OBJS) \ -$(CTRL_PIC_OBJS) $(GUEST_PIC_OBJS): xc_private.h +$(GUEST_LIB_OBJS) $(GUEST_PIC_OBJS): $(LINK_FILES) =20 -PKG_CONFIG :=3D xencontrol.pc xenguest.pc +PKG_CONFIG :=3D xenguest.pc PKG_CONFIG_VERSION :=3D $(MAJOR).$(MINOR) =20 ifneq ($(CONFIG_LIBXC_MINIOS),y) @@ -189,17 +139,11 @@ libs: $(LIB) $(PKG_CONFIG_INST) $(PKG_CONFIG_LOCAL) install: build $(INSTALL_DIR) $(DESTDIR)$(libdir) $(INSTALL_DIR) $(DESTDIR)$(includedir) - $(INSTALL_SHLIB) libxenctrl.so.$(MAJOR).$(MINOR) $(DESTDIR)$(libdir) - $(INSTALL_DATA) libxenctrl.a $(DESTDIR)$(libdir) - $(SYMLINK_SHLIB) libxenctrl.so.$(MAJOR).$(MINOR) $(DESTDIR)$(libdir)/libx= enctrl.so.$(MAJOR) - $(SYMLINK_SHLIB) libxenctrl.so.$(MAJOR) $(DESTDIR)$(libdir)/libxenctrl.so - $(INSTALL_DATA) include/xenctrl.h include/xenctrl_compat.h include/xenctr= l_dom.h $(DESTDIR)$(includedir) $(INSTALL_SHLIB) libxenguest.so.$(MAJOR).$(MINOR) $(DESTDIR)$(libdir) $(INSTALL_DATA) libxenguest.a $(DESTDIR)$(libdir) $(SYMLINK_SHLIB) libxenguest.so.$(MAJOR).$(MINOR) $(DESTDIR)$(libdir)/lib= xenguest.so.$(MAJOR) $(SYMLINK_SHLIB) libxenguest.so.$(MAJOR) $(DESTDIR)$(libdir)/libxenguest.= so $(INSTALL_DATA) include/xenguest.h $(DESTDIR)$(includedir) - $(INSTALL_DATA) xencontrol.pc $(DESTDIR)$(PKG_INSTALLDIR) $(INSTALL_DATA) xenguest.pc $(DESTDIR)$(PKG_INSTALLDIR) =20 .PHONY: uninstall @@ -210,14 +154,6 @@ uninstall: rm -f $(DESTDIR)$(libdir)/libxenguest.so.$(MAJOR) rm -f $(DESTDIR)$(libdir)/libxenguest.so.$(MAJOR).$(MINOR) rm -f $(DESTDIR)$(libdir)/libxenguest.a - rm -f $(DESTDIR)$(PKG_INSTALLDIR)/xencontrol.pc - rm -f $(DESTDIR)$(includedir)/xenctrl.h - rm -f $(DESTDIR)$(includedir)/xenctrl_compat.h - rm -f $(DESTDIR)$(includedir)/xenctrl_dom.h - rm -f $(DESTDIR)$(libdir)/libxenctrl.so - rm -f $(DESTDIR)$(libdir)/libxenctrl.so.$(MAJOR) - rm -f $(DESTDIR)$(libdir)/libxenctrl.so.$(MAJOR).$(MINOR) - rm -f $(DESTDIR)$(libdir)/libxenctrl.a =20 .PHONY: TAGS TAGS: @@ -227,8 +163,8 @@ TAGS: clean: rm -rf *.rpm $(LIB) *~ $(DEPS_RM) \ _paths.h \ - xencontrol.pc xenguest.pc \ - $(CTRL_LIB_OBJS) $(CTRL_PIC_OBJS) \ + $(LINK_FILES) \ + xenguest.pc \ $(GUEST_LIB_OBJS) $(GUEST_PIC_OBJS) =20 .PHONY: distclean @@ -244,19 +180,6 @@ rpm: build mv staging/i386/*.rpm . rm -rf staging =20 -# libxenctrl - -libxenctrl.a: $(CTRL_LIB_OBJS) - $(AR) rc $@ $^ - -libxenctrl.so: libxenctrl.so.$(MAJOR) - $(SYMLINK_SHLIB) $< $@ -libxenctrl.so.$(MAJOR): libxenctrl.so.$(MAJOR).$(MINOR) - $(SYMLINK_SHLIB) $< $@ - -libxenctrl.so.$(MAJOR).$(MINOR): $(CTRL_PIC_OBJS) - $(CC) $(LDFLAGS) $(PTHREAD_LDFLAGS) -Wl,$(SONAME_LDFLAG) -Wl,libxenctrl.s= o.$(MAJOR) $(SHLIB_LDFLAGS) -o $@ $^ $(LDLIBS_libxentoollog) $(LDLIBS_libxe= nevtchn) $(LDLIBS_libxengnttab) $(LDLIBS_libxencall) $(LDLIBS_libxenforeign= memory) $(LDLIBS_libxendevicemodel) $(PTHREAD_LIBS) $(APPEND_LDFLAGS) - # libxenguest =20 libxenguest.a: $(GUEST_LIB_OBJS) @@ -277,7 +200,7 @@ xc_dom_bzimageloader.o: CFLAGS +=3D $(filter -D%,$(zlib= -options)) xc_dom_bzimageloader.opic: CFLAGS +=3D $(filter -D%,$(zlib-options)) =20 libxenguest.so.$(MAJOR).$(MINOR): COMPRESSION_LIBS =3D $(filter -l%,$(zlib= -options)) -libxenguest.so.$(MAJOR).$(MINOR): $(GUEST_PIC_OBJS) libxenctrl.so +libxenguest.so.$(MAJOR).$(MINOR): $(GUEST_PIC_OBJS) $(CC) $(LDFLAGS) -Wl,$(SONAME_LDFLAG) -Wl,libxenguest.so.$(MAJOR) $(SHLIB= _LDFLAGS) -o $@ $(GUEST_PIC_OBJS) $(COMPRESSION_LIBS) -lz $(LDLIBS_libxenev= tchn) $(LDLIBS_libxenctrl) $(PTHREAD_LIBS) $(APPEND_LDFLAGS) =20 -include $(DEPS_INCLUDE) diff --git a/tools/python/Makefile b/tools/python/Makefile index 8d22c03676..8dc755d6e8 100644 --- a/tools/python/Makefile +++ b/tools/python/Makefile @@ -33,7 +33,7 @@ uninstall: =20 .PHONY: test test: - LD_LIBRARY_PATH=3D$$(readlink -f ../libxc):$$(readlink -f ../xenstore) $(= PYTHON) -m unittest discover + LD_LIBRARY_PATH=3D$$(readlink -f ../libs/ctrl):$$(readlink -f ../xenstore= ) $(PYTHON) -m unittest discover =20 .PHONY: clean clean: diff --git a/tools/python/setup.py b/tools/python/setup.py index 44696b3998..24b284af39 100644 --- a/tools/python/setup.py +++ b/tools/python/setup.py @@ -9,7 +9,7 @@ extra_compile_args =3D [ "-fno-strict-aliasing", "-Werror"= ] PATH_XEN =3D XEN_ROOT + "/tools/include" PATH_LIBXENTOOLLOG =3D XEN_ROOT + "/tools/libs/toollog" PATH_LIBXENEVTCHN =3D XEN_ROOT + "/tools/libs/evtchn" -PATH_LIBXC =3D XEN_ROOT + "/tools/libxc" +PATH_LIBXENCTRL =3D XEN_ROOT + "/tools/libs/ctrl" PATH_LIBXL =3D XEN_ROOT + "/tools/libxl" PATH_XENSTORE =3D XEN_ROOT + "/tools/xenstore" =20 @@ -18,11 +18,11 @@ xc =3D Extension("xc", include_dirs =3D [ PATH_XEN, PATH_LIBXENTOOLLOG + "/include", PATH_LIBXENEVTCHN + "/include", - PATH_LIBXC + "/include", + PATH_LIBXENCTRL + "/include", "xen/lowlevel/xc" ], - library_dirs =3D [ PATH_LIBXC ], + library_dirs =3D [ PATH_LIBXENCTRL ], libraries =3D [ "xenctrl" ], - depends =3D [ PATH_LIBXC + "/libxenctrl.so" ], + depends =3D [ PATH_LIBXENCTRL + "/libxenctrl.so"= ], extra_link_args =3D [ "-Wl,-rpath-link=3D"+PATH_LIBXENTO= OLLOG ], sources =3D [ "xen/lowlevel/xc/xc.c" ]) =20 --=20 2.26.2