From mboxrd@z Thu Jan 1 00:00:00 1970 From: Paolo Bonzini Subject: Re: [PATCH 2/3] KVM: x86: request interrupt window when IRQ chip is split Date: Fri, 13 Nov 2015 09:56:00 +0100 Message-ID: <5645A5A0.30701@redhat.com> References: <0F3C2194-AAA7-4F34-8EEA-9EA606198B2D@google.com> Mime-Version: 1.0 Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 8bit Cc: Steve Rutherford To: Matt Gingell , kvm@vger.kernel.org Return-path: Received: from mail-wm0-f49.google.com ([74.125.82.49]:38377 "EHLO mail-wm0-f49.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751978AbbKMI4E (ORCPT ); Fri, 13 Nov 2015 03:56:04 -0500 Received: by wmec201 with SMTP id c201so20900678wme.1 for ; Fri, 13 Nov 2015 00:56:02 -0800 (PST) In-Reply-To: <0F3C2194-AAA7-4F34-8EEA-9EA606198B2D@google.com> Sender: kvm-owner@vger.kernel.org List-ID: On 12/11/2015 20:08, Matt Gingell wrote: > + bool req_int_win = !pic_in_kernel(vcpu->kvm) && > vcpu->run->request_interrupt_window; Hey, this is the new form of dm_request_for_irq_injection I have just written about, in the review to patch 3. So it's probably best to swap these two. > bool req_immediate_exit = false; > > + if (irqchip_split(vcpu->kvm)) > + req_int_win = req_int_win && kvm_apic_accept_pic_intr(vcpu); Overall this is bool req_int_win = vcpu->run->request_interrupt_window && !pic_in_kernel(vcpu->kvm) && (!lapic_in_kernel(vcpu) || kvm_apic_accept_pic_intr(vcpu)) writing it in this form is nice, because it's again very similar to the tests you're using in patch 3. Paolo