Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/1.2/patches/2233099/?format=api
{ "id": 2233099, "url": "http://patchwork.ozlabs.org/api/1.2/patches/2233099/?format=api", "web_url": "http://patchwork.ozlabs.org/project/linux-pci/patch/20260505170010.3414074-2-marcin.bernatowicz@linux.intel.com/", "project": { "id": 28, "url": "http://patchwork.ozlabs.org/api/1.2/projects/28/?format=api", "name": "Linux PCI development", "link_name": "linux-pci", "list_id": "linux-pci.vger.kernel.org", "list_email": "linux-pci@vger.kernel.org", "web_url": null, "scm_url": null, "webscm_url": null, "list_archive_url": "", "list_archive_url_format": "", "commit_url_format": "" }, "msgid": "<20260505170010.3414074-2-marcin.bernatowicz@linux.intel.com>", "list_archive_url": null, "date": "2026-05-05T17:00:08", "name": "[1/3] PCI/IOV: Remember initial VF BAR sizes", "commit_ref": null, "pull_url": null, "state": "new", "archived": false, "hash": "4b823243f0f115ad4da2f6199873f2cbb603dfc3", "submitter": { "id": 93334, "url": "http://patchwork.ozlabs.org/api/1.2/people/93334/?format=api", "name": "Marcin Bernatowicz", "email": "marcin.bernatowicz@linux.intel.com" }, "delegate": null, "mbox": "http://patchwork.ozlabs.org/project/linux-pci/patch/20260505170010.3414074-2-marcin.bernatowicz@linux.intel.com/mbox/", "series": [ { "id": 502868, "url": "http://patchwork.ozlabs.org/api/1.2/series/502868/?format=api", "web_url": "http://patchwork.ozlabs.org/project/linux-pci/list/?series=502868", "date": "2026-05-05T17:00:08", "name": "PCI/IOV: Restore initial VF BAR sizing after VF ReBAR", "version": 1, "mbox": "http://patchwork.ozlabs.org/series/502868/mbox/" } ], "comments": "http://patchwork.ozlabs.org/api/patches/2233099/comments/", "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/2233099/checks/", "tags": {}, "related": [], "headers": { "Return-Path": "\n <linux-pci+bounces-53759-incoming=patchwork.ozlabs.org@vger.kernel.org>", "X-Original-To": [ "incoming@patchwork.ozlabs.org", "linux-pci@vger.kernel.org" ], "Delivered-To": "patchwork-incoming@legolas.ozlabs.org", "Authentication-Results": [ "legolas.ozlabs.org;\n\tdkim=pass (2048-bit key;\n unprotected) header.d=intel.com header.i=@intel.com header.a=rsa-sha256\n header.s=Intel header.b=aL6XfDf+;\n\tdkim-atps=neutral", "legolas.ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=vger.kernel.org\n (client-ip=2600:3c09:e001:a7::12fc:5321; helo=sto.lore.kernel.org;\n envelope-from=linux-pci+bounces-53759-incoming=patchwork.ozlabs.org@vger.kernel.org;\n receiver=patchwork.ozlabs.org)", "smtp.subspace.kernel.org;\n\tdkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com\n header.b=\"aL6XfDf+\"", "smtp.subspace.kernel.org;\n arc=none smtp.client-ip=198.175.65.18", "smtp.subspace.kernel.org;\n dmarc=pass (p=none dis=none) header.from=linux.intel.com", "smtp.subspace.kernel.org;\n spf=pass smtp.mailfrom=linux.intel.com" ], "Received": [ "from sto.lore.kernel.org (sto.lore.kernel.org\n [IPv6:2600:3c09:e001:a7::12fc:5321])\n\t(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n\t key-exchange x25519)\n\t(No client certificate requested)\n\tby legolas.ozlabs.org (Postfix) with ESMTPS id 4g94XG5HKDz1yK2\n\tfor <incoming@patchwork.ozlabs.org>; Wed, 06 May 2026 03:00:46 +1000 (AEST)", "from smtp.subspace.kernel.org (conduit.subspace.kernel.org\n [100.90.174.1])\n\tby sto.lore.kernel.org (Postfix) with ESMTP id 41718301E49F\n\tfor <incoming@patchwork.ozlabs.org>; Tue, 5 May 2026 17:00:39 +0000 (UTC)", "from localhost.localdomain (localhost.localdomain [127.0.0.1])\n\tby smtp.subspace.kernel.org (Postfix) with ESMTP id 8BA8C4949E0;\n\tTue, 5 May 2026 17:00:35 +0000 (UTC)", "from mgamail.intel.com (mgamail.intel.com [198.175.65.18])\n\t(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))\n\t(No client certificate requested)\n\tby smtp.subspace.kernel.org (Postfix) with ESMTPS id A6E764A2E08;\n\tTue, 5 May 2026 17:00:33 +0000 (UTC)", "from fmviesa001.fm.intel.com ([10.60.135.141])\n by orvoesa110.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384;\n 05 May 2026 10:00:33 -0700", "from soc-5cg43972f8.clients.intel.com (HELO localhost)\n ([172.28.182.189])\n by smtpauth.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384;\n 05 May 2026 10:00:30 -0700" ], "ARC-Seal": "i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;\n\tt=1778000435; cv=none;\n b=r+v0DGSmQWrorqvaNso7n4wgAwt4wi0qRo+CAd5cbOS3ln42VkK8G+ypZlDpKw/rxoKmlC+qljwyNHKci5bP9PO4UuYpJUZ2jZVF8toj67vKypL2K3+w3XY0hd5DiLrTXfrAN6FKgpVW6PFJjahzKJeO+sFFgkOr2KqVD2N/ceg=", "ARC-Message-Signature": "i=1; a=rsa-sha256; d=subspace.kernel.org;\n\ts=arc-20240116; t=1778000435; c=relaxed/simple;\n\tbh=PloGYEOPDQl1zTi9kp545zgPmv+ZW+lkNa+P1IMTbzM=;\n\th=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References:\n\t MIME-Version;\n b=ig/JBpJYVG2NVSy4TOfdKA2L6xfrLvQ/Z9qZiOMl6C4UZg13xEdLWR9jNh0QCdBqhAJUdBj5pa3MdmubvzL+FxaoMrjlJKddClZ+xir/A0ZQr5WLQJ/sPavZ2vqUcFDZXDlR09Tg5Zu2P5YH7uyqWuyCPec31yyglQSUUULMQgk=", "ARC-Authentication-Results": "i=1; smtp.subspace.kernel.org;\n dmarc=pass (p=none dis=none) header.from=linux.intel.com;\n spf=pass smtp.mailfrom=linux.intel.com;\n dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com\n header.b=aL6XfDf+; arc=none smtp.client-ip=198.175.65.18", "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/simple;\n d=intel.com; i=@intel.com; q=dns/txt; s=Intel;\n t=1778000434; x=1809536434;\n h=from:to:cc:subject:date:message-id:in-reply-to:\n references:mime-version:content-transfer-encoding;\n bh=PloGYEOPDQl1zTi9kp545zgPmv+ZW+lkNa+P1IMTbzM=;\n b=aL6XfDf+CQ/bSOh8jDYh1nCIlAC07EuwCCKpJIcZYJErGwapnOfBoiXm\n 37ysPYGr6+y6Z4jBfDX3vVXXjE10zTxDYxn2H0kuy+Iwm8qdbOP3kGB8A\n 2s4HH0Pg7L3A6OTNQ8I9N2GxcEaSaLC/6iowtkKfeMy/GAVgg8fYQQ4C2\n qCoBETbrlXZEIdqGQFslIvBz+kEBavTD566JUgAORuD8MahjoXtVsZhbs\n Ju94+R1c7TTMzN/cWJ5+6X95IwXZYbsMlUTybJ80ADSFDtTM2GFX9kHyA\n gu9phgzXK7qwtZluxq7priADQWAU22lArX/pQv0srVv+xYLRq0AkHmgzI\n g==;", "X-CSE-ConnectionGUID": [ "edJ58YBdRtOq9bq0E4CnDA==", "WFWcPKCjQhidUjPuJX89ag==" ], "X-CSE-MsgGUID": [ "cCqI7nzXRra525huotx59w==", "W2Y0jcunRO2J22Aqiw9x4w==" ], "X-IronPort-AV": [ "E=McAfee;i=\"6800,10657,11777\"; a=\"78902137\"", "E=Sophos;i=\"6.23,217,1770624000\";\n d=\"scan'208\";a=\"78902137\"", "E=Sophos;i=\"6.23,217,1770624000\";\n d=\"scan'208\";a=\"259539792\"" ], "X-ExtLoop1": "1", "From": "Marcin Bernatowicz <marcin.bernatowicz@linux.intel.com>", "To": "Bjorn Helgaas <bhelgaas@google.com>,\n\tlinux-pci@vger.kernel.org,\n\tlinux-kernel@vger.kernel.org", "Cc": "Michal Wajdeczko <michal.wajdeczko@intel.com>, =?utf-8?q?Micha=C5=82_Win?=\n\t=?utf-8?q?iarski?= <michal.winiarski@intel.com>, =?utf-8?q?Ilpo_J=C3=A4rvin?=\n\t=?utf-8?q?en?= <ilpo.jarvinen@linux.intel.com>, =?utf-8?q?Krzysztof_Wilczy?=\n\t=?utf-8?q?=C5=84ski?= <kwilczynski@kernel.org>, =?utf-8?q?Thomas_Hellstr?=\n\t=?utf-8?q?=C3=B6m?= <thomas.hellstrom@linux.intel.com>,\n Rodrigo Vivi <rodrigo.vivi@intel.com>, intel-xe@lists.freedesktop.org,\n Marcin Bernatowicz <marcin.bernatowicz@linux.intel.com>", "Subject": "[PATCH 1/3] PCI/IOV: Remember initial VF BAR sizes", "Date": "Tue, 5 May 2026 19:00:08 +0200", "Message-ID": "<20260505170010.3414074-2-marcin.bernatowicz@linux.intel.com>", "X-Mailer": "git-send-email 2.43.0", "In-Reply-To": "<20260505170010.3414074-1-marcin.bernatowicz@linux.intel.com>", "References": "<20260505170010.3414074-1-marcin.bernatowicz@linux.intel.com>", "Precedence": "bulk", "X-Mailing-List": "linux-pci@vger.kernel.org", "List-Id": "<linux-pci.vger.kernel.org>", "List-Subscribe": "<mailto:linux-pci+subscribe@vger.kernel.org>", "List-Unsubscribe": "<mailto:linux-pci+unsubscribe@vger.kernel.org>", "MIME-Version": "1.0", "Content-Transfer-Encoding": "8bit" }, "content": "SR-IOV initialization records the per-VF BAR sizes derived from the VF\nBAR registers in the SR-IOV capability.\n\nPF drivers may later change VF BAR sizes using VF Resizable BAR support\n(pci_iov_vf_bar_set_size()). Save the initial per-VF BAR sizes so later\ncode can restore them when SR-IOV is disabled, when SR-IOV enable fails,\nor when the PF driver is unbound while VF BARs are still resized.\n\nThe initial size is captured before the resource is multiplied by\nTotalVFs, so it represents one VF's BAR size as advertised by hardware.\n\nNo functional change on its own.\n\nSigned-off-by: Marcin Bernatowicz <marcin.bernatowicz@linux.intel.com>\n---\n drivers/pci/iov.c | 1 +\n drivers/pci/pci.h | 3 ++-\n 2 files changed, 3 insertions(+), 1 deletion(-)", "diff": "diff --git a/drivers/pci/iov.c b/drivers/pci/iov.c\nindex 30ca4535fc36..19f4dca4eec1 100644\n--- a/drivers/pci/iov.c\n+++ b/drivers/pci/iov.c\n@@ -869,6 +869,7 @@ static int sriov_init(struct pci_dev *dev, int pos)\n \t\t\tgoto failed;\n \t\t}\n \t\tiov->barsz[i] = resource_size(res);\n+\t\tiov->barsz_orig[i] = iov->barsz[i];\n \t\tresource_set_size(res, resource_size(res) * total);\n \t\tpci_info(dev, \"%s %pR: contains BAR %d for %d VFs\\n\",\n \t\t\t res_name, res, i, total);\ndiff --git a/drivers/pci/pci.h b/drivers/pci/pci.h\nindex 19660d068fb7..441ef5b4ddc2 100644\n--- a/drivers/pci/pci.h\n+++ b/drivers/pci/pci.h\n@@ -670,7 +670,8 @@ struct pci_sriov {\n \tu8\t\thdr_type;\t/* VF header type */\n \tu16\t\tsubsystem_vendor; /* VF subsystem vendor */\n \tu16\t\tsubsystem_device; /* VF subsystem device */\n-\tresource_size_t\tbarsz[PCI_SRIOV_NUM_BARS];\t/* VF BAR size */\n+\tresource_size_t\tbarsz[PCI_SRIOV_NUM_BARS];\t/* Current VF BAR size */\n+\tresource_size_t\tbarsz_orig[PCI_SRIOV_NUM_BARS]; /* Initial VF BAR size at probe */\n \tu16\t\tvf_rebar_cap;\t/* VF Resizable BAR capability offset */\n \tbool\t\tdrivers_autoprobe; /* Auto probing of VFs by driver */\n };\n", "prefixes": [ "1/3" ] }