Received: by 10.223.185.116 with SMTP id b49csp1337257wrg; Fri, 23 Feb 2018 16:43:57 -0800 (PST) X-Google-Smtp-Source: AH8x2259DSWxN0TiXkmUhoQiyirESE9drexAip3AefyKnfBxdzEE/F+Fsop6zn+rvpS/VJ2d84z/ X-Received: by 10.101.91.193 with SMTP id o1mr2816720pgr.315.1519433037397; Fri, 23 Feb 2018 16:43:57 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1519433037; cv=none; d=google.com; s=arc-20160816; b=a+EssYR1694q8vqSVmJvtBRwfxXeoUz3RDxaa4itKapsGDRskPlIb9Z68VPlylOVuI wDZvQ1LvhQsCXot3dMWPX0RPSH1aSeqNpK1cVeugCgssGgjaX70+JASoXntuT6bFeioT +eG9RFiECFAkSGyMbzMKC0km/66EO2mtb8db+PhWR55rowPlw7Wnc16F0Z89bdOPcUwX N6XqDeNkfXHCEynzzlm9PjxlML84SuuJoCmnn4K2k/yqMsk/LUANdQydD1b4+PtZ9Dwk 3FsMkttyuWpJj7T9MWGrIWI5/unnryir9fDUTzRukYnkDQN+JvN9NvcdTODo3vKZgryH c0zQ== 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 :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:arc-authentication-results; bh=g+2eMYZ/4qs/NYw0h0I8QfyL/RsiLvEk1KdYVK/Xtk4=; b=jJEJ75A1HAid6KKTI7uhIYn1nbYPAIEHH/L51yPS13eMj5oEygBPHwqeSjcpow/+o+ acVGhiDisUVJLhDmis0m4+DhNbALig1ARgUo2dLqb7HYv/ZFJV6XF05CHBTJSJ7kjBhZ 781sM4sQ1elaivxzLcUGaA7Chj2rsU2LeqKIhorwb7Q21VziCkdz8gG1UiSIQm/Jhm/U PHGKljMGsHSul36JACwaOqbQtjy9kVRUgw0htbDvHzBCj8uLiY/Gdj4N7mslHdxylIlj 022qYprkYkrAcjFrzyROJFkbGR7OTFrhID/ptPTOOwYmDTh1Fibp8mNJg7NIUALtySnx S+Vw== 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 l6si2625698pff.308.2018.02.23.16.43.43; Fri, 23 Feb 2018 16:43:57 -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 S1752245AbeBXAnE (ORCPT + 99 others); Fri, 23 Feb 2018 19:43:04 -0500 Received: from mx3-rdu2.redhat.com ([66.187.233.73]:37438 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751864AbeBXAnD (ORCPT ); Fri, 23 Feb 2018 19:43:03 -0500 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.rdu2.redhat.com [10.11.54.6]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id A206A8182D3F; Sat, 24 Feb 2018 00:43:02 +0000 (UTC) Received: from [10.36.117.249] (ovpn-117-249.ams2.redhat.com [10.36.117.249]) by smtp.corp.redhat.com (Postfix) with ESMTPS id BD003213AEED; Sat, 24 Feb 2018 00:43:01 +0000 (UTC) Subject: Re: [PATCH] KVM: x86: move LAPIC initialization after VMCS creation To: Liran Alon Cc: linux-kernel@vger.kernel.org, kvm@vger.kernel.org References: <764f4da9-2d0c-41cf-a4a4-d9b3bf3447c2@default> From: Paolo Bonzini Message-ID: <79e3fc04-c76e-186e-3b73-74f5128dff91@redhat.com> Date: Sat, 24 Feb 2018 01:43:00 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0 MIME-Version: 1.0 In-Reply-To: <764f4da9-2d0c-41cf-a4a4-d9b3bf3447c2@default> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-Scanned-By: MIMEDefang 2.78 on 10.11.54.6 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.8]); Sat, 24 Feb 2018 00:43:02 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.8]); Sat, 24 Feb 2018 00:43:02 +0000 (UTC) for IP:'10.11.54.6' DOMAIN:'int-mx06.intmail.prod.int.rdu2.redhat.com' HELO:'smtp.corp.redhat.com' FROM:'pbonzini@redhat.com' RCPT:'' Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 24/02/2018 01:39, Liran Alon wrote: > I agree with the bug and the fix. > It makes sense to reset LAPIC in the same place other components are reset > rather than in it's creation. > > However, I failed to understand why you mention it fixes commit: > 851c1a18c541 ("KVM: nVMX: Fix injection to L2 when L1 don't intercept external-interrupts") > > Before and after that commit, vmx_hwapic_irr_update() did exactly the same > because is_guest_mode(vcpu)==false at this point. > Therefore, vmx_hwapic_irr_update() has always just called vmx_set_rvi() > which has not changed in that commit. > > It seems to me that the commit which introduced this issue is actually: > 4191db26b714 ("KVM: x86: Update APICv on APIC reset") > > What am I missing? No, you're right. But then I'm not sure why I'm only seeing the issue now, and not with 4.15 kernels. Paolo