Message ID | 20200107173902.13768-2-liuwe@microsoft.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | Misc Hyper-V TLFS fixes | expand |
On 07.01.2020 18:39, Wei Liu wrote: > --- a/xen/include/asm-x86/guest/hyperv-tlfs.h > +++ b/xen/include/asm-x86/guest/hyperv-tlfs.h > @@ -415,13 +415,13 @@ enum HV_GENERIC_SET_FORMAT { > HV_GENERIC_SET_ALL, > }; > > -#define HV_HYPERCALL_RESULT_MASK GENMASK_ULL(15, 0) > +#define HV_HYPERCALL_RESULT_MASK 0xffff /* GENMASK_ULL(15, 0) */ > #define HV_HYPERCALL_FAST_BIT BIT(16, UL) > #define HV_HYPERCALL_VARHEAD_OFFSET 17 > #define HV_HYPERCALL_REP_COMP_OFFSET 32 > -#define HV_HYPERCALL_REP_COMP_MASK GENMASK_ULL(43, 32) > +#define HV_HYPERCALL_REP_COMP_MASK 0xfff00000000 /* GENMASK_ULL(43, 32) */ > #define HV_HYPERCALL_REP_START_OFFSET 48 > -#define HV_HYPERCALL_REP_START_MASK GENMASK_ULL(59, 48) > +#define HV_HYPERCALL_REP_START_MASK 0xfff000000000000 /* GENMASK_ULL(59, 48) */ The last two should gain ULL (or at least UL) suffixes. I also wonder whether both wouldn't better be expressed as (0xfffULL << N). With at least the suffixes added Acked-by: Jan Beulich <jbeulich@suse.com> Jan
On Wed, Jan 08, 2020 at 01:26:20PM +0100, Jan Beulich wrote: > On 07.01.2020 18:39, Wei Liu wrote: > > --- a/xen/include/asm-x86/guest/hyperv-tlfs.h > > +++ b/xen/include/asm-x86/guest/hyperv-tlfs.h > > @@ -415,13 +415,13 @@ enum HV_GENERIC_SET_FORMAT { > > HV_GENERIC_SET_ALL, > > }; > > > > -#define HV_HYPERCALL_RESULT_MASK GENMASK_ULL(15, 0) > > +#define HV_HYPERCALL_RESULT_MASK 0xffff /* GENMASK_ULL(15, 0) */ > > #define HV_HYPERCALL_FAST_BIT BIT(16, UL) > > #define HV_HYPERCALL_VARHEAD_OFFSET 17 > > #define HV_HYPERCALL_REP_COMP_OFFSET 32 > > -#define HV_HYPERCALL_REP_COMP_MASK GENMASK_ULL(43, 32) > > +#define HV_HYPERCALL_REP_COMP_MASK 0xfff00000000 /* GENMASK_ULL(43, 32) */ > > #define HV_HYPERCALL_REP_START_OFFSET 48 > > -#define HV_HYPERCALL_REP_START_MASK GENMASK_ULL(59, 48) > > +#define HV_HYPERCALL_REP_START_MASK 0xfff000000000000 /* GENMASK_ULL(59, 48) */ > > The last two should gain ULL (or at least UL) suffixes. I also > wonder whether both wouldn't better be expressed as (0xfffULL << N). > With at least the suffixes added Thanks. I will fix those up. Using (0xffffULL << N) works for me too. Let's see what form Paul prefers. Wei. > Acked-by: Jan Beulich <jbeulich@suse.com> > > Jan
diff --git a/xen/include/asm-x86/guest/hyperv-tlfs.h b/xen/include/asm-x86/guest/hyperv-tlfs.h index 5b43f99de8..e4183c802c 100644 --- a/xen/include/asm-x86/guest/hyperv-tlfs.h +++ b/xen/include/asm-x86/guest/hyperv-tlfs.h @@ -415,13 +415,13 @@ enum HV_GENERIC_SET_FORMAT { HV_GENERIC_SET_ALL, }; -#define HV_HYPERCALL_RESULT_MASK GENMASK_ULL(15, 0) +#define HV_HYPERCALL_RESULT_MASK 0xffff /* GENMASK_ULL(15, 0) */ #define HV_HYPERCALL_FAST_BIT BIT(16, UL) #define HV_HYPERCALL_VARHEAD_OFFSET 17 #define HV_HYPERCALL_REP_COMP_OFFSET 32 -#define HV_HYPERCALL_REP_COMP_MASK GENMASK_ULL(43, 32) +#define HV_HYPERCALL_REP_COMP_MASK 0xfff00000000 /* GENMASK_ULL(43, 32) */ #define HV_HYPERCALL_REP_START_OFFSET 48 -#define HV_HYPERCALL_REP_START_MASK GENMASK_ULL(59, 48) +#define HV_HYPERCALL_REP_START_MASK 0xfff000000000000 /* GENMASK_ULL(59, 48) */ /* hypercall status code */ #define HV_STATUS_SUCCESS 0
I'm told that GENMASK_ULL shouldn't be used outside of Arm code in its current form. Requested-by: Jan Beulich <jbeulich@suse.com> Signed-off-by: Wei Liu <liuwe@microsoft.com> --- xen/include/asm-x86/guest/hyperv-tlfs.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)