[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH v12 11/15] vpci: add initial support for virtual PCI bus topology



On Fri, Jan 12, 2024 at 1:50 PM Stewart Hildebrand
<stewart.hildebrand@xxxxxxx> wrote:
>
> On 1/12/24 06:46, George Dunlap wrote:
> > On Tue, Jan 9, 2024 at 9:54 PM Stewart Hildebrand
> > <stewart.hildebrand@xxxxxxx> wrote:
> >> diff --git a/xen/include/xen/sched.h b/xen/include/xen/sched.h
> >> index 37f5922f3206..b58a822847be 100644
> >> --- a/xen/include/xen/sched.h
> >> +++ b/xen/include/xen/sched.h
> >> @@ -484,6 +484,14 @@ struct domain
> >>       * 2. pdev->vpci->lock
> >>       */
> >>      rwlock_t pci_lock;
> >> +#ifdef CONFIG_HAS_VPCI_GUEST_SUPPORT
> >> +    /*
> >> +     * The bitmap which shows which device numbers are already used by the
> >> +     * virtual PCI bus topology and is used to assign a unique SBDF to the
> >> +     * next passed through virtual PCI device.
> >> +     */
> >> +    DECLARE_BITMAP(vpci_dev_assigned_map, VPCI_MAX_VIRT_DEV);
> >> +#endif
> >>  #endif
> >
> > Without digging through the whole series, how big do we expect this
> > bitmap to be on typical systems?
> >
> > If it's only going to be a handful of bytes, keeping it around for all
> > guests would be OK; but it's large, it would be better as a pointer,
> > since it's unused on the vast majority of guests.
>
> Since the bitmap is an unsigned long type it will typically be 8 bytes, 
> although only 4 bytes are actually used. VPCI_MAX_VIRT_DEV is currently fixed 
> at 32, as we are only tracking D (not the whole SBDF) in the bitmap so far.

OK, that's fine with me.  (FYI I replied because I thought you needed
my ack specifically for sched.h; looks like any of THE REST will do,
however.)

 -George



 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.