From: Avi Kivity <avi@qumranet.com>
To: Amit Shah <amit.shah@qumranet.com>
Cc: kvm@vger.kernel.org, muli@il.ibm.com, benami@il.ibm.com,
allen.m.kay@intel.com, chrisw@redhat.com, weidong.han@intel.com,
virtualization@lists.osdl.org
Subject: Re: [PATCH 2/4] KVM: Introduce a callback routine for IOAPIC ack handling
Date: Mon, 07 Jul 2008 13:08:54 +0300 [thread overview]
Message-ID: <4871EB36.5030003@qumranet.com> (raw)
In-Reply-To: <1214571305-20701-3-git-send-email-amit.shah@qumranet.com>
Amit Shah wrote:
> This will be useful for acking irqs of assigned devices
>
>
And also for improving time drift tracking.
Please make this more generic by having a list of callbacks. There
could also be just one list, rather than one for the ioapic and one for
the pic as implemented now.
It may also make sense to filter the irq number before calling the
callback rather than relying on the callback to ignore uninteresting irqs.
> Signed-off-by: Amit Shah <amit.shah@qumranet.com>
> ---
> virt/kvm/ioapic.c | 3 +++
> virt/kvm/ioapic.h | 1 +
> 2 files changed, 4 insertions(+), 0 deletions(-)
>
> diff --git a/virt/kvm/ioapic.c b/virt/kvm/ioapic.c
> index 9d02136..6d99a35 100644
> --- a/virt/kvm/ioapic.c
> +++ b/virt/kvm/ioapic.c
> @@ -295,6 +295,9 @@ static void __kvm_ioapic_update_eoi(struct kvm_ioapic *ioapic, int gsi)
> ent->fields.remote_irr = 0;
> if (!ent->fields.mask && (ioapic->irr & (1 << gsi)))
> ioapic_deliver(ioapic, gsi);
> +
> + if (ioapic->ack_notifier)
> + ioapic->ack_notifier(ioapic->kvm, gsi);
> }
>
> void kvm_ioapic_update_eoi(struct kvm *kvm, int vector)
> diff --git a/virt/kvm/ioapic.h b/virt/kvm/ioapic.h
> index 7f16675..a42743f 100644
> --- a/virt/kvm/ioapic.h
> +++ b/virt/kvm/ioapic.h
> @@ -58,6 +58,7 @@ struct kvm_ioapic {
> } redirtbl[IOAPIC_NUM_PINS];
> struct kvm_io_device dev;
> struct kvm *kvm;
> + void (*ack_notifier)(void *opaque, int irq);
> };
>
> #ifdef DEBUG
>
--
error compiling committee.c: too many arguments to function
next prev parent reply other threads:[~2008-07-07 10:08 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-06-27 12:55 PCI device assignment to guests Amit Shah
2008-06-27 12:55 ` [PATCH 1/4] KVM: Introduce kvm_set_irq to inject interrupts in guests Amit Shah
2008-06-27 12:55 ` [PATCH 2/4] KVM: Introduce a callback routine for IOAPIC ack handling Amit Shah
2008-06-27 12:55 ` [PATCH 3/4] KVM: Introduce a callback routine for PIC " Amit Shah
2008-06-27 12:55 ` [PATCH 4/4] KVM: Handle device assignment to guests Amit Shah
2008-07-02 10:25 ` Amit Shah
2008-07-07 10:08 ` Avi Kivity [this message]
2008-07-08 10:34 ` [PATCH 2/4] KVM: Introduce a callback routine for IOAPIC ack handling Ben-Ami Yassour
2008-07-10 13:57 ` Avi Kivity
2008-07-17 16:56 ` Ben-Ami Yassour
2008-07-17 17:16 ` Avi Kivity
2008-07-17 17:25 ` Avi Kivity
2008-07-05 11:05 ` [PATCH 1/4] KVM: Introduce kvm_set_irq to inject interrupts in guests Avi Kivity
2008-07-06 13:50 ` Ben-Ami Yassour
2008-07-06 13:59 ` 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=4871EB36.5030003@qumranet.com \
--to=avi@qumranet.com \
--cc=allen.m.kay@intel.com \
--cc=amit.shah@qumranet.com \
--cc=benami@il.ibm.com \
--cc=chrisw@redhat.com \
--cc=kvm@vger.kernel.org \
--cc=muli@il.ibm.com \
--cc=virtualization@lists.osdl.org \
--cc=weidong.han@intel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).