From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932252AbcI1MOZ (ORCPT ); Wed, 28 Sep 2016 08:14:25 -0400 Received: from mx1.redhat.com ([209.132.183.28]:36788 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753615AbcI1MOS (ORCPT ); Wed, 28 Sep 2016 08:14:18 -0400 Subject: Re: [PATCH 2/3] kvm: x86: do not use KVM_REQ_EVENT for APICv interrupt injection To: "Wu, Feng" , "Michael S. Tsirkin" References: <1475011213-34225-1-git-send-email-pbonzini@redhat.com> <1475011213-34225-3-git-send-email-pbonzini@redhat.com> <20160928020319-mutt-send-email-mst@kernel.org> <286c39fb-6ba3-3267-dff6-b04ee4cbb1c7@redhat.com> <7b5daf1a-dd92-d199-a9b2-c6564b46f1fc@redhat.com> Cc: "linux-kernel@vger.kernel.org" , "kvm@vger.kernel.org" , "yang.zhang.wz@gmail.com" , "rkrcmar@redhat.com" From: Paolo Bonzini Message-ID: Date: Wed, 28 Sep 2016 14:14:14 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.3.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 8bit X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.26]); Wed, 28 Sep 2016 12:14:18 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 28/09/2016 14:06, Wu, Feng wrote: >> Then the >> > guest is entered with PIR.ON, but the PI interrupt is not pending and >> > hence the interrupt is never delivered to the guest. > Why "never", at least, the interrupt should be delivered to the guest in the next > vm-entry, right? I mean vm-entry -> vm-exit -> _vm-entry_ (interrupts will be > delivered at this vm-entery). Sure, but you could in principle have a case where the vmexit never happens (right now nohz_full CPUs have a 1 Hz timer tick, but that's just a limitation of isolcpus). When that happens, the interrupt might never be delivered because it is not recorded in IRR. Also, if the guest issues an EOI, the pending posted interrupt may be reordered incorrectly with a lower-priority interrupt already in IRR. But I'll re-check the wording in the commit message before posting the non-RFC version. Paolo