[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH]ACPI: re-enable mwait for xen cpuidle



Think about it some more: Since this is about partial enabling of
MONITOR/WAIT, just to get C-state info to Xen -- i.e., something a bit hacky
anyway -- the right answer is for Linux to lie to itself and your 2nd patch
attempt is best. I would think of Xen advertising the fature to dom0 via
CPUID as meaning that the guest can use it as a 1st-class feature itself,
which is not the case.

 -- Keir

On 02/04/2010 15:27, "Keir Fraser" <keir.fraser@xxxxxxxxxxxxx> wrote:

> It also has wider impact, including questionable effect on existing dom0
> kernels which have never been tested with MONITOR/MWAIT present in
> virtualised CPUID. I'm not sure about making this change even in current
> xen-unstable (but not dead against it), and there's no chance for 4.0 and
> 3.4 branches.
> 
>  -- Keir
> 
> On 02/04/2010 14:41, "Wei, Gang" <gang.wei@xxxxxxxxx> wrote:
> 
>> The 3rd choice: don't clear MWAIT feature in xen. This should be the best
>> choice.
>> 
>> Jimmy
>> 
>> X86: re-enable mwait for xen cpuidle
>> 
>> Xen hypervisor doesn't export mwait feature to dom0, but latest Linux kernel
>> start to check this feature while initializing _PDC object. Pass the MWAIT
>> feature to dom0 to let dom0 got & pass to xen correct C state info.
>> 
>> Signed-off-by: Wei Gang <gang.wei@xxxxxxxxx>
>> 
>> diff -r 537451477469 xen/arch/x86/traps.c
>> --- a/xen/arch/x86/traps.c Thu Apr 01 09:55:27 2010 +0100
>> +++ b/xen/arch/x86/traps.c Sat Apr 03 05:26:53 2010 +0800
>> @@ -776,7 +776,6 @@ static void pv_cpuid(struct cpu_user_reg
>>          __clear_bit(X86_FEATURE_PBE, &d);
>>  
>>          __clear_bit(X86_FEATURE_DTES64 % 32, &c);
>> -        __clear_bit(X86_FEATURE_MWAIT % 32, &c);
>>          __clear_bit(X86_FEATURE_DSCPL % 32, &c);
>>          __clear_bit(X86_FEATURE_VMXE % 32, &c);
>>          __clear_bit(X86_FEATURE_SMXE % 32, &c);
>> @@ -814,7 +813,6 @@ static void pv_cpuid(struct cpu_user_reg
>>          __clear_bit(X86_FEATURE_SKINIT % 32, &c);
>>          __clear_bit(X86_FEATURE_WDT % 32, &c);
>>          break;
>> -    case 5: /* MONITOR/MWAIT */
>>      case 0xa: /* Architectural Performance Monitor Features */
>>      case 0x8000000a: /* SVM revision and features */
>>      case 0x8000001b: /* Instruction Based Sampling */
> 
> 
> 
> _______________________________________________
> Xen-devel mailing list
> Xen-devel@xxxxxxxxxxxxxxxxxxx
> http://lists.xensource.com/xen-devel



_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.