[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: [PATCH v10 36/38] x86/fred: Add fred_syscall_init()
- To: Thomas Gleixner <tglx@xxxxxxxxxxxxx>, "linux-doc@xxxxxxxxxxxxxxx" <linux-doc@xxxxxxxxxxxxxxx>, "linux-kernel@xxxxxxxxxxxxxxx" <linux-kernel@xxxxxxxxxxxxxxx>, "linux-edac@xxxxxxxxxxxxxxx" <linux-edac@xxxxxxxxxxxxxxx>, "linux-hyperv@xxxxxxxxxxxxxxx" <linux-hyperv@xxxxxxxxxxxxxxx>, "kvm@xxxxxxxxxxxxxxx" <kvm@xxxxxxxxxxxxxxx>, "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>
- From: "Li, Xin3" <xin3.li@xxxxxxxxx>
- Date: Wed, 20 Sep 2023 04:33:38 +0000
- Accept-language: en-US
- Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=intel.com; dmarc=pass action=none header.from=intel.com; dkim=pass header.d=intel.com; arc=none
- Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=cuWtYsNSV45fWFoOBKicjRCIAtGyvumISLu68v8Tnfw=; b=UwqzdeYdSGLKU4z2foRy/kpYEqkZ8JwwcOv5KKxve7edM1IpzozjbIPX7JyifsUpfIrLARDIKjGSHHX4/EAjYLvMWLhi4EgxSCggbBcK5Q0D3EgkWkRF9p1lFyxeY2US5mgz/5d5P8Uow8e7JpbnsErbyzj067ugsR0JjZBz/uEu7gmGugk8UsWBSZ5/+uAM0hZNyMhNVdpoDEHrBEtOUvP7E2O6KwQDcmt2LZg6YOAKQZ/SA9ZY926YG6xx52PKIdEbeeoZG15IOcX+tw5cEAS0dhZ1g1bekwFtB5irj3TNK41y8X7JCrFfgLOXEbw+plt0Pfmdm9qgqhxp11FRaQ==
- Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=GDGdrb+ENySOSoaJwFbw7TvyFIbnqaTP8IP40GnC2Ulga0UvZKEfvRIVJwHjXVsAzYHuJSp9m8u9qrhNzRWgJiUu/u8bZAv36Cpbd8Ny1ImyCdIz8giK6bIu6UrqMp250UTCM30io5a+c29ronDjWWdSxwJbxQIJPLR/tXY8fMY/CUBrnBR2NPQ7fWok52VyK7ag27HIBSLIqj01w0fw7PdF5zp8wcj5q4O0hYLT1YkfLmz+Xd54KCV6pZiIID/+8cBVMMk5WimrfgVwgLcl8aHJ3m/8JPEurF/Ee/wAbjXb0Am4VZzuiyVl0rpbqVgdYWEWnP8pnxEgOEvC6wae5Q==
- Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=intel.com;
- Cc: "mingo@xxxxxxxxxx" <mingo@xxxxxxxxxx>, "bp@xxxxxxxxx" <bp@xxxxxxxxx>, "dave.hansen@xxxxxxxxxxxxxxx" <dave.hansen@xxxxxxxxxxxxxxx>, "x86@xxxxxxxxxx" <x86@xxxxxxxxxx>, "hpa@xxxxxxxxx" <hpa@xxxxxxxxx>, "Lutomirski, Andy" <luto@xxxxxxxxxx>, "pbonzini@xxxxxxxxxx" <pbonzini@xxxxxxxxxx>, "Christopherson,, Sean" <seanjc@xxxxxxxxxx>, "peterz@xxxxxxxxxxxxx" <peterz@xxxxxxxxxxxxx>, "Gross, Jurgen" <jgross@xxxxxxxx>, "Shankar, Ravi V" <ravi.v.shankar@xxxxxxxxx>, "mhiramat@xxxxxxxxxx" <mhiramat@xxxxxxxxxx>, "andrew.cooper3@xxxxxxxxxx" <andrew.cooper3@xxxxxxxxxx>, "jiangshanlai@xxxxxxxxx" <jiangshanlai@xxxxxxxxx>
- Delivery-date: Wed, 20 Sep 2023 04:34:11 +0000
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
- Thread-index: AQHZ5strXMSQ17oxYk2by6W1B7FxqLAh2QeAgAFNrPA=
- Thread-topic: [PATCH v10 36/38] x86/fred: Add fred_syscall_init()
> > +static inline void fred_syscall_init(void) {
> > + /*
> > + * Per FRED spec 5.0, FRED uses the ring 3 FRED entrypoint for SYSCALL
> > + * and SYSENTER, and ERETU is the only legit instruction to return to
> > + * ring 3, as a result there is _no_ need to setup the SYSCALL and
> > + * SYSENTER MSRs.
> > + *
> > + * Note, both sysexit and sysret cause #UD when FRED is enabled.
> > + */
> > + wrmsrl(MSR_LSTAR, 0ULL);
> > + wrmsrl_cstar(0ULL);
>
> That write is pointless. See the comment in wrmsrl_cstar().
What I heard is that AMD is going to support FRED.
Both LSTAR and CSTAR have no function when FRED is enabled, so maybe
just do NOT write to them?
Thanks!
Xin
|