[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH v4 3/4] x86: fix indirect thunk usage of CONFIG_INDIRECT_THUNK



On Tue, Feb 20, 2018 at 05:32:17AM -0700, Jan Beulich wrote:
> >>> On 20.02.18 at 12:22, <roger.pau@xxxxxxxxxx> wrote:
> > On Tue, Feb 20, 2018 at 04:13:42AM -0700, Jan Beulich wrote:
> >> >>> On 20.02.18 at 12:01, <roger.pau@xxxxxxxxxx> wrote:
> >> > --- a/xen/include/asm-x86/asm_defns.h
> >> > +++ b/xen/include/asm-x86/asm_defns.h
> >> > @@ -15,6 +15,9 @@
> >> >  #include <asm/alternative.h>
> >> > 
> >> >  #ifdef __ASSEMBLY__
> >> > +#ifndef CONFIG_INDIRECT_THUNK
> >> > +.equ CONFIG_INDIRECT_THUNK, 0
> >> > +#endif
> >> >  # include <asm/indirect_thunk_asm.h>
> >> >  #else
> >> >  asm ( "\t.equ CONFIG_INDIRECT_THUNK, "
> >> > 
> >> > It's fairly similar to my first approach, but at least "#ifdef
> >> > CONFIG_INDIRECT_THUNK" will still work as expected after this fix.
> >> 
> >> I've used something similar in backports to old versions, so I
> >> wonder whether what you quote above is right: Assembly files
> >> don't get handed to clang anyway iirc, so the change would
> >> seem to be needed in the #else part of the conditional.
> > 
> > Assembly files do get handed to clang, from xen/Rules.mk:
> > 
> > %.o: %.S Makefile
> >     $(CC) $(AFLAGS) -c $< -o $@
> > 
> > Xen doesn't call as directly to compile those, or am I missing
> > something?
> 
> Oh, I was referring to the -mno-integrated-as (or whatever it's
> called) option. "Handed to clang" wasn't the best way to put it,
> I agree. But it's clang's integrated assembler which the problem
> is with.

Oh, I see. You are right, this is just a preparatory change for patch
4, which does enable clang's integrated assembler if the right
features are present.

Let me know if you think the above chunk is acceptable.

Thanks, Roger.

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.