Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NVIDIA: SAUCE: iommu/arm-smmu-v3: Allow default substream bypass with… #22

Open
wants to merge 128 commits into
base: 24.04_linux-nvidia
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
128 commits
Select commit Hold shift + click to select a range
69d39e8
UBUNTU: [Packaging] Initialize linux-nvidia-6.5
ianmay81 Oct 3, 2023
78ac78d
Revert "UBUNTU: SAUCE: modpost: support arbitrary symbol length in mo…
ianmay81 Oct 4, 2023
802d3ad
UBUNTU: [Packaging] update variants
ianmay81 Oct 4, 2023
9a49ff5
UBUNTU: [Packaging] update Ubuntu.md
ianmay81 Oct 4, 2023
87c8330
UBUNTU: Start new release
ianmay81 Oct 4, 2023
0c3296a
UBUNTU: [Config] nvidia-6.5: update annotations
ianmay81 Oct 4, 2023
de69b2f
UBUNTU: Ubuntu-nvidia-6.5-6.5.0-1001.1
ianmay81 Oct 4, 2023
f3962f5
UBUNTU: [Packaging] nvidia-6.5: disable rust support
ianmay81 Oct 12, 2023
c17dbb4
UBUNTU: Start new release
ianmay81 Oct 12, 2023
e5a2ec8
UBUNTU: link-to-tracker: update tracking bug
ianmay81 Oct 12, 2023
a83f820
UBUNTU: [Config] nvidia-6.5: update annotations
ianmay81 Oct 12, 2023
7f24860
UBUNTU: Ubuntu-nvidia-6.5-6.5.0-1004.4
ianmay81 Oct 12, 2023
3fb1672
UBUNTU: Start new release
piso77 Dec 11, 2023
fbfdb32
UBUNTU: rename debian.nvidia-6.6 to debian.nvidia
piso77 Dec 11, 2023
81e73c4
UBUNTU: link-to-tracker: update tracking bug
piso77 Dec 11, 2023
bbcf2e5
UBUNTU: [Packaging] update variants
piso77 Dec 11, 2023
2dfc72a
UBUNTU: [Packaging] update update.conf
piso77 Dec 11, 2023
42f3b0e
UBUNTU: [Packaging] move to gcc-13 by default
Jul 17, 2023
851467d
UBUNTU: rebase on Ubuntu-6.6.0-14.14
piso77 Dec 11, 2023
fbef962
UBUNTU: [Config] updateconfigs following Ubuntu-6.6.0-14.14 rebase
piso77 Dec 11, 2023
0a27f8a
UBUNTU: Ubuntu-nvidia-6.6.0-1001.1
piso77 Dec 11, 2023
af5578e
UBUNTU: [Packaging] move to linux 6.8
Feb 27, 2024
bff4ff0
UBUNTU: update dropped.txt
Feb 27, 2024
dd5cc75
UBUNTU: Start new release
Feb 27, 2024
f1a3860
UBUNTU: link-to-tracker: update tracking bug
Feb 27, 2024
6ac0199
UBUNTU: debian.nvidia/dkms-versions -- update from kernel-versions (m…
Feb 27, 2024
53d22d4
UBUNTU: [Packaging] add Rust build dependencies
Feb 27, 2024
7780b2b
UBUNTU: [Config] update annotations after rebase to v6.8
Feb 27, 2024
465621f
UBUNTU: [Packaging] clean ABI check files
Feb 27, 2024
7f12731
UBUNTU: Ubuntu-nvidia-6.8.0-1001.1
Feb 27, 2024
b216b9c
UBUNTU: Start new release
ianmay81 Mar 18, 2024
be78888
UBUNTU: link-to-tracker: update tracking bug
ianmay81 Mar 18, 2024
68b9df0
UBUNTU: [Config] nvidia: update annotations
ianmay81 Mar 18, 2024
ef1afb4
UBUNTU: Ubuntu-nvidia-6.8.0-1002.2
ianmay81 Mar 18, 2024
243037d
UBUNTU: [Packaging] dkms-versions standalone provides support
nvidia-bfigg Jan 5, 2024
bb2fa1a
UBUNTU: [Packaging] add versioning to dkms standalone rprovides
ianmay81 Mar 21, 2024
2ada708
NVIDIA: [Config]: Grouping AAEON config options together, under a com…
nvidia-bfigg Apr 4, 2024
a44151a
NVIDIA: [Config]: Disable the NOUVEAU driver which is not used with -…
nvidia-bfigg Apr 4, 2024
2d4fd6c
NVIDIA: [Config]: Adding CORESIGHT and ARM64_ERRATUM configs to annot…
nvidia-bfigg Apr 5, 2024
36b3e02
UBUNTU: [Config] update nvidia specific annotations with notes
ianmay81 Apr 10, 2024
dd99c78
UBUNTU: [Config] update annotations with updateconfigs
ianmay81 Apr 10, 2024
a119bd4
UBUNTU: [Packaging] remove tools host package
ianmay81 Apr 10, 2024
1bc2d8c
NVIDIA: SAUCE: Patch NFS driver to support GDS with 6.8 Kernel
sourabgupta3 Oct 30, 2023
c79e578
NVIDIA: SAUCE: NVMe/MVMEeOF: Patch NVMe/NVMeOF driver to support GDS …
sourabgupta3 Oct 30, 2023
b5d45c0
NVIDIA: [Config] Add nvidia-fs build dependencies
nvidia-bfigg Mar 29, 2024
c6738f6
UBUNTU: [Packaging] drop getabis data
ianmay81 Apr 15, 2024
88fff1f
UBUNTU: [Packaging] Replace fs/cifs with fs/smb in inclusion list
ianmay81 Apr 15, 2024
a2b373c
UBUNTU: [Packaging] remove bindgen-0.56
ianmay81 Apr 15, 2024
e1af8b8
UBUNTU: Start new release
ianmay81 Apr 15, 2024
b137281
UBUNTU: [Packaging] debian.nvidia/dkms-versions -- update from kernel…
ianmay81 Apr 10, 2024
6c89f3e
UBUNTU: link-to-tracker: update tracking bug
ianmay81 Apr 22, 2024
eafda88
UBUNTU: Ubuntu-nvidia-6.8.0-1006.6
ianmay81 Apr 22, 2024
660f55a
arm64/mm: make set_ptes() robust when OAs cross 48-bit boundary
Jan 29, 2024
ef0b761
arm/pgtable: define PFN_PTE_SHIFT
davidhildenbrand Jan 29, 2024
162bf94
nios2/pgtable: define PFN_PTE_SHIFT
davidhildenbrand Jan 29, 2024
1cf8ad1
powerpc/pgtable: define PFN_PTE_SHIFT
davidhildenbrand Jan 29, 2024
f9f7bc0
riscv/pgtable: define PFN_PTE_SHIFT
davidhildenbrand Jan 29, 2024
b459537
s390/pgtable: define PFN_PTE_SHIFT
davidhildenbrand Jan 29, 2024
2c9f350
sparc/pgtable: define PFN_PTE_SHIFT
davidhildenbrand Jan 29, 2024
e44c441
mm/pgtable: make pte_next_pfn() independent of set_ptes()
davidhildenbrand Jan 29, 2024
9f27794
arm/mm: use pte_next_pfn() in set_ptes()
davidhildenbrand Jan 29, 2024
5a23a5c
powerpc/mm: use pte_next_pfn() in set_ptes()
davidhildenbrand Jan 29, 2024
987d459
mm/memory: factor out copying the actual PTE in copy_present_pte()
davidhildenbrand Jan 29, 2024
f0d2a33
mm/memory: pass PTE to copy_present_pte()
davidhildenbrand Jan 29, 2024
779b7ba
mm/memory: optimize fork() with PTE-mapped THP
davidhildenbrand Jan 29, 2024
684e3d3
mm/memory: ignore dirty/accessed/soft-dirty bits in folio_pte_batch()
davidhildenbrand Jan 29, 2024
4d4ff07
mm/memory: ignore writable bit in folio_pte_batch()
davidhildenbrand Jan 29, 2024
f668257
mm: clarify the spec for set_ptes()
Feb 15, 2024
ad151db
mm: thp: batch-collapse PMD with set_ptes()
Feb 15, 2024
85ec891
mm: introduce pte_advance_pfn() and use for pte_next_pfn()
Feb 15, 2024
fe03b44
arm64/mm: convert pte_next_pfn() to pte_advance_pfn()
Feb 15, 2024
75ac746
x86/mm: convert pte_next_pfn() to pte_advance_pfn()
Feb 15, 2024
1e974e3
mm: tidy up pte_next_pfn() definition
Feb 15, 2024
38b064a
arm64/mm: convert READ_ONCE(*ptep) to ptep_get(ptep)
Feb 15, 2024
3884fb3
arm64/mm: convert set_pte_at() to set_ptes(..., 1)
Feb 15, 2024
0109b80
arm64/mm: convert ptep_clear() to ptep_get_and_clear()
Feb 15, 2024
97ab3a7
arm64/mm: new ptep layer to manage contig bit
Feb 15, 2024
0517eaa
arm64/mm: dplit __flush_tlb_range() to elide trailing DSB
Feb 15, 2024
b0e37cb
NVIDIA: [Config] arm64: ARM64_CONTPTE=y
dannf Mar 27, 2024
9f074df
arm64/mm: wire up PTE_CONT for user mappings
Feb 15, 2024
cd15b76
arm64/mm: implement new wrprotect_ptes() batch API
Feb 15, 2024
7290042
arm64/mm: implement new [get_and_]clear_full_ptes() batch APIs
Feb 15, 2024
7c904f5
mm: add pte_batch_hint() to reduce scanning in folio_pte_batch()
Feb 15, 2024
c2cef21
arm64/mm: implement pte_batch_hint()
Feb 15, 2024
6204d2f
arm64/mm: __always_inline to improve fork() perf
Feb 15, 2024
2d58dc2
arm64/mm: automatically fold contpte mappings
Feb 15, 2024
9d05181
arm64/mm: export contpte symbols only to GPL users
Feb 26, 2024
745084d
arm64/mm: improve comment in contpte_ptep_get_lockless()
Feb 26, 2024
82e6351
NVIDIA: [Packaging] update nvidia-fs driver to latest version
nvidia-bfigg May 23, 2024
979a57b
UBUNTU: [Packaging] blacklist coresight_etm4x
ianmay81 Apr 25, 2024
6b824f4
tpm_tis_spi: Account for SPI header when allocating TPM SPI xfer buffer
nvmochs May 22, 2024
7c94832
UBUNTU: [Packaging] update Ubuntu.md
jacobmartin0 May 30, 2024
bae4b1e
UBUNTU: Start new release
jacobmartin0 May 30, 2024
38ba61d
UBUNTU: [Packaging] enable perf python module
Mar 14, 2024
6a9f956
UBUNTU: [Packaging] add Real-time Linux Analysis tool (rtla) to linux…
Mar 26, 2024
927a471
UBUNTU: [Packaging] update dependencies for rtla
Apr 9, 2024
76f8658
UBUNTU: link-to-tracker: update tracking bug
jacobmartin0 May 30, 2024
947add3
UBUNTU: [Packaging] debian.nvidia/dkms-versions -- update from kernel…
jacobmartin0 May 30, 2024
333f92d
UBUNTU: Ubuntu-nvidia-6.8.0-1007.7
jacobmartin0 May 30, 2024
8766036
UBUNTU: Start new release
jacobmartin0 Jun 13, 2024
45c1031
UBUNTU: link-to-tracker: update tracking bug
jacobmartin0 Jun 13, 2024
fa4e41f
UBUNTU: Ubuntu-nvidia-6.8.0-1008.8
jacobmartin0 Jun 13, 2024
a169adb
NVIDIA: SAUCE: NFS: Export nvfs register and unregister functions as GPL
sourabgupta3 Jun 6, 2024
260121e
NVIDIA: SAUCE: NVMe/NVMeoF: Export nvfs register and unregister funct…
sourabgupta3 Jun 6, 2024
19d3544
mlxbf_gige: add support to display pause frame counters
dthompso Mar 5, 2024
5067378
UBUNTU: Start new release
jacobmartin0 Jun 21, 2024
6dad0fc
UBUNTU: link-to-tracker: update tracking bug
jacobmartin0 Jun 21, 2024
9fba99f
UBUNTU: Ubuntu-nvidia-6.8.0-1009.9
jacobmartin0 Jun 21, 2024
19b4bbe
UBUNTU: Start new release
jacobmartin0 Jul 15, 2024
587e300
UBUNTU: link-to-tracker: update tracking bug
jacobmartin0 Jul 15, 2024
3d8fe49
UBUNTU: Ubuntu-nvidia-6.8.0-1010.10
jacobmartin0 Jul 15, 2024
65924b5
platform/mellanox: mlxbf-pmc: Replace uintN_t with kernel-style types
shravankumarr Feb 13, 2024
0c251e7
platform/mellanox: mlxbf-pmc: Cleanup signed/unsigned mix-up
shravankumarr Feb 13, 2024
925f0b0
platform/mellanox: mlxbf-pmc: mlxbf_pmc_event_list(): make size ptr o…
Feb 22, 2024
76577eb
platform/mellanox: mlxbf-pmc: Ignore unsupported performance blocks
Feb 22, 2024
f21934a
platform/mellanox: mlxbf-pmc: fix signedness bugs
Feb 29, 2024
28cfb7c
PCI: Clear Secondary Status errors after enumeration
Jan 16, 2024
8875b76
x86: Stop using weak symbols for __iowrite32_copy()
jgunthorpe Apr 11, 2024
e0d3d66
s390: Implement __iowrite32_copy()
jgunthorpe Apr 11, 2024
be4597f
s390: Stop using weak symbols for __iowrite64_copy()
jgunthorpe Apr 11, 2024
1f453b8
arm64/io: Provide a WC friendly __iowriteXX_copy()
jgunthorpe Apr 11, 2024
3462635
net: hns3: Remove io_stop_wc() calls after __iowrite64_copy()
jgunthorpe Apr 11, 2024
dc3aa13
UBUNTU: Start new release
jacobmartin0 Jul 17, 2024
e93cd9a
UBUNTU: link-to-tracker: update tracking bug
jacobmartin0 Jul 17, 2024
47898a1
UBUNTU: Ubuntu-nvidia-6.8.0-1011.11
jacobmartin0 Jul 17, 2024
518b65f
PCI: Extend ACS configurability
Jun 25, 2024
ba4d0ab
mm: fix old/young bit handling in the faulting path
Jul 10, 2024
0a8cd9e
NVIDIA: SAUCE: iommu/arm-smmu-v3: Allow default substream bypass with…
nicolinc Aug 5, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 32 additions & 0 deletions Documentation/admin-guide/kernel-parameters.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4572,6 +4572,38 @@
bridges without forcing it upstream. Note:
this removes isolation between devices and
may put more devices in an IOMMU group.
config_acs=
Format:
<ACS flags>@<pci_dev>[; ...]
Specify one or more PCI devices (in the format
specified above) optionally prepended with flags
and separated by semicolons. The respective
capabilities will be enabled, disabled or
unchanged based on what is specified in
flags.

ACS Flags is defined as follows:
bit-0 : ACS Source Validation
bit-1 : ACS Translation Blocking
bit-2 : ACS P2P Request Redirect
bit-3 : ACS P2P Completion Redirect
bit-4 : ACS Upstream Forwarding
bit-5 : ACS P2P Egress Control
bit-6 : ACS Direct Translated P2P
Each bit can be marked as:
'0' – force disabled
'1' – force enabled
'x' – unchanged
For example,
pci=config_acs=10x
would configure all devices that support
ACS to enable P2P Request Redirect, disable
Translation Blocking, and leave Source
Validation unchanged from whatever power-up
or firmware set it to.

Note: this may remove isolation between devices
and may put more devices in an IOMMU group.
force_floating [S390] Force usage of floating interrupts.
nomio [S390] Do not use MIO instructions.
norid [S390] ignore the RID field and force use of
Expand Down
10 changes: 5 additions & 5 deletions Ubuntu.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
Name: linux
Version: 6.1.0
Series: 23.04 (lunar)
Name: linux-nvidia
Version: 6.8.0
Series: 24.04 (noble)
Description:
This is the source code for the Ubuntu linux kernel for the 23.04 series. This
source tree is used to produce the flavours: generic, generic-64k, generic-lpae.
This is the source code for the Ubuntu linux kernel for the 24.04 series. This
source tree is used to produce the flavours: nvidia, nvidia-64k.
This kernel is configured to support the widest range of desktop, laptop and
server configurations.
2 changes: 2 additions & 0 deletions arch/arm/include/asm/pgtable.h
Original file line number Diff line number Diff line change
Expand Up @@ -209,6 +209,8 @@ static inline void __sync_icache_dcache(pte_t pteval)
extern void __sync_icache_dcache(pte_t pteval);
#endif

#define PFN_PTE_SHIFT PAGE_SHIFT

void set_ptes(struct mm_struct *mm, unsigned long addr,
pte_t *ptep, pte_t pteval, unsigned int nr);
#define set_ptes set_ptes
Expand Down
2 changes: 1 addition & 1 deletion arch/arm/mm/mmu.c
Original file line number Diff line number Diff line change
Expand Up @@ -1814,6 +1814,6 @@ void set_ptes(struct mm_struct *mm, unsigned long addr,
if (--nr == 0)
break;
ptep++;
pte_val(pteval) += PAGE_SIZE;
pteval = pte_next_pfn(pteval);
}
}
9 changes: 9 additions & 0 deletions arch/arm64/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -2229,6 +2229,15 @@ config UNWIND_PATCH_PAC_INTO_SCS
select UNWIND_TABLES
select DYNAMIC_SCS

