From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Yang, Sheng" Subject: Re: [PATCH 2/5] KVM: Add irq ack notifier list Date: Tue, 29 Jul 2008 15:14:17 +0800 Message-ID: <200807291514.18097.sheng.yang@intel.com> References: <1217262388-7309-1-git-send-email-benami@il.ibm.com> <1217262388-7309-2-git-send-email-benami@il.ibm.com> <1217262388-7309-3-git-send-email-benami@il.ibm.com> Mime-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Cc: Ben-Ami Yassour , avi@qumranet.com, amit.shah@qumranet.com, muli@il.ibm.com, weidong.han@intel.com, anthony@codemonkey.ws To: kvm@vger.kernel.org, Marcelo Tosatti Return-path: Received: from mga02.intel.com ([134.134.136.20]:39157 "EHLO mga02.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752144AbYG2HLw (ORCPT ); Tue, 29 Jul 2008 03:11:52 -0400 In-Reply-To: <1217262388-7309-3-git-send-email-benami@il.ibm.com> Content-Disposition: inline Sender: kvm-owner@vger.kernel.org List-ID: On Tuesday 29 July 2008 00:26:25 Ben-Ami Yassour wrote: > FROM: Avi Kivity > > This can be used by kvm subsystems that are interested in when > interrupts > are acked, for example time drift compenstation. > > [Ben: add notification call to the pic and ioapic] > > Signed-off-by: Avi Kivity > Signed-off-by: Ben-Ami Yassour > --- > arch/x86/kvm/i8259.c | 1 + > arch/x86/kvm/irq.c | 22 ++++++++++++++++++++++ > arch/x86/kvm/irq.h | 5 +++++ > include/asm-x86/kvm_host.h | 7 +++++++ > virt/kvm/ioapic.c | 2 ++ > 5 files changed, 37 insertions(+), 0 deletions(-) > > diff --git a/arch/x86/kvm/i8259.c b/arch/x86/kvm/i8259.c > index 55e179a..d2a61bf 100644 > --- a/arch/x86/kvm/i8259.c > +++ b/arch/x86/kvm/i8259.c > @@ -186,6 +186,7 @@ int kvm_pic_read_irq(struct kvm_pic *s) > irq = 7; > intno = s->pics[0].irq_base + irq; > } > + kvm_notify_acked_irq(s->irq_request_opaque, irq); It's not what I mean, sorry to not tell it clearly... Now it got confusing semantic. irq_request_opaque has nothing to do with acked_irq. What I mean is rename irq_request_opaque to struct* kvm in struct kvm_pic, and modify all irq_request() calling(three of them in all) with (void *)kvm. It's not a must, I just think it's clearer... -- regards Yang, Sheng