From: Gleb Natapov <gleb@redhat.com>
To: Yang Zhang <yang.z.zhang@intel.com>
Cc: kvm@vger.kernel.org, mtosatti@redhat.com,
xiantao.zhang@intel.com, avi.kivity@gmail.com
Subject: Re: [PATCH 4/5] KVM: register rtc eoi notifier
Date: Sun, 17 Mar 2013 12:19:18 +0200 [thread overview]
Message-ID: <20130317101918.GG11223@redhat.com> (raw)
In-Reply-To: <1363334700-24507-5-git-send-email-yang.z.zhang@intel.com>
On Fri, Mar 15, 2013 at 04:04:59PM +0800, Yang Zhang wrote:
> From: Yang Zhang <yang.z.zhang@Intel.com>
>
> when virtual interrupt delivery avaliable, register a rtc eoi notifier
> to force vmexit when writing eoi for rtc interupt
>
> Signed-off-by: Yang Zhang <yang.z.zhang@Intel.com>
> ---
> virt/kvm/ioapic.c | 26 ++++++++++++++++++++++++++
> 1 files changed, 26 insertions(+), 0 deletions(-)
>
> diff --git a/virt/kvm/ioapic.c b/virt/kvm/ioapic.c
> index ed6f111..2c6235c 100644
> --- a/virt/kvm/ioapic.c
> +++ b/virt/kvm/ioapic.c
> @@ -87,6 +87,30 @@ static unsigned long ioapic_read_indirect(struct kvm_ioapic *ioapic,
> return result;
> }
>
> +#ifdef CONFIG_X86
> +static void kvm_rtc_ack_irq(struct kvm_irq_ack_notifier *kian)
> +{
> + return;
> +}
No need to register fake ack notifier to request EOI exit from APICv.
IOAPIC can do it directly.
> +
> +static void rtc_register_notifier(struct kvm_ioapic *ioapic)
> +{
> + if (!kvm_apic_vid_enabled(ioapic->kvm))
> + return;
> +
> + ioapic->rtc_status.irq_ack_notifier.gsi = 8;
> + ioapic->rtc_status.irq_ack_notifier.irq_acked = kvm_rtc_ack_irq;
> + kvm_register_irq_ack_notifier(ioapic->kvm,
> + &ioapic->rtc_status.irq_ack_notifier);
> +}
> +#else
> +
> +static void rtc_register_notifier(struct kvm_ioapic *ioapic)
> +{
> + return;
> +}
> +#endif
> +
> static int ioapic_service(struct kvm_ioapic *ioapic, unsigned int idx)
> {
> union kvm_ioapic_redirect_entry *pent;
> @@ -458,6 +482,8 @@ int kvm_ioapic_init(struct kvm *kvm)
> kfree(ioapic);
> }
>
> + rtc_register_notifier(ioapic);
> +
> return ret;
> }
>
> --
> 1.7.1
--
Gleb.
next prev parent reply other threads:[~2013-03-17 10:19 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-03-15 8:04 [PATCH 0/5] use eoi to track RTC interrupt delivery status Yang Zhang
2013-03-15 8:04 ` [PATCH 1/5] KVM: parse ioapic entry to get destination vcpu Yang Zhang
2013-03-15 8:04 ` [PATCH 2/5] KVM: add vcpu info to ioapic_update_eoi() Yang Zhang
2013-03-15 8:04 ` [PATCH 3/5] KVM: introduce struct rtc_status Yang Zhang
2013-03-15 8:04 ` [PATCH 4/5] KVM: register rtc eoi notifier Yang Zhang
2013-03-17 10:19 ` Gleb Natapov [this message]
2013-03-15 8:05 ` [PATCH 5/5] KVM: use eoi to track RTC interrupt delivery status Yang Zhang
2013-03-17 10:28 ` Gleb Natapov
2013-03-17 13:09 ` Zhang, Yang Z
2013-03-17 14:00 ` Gleb Natapov
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=20130317101918.GG11223@redhat.com \
--to=gleb@redhat.com \
--cc=avi.kivity@gmail.com \
--cc=kvm@vger.kernel.org \
--cc=mtosatti@redhat.com \
--cc=xiantao.zhang@intel.com \
--cc=yang.z.zhang@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