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: 8421531 Return-Path: X-Original-To: patchwork-qemu-devel@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 9B0939F2F0 for ; Thu, 25 Feb 2016 09:55:49 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 1DA4B20361 for ; Thu, 25 Feb 2016 09:55:49 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 1F576202EB for ; Thu, 25 Feb 2016 09:55:48 +0000 (UTC) Received: from localhost ([::1]:41734 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aYseB-0007GA-3f for patchwork-qemu-devel@patchwork.kernel.org; Thu, 25 Feb 2016 04:55:47 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:43021) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aYrMh-0005lE-Sn for qemu-devel@nongnu.org; Thu, 25 Feb 2016 03:33:40 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aYrMh-0003R8-2S for qemu-devel@nongnu.org; Thu, 25 Feb 2016 03:33:39 -0500 Received: from mail-qk0-x22f.google.com ([2607:f8b0:400d:c09::22f]:36214) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aYrMg-0003R1-UV for qemu-devel@nongnu.org; Thu, 25 Feb 2016 03:33:38 -0500 Received: by mail-qk0-x22f.google.com with SMTP id s68so16845917qkh.3 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=b3I3Ubc9VBSFM7/YC+ojvvyGYpzJgdh8lcswhiUNsH9f9xUgcajrVriMSGodfgDmBw j7tp10S/34aLHsqnTrc0Yak6fJUK/m1zxT56p7FziMAYMrrE+mxAhcc3AihyaTSNK3AZ av202gTtE0dtggAOaaN1EiY0DwmUO9sr1AEhQRSEmyLEVQoTXoFbg8OlL/clXIk/4jYy Zwrg704/FerWb7pgmR6IsWlGsFJPzgEWg4kFaOYnKZDkj0me49Az4dXmqRJ8d+GVcc9v KTnvclD1fKYoMWupKyDWHlbRnHBcw+UibBX3bHv/ua8jiXJGY1XLMa8inOyknN2q2DJy yt+A== X-Gm-Message-State: AG10YOS858mcW2FnOFn4SQDx4Fzo7jem8oFsw87bc7P9xK4579ValRSdCipbjGzBtQAtSydEr+2VfJt2ZGXEpA== 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: From: Lan Tianyu To: Paolo Bonzini X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2607:f8b0:400d:c09::22f X-Mailman-Approved-At: Thu, 25 Feb 2016 04:49:12 -0500 Cc: Jan Kiszka , Eduardo Habkost , kvm , qemu-devel Subject: Re: [Qemu-devel] kvm: "warning: host doesn't support requested feature: CPUID.01H:ECX.x2apic [bit 21]" X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.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 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); }