On 02/03/18 16:47, Jan Beulich wrote: >>>> On 02.03.18 at 17:23, <wei.l...@citrix.com> wrote: >> +static inline void invpcid(unsigned int pcid, unsigned long addr, >> + unsigned int type) >> +{ >> + struct { >> + uint64_t pcid:12; >> + uint64_t reserved:52; >> + uint64_t addr; >> + } desc = { .pcid = pcid, .addr = addr }; >> + >> + asm volatile ( >> +#ifdef HAVE_AS_INVPCID >> + "invpcid %[desc], %q[type]" >> + : /* No output */ >> + : [desc] "m" (desc), [type] "r" (type) >> +#else >> + INVPCID_OPCODE MODRM_ECX_01 >> + : /* No output */ >> + : "a" (type), "c" (&desc) >> +#endif >> + : "memory" ); > I can see why you need the memory clobber in the #else case > (albeit even there it could be avoided by also properly specifying > the input), but what is this good for in the #if case?
This is a tlb flush operation. I don't think anything good will come from having other operations reordered around it. ~Andrew _______________________________________________ Xen-devel mailing list Xen-devel@lists.xenproject.org https://lists.xenproject.org/mailman/listinfo/xen-devel