xen: make grant table configurable
PATCH v2 1/1 xen: make grant table configurable
Introduce CONFIG_GRANT_TABLE. Provide stubs and make sure x86 and arm hypervisors build with grant table disabled.
---
v2:
1. CONFIG_GRANT_TABLE should depend on EXPERT=y
2. Define two opt_* to be 0
--- xen/arch/arm/traps.c | 2 ++ xen/arch/x86/hvm/Makefile | 2 +- xen/arch/x86/hvm/hypercall.c | 4 ++++ xen/arch/x86/hypercall.c | 2 ++ xen/arch/x86/pv/Makefile | 2 +- xen/arch/x86/pv/hypercall.c | 2 ++ xen/common/Kconfig | 11 ++++++++++ xen/common/Makefile | 2 +- xen/include/xen/grant_table.h | 48 +++++++++++++++++++++++++++++++++++++++++++ 9 files changed, 72 insertions(+), 3 deletions(-)
xen/arch/arm/traps.c +2 -0
@@ -1392,7 +1392,9 @@ static arm_hypercall_t arm_hypercall_table[] = {HYPERCALL_DEPRECATED (physdev_op_compat,1 ),HYPERCALL (sysctl,2 ),HYPERCALL (hvm_op,2 ), +#ifdef CONFIG_GRANT_TABLEHYPERCALL (grant_table_op,3 ), +#endifHYPERCALL (multicall,2 ),HYPERCALL (platform_op,1 ), HYPERCALL_ARM(vcpu_op, 3),
xen/arch/x86/hvm/Makefile +1 -1
@@ -7,7 +7,7 @@ obj-y += dm.o 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
xen/arch/x86/hvm/hypercall.c +4 -0
@@ -47,6 +47,7 @@ static long hvm_memory_op(int cmd, XEN_GUEST_HANDLE_PARAM(void) arg)return rc; } +#ifdef CONFIG_GRANT_TABLE static long hvm_grant_table_op (unsigned int cmd,XEN_GUEST_HANDLE_PARAM (void ) uop,unsigned int count) {
@@ -71,6 +72,7 @@ static long hvm_grant_table_op( else return compat_grant_table_op(cmd, uop, count); } +#endif static long hvm_physdev_op (int cmd,XEN_GUEST_HANDLE_PARAM (void ) arg) {
@@ -119,7 +121,9 @@ 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_TABLEHVM_CALL (grant_table_op), +#endifCOMPAT_CALL (vcpu_op),HVM_CALL (physdev_op),COMPAT_CALL (xen_version),
xen/arch/x86/hypercall.c +2 -0
@@ -47,7 +47,9 @@ const hypercall_args_t hypercall_args_table[NR_hypercalls] =ARGS (xen_version,2 ),ARGS (console_io,3 ),ARGS (physdev_op_compat,1 ), +#ifdef CONFIG_GRANT_TABLEARGS (grant_table_op,3 ), +#endifARGS (vm_assist,2 ),COMP (update_va_mapping_otherdomain,4 ,5 ), ARGS(vcpu_op, 3),
xen/arch/x86/pv/Makefile +1 -1
@@ -5,7 +5,7 @@ obj-y += emulate.o 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
xen/arch/x86/pv/hypercall.c +2 -0
@@ -53,7 +53,9 @@ const hypercall_table_t pv_hypercall_table[] = {COMPAT_CALL (xen_version),HYPERCALL (console_io),COMPAT_CALL (physdev_op_compat), +#ifdef CONFIG_GRANT_TABLECOMPAT_CALL (grant_table_op), +#endifCOMPAT_CALL (vm_assist),COMPAT_CALL (update_va_mapping_otherdomain), COMPAT_CALL(iret),
xen/common/Kconfig +11 -0
@@ -11,6 +11,17 @@ config COMPAT 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
xen/common/Makefile +1 -1
@@ -10,7 +10,7 @@ obj-y += event_2l.o 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
xen/include/xen/grant_table.h +48 -0
58 lines not on this page · raw message
Signature · 7 lines
2.11.0 _______________________________________________ Xen-devel mailing list [email protected] https://lists.xenproject.org/mailman/listinfo/xen-devel
Quoted 5 lines
Quoted 1 line
Quoted 1 line
Wei Liu <[email protected]> 01/18/19 1:44 PM >>>
Introduce
CONFIG_GRANT_TABLE. Provide stubs and make sure x86 and arm hypervisors build with grant table disabled.Signed-off-by Wei Liu <[email protected]>
I continue to misinterpret the title - would you mind making it "make grant table support configurable", to disambiguate it from meaning you want grant table behavior (size, versions, or what not) to be configurable? Other than this
Jan
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel
Quoted 11 lines · Jan Beulich
Quoted 5 lines
Quoted 1 line
Quoted 1 line
Wei Liu <[email protected]> 01/18/19 1:44 PM >>>
Introduce
CONFIG_GRANT_TABLE. Provide stubs and make sure x86 and arm hypervisors build with grant table disabled.Signed-off-by Wei Liu <[email protected]>I continue to misinterpret the title - would you mind making it "make grant table support configurable", to disambiguate it from meaning you want grant table behavior (size, versions, or what not) to be configurable? Other than this
Sure. I will fix the title.
Quoted 2 lines
Acked-by Jan Beulich <[email protected]>
Thanks.
Wei.
Quoted 3 lines
Jan
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel
Quoted 4 lines · Wei Liu
Introduce
CONFIG_GRANT_TABLE. Provide stubs and make sure x86 and arm hypervisors build with grant table disabled.Signed-off-by Wei Liu <[email protected]>
I know this patch can only be applied after the tree is reopen but ...
Quoted 6 lines
xen/arch/arm/traps.c +0
-0
xen/arch/arm/traps.c static arm_hypercall_t arm_hypercall_table[] = { · line 1400
Quoted 9 lines
xen/arch/arm/traps.c +2
-0@@ -1392,7 +1392,9 @@ static arm_hypercall_t arm_hypercall_table[] = {HYPERCALL_DEPRECATED (physdev_op_compat,1 ),HYPERCALL (sysctl,2 ),HYPERCALL (hvm_op,2 ), +#ifdef CONFIG_GRANT_TABLEHYPERCALL (grant_table_op,3 ), +#endifHYPERCALL (multicall,2 ),HYPERCALL (platform_op,1 ), HYPERCALL_ARM(vcpu_op, 3),
can I get an ack from one of the Arm maintainers so that I can queue it up?
Thanks,
Wei.
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel
Julien Grall
Acked-byQuoted 18 lines · Wei Liu
Quoted 4 lines · Wei Liu
Introduce
CONFIG_GRANT_TABLE. Provide stubs and make sure x86 and arm hypervisors build with grant table disabled.Signed-off-by Wei Liu <[email protected]>I know this patch can only be applied after the tree is reopen but ...
Quoted 10 lines
xen/arch/arm/traps.c +1
-0@@ -1392,7 +1392,9 @@ static arm_hypercall_t arm_hypercall_table[] = {HYPERCALL_DEPRECATED (physdev_op_compat,1 ),HYPERCALL (sysctl,2 ),HYPERCALL (hvm_op,2 ), +#ifdef CONFIG_GRANT_TABLE
Quoted 8 lines
xen/arch/arm/traps.c static arm_hypercall_t arm_hypercall_table[] = { · line 1400
Quoted 5 lines
xen/arch/arm/traps.c +1
-0HYPERCALL (grant_table_op,3 ), +#endifHYPERCALL (multicall,2 ),HYPERCALL (platform_op,1 ), HYPERCALL_ARM(vcpu_op, 3),can I get an ack from one of the Arm maintainers so that I can queue it up?
Cheers,
Signature · 6 lines
Julien Grall _______________________________________________ Xen-devel mailing list [email protected] https://lists.xenproject.org/mailman/listinfo/xen-devel
Quoted 30 lines · Julien Grall
Quoted 18 lines · Wei Liu
Quoted 4 lines · Wei Liu
Introduce
CONFIG_GRANT_TABLE. Provide stubs and make sure x86 and arm hypervisors build with grant table disabled.Signed-off-by Wei Liu <[email protected]>I know this patch can only be applied after the tree is reopen but ...
Quoted 10 lines
xen/arch/arm/traps.c +1
-0@@ -1392,7 +1392,9 @@ static arm_hypercall_t arm_hypercall_table[] = {HYPERCALL_DEPRECATED (physdev_op_compat,1 ),HYPERCALL (sysctl,2 ),HYPERCALL (hvm_op,2 ), +#ifdef CONFIG_GRANT_TABLEQuoted 8 lines
xen/arch/arm/traps.c static arm_hypercall_t arm_hypercall_table[] = { · line 1400
Quoted 5 lines
xen/arch/arm/traps.c +1
-0HYPERCALL (grant_table_op,3 ), +#endifHYPERCALL (multicall,2 ),HYPERCALL (platform_op,1 ), HYPERCALL_ARM(vcpu_op, 3),can I get an ack from one of the Arm maintainers so that I can queue it up?
Quoted 1 line
Acked-by Julien Grall <[email protected]>
Thank you!
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel