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

--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to