From: "Pali Rohár" <pali.rohar@gmail.com>
To: Oleksandr Natalenko <oleksandr@natalenko.name>
Cc: Jean Delvare <jdelvare@suse.de>,
Jonathan Buzzard <jonathan@buzzard.org.uk>,
Guenter Roeck <linux@roeck-us.net>,
linux-hwmon@vger.kernel.org, linux-kernel@vger.kernel.org,
Mario Limonciello <mario.limonciello@dell.com>
Subject: Re: i8k_smm_func() takes enormous of time to execute
Date: Mon, 4 Dec 2017 13:18:29 +0100 [thread overview]
Message-ID: <20171204121829.m6zk3imp47ru2od2@pali> (raw)
In-Reply-To: <0cfe104c062adcd7cc35e0b94c5bfba1@natalenko.name>
On Monday 04 December 2017 13:08:18 Oleksandr Natalenko wrote:
> Hi.
>
> 04.12.2017 11:35, Pali Rohár wrote:
> > On Friday 24 November 2017 13:28:59 Oleksandr Natalenko wrote:
> > > On pátek 24. listopadu 2017 12:25:43 CET Pali Rohár wrote:
> > > > On Friday 24 November 2017 12:17:30 Oleksandr Natalenko wrote:
> > > > > > There are two patches waiting to be tested in
> > > > > > https://bugzilla.kernel.org/show_bug.cgi?id=195751
> > > > >
> > > > > Tested and attached a couple of patches on top of those to the BZ. If
> > > > > disabling fan control is the only approach here, I can confirm that this
> > > > > works.
> > > >
> > > > Hi! Please figure out which SMM call (they are identified by eax and ebx
> > > > registers) cause this freeze. So we would now what needs to be
> > > > blacklisted.
> > >
> > > Here it goes:
> > >
> > > [ 7.191081] dell_smm_hwmon: smm(0x10a3 0x0000) = 0x002e (took
> > > 1837 usecs)
> > > [ 7.194007] dell_smm_hwmon: smm(0x00a3 0x0001) = 0xffff (took
> > > 151 usecs)
> > > [ 7.198239] dell_smm_hwmon: smm(0x00a3 0x0000) = 0x0002 (took
> > > 1411 usecs)
> > > [ 7.199095] dell_smm_hwmon: smm(0x02a3 0x0001) = 0xffff (took
> > > 71 usecs)
> > > [ 7.700493] dell_smm_hwmon: smm(0x02a3 0x0000) = 0x157c (took
> > > 488912 usecs)
> > > [ 7.701277] dell_smm_hwmon: smm(0x0025 0X0000) = 0xffff (took
> > > 71 usecs)
> > >
> > > 0x02a3 is I8K_SMM_GET_SPEED.
> >
> > Ok, so it is really a good idea to disable fan control completely on
> > your machine.
>
> This still doesn't explain why things work in non-Linux environment…
No, they does not work in non-Linux environment too. You can call same
smm request also on Windows and it freeze computer in same way. Just
windows do not have such smm driver out of box. To reproduce this
problem you need to write either own kernel driver in assembler (like
driver for linux) or write that smm code in assembler for classic
(userspace) application and find out how to call that smm code via
WinAPI (probably you would need Administrator rights and study lot of
WinAPI documentation).
> But as a workaround, okay, let it be.
Basically once you issue this 0x02a3 call your computer freeze (more
precisely stay in SMM mode -- it is x86 processor mode) and such
operation is fully independent of what is running on your x86 cpu
(Linux, Windows, DOS, some RTOS system, ...)
> > Your last patch in bugzilla looks ok, you add my Reviewed-by: Pali
> > Rohár <pali.rohar@gmail.com>
>
> Could you please advice on how to proceed further? I can submit all 3
> patches (incl. yours two), to a ML.
Now it is up to hwmon maintainers (Jean Delvare & Guenter Roeck) to pick
up these patches. I think nothing more is needed from your side. (And if
yes, Jean would write.)
--
Pali Rohár
pali.rohar@gmail.com
next prev parent reply other threads:[~2017-12-04 12:18 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-11-23 21:41 i8k_smm_func() takes enormous of time to execute Oleksandr Natalenko
2017-11-24 10:22 ` Jean Delvare
2017-11-24 11:17 ` Oleksandr Natalenko
2017-11-24 11:25 ` Pali Rohár
2017-11-24 12:28 ` Oleksandr Natalenko
2017-12-04 10:35 ` Pali Rohár
2017-12-04 12:08 ` Oleksandr Natalenko
2017-12-04 12:18 ` Pali Rohár [this message]
2018-01-27 14:09 ` Pali Rohár
2018-01-27 16:07 ` Guenter Roeck
2017-11-24 11:13 ` Pali Rohár
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20171204121829.m6zk3imp47ru2od2@pali \
--to=pali.rohar@gmail.com \
--cc=jdelvare@suse.de \
--cc=jonathan@buzzard.org.uk \
--cc=linux-hwmon@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@roeck-us.net \
--cc=mario.limonciello@dell.com \
--cc=oleksandr@natalenko.name \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox