[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


  • To: George Dunlap <george.dunlap@xxxxxxxxx>
  • From: Stewart Hildebrand <stewart.hildebrand@xxxxxxx>
  • Date: Fri, 12 Jan 2024 08:50:39 -0500
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=cloud.com smtp.mailfrom=amd.com; dmarc=pass (p=quarantine sp=quarantine pct=100) action=none header.from=amd.com; dkim=none (message not signed); arc=none (0)
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=gN6DhG3pJAvtFPFPedn4aa2WTMysDp5MNUjyuuO+5fI=; b=Ds84SYhvBHRjT/78b5zXbW/irbzcrbM67S+z3Daq/qK7VjYRKEx/y56iBu4fcRJsWfSkZ8XYXMvMloS7ZT1hMOqR8tMhZ3U8xbUe4fvwbBGLzDzZudbAI7ofhpV/io80MTRNyJYEdcqRTNcJjdYIbnCF3uRlaL4yxBvAekw+wdy8fofHQNzQ30d+RYlLafASMGUnlloU4ayGCSDv563rl/U3suVR5DrfHzOv4fJBIQ7BWRtSw/CiwHp/GnaBo72+CuSd19SgTgle3C5jpTPLkp9BR7g5CZxtbKyy+x4Kt3HwiZwQx1jEhIQN1ac7HwemWPOZOrrIN98vPHFZsktjYg==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=HSlIpMIsKL5cpOr+lbMSwoY4hd5td8fIdvVAqHCGRLPXvsd+M/4lFsRaVMcyOTYq2VIwAN5LsvyPIbhdJSYtQ7mwUOMT+UHnI978GmwJsn8x9RLFhBPkoDST3PzkAzcDq+JLmfmjxcj3RFER5uyMX7OvusvIkCIhrVxZncbZx6PSs3MEJ2249twgCQ459fv05zKGF/JG6rOu8vSHiDJ8P5cfjMJzxwxCUvnQ38rvSqfZE90RsxaLtUkjgRYCs2Z4WevNyRrsBga/hyxCwZ344LNZatIOUmZ+YGM/alAY0eLrUylhORY+ywt7WAHrBJOo/wZCkwHbN25yxIkjJGNoPw==
  • Cc: <xen-devel@xxxxxxxxxxxxxxxxxxxx>, Oleksandr Andrushchenko <oleksandr_andrushchenko@xxxxxxxx>, Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, Jan Beulich <jbeulich@xxxxxxxx>, Julien Grall <julien@xxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Wei Liu <wl@xxxxxxx>, Roger Pau Monné <roger.pau@xxxxxxxxxx>, Volodymyr Babchuk <volodymyr_babchuk@xxxxxxxx>
  • Delivery-date: Fri, 12 Jan 2024 13:50:52 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

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.



 


Rackspace

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