[PATCH 1/2] x86: PadLock adjustments
Mayshao-oc
Mayshao-oc@zhaoxin.com
Wed Nov 26 08:24:47 GMT 2025
> On 26.09.2025 14:57, Jan Beulich wrote:
> > For one, all PadLock insns depend on CR4.FXSR to be enabled, which
> > means they ought to be taking FXSR as a prereq.
Sorry for the late reply. AFAIK CR4.FXSR indicates whether the OS supports
the FXSAVE and FXRSTOR instructions, PadLock insns don't depend on it.
> >
> > Furthermore none of them permits a REPNE prefix; such forms are
> > documented to cause #UD. (This is mainly relevant for XSTORE, which
> > doesn't include a REP prefix in its base encoding. For the others this
> > merely is a change in what diagnostic is issued.)
> >
> > Finally it is documented that an operand size prefix also causes #UD.
> > ---
> > Question is whether for the GMI insns the data size prefix is invalid
> > as well.
>
> Can you possibly answer this?
For the GMI insns the data size prefix is not a mandatory prefix like REPE/REPNE.
For example, the encoding of sm2 instruction is 0xf20fa6c0, 0x660fa6c0 will cause
#UD, but 0x66f20fa6c0 will not cause #UD.I think for the GMI insns, if only data
size prefix present, it's invalid, if data size prefix present with REPE/REPNE,
it's valid.
>
> Thanks, Jan
BR
Mayshao
More information about the Binutils
mailing list