public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: David Vrabel <david.vrabel@citrix.com>
To: Jan Beulich <JBeulich@suse.com>,
	David Vrabel <david.vrabel@citrix.com>,
	<boris.ostrovsky@oracle.com>, Juergen Gross <JGross@suse.com>
Cc: <xen-devel@lists.xenproject.org>, <linux-kernel@vger.kernel.org>
Subject: Re: [Xen-devel] [PATCH] xen/acpi: allow xen-acpi-processor driver to load on Xen 4.7
Date: Fri, 8 Jul 2016 14:53:03 +0100	[thread overview]
Message-ID: <577FB03F.9080108@citrix.com> (raw)
In-Reply-To: <577FBE6702000078000FCA81@prv-mh.provo.novell.com>

On 08/07/16 13:53, Jan Beulich wrote:
>>>> On 08.07.16 at 14:29, <david.vrabel@citrix.com> wrote:
>> On 08/07/16 13:15, Jan Beulich wrote:
>>> As of Xen 4.7 PV CPUID doesn't expose either of CPUID[1].ECX[7] and
>>> CPUID[0x80000007].EDX[7] anymore, causing the driver to fail to load on
>>> both Intel and AMD systems. Doing any kind of hardware capability
>>> checks in the driver as a prerequisite was wrong anyway: With the
>>> hypervisor being in charge, all such checking should be done by it. If
>>> ACPI data gets uploaded despite some missing capability, the hypervisor
>>> is free to ignore part or all of that data.
>>>
>>> Ditch the entire check_prereq() function, and do the only valid check
>>> (xen_initial_domain()) in the caller in its place.
>>
>> Thanks, but I'm not sure this is sufficient.  I think the generic ACPI
>> code needs to know the full capabilities in order to generate the
>> correct tables, or you won't get (for example) turbo mode working.
>>
>> We had to fake the EST feature back in.
>>
>> --- a/arch/x86/xen/enlighten.c
>> +++ b/arch/x86/xen/enlighten.c
>> @@ -448,7 +448,8 @@ static void __init xen_init_cpuid_mask(void)
>>  	if ((cx & xsave_mask) != xsave_mask)
>>  		cpuid_leaf1_ecx_mask &= ~xsave_mask; /* disable XSAVE & OSXSAVE */
>>  	if (xen_check_mwait())
>> -		cpuid_leaf1_ecx_set_mask = (1 << (X86_FEATURE_MWAIT % 32));
>> +		cpuid_leaf1_ecx_set_mask = (1 << (X86_FEATURE_MWAIT % 32)
>> +					   | 1 << (X86_FEATURE_EST % 32));
>>  }
>>
>>  static void xen_set_debugreg(int reg, unsigned long val)
> 
> Hmm, interesting. I admit I only tested on an AMD system, so I
> can't exclude the above is necessary. Otoh going over generic
> ACPI code the only use of X86_FEATURE_EST controls the
> logging of a message. Plus there's a use in
> arch_acpi_set_pdc_bits() - perhaps that's the one you mean?
> 
> There's certainly no use of X86_FEATURE_HW_PSTATE anywhere
> in relevant code, so the AMD side would appear to be fine (which
> matches my testing). So I think the patch is fine as is (also avoiding
> cross component adjustments), and the part you suggest may then
> better be a separate patch?

It's also possible that I'm misremembering why we went with the above hack.

I've applied your patch to for-linus-3.7b, thanks.

David

      reply	other threads:[~2016-07-08 13:53 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-07-08 12:15 [PATCH] xen/acpi: allow xen-acpi-processor driver to load on Xen 4.7 Jan Beulich
2016-07-08 12:29 ` David Vrabel
2016-07-08 12:53   ` Jan Beulich
2016-07-08 13:53     ` David Vrabel [this message]

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=577FB03F.9080108@citrix.com \
    --to=david.vrabel@citrix.com \
    --cc=JBeulich@suse.com \
    --cc=JGross@suse.com \
    --cc=boris.ostrovsky@oracle.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=xen-devel@lists.xenproject.org \
    /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