* tainted Linux kernel in default SMP QEMU/KVM guests
@ 2010-03-19 12:16 ` Andre Przywara
0 siblings, 0 replies; 8+ messages in thread
From: Andre Przywara @ 2010-03-19 12:16 UTC (permalink / raw)
To: QEMU devel, KVM list
Hi,
since the default CPU model for QEMU (qemu64) is an AMD K7, the Linux
kernel complains and taints the kernel when it detects multiple
processors. The reason for this is a check for SMP safe CPUs in
arch/x86/kernel/cpu/amd.c:amd_k7_smp_check(). In recent kernels (since
about 2.6.29) this in only executed in 32bit kernels, since the check
has been #ifdef'ed CONFIG_X86_32.
The failing check triggers a nasty dump along with a call trace and
taints the kernel, this confuses users, so I want to get rid of it.
One can work around it (using -cpu kvm64 or -cpu host), but I want to
avoid it in the default case, too.
I see these possible solutions:
1) Change the default CPUID bits from 6/2/3 to 6/6/1, this passes the
Linux kernel check. But I am not sure if that would introduce
regressions, since some OSes apply quirks if they detect certain models
(like we had with the sysenter issue in the past)
2) Only change the CPUID bits to 6/6/1 if we use SMP. Still has the
above drawback, but would be limited to SMP guests only.
3) Set kvm64/kvm32 as the default CPU model if KVM is enabled. This
would limit the report and taint to TCG, where SMP is rarely used.
Additionally less people (if any) use it for production systems.
4) Make the Linux' kernel quirk dependent on the missing hypervisor bit.
I don't think this will be accepted easily upstream (and I don't want to
support Ingo's recent ideas ;-), also this would not fix older kernels.
I can easily provide patches for all solutions, but I'd like to get
advice from people on which one to pursue.
Regards,
Andre.
--
Andre Przywara
AMD-Operating System Research Center (OSRC), Dresden, Germany
Tel: +49 351 448-3567-12
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Qemu-devel] tainted Linux kernel in default SMP QEMU/KVM guests
@ 2010-03-19 12:16 ` Andre Przywara
0 siblings, 0 replies; 8+ messages in thread
From: Andre Przywara @ 2010-03-19 12:16 UTC (permalink / raw)
To: QEMU devel, KVM list
Hi,
since the default CPU model for QEMU (qemu64) is an AMD K7, the Linux
kernel complains and taints the kernel when it detects multiple
processors. The reason for this is a check for SMP safe CPUs in
arch/x86/kernel/cpu/amd.c:amd_k7_smp_check(). In recent kernels (since
about 2.6.29) this in only executed in 32bit kernels, since the check
has been #ifdef'ed CONFIG_X86_32.
The failing check triggers a nasty dump along with a call trace and
taints the kernel, this confuses users, so I want to get rid of it.
One can work around it (using -cpu kvm64 or -cpu host), but I want to
avoid it in the default case, too.
I see these possible solutions:
1) Change the default CPUID bits from 6/2/3 to 6/6/1, this passes the
Linux kernel check. But I am not sure if that would introduce
regressions, since some OSes apply quirks if they detect certain models
(like we had with the sysenter issue in the past)
2) Only change the CPUID bits to 6/6/1 if we use SMP. Still has the
above drawback, but would be limited to SMP guests only.
3) Set kvm64/kvm32 as the default CPU model if KVM is enabled. This
would limit the report and taint to TCG, where SMP is rarely used.
Additionally less people (if any) use it for production systems.
4) Make the Linux' kernel quirk dependent on the missing hypervisor bit.
I don't think this will be accepted easily upstream (and I don't want to
support Ingo's recent ideas ;-), also this would not fix older kernels.
I can easily provide patches for all solutions, but I'd like to get
advice from people on which one to pursue.
Regards,
Andre.
--
Andre Przywara
AMD-Operating System Research Center (OSRC), Dresden, Germany
Tel: +49 351 448-3567-12
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: tainted Linux kernel in default SMP QEMU/KVM guests
2010-03-19 12:16 ` [Qemu-devel] " Andre Przywara
@ 2010-03-19 12:58 ` Paolo Bonzini
-1 siblings, 0 replies; 8+ messages in thread
From: Paolo Bonzini @ 2010-03-19 12:58 UTC (permalink / raw)
To: Andre Przywara; +Cc: QEMU devel, KVM list
> 1) Change the default CPUID bits from 6/2/3 to 6/6/1, this passes the
> Linux kernel check. But I am not sure if that would introduce
> regressions, since some OSes apply quirks if they detect certain models
> (like we had with the sysenter issue in the past)
>
> 2) Only change the CPUID bits to 6/6/1 if we use SMP. Still has the
> above drawback, but would be limited to SMP guests only.
>
> 3) Set kvm64/kvm32 as the default CPU model if KVM is enabled. This
> would limit the report and taint to TCG, where SMP is rarely used.
> Additionally less people (if any) use it for production systems.
>
> 4) Make the Linux' kernel quirk dependent on the missing hypervisor bit.
> I don't think this will be accepted easily upstream (and I don't want to
> support Ingo's recent ideas ;-), also this would not fix older kernels.
>
> I can easily provide patches for all solutions, but I'd like to get
> advice from people on which one to pursue.
Doing (3) seems the most sensible thing to do, and it does not prevent
doing (1) later on for TCG only.
Paolo
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Qemu-devel] Re: tainted Linux kernel in default SMP QEMU/KVM guests
@ 2010-03-19 12:58 ` Paolo Bonzini
0 siblings, 0 replies; 8+ messages in thread
From: Paolo Bonzini @ 2010-03-19 12:58 UTC (permalink / raw)
To: Andre Przywara; +Cc: QEMU devel, KVM list
> 1) Change the default CPUID bits from 6/2/3 to 6/6/1, this passes the
> Linux kernel check. But I am not sure if that would introduce
> regressions, since some OSes apply quirks if they detect certain models
> (like we had with the sysenter issue in the past)
>
> 2) Only change the CPUID bits to 6/6/1 if we use SMP. Still has the
> above drawback, but would be limited to SMP guests only.
>
> 3) Set kvm64/kvm32 as the default CPU model if KVM is enabled. This
> would limit the report and taint to TCG, where SMP is rarely used.
> Additionally less people (if any) use it for production systems.
>
> 4) Make the Linux' kernel quirk dependent on the missing hypervisor bit.
> I don't think this will be accepted easily upstream (and I don't want to
> support Ingo's recent ideas ;-), also this would not fix older kernels.
>
> I can easily provide patches for all solutions, but I'd like to get
> advice from people on which one to pursue.
Doing (3) seems the most sensible thing to do, and it does not prevent
doing (1) later on for TCG only.
Paolo
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: tainted Linux kernel in default SMP QEMU/KVM guests
2010-03-19 12:58 ` [Qemu-devel] " Paolo Bonzini
@ 2010-03-19 13:12 ` Anthony Liguori
-1 siblings, 0 replies; 8+ messages in thread
From: Anthony Liguori @ 2010-03-19 13:12 UTC (permalink / raw)
To: Paolo Bonzini; +Cc: Andre Przywara, QEMU devel, KVM list
On 03/19/2010 07:58 AM, Paolo Bonzini wrote:
>
>> 1) Change the default CPUID bits from 6/2/3 to 6/6/1, this passes the
>> Linux kernel check. But I am not sure if that would introduce
>> regressions, since some OSes apply quirks if they detect certain models
>> (like we had with the sysenter issue in the past)
>>
>> 2) Only change the CPUID bits to 6/6/1 if we use SMP. Still has the
>> above drawback, but would be limited to SMP guests only.
>>
>> 3) Set kvm64/kvm32 as the default CPU model if KVM is enabled. This
>> would limit the report and taint to TCG, where SMP is rarely used.
>> Additionally less people (if any) use it for production systems.
>>
>> 4) Make the Linux' kernel quirk dependent on the missing hypervisor bit.
>> I don't think this will be accepted easily upstream (and I don't want to
>> support Ingo's recent ideas ;-), also this would not fix older kernels.
>>
>> I can easily provide patches for all solutions, but I'd like to get
>> advice from people on which one to pursue.
>
> Doing (3) seems the most sensible thing to do, and it does not prevent
> doing (1) later on for TCG only.
Let's switch to -cpu host for kvm.
Regards,
Anthony Liguori
> Paolo
> --
> To unsubscribe from this list: send the line "unsubscribe kvm" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Qemu-devel] Re: tainted Linux kernel in default SMP QEMU/KVM guests
@ 2010-03-19 13:12 ` Anthony Liguori
0 siblings, 0 replies; 8+ messages in thread
From: Anthony Liguori @ 2010-03-19 13:12 UTC (permalink / raw)
To: Paolo Bonzini; +Cc: Andre Przywara, QEMU devel, KVM list
On 03/19/2010 07:58 AM, Paolo Bonzini wrote:
>
>> 1) Change the default CPUID bits from 6/2/3 to 6/6/1, this passes the
>> Linux kernel check. But I am not sure if that would introduce
>> regressions, since some OSes apply quirks if they detect certain models
>> (like we had with the sysenter issue in the past)
>>
>> 2) Only change the CPUID bits to 6/6/1 if we use SMP. Still has the
>> above drawback, but would be limited to SMP guests only.
>>
>> 3) Set kvm64/kvm32 as the default CPU model if KVM is enabled. This
>> would limit the report and taint to TCG, where SMP is rarely used.
>> Additionally less people (if any) use it for production systems.
>>
>> 4) Make the Linux' kernel quirk dependent on the missing hypervisor bit.
>> I don't think this will be accepted easily upstream (and I don't want to
>> support Ingo's recent ideas ;-), also this would not fix older kernels.
>>
>> I can easily provide patches for all solutions, but I'd like to get
>> advice from people on which one to pursue.
>
> Doing (3) seems the most sensible thing to do, and it does not prevent
> doing (1) later on for TCG only.
Let's switch to -cpu host for kvm.
Regards,
Anthony Liguori
> Paolo
> --
> To unsubscribe from this list: send the line "unsubscribe kvm" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: tainted Linux kernel in default SMP QEMU/KVM guests
2010-03-19 13:12 ` [Qemu-devel] " Anthony Liguori
@ 2010-03-23 10:45 ` Avi Kivity
-1 siblings, 0 replies; 8+ messages in thread
From: Avi Kivity @ 2010-03-23 10:45 UTC (permalink / raw)
To: Anthony Liguori; +Cc: Paolo Bonzini, Andre Przywara, QEMU devel, KVM list
On 03/19/2010 03:12 PM, Anthony Liguori wrote:
> On 03/19/2010 07:58 AM, Paolo Bonzini wrote:
>>
>>> 1) Change the default CPUID bits from 6/2/3 to 6/6/1, this passes the
>>> Linux kernel check. But I am not sure if that would introduce
>>> regressions, since some OSes apply quirks if they detect certain models
>>> (like we had with the sysenter issue in the past)
>>>
>>> 2) Only change the CPUID bits to 6/6/1 if we use SMP. Still has the
>>> above drawback, but would be limited to SMP guests only.
>>>
>>> 3) Set kvm64/kvm32 as the default CPU model if KVM is enabled. This
>>> would limit the report and taint to TCG, where SMP is rarely used.
>>> Additionally less people (if any) use it for production systems.
>>>
>>> 4) Make the Linux' kernel quirk dependent on the missing hypervisor
>>> bit.
>>> I don't think this will be accepted easily upstream (and I don't
>>> want to
>>> support Ingo's recent ideas ;-), also this would not fix older kernels.
>>>
>>> I can easily provide patches for all solutions, but I'd like to get
>>> advice from people on which one to pursue.
>>
>> Doing (3) seems the most sensible thing to do, and it does not
>> prevent doing (1) later on for TCG only.
>
> Let's switch to -cpu host for kvm.
Except for -M old.
This has the nice advantage of exposing new features as they are rolled out.
--
error compiling committee.c: too many arguments to function
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Qemu-devel] Re: tainted Linux kernel in default SMP QEMU/KVM guests
@ 2010-03-23 10:45 ` Avi Kivity
0 siblings, 0 replies; 8+ messages in thread
From: Avi Kivity @ 2010-03-23 10:45 UTC (permalink / raw)
To: Anthony Liguori; +Cc: Paolo Bonzini, QEMU devel, KVM list, Andre Przywara
On 03/19/2010 03:12 PM, Anthony Liguori wrote:
> On 03/19/2010 07:58 AM, Paolo Bonzini wrote:
>>
>>> 1) Change the default CPUID bits from 6/2/3 to 6/6/1, this passes the
>>> Linux kernel check. But I am not sure if that would introduce
>>> regressions, since some OSes apply quirks if they detect certain models
>>> (like we had with the sysenter issue in the past)
>>>
>>> 2) Only change the CPUID bits to 6/6/1 if we use SMP. Still has the
>>> above drawback, but would be limited to SMP guests only.
>>>
>>> 3) Set kvm64/kvm32 as the default CPU model if KVM is enabled. This
>>> would limit the report and taint to TCG, where SMP is rarely used.
>>> Additionally less people (if any) use it for production systems.
>>>
>>> 4) Make the Linux' kernel quirk dependent on the missing hypervisor
>>> bit.
>>> I don't think this will be accepted easily upstream (and I don't
>>> want to
>>> support Ingo's recent ideas ;-), also this would not fix older kernels.
>>>
>>> I can easily provide patches for all solutions, but I'd like to get
>>> advice from people on which one to pursue.
>>
>> Doing (3) seems the most sensible thing to do, and it does not
>> prevent doing (1) later on for TCG only.
>
> Let's switch to -cpu host for kvm.
Except for -M old.
This has the nice advantage of exposing new features as they are rolled out.
--
error compiling committee.c: too many arguments to function
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2010-03-23 10:45 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-03-19 12:16 tainted Linux kernel in default SMP QEMU/KVM guests Andre Przywara
2010-03-19 12:16 ` [Qemu-devel] " Andre Przywara
2010-03-19 12:58 ` Paolo Bonzini
2010-03-19 12:58 ` [Qemu-devel] " Paolo Bonzini
2010-03-19 13:12 ` Anthony Liguori
2010-03-19 13:12 ` [Qemu-devel] " Anthony Liguori
2010-03-23 10:45 ` Avi Kivity
2010-03-23 10:45 ` [Qemu-devel] " Avi Kivity
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.