Re: [Xen-devel] [PATCH 5/5] tmem: allow tmem to be disabled with Kconfig
>>> On 15.03.16 at 20:04,wrote: > On 3/15/16 3:31 AM, Jan Beulich wrote: > On 14.03.16 at 21:29, wrote: >>> --- a/xen/arch/x86/hvm/hvm.c >>> +++ b/xen/arch/x86/hvm/hvm.c >>> @@ -5311,6 +5311,10 @@ typedef unsigned long hvm_hypercall_t( >>> #define compat_grant_table_op hvm_grant_table_op_compat32 >>> #define do_arch_1 paging_domctl_continuation >>> >>> +#ifndef CONFIG_TMEM >>> +#define do_tmem_op do_ni_hypercall >>> +#endif >> >> This being repeated in 3 places, wouldn't be better to put this in, >> say, xen/hypercall.h, next to the function declaration? > > Actually I tried this and it doesn't compile because that header isn't > included. Including that header into the relevant files (entry.S) > doesn't work either. Got a different suggestion? Well, if the header can't be used in assembly files, so be it (for now at least, as mentioned by Andrew on IRC). But this then still calls for the #define to go into the header for the C source(s) sake. Jan ___ Xen-devel mailing list Xen-devel@lists.xen.org http://lists.xen.org/xen-devel
Re: [Xen-devel] [PATCH 5/5] tmem: allow tmem to be disabled with Kconfig
On 3/15/16 3:31 AM, Jan Beulich wrote: On 14.03.16 at 21:29,wrote: >> --- a/xen/arch/x86/hvm/hvm.c >> +++ b/xen/arch/x86/hvm/hvm.c >> @@ -5311,6 +5311,10 @@ typedef unsigned long hvm_hypercall_t( >> #define compat_grant_table_op hvm_grant_table_op_compat32 >> #define do_arch_1 paging_domctl_continuation >> >> +#ifndef CONFIG_TMEM >> +#define do_tmem_op do_ni_hypercall >> +#endif > > This being repeated in 3 places, wouldn't be better to put this in, > say, xen/hypercall.h, next to the function declaration? > Actually I tried this and it doesn't compile because that header isn't included. Including that header into the relevant files (entry.S) doesn't work either. Got a different suggestion? -- Doug Goldstein signature.asc Description: OpenPGP digital signature ___ Xen-devel mailing list Xen-devel@lists.xen.org http://lists.xen.org/xen-devel
Re: [Xen-devel] [PATCH 5/5] tmem: allow tmem to be disabled with Kconfig
On 3/15/16 3:31 AM, Jan Beulich wrote: On 14.03.16 at 21:29,wrote: >> --- a/xen/arch/x86/hvm/hvm.c >> +++ b/xen/arch/x86/hvm/hvm.c >> @@ -5311,6 +5311,10 @@ typedef unsigned long hvm_hypercall_t( >> #define compat_grant_table_op hvm_grant_table_op_compat32 >> #define do_arch_1 paging_domctl_continuation >> >> +#ifndef CONFIG_TMEM >> +#define do_tmem_op do_ni_hypercall >> +#endif > > This being repeated in 3 places, wouldn't be better to put this in, > say, xen/hypercall.h, next to the function declaration? We can do this but I'd like to move the other ones from entry.S into here as well in a follow on then. -- Doug Goldstein signature.asc Description: OpenPGP digital signature ___ Xen-devel mailing list Xen-devel@lists.xen.org http://lists.xen.org/xen-devel
Re: [Xen-devel] [PATCH 5/5] tmem: allow tmem to be disabled with Kconfig
>>> On 14.03.16 at 21:29,wrote: > --- a/xen/arch/x86/hvm/hvm.c > +++ b/xen/arch/x86/hvm/hvm.c > @@ -5311,6 +5311,10 @@ typedef unsigned long hvm_hypercall_t( > #define compat_grant_table_op hvm_grant_table_op_compat32 > #define do_arch_1 paging_domctl_continuation > > +#ifndef CONFIG_TMEM > +#define do_tmem_op do_ni_hypercall > +#endif This being repeated in 3 places, wouldn't be better to put this in, say, xen/hypercall.h, next to the function declaration? > --- a/xen/common/Kconfig > +++ b/xen/common/Kconfig > @@ -87,6 +87,17 @@ config LATE_HWDOM > > If unsure, say N. > > +# Enables transactional memory support > +config TMEM > + bool "Transaction Memory Support" I think it should be "Transactional" here too. > + default y No EXPERT dependency? > + ---help--- > + fill me out Indeed. > +config TMEM_COMPAT > + bool > + default y if COMPAT && TMEM I don't see the need for such an extra symbol: > --- a/xen/common/Makefile > +++ b/xen/common/Makefile > @@ -49,8 +49,8 @@ obj-y += sysctl.o > obj-y += tasklet.o > obj-y += time.o > obj-y += timer.o > -obj-y += tmem.o > -obj-y += tmem_xen.o > +obj-$(CONFIG_TMEM) += tmem.o > +obj-$(CONFIG_TMEM) += tmem_xen.o > obj-y += trace.o > obj-y += version.o > obj-y += vm_event.o > @@ -65,7 +65,8 @@ obj-bin-$(CONFIG_X86) += $(foreach n,decompress bunzip2 > unxz unlzma unlzo unlz4 > obj-$(perfc) += perfc.o > obj-$(crash_debug) += gdbstub.o > > -obj-$(CONFIG_COMPAT) += $(addprefix compat/,domain.o kernel.o memory.o > multicall.o tmem_xen.o xlat.o) > +obj-$(CONFIG_COMPAT) += $(addprefix compat/,domain.o kernel.o memory.o > multicall.o xlat.o) > +obj-$(CONFIG_TMEM_COMPAT) += compat/tmem_xen.o tmem-y := tmem.o tmem_xen.o tmem-$(CONFIG_COMPAT) += compat/tmem_xen.o obj-$(CONFIG_TMEM) += $(tmem-y) or some such would have the same effect. Jan ___ Xen-devel mailing list Xen-devel@lists.xen.org http://lists.xen.org/xen-devel