[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [V9 1/3] x86/xsaves: enable xsaves/xrstors/xsavec in xen
On Thu, Nov 05, 2015 at 03:13:01AM -0700, Jan Beulich wrote: > >>> On 05.11.15 at 10:57, <shuai.ruan@xxxxxxxxxxxxxxx> wrote: > > Ok. So alternative_input will not used here (means use the way > > xrstor in Patch 8)? Or put the XSTATE_FIXUP into alternative_input ? > > Which one is ok to you ? > > The latter, if necessary by extending alternative_input() accordingly > (or provide a second, more flexible variant if need be; iirc Linux has > gained a couple of variants over the years). > Ok,I will introduct 2 new macro to handle this. 1. #define ASM_OUTPUT2(a...) a The first one(Porting from linux) is used when more than one output parameter is needed. 2. #define alternative_io_fixup(oldinstr, newinstr, feature, fixup, output, input...) \ asm volatile (ALTERNATIVE(oldinstr, newinstr, feature) "\n" \ fixup \ : output : "i"(0), ## input) The second is to handle alternaive asm with fixup. Then xrstor side will be: alternative_io_fixup("1: "".byte 0x48,0x0f,0xae,0x2f", ".byte 0x48,0x0f,0xc7,0x1f", X86_FEATURE_XSAVES, XSTATE_FIXUP, ASM_OUTPUT2("+&D" (ptr), "+&a" (lmask)), "m" (*ptr), "g" (lmask), "d" (hmask), "m" (xsave_cntxt_size) : "ecx"); Also, the position of the operand used in XSTATE_FIXUP will changed. Any suggestions of this ? Thanks > Xen-devel@xxxxxxxxxxxxx > http://lists.xen.org/xen-devel > _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx http://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |