Received: by 10.223.176.5 with SMTP id f5csp873192wra; Fri, 9 Feb 2018 08:33:52 -0800 (PST) X-Google-Smtp-Source: AH8x227moZOGdnWKR2/M0q43V65eJ3BbJMMj3K5bpUWWxDTGBIGiCKijt55M+TKqjiEbb+f+N5/L X-Received: by 2002:a17:902:3fa5:: with SMTP id a34-v6mr3219729pld.326.1518194032626; Fri, 09 Feb 2018 08:33:52 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1518194032; cv=none; d=google.com; s=arc-20160816; b=jsrZalRoq+fCYAaFnRZWlu/enNLRl6pXTvSzVtvbRqxx5jYLnBUQbCn9mQaFX2rlOy UqB7lOO9b0CYudHIk1vzDBLvB/HGM9FwRp1NF+F84xNMxSzODAE2YePz7+A1+cKizalT Tz+W3wKauoE6kkexlhElIU60PmDhNJFr7FPSKr+YgkSu8hwXq75o1d3CV8ahLKGA0+gu WXUVvKH8WJbCAalZ6K8cBufv1qmN/IsziSQG8NmuGAije/BX9zzThPk2C/1oOilgbYBa NECexqyu7WuVE6w27XumMNhBgF79iLZrTox2q4m24CspjwWftYJ4pnQJD4/+50IrI5PY 2Lgg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:message-id:in-reply-to:date:references:subject:cc:to :from:arc-authentication-results; bh=+BwZH7vR38UL2fbCcrM+35aeXFoIod7CdRI664GptxY=; b=InuhAsTULAfNCnkqPGfotxneruijvndM/Xwp9DMTu+93nr9E27SLIL62cjOf95McnX QLegwBS7UD0cpPLdtJ2lYTIDDzQ0vEWNTk+x5cF96yWTZLq5vIiqXex2wPSzWvngHTFi W+dq/7N8cAImTnZe3m+5MAqQ704XdLsLkJCiUtrvzc7vBdnwly7Sn1FALW2CT1Tp4/ED 7m+2ozxLZXcmkslHukjqjxnRvd6C4aCWfeUrLOnnnn4njs1rEYWdfWuXatY8oGVXzbt4 LaLZGZeIjLvgoif+vkPm1jrVeZtcyKl7kW+JRujqIEMQe75vcsifu+yQoYTDJeUQAAv7 9bdw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id e4si1541407pgr.627.2018.02.09.08.33.36; Fri, 09 Feb 2018 08:33:52 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751700AbeBIQcx (ORCPT + 99 others); Fri, 9 Feb 2018 11:32:53 -0500 Received: from mx3-rdu2.redhat.com ([66.187.233.73]:51500 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751028AbeBIQcw (ORCPT ); Fri, 9 Feb 2018 11:32:52 -0500 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.rdu2.redhat.com [10.11.54.3]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 0CBA08182D37; Fri, 9 Feb 2018 16:32:52 +0000 (UTC) Received: from vitty.brq.redhat.com.redhat.com (unknown [10.43.2.155]) by smtp.corp.redhat.com (Postfix) with ESMTPS id D8A7A1010415; Fri, 9 Feb 2018 16:32:48 +0000 (UTC) From: Vitaly Kuznetsov To: Nikita Leshenko Cc: kvm , linux-kernel@vger.kernel.org, x86@kernel.org, Paolo Bonzini , Radim =?utf-8?B?S3LEjW3DocWZ?= , Peter Xu Subject: Re: [PATCH] KVM: lapic: stop advertising DIRECTED_EOI when in-kernel IOAPIC is in use References: <20180209130133.28387-1-vkuznets@redhat.com> <292414F1-6978-497E-9CE2-3847E171150B@oracle.com> Date: Fri, 09 Feb 2018 17:32:47 +0100 In-Reply-To: <292414F1-6978-497E-9CE2-3847E171150B@oracle.com> (Nikita Leshenko's message of "Fri, 9 Feb 2018 17:20:48 +0200") Message-ID: <877ermyvgw.fsf@vitty.brq.redhat.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Scanned-By: MIMEDefang 2.78 on 10.11.54.3 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.8]); Fri, 09 Feb 2018 16:32:52 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.8]); Fri, 09 Feb 2018 16:32:52 +0000 (UTC) for IP:'10.11.54.3' DOMAIN:'int-mx03.intmail.prod.int.rdu2.redhat.com' HELO:'smtp.corp.redhat.com' FROM:'vkuznets@redhat.com' RCPT:'' Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Nikita Leshenko writes: > The patch looks correct, however I’m confused about why you consider > this to be a bug in the guest rather than a bug in KVM. > > The spec for x2APIC states: > "The support for Directed EOI capability can be detected by means of > bit 24 in the Local APIC Version Register” (Intel’s x2APIC spec, 2.5.1 > Directed EOI) > It seems to me that Windows did the right thing by testing for the > presence of directed EOI feature rather than implying it exists by > testing a version number. KVM did the wrong thing by advertising a > feature it doesn’t support. > > Therefore I think that you should change the comment to something like > “KVM’s in-kernel IOAPIC doesn’t support Directed EOI register, so don’t > advertise this capability in the LAPIC Version Register.” instead of > talking about buggy guests, as it may confuse future readers of this > code. > Before disabling EOI broadcast guests should check if IOAPIC is of proper version - the fact that you can disable EOI broadcast doesn't automatically mean that you can later do EOI through IOAPIC... Anyway, I got the impression that last time conversation ended up with 'this is a guest bug' conclusion (https://www.spinics.net/lists/kvm/msg148187.html - see Radim's and Ladi's comments) but I'm not insisting - if now we conclude this is not a Windows issue let it be it. But let's just fix it once and for all :-) -- Vitaly