HYPERCALL_DEPRECATED(physdev_op_compat, 1),
HYPERCALL(sysctl, 2),
HYPERCALL(hvm_op, 2),
+#ifdef CONFIG_GRANT_TABLE
HYPERCALL(grant_table_op, 3),
+#endif
HYPERCALL(multicall, 2),
HYPERCALL(platform_op, 1),
HYPERCALL_ARM(vcpu_op, 3),
obj-bin-y += dom0_build.init.o
obj-y += domain.o
obj-y += emulate.o
-obj-y += grant_table.o
+obj-$(CONFIG_GRANT_TABLE) += grant_table.o
obj-y += hpet.o
obj-y += hvm.o
obj-y += hypercall.o
return rc;
}
+#ifdef CONFIG_GRANT_TABLE
static long hvm_grant_table_op(
unsigned int cmd, XEN_GUEST_HANDLE_PARAM(void) uop, unsigned int count)
{
else
return compat_grant_table_op(cmd, uop, count);
}
+#endif
static long hvm_physdev_op(int cmd, XEN_GUEST_HANDLE_PARAM(void) arg)
{
static const hypercall_table_t hvm_hypercall_table[] = {
HVM_CALL(memory_op),
+#ifdef CONFIG_GRANT_TABLE
HVM_CALL(grant_table_op),
+#endif
COMPAT_CALL(vcpu_op),
HVM_CALL(physdev_op),
COMPAT_CALL(xen_version),
ARGS(xen_version, 2),
ARGS(console_io, 3),
ARGS(physdev_op_compat, 1),
+#ifdef CONFIG_GRANT_TABLE
ARGS(grant_table_op, 3),
+#endif
ARGS(vm_assist, 2),
COMP(update_va_mapping_otherdomain, 4, 5),
ARGS(vcpu_op, 3),
obj-y += emul-gate-op.o
obj-y += emul-inv-op.o
obj-y += emul-priv-op.o
-obj-y += grant_table.o
+obj-$(CONFIG_GRANT_TABLE) += grant_table.o
obj-y += hypercall.o
obj-y += iret.o
obj-y += misc-hypercalls.o
COMPAT_CALL(xen_version),
HYPERCALL(console_io),
COMPAT_CALL(physdev_op_compat),
+#ifdef CONFIG_GRANT_TABLE
COMPAT_CALL(grant_table_op),
+#endif
COMPAT_CALL(vm_assist),
COMPAT_CALL(update_va_mapping_otherdomain),
COMPAT_CALL(iret),
config CORE_PARKING
bool
+config GRANT_TABLE
+ bool "Grant table support" if EXPERT = "y"
+ default y
+ ---help---
+ Grant table provides a generic mechanism to memory sharing
+ between domains. This shared memory interface underpins the
+ split device drivers for block and network IO in a classic
+ Xen setup.
+
+ If unsure, say Y.
+
config HAS_ALTERNATIVE
bool
obj-y += event_channel.o
obj-y += event_fifo.o
obj-$(CONFIG_CRASH_DEBUG) += gdbstub.o
-obj-y += grant_table.o
+obj-$(CONFIG_GRANT_TABLE) += grant_table.o
obj-y += guestcopy.o
obj-bin-y += gunzip.init.o
obj-y += irq.o
#include <asm/page.h>
#include <asm/grant_table.h>
+#ifdef CONFIG_GRANT_TABLE
struct grant_table;
extern unsigned int opt_max_grant_frames;
int gnttab_get_status_frame(struct domain *d, unsigned long idx,
mfn_t *mfn);
+#else
+
+#define opt_max_grant_frames 0
+#define opt_max_maptrack_frames 0
+
+static inline int grant_table_init(struct domain *d,
+ unsigned int max_grant_frames,
+ unsigned int max_maptrack_frames)
+{
+ return 0;
+}
+
+static inline void grant_table_destroy(struct domain *d) {}
+
+static inline void grant_table_init_vcpu(struct vcpu *v) {}
+
+static inline void grant_table_warn_active_grants(struct domain *d) {}
+
+static inline void gnttab_release_mappings(struct domain *d) {}
+
+static inline int mem_sharing_gref_to_gfn(struct grant_table *gt,
+ grant_ref_t ref,
+ gfn_t *gfn, uint16_t *status)
+{
+ return -EINVAL;
+}
+
+static inline int gnttab_map_frame(struct domain *d, unsigned long idx,
+ gfn_t gfn, mfn_t *mfn)
+{
+ return -EINVAL;
+}
+
+static inline int gnttab_get_shared_frame(struct domain *d, unsigned long idx,
+ mfn_t *mfn)
+{
+ return -EINVAL;
+}
+
+static inline int gnttab_get_status_frame(struct domain *d, unsigned long idx,
+ mfn_t *mfn)
+{
+ return -EINVAL;
+}
+
+#endif /* CONFIG_GRANT_TABLE */
+
#endif /* __XEN_GRANT_TABLE_H__ */