This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: [PATCH RFC] x86: SYSENTER/SYSEXIT are unavailable in 64-bit mode on AMD
- From: "H.J. Lu" <hjl dot tools at gmail dot com>
- To: Jan Beulich <jbeulich at suse dot com>
- Cc: "binutils at sourceware dot org" <binutils at sourceware dot org>
- Date: Tue, 12 Nov 2019 12:26:53 -0800
- Subject: Re: [PATCH RFC] x86: SYSENTER/SYSEXIT are unavailable in 64-bit mode on AMD
- References: <4fb39967-31dd-ed6d-0fad-425e5f2a012d@suse.com> <CAMe9rOpBDXdgvpVESLr_90FWELL7-F5tU6BbAKgz=fAhYDjeGQ@mail.gmail.com> <a7951cad-53c7-2fd7-bee3-b830a3d9d80a@suse.com>
On Mon, Nov 11, 2019 at 11:13 PM Jan Beulich <jbeulich@suse.com> wrote:
>
> On 11.11.2019 18:12, H.J. Lu wrote:
> > On Mon, Nov 11, 2019 at 4:01 AM Jan Beulich <jbeulich@suse.com> wrote:
> >> RFC because this is liable to cause problems for existing code, but I
> >> think we should still correct this. We may want to have a directive
> >> (besides the command line option) such that the accepted ISA can be
> >> overridden in a more fine granular manner.
> >
> > I think it is an overkill.
>
> Well, even better if this means you're fine with the patch as is
> (seeing that below you're even suggesting a more rigid approach).
>
> >> --- a/opcodes/i386-opc.tbl
> >> +++ b/opcodes/i386-opc.tbl
> >> @@ -891,8 +891,10 @@ rdmsr, 0, 0xf32, None, 2, Cpu586, No_bSu
> >> cmpxchg8b, 1, 0xfc7, 0x1, 2, Cpu586, Modrm|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_ldSuf|IsLockable|NoRex64|HLEPrefixOk, { Qword|Unspecified|BaseIndex }
> >>
> >> // Pentium II/Pentium Pro extensions.
> >> -sysenter, 0, 0xf34, None, 2, Cpu686, No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_ldSuf, { 0 }
> >> -sysexit, 0, 0xf35, None, 2, Cpu686, No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_ldSuf, { 0 }
> >> +sysenter, 0, 0xf34, None, 2, Cpu686, Intel64|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_ldSuf, { 0 }
> >> +sysenter, 0, 0xf34, None, 2, Cpu686|CpuNo64, AMD64|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_ldSuf, { 0 }
> >> +sysexit, 0, 0xf35, None, 2, Cpu686, Intel64|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_ldSuf, { 0 }
> >> +sysexit, 0, 0xf35, None, 2, Cpu686|CpuNo64, AMD64|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_ldSuf, { 0 }
> >> fxsave, 1, 0xfae, 0x0, 2, CpuFXSR, Modrm|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_ldSuf, { Unspecified|BaseIndex }
> >> fxsave64, 1, 0xfae, 0x0, 2, CpuFXSR|Cpu64, Modrm|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_ldSuf|Rex64, { Unspecified|BaseIndex }
> >> fxrstor, 1, 0xfae, 0x1, 2, CpuFXSR, Modrm|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_ldSuf, { Unspecified|BaseIndex }
> >
> > Are there any usages in 64-bit mode? If not, just disallow them in 64-bit mode.
>
> Usages - I don't know. But I do know that they're usable.
>
They can use REX.W prefix if needed.
--
H.J.