config ARM64_CONTPTE
bool "Contiguous PTE mappings for user memory" if EXPERT
depends on TRANSPARENT_HUGEPAGE
default y
help
When enabled, user mappings are configured using the PTE contiguous
bit, for any mappings that meet the size and alignment requirements.
This reduces TLB pressure and improves performance.

endmenu # "Kernel Features"

menu "Boot options"
Expand Down
132 changes: 132 additions & 0 deletions arch/arm64/include/asm/io.h
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,138 @@ extern void __memset_io(volatile void __iomem *, int, size_t);
#define memcpy_fromio(a,c,l) __memcpy_fromio((a),(c),(l))
#define memcpy_toio(c,a,l) __memcpy_toio((c),(a),(l))

/*
* The ARM64 iowrite implementation is intended to support drivers that want to
* use write combining. For instance PCI drivers using write combining with a 64
* byte __iowrite64_copy() expect to get a 64 byte MemWr TLP on the PCIe bus.
*
* Newer ARM core have sensitive write combining buffers, it is important that
* the stores be contiguous blocks of store instructions. Normal memcpy
* approaches have a very low chance to generate write combining.
*
* Since this is the only API on ARM64 that should be used with write combining
* it also integrates the DGH hint which is supposed to lower the latency to
* emit the large TLP from the CPU.
*/

