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

Re: [PATCH v4 4/5] vpci: add SR-IOV support for PVH Dom0


  • To: Mykyta Poturai <Mykyta_Poturai@xxxxxxxx>, "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • From: Jason Andryuk <jason.andryuk@xxxxxxx>
  • Date: Mon, 19 Oct 2026 20:29:21 -0400
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=epam.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=arcselector10001; 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=3TDzjaB1CsC+v4d6fNQUgbjYY/jzjV5+vqvFpqFwdro=; b=MQW20aESQ9NJJahkivNer5pl5zaSUzt8qD1Aci0Kn2GF+MuIEoPTiuR6ce67xDgG+Ib8z7PEm+NJ/xHhfFWCwdUTy8RQei2sYllnjyUdgp8l7xqspKb1xC8P420xHlGd60wrF83XCq158gpVCRuW9afdanhY41C6NsXNk4wKdQ3dzxWomObQ5hX1euIR1PdK2Mg6dsEM5b+oZ9QBb3ohq7oCX7YHtm4JTY7cXy6NFeUGjUvaC7LFpckY9qw+2+m20Kr0R7VBJZ0+LvZXVdH6jHSSFq0TSd/IqT7EAWgo/EnZHRL3cLQe5dcuh+wt+ZWl2hNkq8RqauhceyZ1N33GPA==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=m3VYQTgi3cIgOI11bg6r3XA0ar4PW7U2kVxYOAxo7e9RMhF6s+98q9JnBOtjuNvcXmWJSjA3I3VNTOMqN7ze4A7AaARxwDXg6vC/IvcJ4uF97FHRSK3IT7ffQkZiXIzwoPRY6wQMQ9d1Rp2FGKmTV+SL7GJ560f2abAmppbPBfNH8ArxzjbqC1MezDP3KlvKfaRT+4Gazu47Z7ldNw+Vtsy9hqQqxUR0pozrCcT74GMizy33loHj9sq4+MKMOKI+NW00QckujEffqVBp3qik60JhguLHyeu3WZh+Z9+kCpSuw7w3mBGWZifgRZI2Dq+jTYyQMJduW1wyqvDUk9WyEA==
  • Authentication-results: eu.smtp.expurgate.cloud; dkim=pass header.s=selector1 header.d=amd.com header.i="@amd.com" header.h="From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck"
  • Cc: Stewart Hildebrand <stewart.hildebrand@xxxxxxx>, Oleksii Kurochko <oleksii.kurochko@xxxxxxxxx>, Community Manager <community.manager@xxxxxxxxxxxxxx>, Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, Anthony PERARD <anthony.perard@xxxxxxxxxx>, Michal Orzel <michal.orzel@xxxxxxx>, Jan Beulich <jbeulich@xxxxxxxx>, "Julien Grall" <julien@xxxxxxx>, Roger Pau Monné <roger@xxxxxxxxxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Roger Pau Monné <roger@xxxxxxxxxxxxxx>, "Daniel P. Smith" <dpsmith@xxxxxxxxxxxxxxxxxxxx>, Roger Pau Monné <roger.pau@xxxxxxxxxx>
  • Delivery-date: Tue, 20 Oct 2026 00:29:36 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 2026-10-19 17:47, Jason Andryuk wrote:
On 2026-10-15 10:08, Mykyta Poturai wrote:
From: Stewart Hildebrand <stewart.hildebrand@xxxxxxx>

+        struct vpci_bar *bar = &bars[i];
+
+        /*
+         * The upper half of a 64-bit BAR holds no address or size of its own;
+         * the handlers reach the lower half through its type alone.
+         */
+        if ( pf_bar->type == VPCI_BAR_MEM64_HI )
+        {
+            bar->type = VPCI_BAR_MEM64_HI;
+            continue;
+        }
+
+        if ( pf_bar->type != VPCI_BAR_MEM32 &&
+             pf_bar->type != VPCI_BAR_MEM64_LO )
+            continue;
+
+        bar->addr         = pf_bar->addr + vf_idx * pf_bar->size;
AIUI, the PF has the SR-IOV BARs, which are sized like normal.  But I thought the pf_bar->size needs to be reduced by some factor to get the per-VF size.  I can't find where that is done.  Or am I wrong about this?
Ok, I looked around and I think I was wrong. The SR-IOV bar returns the single VF size, and it is up to the OS to multiply by the number of VFs.

Thanks,
Jason



 


Rackspace

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