lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Message-ID: <20251114131300.21a5c6da@canb.auug.org.au>
Date: Fri, 14 Nov 2025 13:13:00 +1100
From: Stephen Rothwell <sfr@...b.auug.org.au>
To: Bjorn Helgaas <bhelgaas@...gle.com>, Lorenzo Pieralisi
 <lpieralisi@...nel.org>, Krzysztof Wilczyński
 <kwilczynski@...nel.org>
Cc: Ilpo Järvinen <ilpo.jarvinen@...ux.intel.com>, Linux
 Kernel Mailing List <linux-kernel@...r.kernel.org>, Linux Next Mailing List
 <linux-next@...r.kernel.org>, Lucas De Marchi <lucas.demarchi@...el.com>
Subject: linux-next: manual merge of the pci tree with Linus' tree

Hi all,

Today's linux-next merge of the pci tree got a conflict in:

  drivers/gpu/drm/xe/xe_vram.c

between commit:

  d30203739be7 ("drm/xe: Move rebar to be done earlier")

from Linus' tree and commits:

  73cd7ee85e78 ("PCI: Fix restoring BARs on BAR resize rollback path")
  348df5b30822 ("drm/xe: Remove driver side BAR release before resize")
  af63e94f01d7 ("drm/xe/vram: Use PCI rebar helpers in resize_vram_bar()")

from the pci tree.

I fixed it up (but I am not happy with the result - see below) and can
carry the fix as necessary. This is now fixed as far as linux-next is
concerned, but any non trivial conflicts should be mentioned to your
upstream maintainer when your tree is submitted for merging.  You may
also want to consider cooperating with the maintainer of the conflicting
tree to minimise any particularly complex conflicts.

-- 
Cheers,
Stephen Rothwell

diff --cc drivers/gpu/drm/xe/xe_vram.c
index 652df7a5f4f6,10f8a73e190b..000000000000
--- a/drivers/gpu/drm/xe/xe_vram.c
+++ b/drivers/gpu/drm/xe/xe_vram.c
@@@ -24,39 -24,14 +24,37 @@@
  #include "xe_vram.h"
  #include "xe_vram_types.h"
  
- #define BAR_SIZE_SHIFT 20
- 
 -static void
 -_resize_bar(struct xe_device *xe, int resno, resource_size_t size)
 +/*
 + * Release all the BARs that could influence/block LMEMBAR resizing, i.e.
 + * assigned IORESOURCE_MEM_64 BARs
 + */
 +static void release_bars(struct pci_dev *pdev)
 +{
 +	struct resource *res;
 +	int i;
 +
 +	pci_dev_for_each_resource(pdev, res, i) {
 +		/* Resource already un-assigned, do not reset it */
 +		if (!res->parent)
 +			continue;
 +
 +		/* No need to release unrelated BARs */
 +		if (!(res->flags & IORESOURCE_MEM_64))
 +			continue;
 +
 +		pci_release_resource(pdev, i);
 +	}
 +}
 +
 +static void resize_bar(struct xe_device *xe, int resno, resource_size_t size)
  {
  	struct pci_dev *pdev = to_pci_dev(xe->drm.dev);
  	int bar_size = pci_rebar_bytes_to_size(size);
  	int ret;
  
 +	release_bars(pdev);
 +
- 	ret = pci_resize_resource(pdev, resno, bar_size);
+ 	ret = pci_resize_resource(pdev, resno, bar_size, 0);
  	if (ret) {
  		drm_info(&xe->drm, "Failed to resize BAR%d to %dM (%pe). Consider enabling 'Resizable BAR' support in your BIOS\n",
  			 resno, 1 << bar_size, ERR_PTR(ret));

Content of type "application/pgp-signature" skipped

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