static inline void __const_memcpy_toio_aligned32(volatile u32 __iomem *to,
const u32 *from, size_t count)
{
switch (count) {
case 8:
asm volatile("str %w0, [%8, #4 * 0]\n"
"str %w1, [%8, #4 * 1]\n"
"str %w2, [%8, #4 * 2]\n"
"str %w3, [%8, #4 * 3]\n"
"str %w4, [%8, #4 * 4]\n"
"str %w5, [%8, #4 * 5]\n"
"str %w6, [%8, #4 * 6]\n"
"str %w7, [%8, #4 * 7]\n"
:
: "rZ"(from[0]), "rZ"(from[1]), "rZ"(from[2]),
"rZ"(from[3]), "rZ"(from[4]), "rZ"(from[5]),
"rZ"(from[6]), "rZ"(from[7]), "r"(to));
break;
case 4:
asm volatile("str %w0, [%4, #4 * 0]\n"
"str %w1, [%4, #4 * 1]\n"
"str %w2, [%4, #4 * 2]\n"
"str %w3, [%4, #4 * 3]\n"
:
: "rZ"(from[0]), "rZ"(from[1]), "rZ"(from[2]),
"rZ"(from[3]), "r"(to));
break;
case 2:
asm volatile("str %w0, [%2, #4 * 0]\n"
"str %w1, [%2, #4 * 1]\n"
:
: "rZ"(from[0]), "rZ"(from[1]), "r"(to));
break;
case 1:
__raw_writel(*from, to);
break;
default:
BUILD_BUG();
}
}

