* [Qemu-devel] kvm: "warning: host doesn't support requested feature: CPUID.01H:ECX.x2apic [bit 21]"
@ 2016-02-20 8:09 Jan Kiszka
2016-02-20 9:00 ` Paolo Bonzini
0 siblings, 1 reply; 6+ messages in thread
From: Jan Kiszka @ 2016-02-20 8:09 UTC (permalink / raw)
To: Eduardo Habkost, Paolo Bonzini; +Cc: qemu-devel, kvm
Hi all,
I suppose 5120901a37 introduced this: qemu with kernel_irqchip=off now
generates these warnings, one per VCPU, during QEMU startup. Is the plan
to live with them until we finally have x2APIC emulation in userspace
(ie. also MSR vmexiting to there), or should we otherwise avoid it?
Thanks,
Jan
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [Qemu-devel] kvm: "warning: host doesn't support requested feature: CPUID.01H:ECX.x2apic [bit 21]"
2016-02-20 8:09 [Qemu-devel] kvm: "warning: host doesn't support requested feature: CPUID.01H:ECX.x2apic [bit 21]" Jan Kiszka
@ 2016-02-20 9:00 ` Paolo Bonzini
2016-02-22 21:40 ` Eduardo Habkost
2016-02-25 8:33 ` Lan Tianyu
0 siblings, 2 replies; 6+ messages in thread
From: Paolo Bonzini @ 2016-02-20 9:00 UTC (permalink / raw)
To: Jan Kiszka; +Cc: Eduardo Habkost, kvm, qemu-devel
----- Original Message -----
> From: "Jan Kiszka" <jan.kiszka@web.de>
> To: "Eduardo Habkost" <ehabkost@redhat.com>, "Paolo Bonzini" <pbonzini@redhat.com>
> Cc: "qemu-devel" <qemu-devel@nongnu.org>, "kvm" <kvm@vger.kernel.org>
> Sent: Saturday, February 20, 2016 9:09:32 AM
> Subject: kvm: "warning: host doesn't support requested feature: CPUID.01H:ECX.x2apic [bit 21]"
>
> Hi all,
>
> I suppose 5120901a37 introduced this: qemu with kernel_irqchip=off now
> generates these warnings, one per VCPU, during QEMU startup. Is the plan
> to live with them until we finally have x2APIC emulation in userspace
> (ie. also MSR vmexiting to there), or should we otherwise avoid it?
I think it's a bug, x2apic should be auto-suppressed with kernel_irqchip=off.
Paolo
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [Qemu-devel] kvm: "warning: host doesn't support requested feature: CPUID.01H:ECX.x2apic [bit 21]"
2016-02-20 9:00 ` Paolo Bonzini
@ 2016-02-22 21:40 ` Eduardo Habkost
2016-02-25 8:33 ` Lan Tianyu
1 sibling, 0 replies; 6+ messages in thread
From: Eduardo Habkost @ 2016-02-22 21:40 UTC (permalink / raw)
To: Paolo Bonzini; +Cc: libvir-list, Jan Kiszka, qemu-devel, kvm
(CCing libvir-list)
On Sat, Feb 20, 2016 at 04:00:30AM -0500, Paolo Bonzini wrote:
> ----- Original Message -----
> > From: "Jan Kiszka" <jan.kiszka@web.de>
> > To: "Eduardo Habkost" <ehabkost@redhat.com>, "Paolo Bonzini" <pbonzini@redhat.com>
> > Cc: "qemu-devel" <qemu-devel@nongnu.org>, "kvm" <kvm@vger.kernel.org>
> > Sent: Saturday, February 20, 2016 9:09:32 AM
> > Subject: kvm: "warning: host doesn't support requested feature: CPUID.01H:ECX.x2apic [bit 21]"
> >
> > Hi all,
> >
> > I suppose 5120901a37 introduced this: qemu with kernel_irqchip=off now
> > generates these warnings, one per VCPU, during QEMU startup. Is the plan
> > to live with them until we finally have x2APIC emulation in userspace
> > (ie. also MSR vmexiting to there), or should we otherwise avoid it?
>
> I think it's a bug, x2apic should be auto-suppressed with kernel_irqchip=off.
My first reaction is to dislike the idea of adding yet another
variable that affects the results of CPU models.
But considering that we are moving towards a design where libvirt
must not assume or query any low-level detail from CPU models at
all, maybe this won't be harmful.
--
Eduardo
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [Qemu-devel] kvm: "warning: host doesn't support requested feature: CPUID.01H:ECX.x2apic [bit 21]"
2016-02-20 9:00 ` Paolo Bonzini
2016-02-22 21:40 ` Eduardo Habkost
@ 2016-02-25 8:33 ` Lan Tianyu
2016-02-25 8:39 ` Jan Kiszka
1 sibling, 1 reply; 6+ messages in thread
From: Lan Tianyu @ 2016-02-25 8:33 UTC (permalink / raw)
To: Paolo Bonzini; +Cc: Jan Kiszka, Eduardo Habkost, kvm, qemu-devel
2016-02-20 17:00 GMT+08:00 Paolo Bonzini <pbonzini@redhat.com>:
>
>
> ----- Original Message -----
>> From: "Jan Kiszka" <jan.kiszka@web.de>
>> To: "Eduardo Habkost" <ehabkost@redhat.com>, "Paolo Bonzini" <pbonzini@redhat.com>
>> Cc: "qemu-devel" <qemu-devel@nongnu.org>, "kvm" <kvm@vger.kernel.org>
>> Sent: Saturday, February 20, 2016 9:09:32 AM
>> Subject: kvm: "warning: host doesn't support requested feature: CPUID.01H:ECX.x2apic [bit 21]"
>>
>> Hi all,
>>
>> I suppose 5120901a37 introduced this: qemu with kernel_irqchip=off now
>> generates these warnings, one per VCPU, during QEMU startup. Is the plan
>> to live with them until we finally have x2APIC emulation in userspace
>> (ie. also MSR vmexiting to there), or should we otherwise avoid it?
>
> I think it's a bug, x2apic should be auto-suppressed with kernel_irqchip=off.
>
The patch is to fix the issue.
------------------------------------->8----------------------------
>From 58f2a3a94c8e7bf9f3474bcafb6c59cc4f8bcbd9 Mon Sep 17 00:00:00 2001
From: Lan Tianyu <tianyu.lan@intel.com>
Date: Sun, 15 Jul 2001 01:40:17 -0400
Subject: [PATCH] Qemu/KVM: Remove x2apic feature from CPU model when
kernel_irqchip=off
x2apic feature is in the kvm_default_props and automatically added to all
CPU models when KVM is enabled regardless of kernel_irqchip=off. This will
trigger "warning: host doesn't support requested feature: CPUID.01H:
ECX.x2apic [bit 21]" when kernel_irqchip=off. This patch is to remove x2apic
feature when kernel_irqchip=off.
Signed-off-by: Lan Tianyu <tianyu.lan@intel.com>
---
target-i386/cpu.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/target-i386/cpu.c b/target-i386/cpu.c
index 0d447b5..2ec7eb7 100644
--- a/target-i386/cpu.c
+++ b/target-i386/cpu.c
@@ -2105,6 +2105,9 @@ static void x86_cpu_load_def(X86CPU *cpu,
X86CPUDefinition *def, Error **errp)
/* Special cases not set in the X86CPUDefinition structs: */
if (kvm_enabled()) {
+ if (!kvm_irqchip_in_kernel())
+ x86_cpu_change_kvm_default("x2apic", "off");
+
x86_cpu_apply_props(cpu, kvm_default_props);
}
--
1.9.3
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [Qemu-devel] kvm: "warning: host doesn't support requested feature: CPUID.01H:ECX.x2apic [bit 21]"
2016-02-25 8:33 ` Lan Tianyu
@ 2016-02-25 8:39 ` Jan Kiszka
2016-02-25 12:31 ` Lan Tianyu
0 siblings, 1 reply; 6+ messages in thread
From: Jan Kiszka @ 2016-02-25 8:39 UTC (permalink / raw)
To: Lan Tianyu, Paolo Bonzini; +Cc: Eduardo Habkost, kvm, qemu-devel
On 2016-02-25 09:33, Lan Tianyu wrote:
> 2016-02-20 17:00 GMT+08:00 Paolo Bonzini <pbonzini@redhat.com>:
>>
>>
>> ----- Original Message -----
>>> From: "Jan Kiszka" <jan.kiszka@web.de>
>>> To: "Eduardo Habkost" <ehabkost@redhat.com>, "Paolo Bonzini" <pbonzini@redhat.com>
>>> Cc: "qemu-devel" <qemu-devel@nongnu.org>, "kvm" <kvm@vger.kernel.org>
>>> Sent: Saturday, February 20, 2016 9:09:32 AM
>>> Subject: kvm: "warning: host doesn't support requested feature: CPUID.01H:ECX.x2apic [bit 21]"
>>>
>>> Hi all,
>>>
>>> I suppose 5120901a37 introduced this: qemu with kernel_irqchip=off now
>>> generates these warnings, one per VCPU, during QEMU startup. Is the plan
>>> to live with them until we finally have x2APIC emulation in userspace
>>> (ie. also MSR vmexiting to there), or should we otherwise avoid it?
>>
>> I think it's a bug, x2apic should be auto-suppressed with kernel_irqchip=off.
>>
>
> The patch is to fix the issue.
> ------------------------------------->8----------------------------
> From 58f2a3a94c8e7bf9f3474bcafb6c59cc4f8bcbd9 Mon Sep 17 00:00:00 2001
> From: Lan Tianyu <tianyu.lan@intel.com>
> Date: Sun, 15 Jul 2001 01:40:17 -0400
> Subject: [PATCH] Qemu/KVM: Remove x2apic feature from CPU model when
> kernel_irqchip=off
>
> x2apic feature is in the kvm_default_props and automatically added to all
> CPU models when KVM is enabled regardless of kernel_irqchip=off. This will
> trigger "warning: host doesn't support requested feature: CPUID.01H:
> ECX.x2apic [bit 21]" when kernel_irqchip=off. This patch is to remove x2apic
> feature when kernel_irqchip=off.
We know this, but it's probably worth to mention the underlying reason
here: userspace devices don't support x2APIC.
>
> Signed-off-by: Lan Tianyu <tianyu.lan@intel.com>
> ---
> target-i386/cpu.c | 3 +++
> 1 file changed, 3 insertions(+)
>
> diff --git a/target-i386/cpu.c b/target-i386/cpu.c
> index 0d447b5..2ec7eb7 100644
> --- a/target-i386/cpu.c
> +++ b/target-i386/cpu.c
> @@ -2105,6 +2105,9 @@ static void x86_cpu_load_def(X86CPU *cpu,
> X86CPUDefinition *def, Error **errp)
>
> /* Special cases not set in the X86CPUDefinition structs: */
> if (kvm_enabled()) {
> + if (!kvm_irqchip_in_kernel())
> + x86_cpu_change_kvm_default("x2apic", "off");
> +
> x86_cpu_apply_props(cpu, kvm_default_props);
> }
>
> --
> 1.9.3
>
Make sure to comply with the coding style (there is a checkpatch.pl also
in QEMU). And please post as a new thread with proper subject, otherwise
people (and tools) will not find your patch as such.
Jan
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [Qemu-devel] kvm: "warning: host doesn't support requested feature: CPUID.01H:ECX.x2apic [bit 21]"
2016-02-25 8:39 ` Jan Kiszka
@ 2016-02-25 12:31 ` Lan Tianyu
0 siblings, 0 replies; 6+ messages in thread
From: Lan Tianyu @ 2016-02-25 12:31 UTC (permalink / raw)
To: Jan Kiszka; +Cc: Paolo Bonzini, Eduardo Habkost, kvm, qemu-devel
2016-02-25 16:39 GMT+08:00 Jan Kiszka <jan.kiszka@web.de>:
> On 2016-02-25 09:33, Lan Tianyu wrote:
>> 2016-02-20 17:00 GMT+08:00 Paolo Bonzini <pbonzini@redhat.com>:
>>>
>>>
>>> ----- Original Message -----
>>>> From: "Jan Kiszka" <jan.kiszka@web.de>
>>>> To: "Eduardo Habkost" <ehabkost@redhat.com>, "Paolo Bonzini" <pbonzini@redhat.com>
>>>> Cc: "qemu-devel" <qemu-devel@nongnu.org>, "kvm" <kvm@vger.kernel.org>
>>>> Sent: Saturday, February 20, 2016 9:09:32 AM
>>>> Subject: kvm: "warning: host doesn't support requested feature: CPUID.01H:ECX.x2apic [bit 21]"
>>>>
>>>> Hi all,
>>>>
>>>> I suppose 5120901a37 introduced this: qemu with kernel_irqchip=off now
>>>> generates these warnings, one per VCPU, during QEMU startup. Is the plan
>>>> to live with them until we finally have x2APIC emulation in userspace
>>>> (ie. also MSR vmexiting to there), or should we otherwise avoid it?
>>>
>>> I think it's a bug, x2apic should be auto-suppressed with kernel_irqchip=off.
>>>
>>
>> The patch is to fix the issue.
>> ------------------------------------->8----------------------------
>> From 58f2a3a94c8e7bf9f3474bcafb6c59cc4f8bcbd9 Mon Sep 17 00:00:00 2001
>> From: Lan Tianyu <tianyu.lan@intel.com>
>> Date: Sun, 15 Jul 2001 01:40:17 -0400
>> Subject: [PATCH] Qemu/KVM: Remove x2apic feature from CPU model when
>> kernel_irqchip=off
>>
>> x2apic feature is in the kvm_default_props and automatically added to all
>> CPU models when KVM is enabled regardless of kernel_irqchip=off. This will
>> trigger "warning: host doesn't support requested feature: CPUID.01H:
>> ECX.x2apic [bit 21]" when kernel_irqchip=off. This patch is to remove x2apic
>> feature when kernel_irqchip=off.
>
> We know this, but it's probably worth to mention the underlying reason
> here: userspace devices don't support x2APIC.
>
>>
>> Signed-off-by: Lan Tianyu <tianyu.lan@intel.com>
>> ---
>> target-i386/cpu.c | 3 +++
>> 1 file changed, 3 insertions(+)
>>
>> diff --git a/target-i386/cpu.c b/target-i386/cpu.c
>> index 0d447b5..2ec7eb7 100644
>> --- a/target-i386/cpu.c
>> +++ b/target-i386/cpu.c
>> @@ -2105,6 +2105,9 @@ static void x86_cpu_load_def(X86CPU *cpu,
>> X86CPUDefinition *def, Error **errp)
>>
>> /* Special cases not set in the X86CPUDefinition structs: */
>> if (kvm_enabled()) {
>> + if (!kvm_irqchip_in_kernel())
>> + x86_cpu_change_kvm_default("x2apic", "off");
>> +
>> x86_cpu_apply_props(cpu, kvm_default_props);
>> }
>>
>> --
>> 1.9.3
>>
>
> Make sure to comply with the coding style (there is a checkpatch.pl also
> in QEMU). And please post as a new thread with proper subject, otherwise
> people (and tools) will not find your patch as such.
>
> Jan
Thanks for comments. Will update soon..
--
Best regards
Tianyu Lan
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2016-02-25 12:31 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-02-20 8:09 [Qemu-devel] kvm: "warning: host doesn't support requested feature: CPUID.01H:ECX.x2apic [bit 21]" Jan Kiszka
2016-02-20 9:00 ` Paolo Bonzini
2016-02-22 21:40 ` Eduardo Habkost
2016-02-25 8:33 ` Lan Tianyu
2016-02-25 8:39 ` Jan Kiszka
2016-02-25 12:31 ` Lan Tianyu
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).