From: Jan Kiszka <jan.kiszka@siemens.com>
To: "Michael S. Tsirkin" <mst@redhat.com>
Cc: Avi Kivity <avi@redhat.com>,
Marcelo Tosatti <mtosatti@redhat.com>, kvm <kvm@vger.kernel.org>,
Alex Williamson <alex.williamson@redhat.com>
Subject: Re: [PATCH v2 4/4] KVM: Allow host IRQ sharing for passed-through PCI 2.3 devices
Date: Tue, 02 Nov 2010 20:30:25 +0100 [thread overview]
Message-ID: <4CD066D1.4050803@siemens.com> (raw)
In-Reply-To: <20101102185428.GD2341@redhat.com>
Am 02.11.2010 19:54, Michael S. Tsirkin wrote:
> On Tue, Nov 02, 2010 at 07:51:39PM +0100, Jan Kiszka wrote:
>> Am 02.11.2010 19:48, Jan Kiszka wrote:
>>> 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?
>>
>> Or does the kernel cache the control word?
>>
>> Jan
>
> Maybe it does, need to dig in drivers/pci. If it does this
> might have other implications.
OK, that mystery is resolved now: pci_reset_function saves & restores
the device state.
Jan
--
Siemens AG, Corporate Technology, CT T DE IT 1
Corporate Competence Center Embedded Linux
next prev parent reply other threads:[~2010-11-02 19:30 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-11-02 15:49 [PATCH v2 0/4] KVM: Improve IRQ assignment for device passthrough Jan Kiszka
2010-11-02 15:49 ` [PATCH v2 1/4] KVM: Clear assigned guest IRQ on release Jan Kiszka
2010-11-02 15:49 ` [PATCH v2 2/4] KVM: Switch assigned device IRQ forwarding to threaded handler Jan Kiszka
2010-11-02 17:44 ` Michael S. Tsirkin
2010-11-02 17:58 ` Jan Kiszka
2010-11-02 15:49 ` [PATCH v2 3/4] KVM: Refactor IRQ names of assigned devices Jan Kiszka
2010-11-02 15:49 ` [PATCH v2 4/4] KVM: Allow host IRQ sharing for passed-through PCI 2.3 devices Jan Kiszka
2010-11-02 17:41 ` Michael S. Tsirkin
2010-11-02 17:56 ` Jan Kiszka
2010-11-02 18:24 ` Michael S. Tsirkin
2010-11-02 18:40 ` Jan Kiszka
2010-11-02 18:48 ` Jan Kiszka
2010-11-02 18:51 ` Jan Kiszka
2010-11-02 18:54 ` Michael S. Tsirkin
2010-11-02 19:30 ` Jan Kiszka [this message]
2010-11-02 19:53 ` Michael S. Tsirkin
2010-11-02 19:58 ` Jan Kiszka
2010-11-02 20:05 ` Michael S. Tsirkin
2010-11-02 18:52 ` Michael S. Tsirkin
2010-11-02 19:11 ` Jan Kiszka
2010-11-02 19:14 ` Michael S. Tsirkin
2010-11-02 19:56 ` Jan Kiszka
2010-11-02 19:41 ` Alex Williamson
2010-11-02 17:11 ` [PATCH v2 0/4] KVM: Improve IRQ assignment for device passthrough Michael S. Tsirkin
2010-11-02 17:56 ` Jan Kiszka
-- strict thread matches above, loose matches on Subject: below --
2010-12-12 11:22 [PATCH v2 0/4] KVM & genirq: Enable adaptive IRQ sharing for passed-through devices Jan Kiszka
2010-12-12 11:22 ` [PATCH v2 4/4] KVM: Allow host IRQ sharing for passed-through PCI 2.3 devices Jan Kiszka
2010-12-13 10:19 ` Avi Kivity
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4CD066D1.4050803@siemens.com \
--to=jan.kiszka@siemens.com \
--cc=alex.williamson@redhat.com \
--cc=avi@redhat.com \
--cc=kvm@vger.kernel.org \
--cc=mst@redhat.com \
--cc=mtosatti@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.