From: Avi Kivity <avi@qumranet.com>
To: Amit Shah <amit.shah@qumranet.com>
Cc: chrisw@redhat.com, kvm-devel@lists.sourceforge.net,
allen.m.kay@intel.com, virtualization@lists.linux-foundation.org,
gcosta@redhat.com, BENAMI@il.ibm.com
Subject: Re: [PATCH 2/2] KVM: Handle interrupts for PCI passthrough devices
Date: Fri, 02 May 2008 13:35:17 +0300 [thread overview]
Message-ID: <481AEE65.2010303@qumranet.com> (raw)
In-Reply-To: <200804222258.40644.amit.shah@qumranet.com>
Amit Shah wrote:
>
>>> +static irqreturn_t
>>> +kvm_pci_pt_dev_intr(int irq, void *dev_id)
>>>
>>> +{
>>> + struct kvm_pci_pt_dev_list *match;
>>> + struct kvm *kvm = (struct kvm *) dev_id;
>>> +
>>> + if (!test_bit(irq, pt_irq_handled))
>>> + return IRQ_NONE;
>>> +
>>> + if (test_bit(irq, pt_irq_pending))
>>> + return IRQ_HANDLED;
>>>
>> Will the interrupt not fire immediately after this returns?
>>
>
> Hmm. This is just an optimisation so that we don't have to look up the list
> each time to find out which assigned device it is and (re)injecting the
> interrupt. Also we avoid the (TODO) getting/releasing locks which will be
> needed for the list lookup.
>
> Disabling interrupts for PCI devices isn't a good idea even if we don't
> support shared interrupts. Any other ideas to avoid this from happening?
>
>
I don't understand. These are level-triggered interrupts, so if one
fires and you don't disable it, it will fire again and again.
Seems to me the only choice here is to mask the interrupt at the ioapic
level, wait until the guest acks the interrupt, then unmask the interrupt.
With the current code, how to the guest interrupt counters and the host
interrupt counters compare?
--
I have a truly marvellous patch that fixes the bug which this
signature is too narrow to contain.
-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference
Don't miss this year's exciting event. There's still time to save $100.
Use priority code J8TL2D2.
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
next prev parent reply other threads:[~2008-05-02 10:35 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-04-10 8:48 PCI Passthrough support for KVM Amit Shah
2008-04-10 8:48 ` [PATCH 1/2] KVM: Expose get_eoi_gsi() for IRQ acking by PCI passthrough devices Amit Shah
2008-04-10 8:48 ` [PATCH 2/2] KVM: Handle interrupts for " Amit Shah
2008-04-10 8:48 ` [PATCH 1/1] QEMU/KVM: Support for PCI Passthrough Amit Shah
2008-04-13 12:49 ` Dor Laor
2008-04-14 0:31 ` Samuel Masham
2008-04-18 5:39 ` Amit Shah
2008-04-18 8:46 ` [kvm-devel] " Samuel Masham
2008-04-13 8:36 ` [PATCH 2/2] KVM: Handle interrupts for PCI passthrough devices Avi Kivity
2008-04-22 17:28 ` Amit Shah
2008-05-02 10:35 ` Avi Kivity [this message]
2008-05-02 13:05 ` Amit Shah
2008-05-02 13:16 ` Avi Kivity
2008-04-13 8:22 ` [PATCH 1/2] KVM: Expose get_eoi_gsi() for IRQ acking by " 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=481AEE65.2010303@qumranet.com \
--to=avi@qumranet.com \
--cc=BENAMI@il.ibm.com \
--cc=allen.m.kay@intel.com \
--cc=amit.shah@qumranet.com \
--cc=chrisw@redhat.com \
--cc=gcosta@redhat.com \
--cc=kvm-devel@lists.sourceforge.net \
--cc=virtualization@lists.linux-foundation.org \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox