1
0
mirror of https://aur.archlinux.org/linux-vfio.git synced 2024-12-26 04:24:09 +00:00

linux-vfio: update patches for 6.1.1.arch1

clean up .gitignore

Signed-off-by: éclairevoyant <848000+eclairevoyant@users.noreply.github.com>
This commit is contained in:
éclairevoyant 2023-01-01 16:34:15 -05:00
parent 84556f2447
commit 33a6d59a36
5 changed files with 48 additions and 126 deletions

View File

@ -1,7 +1,7 @@
pkgbase = linux-vfio
pkgdesc = Linux
pkgver = 6.1.1.arch1
pkgrel = 1
pkgrel = 2
url = https://github.com/archlinux/linux/commits/v6.1.1-arch1
arch = x86_64
license = GPL2
@ -22,16 +22,16 @@ pkgbase = linux-vfio
options = !strip
source = archlinux-linux::git+https://github.com/archlinux/linux?signed#tag=v6.1.1-arch1
source = config
source = add-acs-overrides.patch
source = i915-vga-arbiter.patch
source = 0001-add-acs-overrides.patch
source = 0002-i915-vga-arbiter.patch
validpgpkeys = ABAF11C65A2970B130ABE3C479BE3E4300411886
validpgpkeys = 647F28654894E3BD457199BE38DBBDC86092693E
validpgpkeys = A2FF3A36AAA56654109064AB19802F8B0D70FC30
validpgpkeys = C7E7849466FE2358343588377258734B41C31549
sha256sums = SKIP
sha256sums = 0571ea17a2e38458096b679418197bbea8c414388f628d122517f3a1f3a31b3a
sha256sums = b90be7b79652be61f7d50691000f6a8c75a240dc2eee2667b68d984f67583f77
sha256sums = 5092c62db5ca8f6b806996ba3db0f610d9ad73d499384394e16823dda097f9cd
sha256sums = b8f977aa923aa6076703b88262e395c56ce9df2943a52448d8a0e32cc90b1a70
sha256sums = 750c57539f17332cafe01a978a0133fc9500dbe37a411b823dad2eee66652cfc
pkgname = linux-vfio
pkgdesc = The Linux kernel and modules (ACS override and i915 VGA arbiter patches)

17
.gitignore vendored
View File

@ -1,11 +1,6 @@
pkg
src
linux.install.pkg
*.xz
*.zst
*.sign
*.src.tar.gz
*.log
*.part
*.sig
archlinux-linux/
*
!.gitignore
!.SRCINFO
!PKGBUILD
!config
!*.patch

View File

@ -1,58 +1,19 @@
From 578d958c59002358abdeeb294c25ac28027b9f7a Mon Sep 17 00:00:00 2001
From: Mark Weiman <mark.weiman@markzz.com>
Date: Wed, 27 Jan 2021 13:28:09 -0500
Subject: [PATCH] pci: Enable overrides for missing ACS capabilities (5.10.11+)
From c1ed6974bffaee49ae8a82838a4cf7cd8ebad36c Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C3=A9clairevoyant?=
<848000+eclairevoyant@users.noreply.github.com>
Date: Sun, 1 Jan 2023 16:21:00 -0500
Subject: [PATCH 1/2] add-acs-overrides
This an updated version of Alex Williamson's patch from:
https://lkml.org/lkml/2013/5/30/513
Original commit message follows:
---
PCIe ACS (Access Control Services) is the PCIe 2.0+ feature that
allows us to control whether transactions are allowed to be redirected
in various subnodes of a PCIe topology. For instance, if two
endpoints are below a root port or downsteam switch port, the
downstream port may optionally redirect transactions between the
devices, bypassing upstream devices. The same can happen internally
on multifunction devices. The transaction may never be visible to the
upstream devices.
One upstream device that we particularly care about is the IOMMU. If
a redirection occurs in the topology below the IOMMU, then the IOMMU
cannot provide isolation between devices. This is why the PCIe spec
encourages topologies to include ACS support. Without it, we have to
assume peer-to-peer DMA within a hierarchy can bypass IOMMU isolation.
Unfortunately, far too many topologies do not support ACS to make this
a steadfast requirement. Even the latest chipsets from Intel are only
sporadically supporting ACS. We have trouble getting interconnect
vendors to include the PCIe spec required PCIe capability, let alone
suggested features.
Therefore, we need to add some flexibility. The pcie_acs_override=
boot option lets users opt-in specific devices or sets of devices to
assume ACS support. The "downstream" option assumes full ACS support
on root ports and downstream switch ports. The "multifunction"
option assumes the subset of ACS features available on multifunction
endpoints and upstream switch ports are supported. The "id:nnnn:nnnn"
option enables ACS support on devices matching the provided vendor
and device IDs, allowing more strategic ACS overrides. These options
may be combined in any order. A maximum of 16 id specific overrides
are available. It's suggested to use the most limited set of options
necessary to avoid completely disabling ACS across the topology.
Note to hardware vendors, we have facilities to permanently quirk
specific devices which enforce isolation but not provide an ACS
capability. Please contact me to have your devicstarting
---
.../admin-guide/kernel-parameters.txt | 8 ++
drivers/pci/quirks.c | 102 ++++++++++++++++++
2 files changed, 110 insertions(+)
diff --git a/Documentation/admin-guide/kernel-parameters.txt b/Documentation/admin-guide/kernel-parameters.txt
index 26bfe7ae711b..7babcf646686 100644
index 42af9ca0127e..4f94a9f2cff0 100644
--- a/Documentation/admin-guide/kernel-parameters.txt
+++ b/Documentation/admin-guide/kernel-parameters.txt
@@ -3629,6 +3629,14 @@
@@ -4145,6 +4145,14 @@
nomsi [MSI] If the PCI_MSI kernel config parameter is
enabled, this kernel boot option can be used to
disable the use of MSI interrupts system-wide.
@ -68,10 +29,10 @@ index 26bfe7ae711b..7babcf646686 100644
Safety option to keep boot IRQs enabled. This
should never be necessary.
diff --git a/drivers/pci/quirks.c b/drivers/pci/quirks.c
index fb1dc11e7cc5..8748df0fe1e1 100644
index 285acc4aaccc..7ad267e87c34 100644
--- a/drivers/pci/quirks.c
+++ b/drivers/pci/quirks.c
@@ -192,6 +192,106 @@ static int __init pci_apply_final_quirks(void)
@@ -194,6 +194,106 @@ static int __init pci_apply_final_quirks(void)
}
fs_initcall_sync(pci_apply_final_quirks);
@ -178,8 +139,8 @@ index fb1dc11e7cc5..8748df0fe1e1 100644
/*
* Decoding should be disabled for a PCI device during BAR sizing to avoid
* conflict. But doing so may cause problems on host bridge and perhaps other
@@ -4769,6 +4869,8 @@ static const struct pci_dev_acs_enabled {
{ PCI_VENDOR_ID_ZHAOXIN, 0x9083, pci_quirk_mf_endpoint_acs },
@@ -4980,6 +5080,8 @@ static const struct pci_dev_acs_enabled {
{ PCI_VENDOR_ID_NXP, 0x8d9b, pci_quirk_nxp_rp_acs },
/* Zhaoxin Root/Downstream Ports */
{ PCI_VENDOR_ID_ZHAOXIN, PCI_ANY_ID, pci_quirk_zhaoxin_pcie_ports_acs },
+ /* allow acs for any */
@ -188,5 +149,5 @@ index fb1dc11e7cc5..8748df0fe1e1 100644
};
--
2.30.0
2.38.1

View File

@ -1,40 +1,9 @@
From 07af9476bf0b340df883f558a5c5c1ecad05b406 Mon Sep 17 00:00:00 2001
From: Mark King <mweiman@merit.edu>
Date: Thu, 29 Sep 2022 10:30:20 -0400
Subject: [PATCH] i915: Add module option to support VGA arbiter on HD devices
(5.19)
From c8894968896294c7ced91b86fb59ca2c1aa6e031 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C3=A9clairevoyant?=
<848000+eclairevoyant@users.noreply.github.com>
Date: Sun, 1 Jan 2023 16:21:24 -0500
Subject: [PATCH 2/2] i915-vga-arbiter
This is an updated version of Alex Williamson's patch from:
https://lkml.org/lkml/2014/5/9/517
I don't have i915 graphics, so this is completely untested.
Original commit message follows:
---
Commit 81b5c7bc found that the current VGA arbiter support in i915
only works for ancient GMCH-based IGD devices and attempted to update
support for newer HD devices. Unfortunately newer devices cannot
completely opt-out of VGA arbitration like the old devices could.
The VGA I/O space cannot be disabled internally. The only way to
route VGA I/O elsewhere is by disabling I/O at the device PCI command
register. This means that with commit 81b5c7bc and multiple VGA
adapters, the VGA arbiter will report that multiple VGA devices are
participating in arbitration, Xorg will notice this and disable DRI.
Therefore, 81b5c7bc was reverted because DRI is more important than
being correct.
There is however an actual need for i915 to correctly participate in
VGA arbitration; VGA device assignment. If we want to use VFIO to
assign a VGA device to a virtual machine, we need to be able to
access the VGA resources of that device. By adding an i915 module
option we can allow i915 to continue with its charade by default, but
also allow an easy path for users who require working VGA arbitration.
Hopefully Xorg can someday be taught to behave better with multiple
VGA devices.
This also rolls in reverted commit 6e1b4fda, which corrected an
ordering issue with 81b5c7bc by delaying the disabling of VGA memory
until after vgacon->fbcon handoff.
---
drivers/gpu/drm/i915/display/intel_display.c | 15 ++++++++--
drivers/gpu/drm/i915/display/intel_display.h | 1 +
@ -45,10 +14,10 @@ until after vgacon->fbcon handoff.
6 files changed, 52 insertions(+), 3 deletions(-)
diff --git a/drivers/gpu/drm/i915/display/intel_display.c b/drivers/gpu/drm/i915/display/intel_display.c
index 806d50b302ab..8b07e45c9693 100644
index de77054195c6..507ee4e0d1dc 100644
--- a/drivers/gpu/drm/i915/display/intel_display.c
+++ b/drivers/gpu/drm/i915/display/intel_display.c
@@ -9581,9 +9581,11 @@ int intel_modeset_init_noirq(struct drm_i915_private *i915)
@@ -8656,9 +8656,11 @@ int intel_modeset_init_noirq(struct drm_i915_private *i915)
intel_bios_init(i915);
@ -63,7 +32,7 @@ index 806d50b302ab..8b07e45c9693 100644
/* FIXME: completely on the wrong abstraction layer */
intel_power_domains_init_hw(i915, false);
@@ -9734,6 +9736,12 @@ int intel_modeset_init(struct drm_i915_private *i915)
@@ -8807,6 +8809,12 @@ int intel_modeset_init(struct drm_i915_private *i915)
if (ret)
return ret;
@ -76,19 +45,19 @@ index 806d50b302ab..8b07e45c9693 100644
/* Only enable hotplug handling once the fbdev is fully set up. */
intel_hpd_init(i915);
intel_hpd_poll_disable(i915);
@@ -10467,6 +10475,7 @@ void intel_modeset_driver_remove(struct drm_i915_private *i915)
@@ -8977,6 +8985,7 @@ void intel_modeset_driver_remove(struct drm_i915_private *i915)
if (!HAS_DISPLAY(i915))
return;
+ intel_vga_enable_mem(i915);
flush_workqueue(i915->flip_wq);
flush_workqueue(i915->modeset_wq);
flush_workqueue(i915->display.wq.flip);
flush_workqueue(i915->display.wq.modeset);
diff --git a/drivers/gpu/drm/i915/display/intel_display.h b/drivers/gpu/drm/i915/display/intel_display.h
index 187910d94ec6..82b17d7fee91 100644
index 884e8e67b17c..90f932db61f0 100644
--- a/drivers/gpu/drm/i915/display/intel_display.h
+++ b/drivers/gpu/drm/i915/display/intel_display.h
@@ -568,6 +568,7 @@ void i830_disable_pipe(struct drm_i915_private *dev_priv, enum pipe pipe);
@@ -576,6 +576,7 @@ void i830_disable_pipe(struct drm_i915_private *dev_priv, enum pipe pipe);
int vlv_get_hpll_vco(struct drm_i915_private *dev_priv);
int vlv_get_cck_clock(struct drm_i915_private *dev_priv,
const char *name, u32 reg, int ref_freq);
@ -159,10 +128,10 @@ index ba5b55b917f0..7e2af7924e99 100644
+
#endif /* __INTEL_VGA_H__ */
diff --git a/drivers/gpu/drm/i915/i915_params.c b/drivers/gpu/drm/i915/i915_params.c
index 701fbc98afa0..4c3701e18a4a 100644
index d1e4d528cb17..a00cbc6591b0 100644
--- a/drivers/gpu/drm/i915/i915_params.c
+++ b/drivers/gpu/drm/i915/i915_params.c
@@ -142,6 +142,9 @@ i915_param_named_unsafe(invert_brightness, int, 0400,
@@ -154,6 +154,9 @@ i915_param_named_unsafe(invert_brightness, int, 0400,
i915_param_named(disable_display, bool, 0400,
"Disable display (default: false)");
@ -173,17 +142,17 @@ index 701fbc98afa0..4c3701e18a4a 100644
"Perform a read/write test of all device memory on module load (default: off)");
diff --git a/drivers/gpu/drm/i915/i915_params.h b/drivers/gpu/drm/i915/i915_params.h
index b5e7ea45d191..82d0a75da970 100644
index 2733cb6cfe09..f21c5b1529cc 100644
--- a/drivers/gpu/drm/i915/i915_params.h
+++ b/drivers/gpu/drm/i915/i915_params.h
@@ -75,6 +75,7 @@ struct drm_printer;
param(unsigned int, request_timeout_ms, CONFIG_DRM_I915_REQUEST_TIMEOUT, CONFIG_DRM_I915_REQUEST_TIMEOUT ? 0600 : 0) \
@@ -76,6 +76,7 @@ struct drm_printer;
param(unsigned int, lmem_size, 0, 0400) \
param(unsigned int, lmem_bar_size, 0, 0400) \
/* leave bools at the end to not create holes */ \
+ param(bool, enable_hd_vgaarb, false, 0600) \
param(bool, enable_hangcheck, true, 0600) \
param(bool, load_detect_test, false, 0600) \
param(bool, force_reset_modeset_test, false, 0600) \
--
2.37.3
2.38.1

View File

@ -6,7 +6,7 @@
pkgbase=linux-vfio
pkgver=6.1.1.arch1
pkgrel=1
pkgrel=2
pkgdesc='Linux'
_srctag=v${pkgver%.*}-${pkgver##*.}
url="https://github.com/archlinux/linux/commits/$_srctag"
@ -21,9 +21,9 @@ options=('!strip')
_srcname=archlinux-linux
source=(
"$_srcname::git+https://github.com/archlinux/linux?signed#tag=$_srctag"
config # the main kernel config file
add-acs-overrides.patch
i915-vga-arbiter.patch
config # the main kernel config file
0001-add-acs-overrides.patch # updated from https://lkml.org/lkml/2013/5/30/513
0002-i915-vga-arbiter.patch # updated from https://lkml.org/lkml/2014/5/9/517
)
validpgpkeys=(
'ABAF11C65A2970B130ABE3C479BE3E4300411886' # Linus Torvalds
@ -33,8 +33,8 @@ validpgpkeys=(
)
sha256sums=('SKIP'
'0571ea17a2e38458096b679418197bbea8c414388f628d122517f3a1f3a31b3a'
'b90be7b79652be61f7d50691000f6a8c75a240dc2eee2667b68d984f67583f77'
'5092c62db5ca8f6b806996ba3db0f610d9ad73d499384394e16823dda097f9cd')
'b8f977aa923aa6076703b88262e395c56ce9df2943a52448d8a0e32cc90b1a70'
'750c57539f17332cafe01a978a0133fc9500dbe37a411b823dad2eee66652cfc')
export KBUILD_BUILD_HOST=archlinux
export KBUILD_BUILD_USER=$pkgbase
@ -207,6 +207,3 @@ for _p in "${pkgname[@]}"; do
_package${_p#$pkgbase}
}"
done
# vim:set ts=8 sts=2 sw=2 et: