From patchwork Thu Feb 25 08:33:38 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tianyu Lan X-Patchwork-Id: 8420601 Return-Path: X-Original-To: patchwork-kvm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 2571F9F2F0 for ; Thu, 25 Feb 2016 08:34:04 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 69A0D2034A for ; Thu, 25 Feb 2016 08:34:03 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 0C6382035E for ; Thu, 25 Feb 2016 08:34:02 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1760169AbcBYIdw (ORCPT ); Thu, 25 Feb 2016 03:33:52 -0500 Received: from mail-qk0-f172.google.com ([209.85.220.172]:35784 "EHLO mail-qk0-f172.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1758745AbcBYIdj (ORCPT ); Thu, 25 Feb 2016 03:33:39 -0500 Received: by mail-qk0-f172.google.com with SMTP id o6so16992478qkc.2 for ; Thu, 25 Feb 2016 00:33:38 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=X+JlkJtWsnMRBYPL/fKG5k0nHPSVFSXfFoPmLNAKNVQ=; b=HJXV0H3Nt0UqW2/kmgI/q1SHNXNZj8IuFmC/pW/Tswz/Z743uzt4GKH5BtE+q3fL3Y 1MSbvp6gDffhqQj6wcDztUgoZ5Dik80MH9oh8yWB1MrjCJRRG8EwZmGnOVeS27MeVozu 9+CaIB4doflYY3jGW8XsV00zlHVD/pVF/eo4stvvPVF757wsX81CClpPJVx8icRTrC/c c+q1xrjgpnBGG65AdOrnjMIW+SQvwebsasRcgSrz3ugWc6RxtGe6ED1sPlqIC6q7v3ci W+YOyTh7W9lRT1kpWgE10D3RhmANRzru26a3y2kHLgMQVLd0+xv/wpyGlVVcMx0eKNbL xhsw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:content-type; bh=X+JlkJtWsnMRBYPL/fKG5k0nHPSVFSXfFoPmLNAKNVQ=; b=mpVJkpIUzkNfRyLV68s4Wqlysf9AxJLu6j0Bxds68FKx5nYsYMJqF8REx1DYKT3Em/ I+sHjTXUDA6akWl7JSoKpqQMZlWN1m0/HDupduazTrucB3fUlZemZ9xfHsY4puLsdyr5 7wQ7yDdgnsWfNmEHsGB1AimPt8magUBBeqTx0LlBRgjIqECqM6N7iZzilhQAsfET4JH2 bmF+wmJeTWmxPxGW60Re9E78/EMmNFnUlp77znLn6Stf0zCGGNsBXUQGfpkInT9HtyBV nB2navhPI8nuMtniYEY3MbH1Kw4c8C7Q3RhgvkFjdwnzow8stNx9Zalh6bWD5IRJ4Dvs qLlQ== X-Gm-Message-State: AG10YORaoymQzzHGGRUpDQiazj6+Ya81UIotxCZ2GvZMYVewrCsdMy4QFxRy0o44VojprwI84gSaRQ6sk3zsgA== MIME-Version: 1.0 X-Received: by 10.55.18.168 with SMTP id 40mr29084121qks.99.1456389218302; Thu, 25 Feb 2016 00:33:38 -0800 (PST) Received: by 10.55.168.198 with HTTP; Thu, 25 Feb 2016 00:33:38 -0800 (PST) In-Reply-To: <859622929.26459953.1455958830109.JavaMail.zimbra@redhat.com> References: <56C81F3C.4010006@web.de> <859622929.26459953.1455958830109.JavaMail.zimbra@redhat.com> Date: Thu, 25 Feb 2016 16:33:38 +0800 Message-ID: Subject: Re: kvm: "warning: host doesn't support requested feature: CPUID.01H:ECX.x2apic [bit 21]" From: Lan Tianyu To: Paolo Bonzini Cc: Jan Kiszka , Eduardo Habkost , qemu-devel , kvm Sender: kvm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org X-Spam-Status: No, score=-1.8 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, UNPARSEABLE_RELAY autolearn=no version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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. Signed-off-by: Lan Tianyu --- target-i386/cpu.c | 3 +++ 1 file changed, 3 insertions(+) -- 1.9.3 -- 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 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); }