mirror of
https://github.com/xen-project/xen.git
synced 2026-10-28 02:01:24 +01:00
tools/libs: move xc_core* from libxenctrl to libxenguest
The functionality in xc_core* should be part of libxenguest instead of libxenctrl. Users are already either in libxenguest, or in xl. There is one single exception: xc_core_arch_auto_translated_physmap() is being used by xc_domain_memory_mapping(), which is used by qemu. So leave the xc_core_arch_auto_translated_physmap() functionality in libxenctrl. This will make it easier to merge common functionality of xc_core* and xg_sr_save*. Signed-off-by: Juergen Gross <jgross@suse.com> Acked-by: Wei Liu <wl@xen.org>
This commit is contained in:
1 parent
bf1fc18901
commit
455790573d
14 files changed
+24
-27
No files matched your search
@@ -2,9 +2,6 @@ XEN_ROOT = $(CURDIR)/../../..
|
||||
include $(XEN_ROOT)/tools/Rules.mk
|
||||
|
||||
SRCS-y += xc_altp2m.c
|
||||
SRCS-y += xc_core.c
|
||||
SRCS-$(CONFIG_X86) += xc_core_x86.c
|
||||
SRCS-$(CONFIG_ARM) += xc_core_arm.c
|
||||
SRCS-y += xc_cpupool.c
|
||||
SRCS-y += xc_domain.c
|
||||
SRCS-y += xc_evtchn.c
|
||||
|
||||
@@ -19,8 +19,6 @@
|
||||
* Copyright (c) 2003, K A Fraser.
|
||||
*/
|
||||
|
||||
#include "xc_private.h"
|
||||
#include "xc_core.h"
|
||||
#include "xc_private.h"
|
||||
#include <xen/memory.h>
|
||||
#include <xen/hvm/hvm_op.h>
|
||||
|
||||
@@ -467,6 +467,18 @@ void *xc_vm_event_enable(xc_interface *xch, uint32_t domain_id, int param,
|
||||
|
||||
int do_dm_op(xc_interface *xch, uint32_t domid, unsigned int nr_bufs, ...);
|
||||
|
||||
#if defined (__i386__) || defined (__x86_64__)
|
||||
static inline int xc_core_arch_auto_translated_physmap(const xc_dominfo_t *info)
|
||||
{
|
||||
return info->hvm;
|
||||
}
|
||||
#elif defined (__arm__) || defined(__aarch64__)
|
||||
static inline int xc_core_arch_auto_translated_physmap(const xc_dominfo_t *info)
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* __XC_PRIVATE_H__ */
|
||||
|
||||
/*
|
||||
|
||||
@@ -24,6 +24,9 @@ SRCS-y += xg_offline_page.c
|
||||
else
|
||||
SRCS-y += xg_nomigrate.c
|
||||
endif
|
||||
SRCS-y += xg_core.c
|
||||
SRCS-$(CONFIG_X86) += xg_core_x86.c
|
||||
SRCS-$(CONFIG_ARM) += xg_core_arm.c
|
||||
|
||||
CFLAGS += -I$(XEN_libxenctrl)
|
||||
|
||||
|
||||
@@ -61,7 +61,7 @@
|
||||
*/
|
||||
|
||||
#include "xc_private.h"
|
||||
#include "xc_core.h"
|
||||
#include "xg_core.h"
|
||||
#include <stdlib.h>
|
||||
#include <unistd.h>
|
||||
|
||||
@@ -131,7 +131,6 @@ struct xc_core_memory_map {
|
||||
uint64_t size;
|
||||
};
|
||||
typedef struct xc_core_memory_map xc_core_memory_map_t;
|
||||
int xc_core_arch_auto_translated_physmap(const xc_dominfo_t *info);
|
||||
struct xc_core_arch_context;
|
||||
int xc_core_arch_memory_map_get(xc_interface *xch,
|
||||
struct xc_core_arch_context *arch_ctxt,
|
||||
@@ -152,9 +151,9 @@ int xc_core_arch_get_scratch_gpfn(xc_interface *xch, uint32_t domid,
|
||||
|
||||
|
||||
#if defined (__i386__) || defined (__x86_64__)
|
||||
# include "xc_core_x86.h"
|
||||
# include "xg_core_x86.h"
|
||||
#elif defined (__arm__) || defined(__aarch64__)
|
||||
# include "xc_core_arm.h"
|
||||
# include "xg_core_arm.h"
|
||||
#else
|
||||
# error "unsupported architecture"
|
||||
#endif
|
||||
@@ -17,7 +17,7 @@
|
||||
*/
|
||||
|
||||
#include "xc_private.h"
|
||||
#include "xc_core.h"
|
||||
#include "xg_core.h"
|
||||
|
||||
#include <xen-tools/libs.h>
|
||||
|
||||
@@ -31,12 +31,6 @@ xc_core_arch_gpfn_may_present(struct xc_core_arch_context *arch_ctxt,
|
||||
return 0;
|
||||
}
|
||||
|
||||
int
|
||||
xc_core_arch_auto_translated_physmap(const xc_dominfo_t *info)
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
|
||||
int
|
||||
xc_core_arch_memory_map_get(xc_interface *xch, struct xc_core_arch_context *unused,
|
||||
xc_dominfo_t *info, shared_info_any_t *live_shinfo,
|
||||
File renamed without changes.
@@ -19,7 +19,7 @@
|
||||
|
||||
#include <inttypes.h>
|
||||
#include "xc_private.h"
|
||||
#include "xc_core.h"
|
||||
#include "xg_core.h"
|
||||
#include <xen/hvm/e820.h>
|
||||
|
||||
int
|
||||
@@ -33,12 +33,6 @@ xc_core_arch_gpfn_may_present(struct xc_core_arch_context *arch_ctxt,
|
||||
return 1;
|
||||
}
|
||||
|
||||
int
|
||||
xc_core_arch_auto_translated_physmap(const xc_dominfo_t *info)
|
||||
{
|
||||
return info->hvm;
|
||||
}
|
||||
|
||||
int
|
||||
xc_core_arch_memory_map_get(xc_interface *xch, struct xc_core_arch_context *unused,
|
||||
xc_dominfo_t *info, shared_info_any_t *live_shinfo,
|
||||
File renamed without changes.
@@ -31,7 +31,7 @@
|
||||
#include <zlib.h>
|
||||
|
||||
#include "xg_private.h"
|
||||
#include "xc_core.h"
|
||||
#include "xg_core.h"
|
||||
#include <xen/hvm/params.h>
|
||||
#include <xen/grant_table.h>
|
||||
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
*/
|
||||
|
||||
#include "xg_private.h"
|
||||
#include "xc_core.h"
|
||||
#include "xg_core.h"
|
||||
|
||||
int xc_unmap_domain_meminfo(xc_interface *xch, struct xc_domain_meminfo *minfo)
|
||||
{
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
#include <stdlib.h>
|
||||
#include <unistd.h>
|
||||
#include <sys/time.h>
|
||||
#include <xc_core.h>
|
||||
#include <xg_core.h>
|
||||
|
||||
#include "xc_private.h"
|
||||
#include "xg_private.h"
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
#include <xen/foreign/x86_32.h>
|
||||
#include <xen/foreign/x86_64.h>
|
||||
#include <xen/hvm/params.h>
|
||||
#include "xc_core.h"
|
||||
#include "xg_core.h"
|
||||
|
||||
static int modify_returncode(xc_interface *xch, uint32_t domid)
|
||||
{
|
||||
|
||||