public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
From: Alex Williamson <alex.williamson@hp.com>
To: "Michael S. Tsirkin" <mst@redhat.com>
Cc: kvm@vger.kernel.org, sheng.yang@intel.com, avi@redhat.com
Subject: Re: [PATCH v5] kvm: Use a bitmap for tracking used GSIs
Date: Wed, 13 May 2009 11:13:03 -0600	[thread overview]
Message-ID: <1242234783.9456.167.camel@lappy> (raw)
In-Reply-To: <20090513160519.GA1738@redhat.com>

On Wed, 2009-05-13 at 19:05 +0300, Michael S. Tsirkin wrote:
> On Wed, May 13, 2009 at 09:13:38AM -0600, Alex Williamson wrote:
> > @@ -323,6 +326,28 @@ kvm_context_t kvm_init(struct kvm_callbacks *callbacks,
> >  	kvm->no_irqchip_creation = 0;
> >  	kvm->no_pit_creation = 0;
> >  
> > +	gsi_count = kvm_get_gsi_count(kvm);
> > +	if (gsi_count > 0) {
> > +		int gsi_bytes, i;
> > +
> > +		/* Round up so we can search ints using ffs */
> > +		gsi_bytes = ((gsi_count + 31) / 32) * 4;
> 
> Let's take ALIGN macro from linux/kernel.h?

It's already defined in libkvm.c, I'll just move it up in the file.
There's also a BITMAP_SIZE macro by it that looks like it can be nuked.

> > +		kvm->used_gsi_bitmap = malloc(gsi_bytes);
> > +		if (!kvm->used_gsi_bitmap)
> > +			goto out_close;
> > +		memset(kvm->used_gsi_bitmap, 0, gsi_bytes);
> > +		kvm->max_gsi = gsi_bytes * 8;
> > +
> > +		/* Mark all the IOAPIC pin GSIs and any over-allocated
> > +	 	* GSIs as already in use. */
> 
> Align '*'s please.

Argh, fixed.

> > +#ifdef KVM_IOAPIC_NUM_PINS
> 
> I think we should just export
> #define KVM_IOAPIC_NUM_PINS 0
> for ppc in kernel headers (or in libkvm),
> and get rid of this ifdef completely.

Ok, I'll add an #ifndef and make it zero in libkvm.c.  It can be cleaned
out further from there.  Thanks,

Alex


  reply	other threads:[~2009-05-13 17:13 UTC|newest]

Thread overview: 56+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-05-07 22:22 [PATCH] kvm: Use a bitmap for tracking used GSIs Alex Williamson
2009-05-08 22:31 ` [PATCH v2] " Alex Williamson
2009-05-12 19:39   ` Michael S. Tsirkin
2009-05-12 21:56     ` Alex Williamson
2009-05-12 22:07   ` [PATCH v3] " Alex Williamson
2009-05-13  3:30     ` Yang, Sheng
2009-05-13  3:42       ` Alex Williamson
2009-05-13  4:10         ` Alex Williamson
2009-05-13  4:15           ` Yang, Sheng
2009-05-13  4:41     ` [PATCH v4] " Alex Williamson
2009-05-13  4:58       ` Yang, Sheng
2009-05-13  9:47       ` Avi Kivity
2009-05-13 12:28         ` Alex Williamson
2009-05-13 12:35           ` Avi Kivity
2009-05-13 12:55             ` Alex Williamson
2009-05-13 13:00               ` Avi Kivity
2009-05-13 13:11                 ` Alex Williamson
2009-05-13 13:55                   ` Michael S. Tsirkin
2009-05-13 14:15                     ` Alex Williamson
2009-05-13 14:30                       ` Michael S. Tsirkin
2009-05-13 14:33                       ` Alex Williamson
2009-05-13 23:07                         ` Alex Williamson
2009-05-17 20:47                           ` Avi Kivity
2009-05-18 11:12                             ` Michael S. Tsirkin
2009-05-18 11:36                               ` Avi Kivity
2009-05-18 12:19                                 ` Michael S. Tsirkin
2009-05-18 12:33                                   ` Avi Kivity
2009-05-18 13:45                                     ` Michael S. Tsirkin
2009-05-18 13:55                                       ` Avi Kivity
2009-05-18 14:40                                         ` Michael S. Tsirkin
2009-05-18 14:46                                           ` Avi Kivity
2009-05-18 15:01                                             ` Michael S. Tsirkin
2009-05-18 15:08                                               ` Avi Kivity
2009-05-13 14:32       ` Michael S. Tsirkin
2009-05-13 15:13       ` [PATCH v5] " Alex Williamson
2009-05-13 16:05         ` Michael S. Tsirkin
2009-05-13 17:13           ` Alex Williamson [this message]
2009-05-17 20:51           ` Avi Kivity
2009-05-13 17:28         ` [PATCH v6] " Alex Williamson
2009-05-13 18:46           ` Michael S. Tsirkin
2009-05-17 20:54           ` Avi Kivity
2009-05-18 22:32             ` Alex Williamson
2009-05-19  8:01               ` Avi Kivity
2009-05-19 20:48           ` [PATCH v7] " Alex Williamson
2009-05-20 11:55             ` Avi Kivity
2009-05-13  7:03     ` [PATCH v3] " Michael S. Tsirkin
2009-05-13 12:15       ` Alex Williamson
2009-05-13  7:04     ` Michael S. Tsirkin
2009-05-13 12:19       ` Alex Williamson
2009-05-13 14:25         ` Michael S. Tsirkin
2009-05-17 20:49         ` Avi Kivity
2009-05-11 12:00 ` [PATCH] " Yang, Sheng
2009-05-12 18:45   ` Alex Williamson
2009-05-12 19:06     ` Alex Williamson
2009-05-12 19:10       ` Michael S. Tsirkin
2009-05-12 19:23         ` Alex Williamson

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=1242234783.9456.167.camel@lappy \
    --to=alex.williamson@hp.com \
    --cc=avi@redhat.com \
    --cc=kvm@vger.kernel.org \
    --cc=mst@redhat.com \
    --cc=sheng.yang@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