All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Yang, Sheng" <sheng.yang@intel.com>
To: Amit Shah <amit.shah@qumranet.com>
Cc: kvm@vger.kernel.org, Marcelo Tosatti <mtosatti@redhat.com>,
	Ben-Ami Yassour <benami@il.ibm.com>,
	avi@qumranet.com, muli@il.ibm.com, weidong.han@intel.com,
	anthony@codemonkey.ws
Subject: Re: [PATCH 2/5] KVM: Add irq ack notifier list
Date: Tue, 29 Jul 2008 17:56:45 +0800	[thread overview]
Message-ID: <200807291756.46376.sheng.yang@intel.com> (raw)
In-Reply-To: <200807291504.47162.amit.shah@qumranet.com>

On Tuesday 29 July 2008 17:34:47 Amit Shah wrote:
> * On Tuesday 29 Jul 2008 12:44:17 Yang, Sheng wrote:
> > On Tuesday 29 July 2008 00:26:25 Ben-Ami Yassour wrote:
> > > FROM: Avi Kivity <avi@qumranet.com>
> > >
> > > 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 <avi@qumranet.com>
> > > Signed-off-by: Ben-Ami Yassour <benami@il.ibm.com>
> > > ---
> > >  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
>
> The change here uses the irq_request_opaque field which actually is
> the kvm struct, pointed out by you, thanks for that.

Yeah, I know that... I just meant the meaning of words has no 
relevant. :)
>
> > 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.
>
> 'opaque' fields can be later made to point to other structures
> without changing the structure itself. This is an advantage. Will
> the kvm_pic struct be needed to change in the future? Very
> unlikely. So we can rename it to struct kvm *, however, that gives
> us no real benefit as against opaque (just readability).

Yes, the readability...

I think people would be very curious about why 

void kvm_notify_acked_irq(struct kvm *kvm, unsigned gsi)

got a irq_request_opaque as a parameter. It's more like a hack, which 
is not my meaning...

Anyway, it's trivial one and just a coding style. :)

--
regards
Yang, Sheng

  reply	other threads:[~2008-07-29  9:54 UTC|newest]

Thread overview: 36+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-07-28 16:26 Device assignemnt: updated patches Ben-Ami Yassour
2008-07-28 16:26 ` [PATCH 1/5] KVM: PCIPT: direct mmio pfn check Ben-Ami Yassour
2008-07-28 16:26   ` [PATCH 2/5] KVM: Add irq ack notifier list Ben-Ami Yassour
2008-07-28 16:26     ` [PATCH 3/5] KVM: pci device assignment Ben-Ami Yassour
2008-07-28 16:26       ` [PATCH 4/5] VT-d: changes to support KVM Ben-Ami Yassour
2008-07-28 16:26         ` [PATCH 5/5] This patch extends the VT-d driver " Ben-Ami Yassour
2008-07-28 16:32           ` Device assignment - userspace part Ben-Ami Yassour
2008-07-28 16:32             ` [PATCH 1/1] KVM/userspace: Support for assigning PCI devices to guest Ben-Ami Yassour
2008-08-01  3:09               ` Han, Weidong
2008-08-05  9:41                 ` Ben-Ami Yassour
2008-07-29  7:28           ` [PATCH 5/5] This patch extends the VT-d driver to support KVM Yang, Sheng
2008-08-05  6:01           ` Yang, Sheng
2008-08-05  9:32             ` Ben-Ami Yassour
2008-08-05 14:46           ` Han, Weidong
2008-08-06  5:50             ` Ben-Ami Yassour
2008-08-06  6:18               ` Han, Weidong
2008-08-06  8:56                 ` Ben-Ami Yassour
2008-08-06  9:12                   ` Han, Weidong
2008-08-06  9:42                     ` Ben-Ami Yassour
2008-08-07  1:21                       ` Han, Weidong
2008-08-07 10:35                         ` Ben-Ami Yassour
2008-08-12  3:29                           ` Han, Weidong
2008-07-29  9:19       ` [PATCH 3/5] KVM: pci device assignment Amit Shah
2008-07-29  9:38         ` Ben-Ami Yassour
2008-07-29 14:02           ` Avi Kivity
2008-07-30  6:00             ` Amit Shah
2008-07-30  6:03           ` Amit Shah
2008-07-30 11:58             ` Ben-Ami Yassour
2008-08-01 11:24               ` Amit Shah
2008-07-29 12:27       ` Ben-Ami Yassour
2008-07-29  7:14     ` [PATCH 2/5] KVM: Add irq ack notifier list Yang, Sheng
2008-07-29  9:34       ` Amit Shah
2008-07-29  9:56         ` Yang, Sheng [this message]
2008-07-30  5:54           ` Amit Shah
2008-07-31  8:55             ` Avi Kivity
2008-07-30 15:21 ` Device assignemnt: updated patches 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=200807291756.46376.sheng.yang@intel.com \
    --to=sheng.yang@intel.com \
    --cc=amit.shah@qumranet.com \
    --cc=anthony@codemonkey.ws \
    --cc=avi@qumranet.com \
    --cc=benami@il.ibm.com \
    --cc=kvm@vger.kernel.org \
    --cc=mtosatti@redhat.com \
    --cc=muli@il.ibm.com \
    --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 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.