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

Re: [Xen-devel] [PATCH v2 1/7] x86: Add support for STAC/CLAC instructions




> -----Original Message-----
> From: Jan Beulich [mailto:JBeulich@xxxxxxxx]
> Sent: Friday, April 25, 2014 6:39 PM
> To: Wu, Feng
> Cc: andrew.cooper3@xxxxxxxxxx; ian.campbell@xxxxxxxxxx; Dong, Eddie;
> Nakajima, Jun; Tian, Kevin; xen-devel@xxxxxxxxxxxxx
> Subject: RE: [PATCH v2 1/7] x86: Add support for STAC/CLAC instructions
> 
> >>> On 25.04.14 at 10:51, <feng.wu@xxxxxxxxx> wrote:
> >> From: Jan Beulich [mailto:JBeulich@xxxxxxxx]
> >> Perhaps worth avoiding the basic uses then, by converting them to
> >> extended? Passing these % or %% to the macro looks rather ugly,
> >> so if the suggestion isn't viable, some other trick can certainly be
> >> found to avoid this.
> >
> > Need to add CLAC in the beginning of interrupt in the following macro, which
> > uses
> > the basic inline assembly, seems it is hard to convert this one to extended
> > format. I
> > have been thinking about this for some time and tried several method, but I
> > am kind of
> > run out of ideas about it. Jan, do you have any suggestion about this?
> >
> > Thanks very much in advance!
> >
> > #define BUILD_COMMON_IRQ()                      \
> > __asm__(                                        \
> >     "\n" __ALIGN_STR"\n"                        \
> >     "common_interrupt:\n\t"                     \
> >     STR(SAVE_ALL) "\n\t"                        \
> >     "movq %rsp,%rdi\n\t"                        \
> >     "callq " STR(do_IRQ) "\n\t"                 \
> >     "jmp ret_from_intr\n");
> 
> I agree with Andrew - now that we don't have to care about
> otherwise resulting code duplication (leaving aside that there wasn't
> much of it here anyway, the bulk of it is from BUILD_IRQ()), this
> should simply be moved into entry.S, at once making it better readable
> (and a follow-up patch, unless you want to do it all in one go, would
> be to also move the BUILD_IRQ() consumer into entry.S).
> 

Okay, I will move common_interrupt to entry.S first, and then will handle
BUILD_IRQ in a follow-up patch

> Jan

Thanks,
Feng

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

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