void __iowrite32_copy_full(void __iomem *to, const void *from, size_t count);

static inline void __const_iowrite32_copy(void __iomem *to, const void *from,
size_t count)
{
if (count == 8 || count == 4 || count == 2 || count == 1) {
__const_memcpy_toio_aligned32(to, from, count);
dgh();
} else {
__iowrite32_copy_full(to, from, count);
}
}

#define __iowrite32_copy(to, from, count) \
(__builtin_constant_p(count) ? \
__const_iowrite32_copy(to, from, count) : \
__iowrite32_copy_full(to, from, count))

static inline void __const_memcpy_toio_aligned64(volatile u64 __iomem *to,
const u64 *from, size_t count)
{
switch (count) {
case 8:
asm volatile("str %x0, [%8, #8 * 0]\n"
"str %x1, [%8, #8 * 1]\n"
"str %x2, [%8, #8 * 2]\n"
"str %x3, [%8, #8 * 3]\n"
"str %x4, [%8, #8 * 4]\n"
"str %x5, [%8, #8 * 5]\n"
"str %x6, [%8, #8 * 6]\n"
"str %x7, [%8, #8 * 7]\n"
:
: "rZ"(from[0]), "rZ"(from[1]), "rZ"(from[2]),
"rZ"(from[3]), "rZ"(from[4]), "rZ"(from[5]),
"rZ"(from[6]), "rZ"(from[7]), "r"(to));
break;
case 4:
asm volatile("str %x0, [%4, #8 * 0]\n"
"str %x1, [%4, #8 * 1]\n"
"str %x2, [%4, #8 * 2]\n"
"str %x3, [%4, #8 * 3]\n"
:
: "rZ"(from[0]), "rZ"(from[1]), "rZ"(from[2]),
"rZ"(from[3]), "r"(to));
break;
case 2:
asm volatile("str %x0, [%2, #8 * 0]\n"
"str %x1, [%2, #8 * 1]\n"
:
: "rZ"(from[0]), "rZ"(from[1]), "r"(to));
break;
case 1:
__raw_writeq(*from, to);
break;
default:
BUILD_BUG();
}
}

void __iowrite64_copy_full(void __iomem *to, const void *from, size_t count);

static inline void __const_iowrite64_copy(void __iomem *to, const void *from,
size_t count)
{
if (count == 8 || count == 4 || count == 2 || count == 1) {
__const_memcpy_toio_aligned64(to, from, count);
dgh();
} else {
__iowrite64_copy_full(to, from, count);
}
}

#define __iowrite64_copy(to, from, count) \
(__builtin_constant_p(count) ? \
__const_iowrite64_copy(to, from, count) : \
__iowrite64_copy_full(to, from, count))

/*
* I/O memory mapping functions.
*/
Expand Down
Loading