From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:43914) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aYrS8-0006Sa-Me for qemu-devel@nongnu.org; Thu, 25 Feb 2016 03:39:17 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aYrS5-0004ba-DH for qemu-devel@nongnu.org; Thu, 25 Feb 2016 03:39:16 -0500 Received: from mout.web.de ([212.227.17.12]:49557) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aYrS5-0004ag-4K for qemu-devel@nongnu.org; Thu, 25 Feb 2016 03:39:13 -0500 References: <56C81F3C.4010006@web.de> <859622929.26459953.1455958830109.JavaMail.zimbra@redhat.com> From: Jan Kiszka Message-ID: <56CEBDA7.9050808@web.de> Date: Thu, 25 Feb 2016 09:39:03 +0100 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] kvm: "warning: host doesn't support requested feature: CPUID.01H:ECX.x2apic [bit 21]" List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , 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 : >> >> >> ----- Original Message ----- >>> From: "Jan Kiszka" >>> To: "Eduardo Habkost" , "Paolo Bonzini" >>> Cc: "qemu-devel" , "kvm" >>> 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 > 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 > --- > 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