mirror of
https://github.com/xen-project/xen.git
synced 2026-10-28 02:01:24 +01:00
build: convert HAS_MEM_ACCESS use to Kconfig
Use the Kconfig generated CONFIG_HAS_MEM_ACCESS defines in the code base. Signed-off-by: Doug Goldstein <cardoe@cardoe.com> Acked-by: Razvan Cojocaru <rcojocaru@bitdefender.com> Acked-by: Jan Beulich <jbeulich@suse.com> Acked-by: Daniel De Graaf <dgdegra@tycho.nsa.gov> Acked-by: Ian Campbell <ian.campbell@citrix.com>
This commit is contained in:
1 parent
1e02021d84
commit
ab26ab3084
16 files changed
+16
-16
No files matched your search
@@ -9,8 +9,6 @@ CONFIG_XEN_INSTALL_SUFFIX :=
|
||||
# Explicitly specifiy 32-bit ARM ISA since toolchain default can be -mthumb:
|
||||
CFLAGS += -marm
|
||||
|
||||
HAS_MEM_ACCESS := y
|
||||
|
||||
# Use only if calling $(LD) directly.
|
||||
LDFLAGS_DIRECT += -EL
|
||||
|
||||
|
||||
@@ -6,7 +6,6 @@ CONFIG_XEN_INSTALL_SUFFIX :=
|
||||
|
||||
CFLAGS += #-marm -march= -mcpu= etc
|
||||
|
||||
HAS_MEM_ACCESS := y
|
||||
HAS_GICV3 := y
|
||||
|
||||
# Use only if calling $(LD) directly.
|
||||
|
||||
@@ -5,7 +5,6 @@ CONFIG_X86_$(XEN_OS) := y
|
||||
CONFIG_MIGRATE := y
|
||||
CONFIG_XCUTILS := y
|
||||
|
||||
HAS_MEM_ACCESS := y
|
||||
HAS_MEM_PAGING := y
|
||||
HAS_MEM_SHARING := y
|
||||
|
||||
|
||||
@@ -6,7 +6,6 @@ CONFIG_COMPAT := y
|
||||
CONFIG_MIGRATE := y
|
||||
CONFIG_XCUTILS := y
|
||||
|
||||
HAS_MEM_ACCESS := y
|
||||
HAS_MEM_PAGING := y
|
||||
HAS_MEM_SHARING := y
|
||||
|
||||
|
||||
@@ -59,7 +59,6 @@ CFLAGS-$(crash_debug) += -DCRASH_DEBUG
|
||||
CFLAGS-$(perfc) += -DPERF_COUNTERS
|
||||
CFLAGS-$(perfc_arrays) += -DPERF_ARRAYS
|
||||
CFLAGS-$(lock_profile) += -DLOCK_PROFILE
|
||||
CFLAGS-$(HAS_MEM_ACCESS) += -DHAS_MEM_ACCESS
|
||||
CFLAGS-$(HAS_MEM_PAGING) += -DHAS_MEM_PAGING
|
||||
CFLAGS-$(HAS_MEM_SHARING) += -DHAS_MEM_SHARING
|
||||
CFLAGS-$(frame_pointer) += -fno-omit-frame-pointer -DCONFIG_FRAME_POINTER
|
||||
|
||||
@@ -18,6 +18,7 @@ config ARM
|
||||
def_bool y
|
||||
select HAS_ARM_HDLCD
|
||||
select HAS_DEVICE_TREE
|
||||
select HAS_MEM_ACCESS
|
||||
select HAS_PASSTHROUGH
|
||||
select HAS_PDX
|
||||
select HAS_VIDEO
|
||||
|
||||
@@ -9,6 +9,7 @@ config X86
|
||||
select HAS_GDBSX
|
||||
select HAS_IOPORTS
|
||||
select HAS_KEXEC
|
||||
select HAS_MEM_ACCESS
|
||||
select HAS_NS16550
|
||||
select HAS_PASSTHROUGH
|
||||
select HAS_PCI
|
||||
|
||||
@@ -5,6 +5,10 @@ menu "Common Features"
|
||||
config HAS_DEVICE_TREE
|
||||
bool
|
||||
|
||||
# Select HAS_MEM_ACCESS if mem access is supported
|
||||
config HAS_MEM_ACCESS
|
||||
bool
|
||||
|
||||
# Select HAS_PDX if PDX is supported
|
||||
config HAS_PDX
|
||||
bool
|
||||
|
||||
+1
-1
@@ -18,7 +18,7 @@ obj-$(CONFIG_KEXEC) += kexec.o
|
||||
obj-$(CONFIG_KEXEC) += kimage.o
|
||||
obj-y += lib.o
|
||||
obj-y += lzo.o
|
||||
obj-$(HAS_MEM_ACCESS) += mem_access.o
|
||||
obj-$(CONFIG_HAS_MEM_ACCESS) += mem_access.o
|
||||
obj-y += memory.o
|
||||
obj-y += multicall.o
|
||||
obj-y += notifier.o
|
||||
|
||||
+1
-1
@@ -1130,7 +1130,7 @@ long do_domctl(XEN_GUEST_HANDLE_PARAM(xen_domctl_t) u_domctl)
|
||||
d->disable_migrate = op->u.disable_migrate.disable;
|
||||
break;
|
||||
|
||||
#ifdef HAS_MEM_ACCESS
|
||||
#ifdef CONFIG_HAS_MEM_ACCESS
|
||||
case XEN_DOMCTL_set_access_required:
|
||||
if ( unlikely(current->domain == d) )
|
||||
ret = -EPERM;
|
||||
|
||||
@@ -397,7 +397,7 @@ void vm_event_resume(struct domain *d, struct vm_event_domain *ved)
|
||||
vm_event_register_write_resume(v, &rsp);
|
||||
break;
|
||||
|
||||
#ifdef HAS_MEM_ACCESS
|
||||
#ifdef CONFIG_HAS_MEM_ACCESS
|
||||
case VM_EVENT_REASON_MEM_ACCESS:
|
||||
mem_access_resume(v, &rsp);
|
||||
break;
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
#include <public/memory.h>
|
||||
#include <asm/p2m.h>
|
||||
|
||||
#ifdef HAS_MEM_ACCESS
|
||||
#ifdef CONFIG_HAS_MEM_ACCESS
|
||||
|
||||
int mem_access_memop(unsigned long cmd,
|
||||
XEN_GUEST_HANDLE_PARAM(xen_mem_access_op_t) arg);
|
||||
|
||||
@@ -560,7 +560,7 @@ static XSM_INLINE int xsm_vm_event_control(XSM_DEFAULT_ARG struct domain *d, int
|
||||
return xsm_default_action(action, current->domain, d);
|
||||
}
|
||||
|
||||
#ifdef HAS_MEM_ACCESS
|
||||
#ifdef CONFIG_HAS_MEM_ACCESS
|
||||
static XSM_INLINE int xsm_mem_access(XSM_DEFAULT_ARG struct domain *d)
|
||||
{
|
||||
XSM_ASSERT_ACTION(XSM_DM_PRIV);
|
||||
|
||||
@@ -152,7 +152,7 @@ struct xsm_operations {
|
||||
|
||||
int (*vm_event_control) (struct domain *d, int mode, int op);
|
||||
|
||||
#ifdef HAS_MEM_ACCESS
|
||||
#ifdef CONFIG_HAS_MEM_ACCESS
|
||||
int (*mem_access) (struct domain *d);
|
||||
#endif
|
||||
|
||||
@@ -604,7 +604,7 @@ static inline int xsm_vm_event_control (xsm_default_t def, struct domain *d, int
|
||||
return xsm_ops->vm_event_control(d, mode, op);
|
||||
}
|
||||
|
||||
#ifdef HAS_MEM_ACCESS
|
||||
#ifdef CONFIG_HAS_MEM_ACCESS
|
||||
static inline int xsm_mem_access (xsm_default_t def, struct domain *d)
|
||||
{
|
||||
return xsm_ops->mem_access(d);
|
||||
|
||||
+1
-1
@@ -129,7 +129,7 @@ void xsm_fixup_ops (struct xsm_operations *ops)
|
||||
|
||||
set_to_dummy_if_null(ops, vm_event_control);
|
||||
|
||||
#ifdef HAS_MEM_ACCESS
|
||||
#ifdef CONFIG_HAS_MEM_ACCESS
|
||||
set_to_dummy_if_null(ops, mem_access);
|
||||
#endif
|
||||
|
||||
|
||||
@@ -1192,7 +1192,7 @@ static int flask_vm_event_control(struct domain *d, int mode, int op)
|
||||
return current_has_perm(d, SECCLASS_DOMAIN2, DOMAIN2__VM_EVENT);
|
||||
}
|
||||
|
||||
#ifdef HAS_MEM_ACCESS
|
||||
#ifdef CONFIG_HAS_MEM_ACCESS
|
||||
static int flask_mem_access(struct domain *d)
|
||||
{
|
||||
return current_has_perm(d, SECCLASS_DOMAIN2, DOMAIN2__MEM_ACCESS);
|
||||
@@ -1705,7 +1705,7 @@ static struct xsm_operations flask_ops = {
|
||||
|
||||
.vm_event_control = flask_vm_event_control,
|
||||
|
||||
#ifdef HAS_MEM_ACCESS
|
||||
#ifdef CONFIG_HAS_MEM_ACCESS
|
||||
.mem_access = flask_mem_access,
|
||||
#endif
|
||||
|
||||
|
||||