lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Thu, 9 Aug 2018 07:43:47 -0400
From:   Prarit Bhargava <prarit@...hat.com>
To:     Pavel Machek <pavel@....cz>
Cc:     linux-kernel@...r.kernel.org, Len Brown <lenb@...nel.org>,
        "Rafael J. Wysocki" <rjw@...ysocki.net>,
        Thomas Gleixner <tglx@...utronix.de>,
        Ingo Molnar <mingo@...hat.com>,
        "H. Peter Anvin" <hpa@...or.com>, x86@...nel.org,
        linux-pm@...r.kernel.org
Subject: Re: [PATCH] x86/ACPI/cstate: Output AMD on APCI C1 FFH MWAIT AMD
 systems



On 08/08/2018 03:58 PM, Pavel Machek wrote:
> On Wed 2018-08-08 13:47:35, Prarit Bhargava wrote:
>> commit 5209654a46ee ("x86/ACPI/cstate: Allow ACPI C1 FFH MWAIT use on AMD
>> systems") allows use of FFH for ACPI C1 but tools like cpupower and turbostat
>> display INTEL for the cstate description.
>>
>> Output "AMD" for AMD systems with FFH for ACPI C1.
> 
> Um, is it good idea?
>> First, you are changing kernel API.

I thought about that and the AMD support was only added a year ago so I think it
is okay to change.  Secondly, I did a grep for the use of the desc file in the
Fedora sources and only found a few places where the file is referenced.  They
all *report* the data but do not use it to make a decision.

For example, turbostat and cpupower only return the data to the console.

> 
>> @@ -107,9 +108,14 @@ static long acpi_processor_ffh_cstate_probe_cpu(void *_cx)
>>  			"Monitor-Mwait will be used to enter C-%d state\n",
>>  			cx->type);
>>  	}
>> -	snprintf(cx->desc,
>> -			ACPI_CX_DESC_LEN, "ACPI FFH INTEL MWAIT 0x%x",
>> -			cx->address);
>> +	if (c->x86_vendor == X86_VENDOR_INTEL)
>> +		snprintf(cx->desc,
>> +			 ACPI_CX_DESC_LEN, "ACPI FFH INTEL MWAIT 0x%x",
>> +			 cx->address);
>> +	else
>> +		snprintf(cx->desc,
>> +			 ACPI_CX_DESC_LEN, "ACPI FFH AMD MWAIT 0x%x",
>> +			 cx->address);
> 
> Second, I read it as "Intel MWAIT" instruction is used. Yes, AMD cpu can
> use Intel MWAIT, too...

That's true but the weirdness of seeing INTEL on an AMD box there made me push
this patch.

> 
> Third, there are more CPU vendors out there.

Not in this code.  It is AMD & Intel only.  I thought about dropping INTEL, and
also switching to X86.

Should we drop INTEL from the above or not (as suggested later in this thread)?
It feels like everyone is on the fence about it.

P.

> 
> 									Pavel
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