From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jan Kiszka Subject: Re: [PATCH v2 4/4] KVM: Allow host IRQ sharing for passed-through PCI 2.3 devices Date: Tue, 02 Nov 2010 19:48:21 +0100 Message-ID: <4CD05CF5.1040203@siemens.com> References: <70406157f1f29ade425369f82310a3963f0d0e97.1288712958.git.jan.kiszka@siemens.com> <20101102174149.GC1304@redhat.com> <4CD050BE.5010703@siemens.com> <20101102182401.GB1939@redhat.com> <4CD05B2E.1050005@siemens.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: Avi Kivity , Marcelo Tosatti , kvm , Alex Williamson To: "Michael S. Tsirkin" Return-path: Received: from goliath.siemens.de ([192.35.17.28]:15677 "EHLO goliath.siemens.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752287Ab0KBSsl (ORCPT ); Tue, 2 Nov 2010 14:48:41 -0400 In-Reply-To: <4CD05B2E.1050005@siemens.com> Sender: kvm-owner@vger.kernel.org List-ID: Am 02.11.2010 19:40, Jan Kiszka wrote: >>>>> @@ -199,6 +343,13 @@ static void kvm_free_assigned_device(struct kvm *kvm, >>>>> >>>>> pci_reset_function(assigned_dev->dev); >>>>> >>>>> + /* >>>>> + * Unmask the IRQ at PCI level once the reset is done - the next user >>>>> + * may not expect the IRQ being masked. >>>>> + */ >>>>> + if (assigned_dev->pci_2_3) >>>>> + pci_2_3_irq_unmask(assigned_dev->dev); >>>>> + >>>> >>>> Doesn't pci_reset_function clear mask bit? It seems to ... >>> >>> I was left with non-functional devices for the host here if I was not >>> doing this. Need to recheck, but I think it was required. >> >> Interesting. Could you check why please? >> > > Can't reproduce anymore. This was early code, maybe affected by some > bits or buts that no longer exist. > > Spec says it's cleared on reset, so I removed those lines now. > Hmpf, it just happened again: Guest was using my ath9k, I killed the guest, lspci says DisINTx+. Strange. Is anyone (qemu) restoring the config space after the reset, bringing the disable bit back? Jan -- Siemens AG, Corporate Technology, CT T DE IT 1 Corporate Competence Center Embedded Linux