diff --git a/Makefile b/Makefile index c7177fd4..14b8d99d 100644 --- a/Makefile +++ b/Makefile @@ -1,4 +1,4 @@ -KERNEL_VERSION = linux-6.12.76 +KERNEL_VERSION = linux-6.12.87 KERNEL_REMOTE = https://cdn.kernel.org/pub/linux/kernel/v6.x/$(KERNEL_VERSION).tar.xz KERNEL_TARBALL = tarballs/$(KERNEL_VERSION).tar.xz KERNEL_SOURCES = $(KERNEL_VERSION) @@ -6,8 +6,8 @@ KERNEL_PATCHES = $(shell find patches/ -name "0*.patch" | sort) KERNEL_C_BUNDLE = kernel.c ABI_VERSION = 5 -FULL_VERSION = 5.3.0 -TIMESTAMP = "Tue Mar 10 13:28:56 CET 2026" +FULL_VERSION = 5.4.0 +TIMESTAMP = "Fri May 8 14:25:15 CEST 2026" KERNEL_FLAGS = KBUILD_BUILD_TIMESTAMP=$(TIMESTAMP) KERNEL_FLAGS += KBUILD_BUILD_USER=root diff --git a/patches-tee/0001-virtio-enable-DMA-API-if-memory-is-restricted.patch b/patches-tee/0001-virtio-enable-DMA-API-if-memory-is-restricted.patch index 121e125a..06211159 100644 --- a/patches-tee/0001-virtio-enable-DMA-API-if-memory-is-restricted.patch +++ b/patches-tee/0001-virtio-enable-DMA-API-if-memory-is-restricted.patch @@ -1,4 +1,4 @@ -From 657f3ea1bfeb76ddc6bc4af9eb23dc77a1ff8a1a Mon Sep 17 00:00:00 2001 +From ff5dbd901b0688a006fafcba07449d4a116b7317 Mon Sep 17 00:00:00 2001 From: Sergio Lopez Date: Fri, 10 Sep 2021 13:05:01 +0200 Subject: [PATCH 1/4] virtio: enable DMA API if memory is restricted @@ -54,5 +54,5 @@ index c0276979675d..1d5b988e4452 100644 /* * In theory, it's possible to have a buggy QEMU-supposed -- -2.52.0 +2.54.0 diff --git a/patches-tee/0002-x86-sev-write-AP-reset-vector.patch b/patches-tee/0002-x86-sev-write-AP-reset-vector.patch index 8cb7c52a..bcb5d27f 100644 --- a/patches-tee/0002-x86-sev-write-AP-reset-vector.patch +++ b/patches-tee/0002-x86-sev-write-AP-reset-vector.patch @@ -1,4 +1,4 @@ -From 85875d63186b73e8b524204ee10385f979f49d48 Mon Sep 17 00:00:00 2001 +From dd2119161ec3510a5ca2946dcadd5043f19ff4ed Mon Sep 17 00:00:00 2001 From: Sergio Lopez Date: Thu, 20 Oct 2022 10:23:16 +0200 Subject: [PATCH 2/4] x86/sev: write AP reset vector @@ -12,10 +12,10 @@ Signed-off-by: Sergio Lopez 1 file changed, 24 insertions(+), 1 deletion(-) diff --git a/arch/x86/coco/sev/core.c b/arch/x86/coco/sev/core.c -index de1df0cb45da..7ed486a790fb 100644 +index 2be730765f83..aff0f627c3bd 100644 --- a/arch/x86/coco/sev/core.c +++ b/arch/x86/coco/sev/core.c -@@ -1266,6 +1266,29 @@ void __init snp_set_wakeup_secondary_cpu(void) +@@ -1273,6 +1273,29 @@ void __init snp_set_wakeup_secondary_cpu(void) apic_update_callback(wakeup_secondary_cpu, wakeup_cpu_via_vmgexit); } @@ -45,7 +45,7 @@ index de1df0cb45da..7ed486a790fb 100644 int __init sev_es_setup_ap_jump_table(struct real_mode_header *rmh) { u16 startup_cs, startup_ip; -@@ -1277,7 +1300,7 @@ int __init sev_es_setup_ap_jump_table(struct real_mode_header *rmh) +@@ -1284,7 +1307,7 @@ int __init sev_es_setup_ap_jump_table(struct real_mode_header *rmh) /* On UP guests there is no jump table so this is not a failure */ if (!jump_table_addr) @@ -55,5 +55,5 @@ index de1df0cb45da..7ed486a790fb 100644 /* Check if AP Jump Table is page-aligned */ if (jump_table_addr & ~PAGE_MASK) -- -2.52.0 +2.54.0 diff --git a/patches-tee/0003-Implement-driver-to-retrieve-secrets-from-cmdline.patch b/patches-tee/0003-Implement-driver-to-retrieve-secrets-from-cmdline.patch index b2a77ebb..707ce06e 100644 --- a/patches-tee/0003-Implement-driver-to-retrieve-secrets-from-cmdline.patch +++ b/patches-tee/0003-Implement-driver-to-retrieve-secrets-from-cmdline.patch @@ -1,4 +1,4 @@ -From 702d45def09ba1783735f654a6686c1aa1f601e9 Mon Sep 17 00:00:00 2001 +From 45bce0f81b5111fac6e6979a8709e8bd87661ef4 Mon Sep 17 00:00:00 2001 From: Sergio Lopez Date: Wed, 3 Aug 2022 12:35:12 +0200 Subject: [PATCH 3/4] Implement driver to retrieve secrets from cmdline @@ -259,7 +259,7 @@ index ee1309473bc6..96c0f3c72395 100644 /* used by init/main.c */ diff --git a/init/main.c b/init/main.c -index 821df1f05e9c..04f8f5a6389d 100644 +index dca88ac54c43..0336c3b27043 100644 --- a/init/main.c +++ b/init/main.c @@ -149,6 +149,11 @@ static char *extra_command_line; @@ -290,5 +290,5 @@ index 821df1f05e9c..04f8f5a6389d 100644 /* -- -2.52.0 +2.54.0 diff --git a/patches-tee/0004-x86-sev-Avoid-using-native_cpuid.patch b/patches-tee/0004-x86-sev-Avoid-using-native_cpuid.patch index 8b24e9f3..bab05b0e 100644 --- a/patches-tee/0004-x86-sev-Avoid-using-native_cpuid.patch +++ b/patches-tee/0004-x86-sev-Avoid-using-native_cpuid.patch @@ -1,4 +1,4 @@ -From 3b114c42aaf912e8da93252c5562f7635a8b2199 Mon Sep 17 00:00:00 2001 +From 126c045600e62f2e1bda8568cee52de30b6d0aff Mon Sep 17 00:00:00 2001 From: Sergio Lopez Date: Wed, 5 Jun 2024 16:20:08 +0200 Subject: [PATCH 4/4] x86/sev: Avoid using native_cpuid @@ -61,5 +61,5 @@ index b922b9fea6b6..c0de732b0121 100644 /* Check the SEV MSR whether SEV or SME is enabled */ RIP_REL_REF(sev_status) = msr = __rdmsr(MSR_AMD64_SEV); -- -2.52.0 +2.54.0 diff --git a/patches/0001-krunfw-Don-t-panic-when-init-dies.patch b/patches/0001-krunfw-Don-t-panic-when-init-dies.patch index 74577eff..2b0c15b8 100644 --- a/patches/0001-krunfw-Don-t-panic-when-init-dies.patch +++ b/patches/0001-krunfw-Don-t-panic-when-init-dies.patch @@ -1,7 +1,7 @@ -From 817f5791591a123e06fa85993aa24f2e4367c506 Mon Sep 17 00:00:00 2001 +From db20a79e5810bc9fc77655acde5c8e13e7942ba9 Mon Sep 17 00:00:00 2001 From: Sergio Lopez Date: Thu, 2 Mar 2023 07:34:49 +0100 -Subject: [PATCH 01/26] krunfw: Don't panic when init dies +Subject: [PATCH 01/32] krunfw: Don't panic when init dies In libkrun, the isolated process runs as PID 1. When it exits, trigger an orderly reboot instead of panic'ing. @@ -59,5 +59,5 @@ index d6ee090eda94..f6947c5bd671 100644 machine_restart(cmd); } -- -2.52.0 +2.54.0 diff --git a/patches/0002-krunfw-Ignore-run_cmd-on-orderly-reboot.patch b/patches/0002-krunfw-Ignore-run_cmd-on-orderly-reboot.patch index 2b344ffa..c9be62a3 100644 --- a/patches/0002-krunfw-Ignore-run_cmd-on-orderly-reboot.patch +++ b/patches/0002-krunfw-Ignore-run_cmd-on-orderly-reboot.patch @@ -1,7 +1,7 @@ -From db750d64e3f36576b667b67e979ec800a1eec872 Mon Sep 17 00:00:00 2001 +From 2e7df3e03121c97e16bb72de31e8b5ba9908971a Mon Sep 17 00:00:00 2001 From: Sergio Lopez Date: Mon, 16 May 2022 16:04:27 +0200 -Subject: [PATCH 02/26] krunfw: Ignore run_cmd on orderly reboot +Subject: [PATCH 02/32] krunfw: Ignore run_cmd on orderly reboot We don't really support restarting the conventional way, so ignore "run_cmd" so we can fall back to an emergency sync and reboot. @@ -28,5 +28,5 @@ index f6947c5bd671..5925d8fcfbfa 100644 if (ret) { pr_warn("Failed to start orderly reboot: forcing the issue\n"); -- -2.52.0 +2.54.0 diff --git a/patches/0003-vsock-dgram-generalize-recvmsg-and-drop-transport-dg.patch b/patches/0003-vsock-dgram-generalize-recvmsg-and-drop-transport-dg.patch index 931411ae..e2ebe074 100644 --- a/patches/0003-vsock-dgram-generalize-recvmsg-and-drop-transport-dg.patch +++ b/patches/0003-vsock-dgram-generalize-recvmsg-and-drop-transport-dg.patch @@ -1,7 +1,7 @@ -From 56ef3652b6666b91c1c66fa94aedac70a934bfb2 Mon Sep 17 00:00:00 2001 +From 8ca8db16da5001752ca7d782a60d9af85e7899b7 Mon Sep 17 00:00:00 2001 From: Bobby Eshleman Date: Sat, 10 Jun 2023 00:58:28 +0000 -Subject: [PATCH 03/26] vsock/dgram: generalize recvmsg and drop +Subject: [PATCH 03/32] vsock/dgram: generalize recvmsg and drop transport->dgram_dequeue This commit drops the transport->dgram_dequeue callback and makes @@ -348,5 +348,5 @@ index 6e78927a598e..3d5e05d8950f 100644 .stream_dequeue = virtio_transport_stream_dequeue, .stream_enqueue = virtio_transport_stream_enqueue, -- -2.52.0 +2.54.0 diff --git a/patches/0004-vsock-refactor-transport-lookup-code.patch b/patches/0004-vsock-refactor-transport-lookup-code.patch index 6804bad0..b9a0afa7 100644 --- a/patches/0004-vsock-refactor-transport-lookup-code.patch +++ b/patches/0004-vsock-refactor-transport-lookup-code.patch @@ -1,7 +1,7 @@ -From 385e0bdc508313f07f59bbe26cf91ed6d97eaf39 Mon Sep 17 00:00:00 2001 +From 0530d4f1e7c9112d492330d74bab3426ef4f5cf6 Mon Sep 17 00:00:00 2001 From: Bobby Eshleman Date: Sat, 10 Jun 2023 00:58:29 +0000 -Subject: [PATCH 04/26] vsock: refactor transport lookup code +Subject: [PATCH 04/32] vsock: refactor transport lookup code Introduce new reusable function vsock_connectible_lookup_transport() that performs the transport lookup logic. @@ -57,5 +57,5 @@ index fccb4761b8af..4a8f62e7520d 100644 default: ret = -ESOCKTNOSUPPORT; -- -2.52.0 +2.54.0 diff --git a/patches/0005-vsock-support-multi-transport-datagrams.patch b/patches/0005-vsock-support-multi-transport-datagrams.patch index 071c5fdb..3c2773cf 100644 --- a/patches/0005-vsock-support-multi-transport-datagrams.patch +++ b/patches/0005-vsock-support-multi-transport-datagrams.patch @@ -1,7 +1,7 @@ -From 774a9ccd77a3adb0f736f3f2323bde3d0b06b210 Mon Sep 17 00:00:00 2001 +From 365643863f3166d827024d4b6067222a6453d015 Mon Sep 17 00:00:00 2001 From: Bobby Eshleman Date: Sat, 10 Jun 2023 00:58:30 +0000 -Subject: [PATCH 05/26] vsock: support multi-transport datagrams +Subject: [PATCH 05/32] vsock: support multi-transport datagrams This patch adds support for multi-transport datagrams. @@ -304,5 +304,5 @@ index 3d5e05d8950f..9e9e124f8d2b 100644 .dgram_allow = virtio_transport_dgram_allow, .dgram_get_cid = virtio_transport_dgram_get_cid, -- -2.52.0 +2.54.0 diff --git a/patches/0006-vsock-make-vsock-bind-reusable.patch b/patches/0006-vsock-make-vsock-bind-reusable.patch index a3992dac..df16bd14 100644 --- a/patches/0006-vsock-make-vsock-bind-reusable.patch +++ b/patches/0006-vsock-make-vsock-bind-reusable.patch @@ -1,7 +1,7 @@ -From 4038db5595d575390c8a0d283ae647bf9d3e96c9 Mon Sep 17 00:00:00 2001 +From cc6d6e946fdfd0e5aa2e1a9a1c6f4ecc199c2181 Mon Sep 17 00:00:00 2001 From: Bobby Eshleman Date: Sat, 10 Jun 2023 00:58:31 +0000 -Subject: [PATCH 06/26] vsock: make vsock bind reusable +Subject: [PATCH 06/32] vsock: make vsock bind reusable This commit makes the bind table management functions in vsock usable for different bind tables. For use by datagrams in a future patch. @@ -102,5 +102,5 @@ index c15d9a6f8b89..30517b362fcc 100644 struct sockaddr_vm *addr) { -- -2.52.0 +2.54.0 diff --git a/patches/0007-virtio-vsock-add-VIRTIO_VSOCK_F_DGRAM-feature-bit.patch b/patches/0007-virtio-vsock-add-VIRTIO_VSOCK_F_DGRAM-feature-bit.patch index 4f0b7585..8b9b3015 100644 --- a/patches/0007-virtio-vsock-add-VIRTIO_VSOCK_F_DGRAM-feature-bit.patch +++ b/patches/0007-virtio-vsock-add-VIRTIO_VSOCK_F_DGRAM-feature-bit.patch @@ -1,7 +1,7 @@ -From 881d7e95e6f0e8dae002a32a2a88d7c08b083b54 Mon Sep 17 00:00:00 2001 +From 33ddfd0056365235338e46e289657fc1c1355bc2 Mon Sep 17 00:00:00 2001 From: Bobby Eshleman Date: Sat, 10 Jun 2023 00:58:32 +0000 -Subject: [PATCH 07/26] virtio/vsock: add VIRTIO_VSOCK_F_DGRAM feature bit +Subject: [PATCH 07/32] virtio/vsock: add VIRTIO_VSOCK_F_DGRAM feature bit This commit adds a feature bit for virtio vsock to support datagrams. @@ -24,5 +24,5 @@ index 64738838bee5..9c25f267bbc0 100644 struct virtio_vsock_config { __le64 guest_cid; -- -2.52.0 +2.54.0 diff --git a/patches/0008-virtio-vsock-support-dgrams.patch b/patches/0008-virtio-vsock-support-dgrams.patch index f94dbbb0..8e706990 100644 --- a/patches/0008-virtio-vsock-support-dgrams.patch +++ b/patches/0008-virtio-vsock-support-dgrams.patch @@ -1,7 +1,7 @@ -From 518275adea4e66da9b19bff00439b127926692e6 Mon Sep 17 00:00:00 2001 +From 2883434bdf71f2441c1d34788fb138c010533254 Mon Sep 17 00:00:00 2001 From: Bobby Eshleman Date: Sat, 10 Jun 2023 00:58:33 +0000 -Subject: [PATCH 08/26] virtio/vsock: support dgrams +Subject: [PATCH 08/32] virtio/vsock: support dgrams This commit adds support for datagrams over virtio/vsock. @@ -656,5 +656,5 @@ index 9e9e124f8d2b..b3066c854bb9 100644 { return true; -- -2.52.0 +2.54.0 diff --git a/patches/0009-Transparent-Socket-Impersonation-implementation.patch b/patches/0009-Transparent-Socket-Impersonation-implementation.patch index e7bbdc24..7ddfe4d4 100644 --- a/patches/0009-Transparent-Socket-Impersonation-implementation.patch +++ b/patches/0009-Transparent-Socket-Impersonation-implementation.patch @@ -1,7 +1,7 @@ -From 338b7e34b57dfb82129ec2b022735c3e3f71ef59 Mon Sep 17 00:00:00 2001 +From 2afce693dedb3bc54648665488d346bbc17ab73a Mon Sep 17 00:00:00 2001 From: Sergio Lopez Date: Thu, 19 May 2022 22:38:26 +0200 -Subject: [PATCH 09/26] Transparent Socket Impersonation implementation +Subject: [PATCH 09/32] Transparent Socket Impersonation implementation Transparent Socket Impersonation (AF_TSI) is an address family that provides sockets presenting two simultaneous personalities, one of @@ -1856,5 +1856,5 @@ index 7229c9bf6c27..f08d24321603 100644 #error New address family defined, please update secclass_map. #endif -- -2.52.0 +2.54.0 diff --git a/patches/0010-tsi-allow-hijacking-sockets-tsi_hijack.patch b/patches/0010-tsi-allow-hijacking-sockets-tsi_hijack.patch index b322cf98..cab82068 100644 --- a/patches/0010-tsi-allow-hijacking-sockets-tsi_hijack.patch +++ b/patches/0010-tsi-allow-hijacking-sockets-tsi_hijack.patch @@ -1,7 +1,7 @@ -From 936b1f01fece38e5c2c2038c9fdd50214fb08ec9 Mon Sep 17 00:00:00 2001 +From 11f6bba30167239d54f27fccbeb3ddb319fb360f Mon Sep 17 00:00:00 2001 From: Sergio Lopez Date: Thu, 19 May 2022 22:42:01 +0200 -Subject: [PATCH 10/26] tsi: allow hijacking sockets (tsi_hijack) +Subject: [PATCH 10/32] tsi: allow hijacking sockets (tsi_hijack) Add a kernel command line option (tsi_hijack) enabling users to request the kernel to hijack AF_INET(SOCK_STREAM || SOCK_DGRAM) @@ -81,5 +81,5 @@ index e266f968405b..a8940e3e98a5 100644 int err; -- -2.52.0 +2.54.0 diff --git a/patches/0011-arm64-cpufeature-Unify-SCOPE_LOCAL_CPU-early-late-be.patch b/patches/0011-arm64-cpufeature-Unify-SCOPE_LOCAL_CPU-early-late-be.patch index 2b91ea1a..cb64d05f 100644 --- a/patches/0011-arm64-cpufeature-Unify-SCOPE_LOCAL_CPU-early-late-be.patch +++ b/patches/0011-arm64-cpufeature-Unify-SCOPE_LOCAL_CPU-early-late-be.patch @@ -1,7 +1,7 @@ -From 84ed5b2bc46d5022f246c55aa06922551f83cda3 Mon Sep 17 00:00:00 2001 +From 995eef6ce4407bc20831b242c77ee011d84fea4d Mon Sep 17 00:00:00 2001 From: Asahi Lina Date: Wed, 25 Sep 2024 16:35:34 +0200 -Subject: [PATCH 11/26] arm64: cpufeature: Unify SCOPE_LOCAL_CPU early & late +Subject: [PATCH 11/32] arm64: cpufeature: Unify SCOPE_LOCAL_CPU early & late behavior SCOPE_LOCAL_CPU is mostly used for CPU errata. The early feature logic @@ -81,5 +81,5 @@ index 5e68d65e675e..06ee74cc3dd9 100644 if (caps->desc && !caps->cpus) -- -2.52.0 +2.54.0 diff --git a/patches/0012-prctl-Introduce-PR_-SET-GET-_MEM_MODEL.patch b/patches/0012-prctl-Introduce-PR_-SET-GET-_MEM_MODEL.patch index 9583446b..a99eb056 100644 --- a/patches/0012-prctl-Introduce-PR_-SET-GET-_MEM_MODEL.patch +++ b/patches/0012-prctl-Introduce-PR_-SET-GET-_MEM_MODEL.patch @@ -1,7 +1,7 @@ -From 313af1b4bd78ce8673610442a39a1311b8bd3b1d Mon Sep 17 00:00:00 2001 +From 582250ebe10df99415a233af1f40384004594d3b Mon Sep 17 00:00:00 2001 From: Hector Martin Date: Thu, 11 Apr 2024 09:51:20 +0900 -Subject: [PATCH 12/26] prctl: Introduce PR_{SET,GET}_MEM_MODEL +Subject: [PATCH 12/32] prctl: Introduce PR_{SET,GET}_MEM_MODEL On some architectures, it is possible to query and/or change the CPU memory model. This allows userspace to switch to a stricter memory model @@ -119,5 +119,5 @@ index 35990f0796bc..3cb05c88a4b7 100644 error = -EINVAL; break; -- -2.52.0 +2.54.0 diff --git a/patches/0013-arm64-Implement-PR_-GET-SET-_MEM_MODEL-for-always-TS.patch b/patches/0013-arm64-Implement-PR_-GET-SET-_MEM_MODEL-for-always-TS.patch index c8fc6b87..cadd627e 100644 --- a/patches/0013-arm64-Implement-PR_-GET-SET-_MEM_MODEL-for-always-TS.patch +++ b/patches/0013-arm64-Implement-PR_-GET-SET-_MEM_MODEL-for-always-TS.patch @@ -1,7 +1,7 @@ -From 0d269370cdb6cb89f683528f6b28e08a5c9da7cf Mon Sep 17 00:00:00 2001 +From 16bd1b5e032b16031d54e0215d475cf3cc0d0dcc Mon Sep 17 00:00:00 2001 From: Hector Martin Date: Thu, 11 Apr 2024 09:51:21 +0900 -Subject: [PATCH 13/26] arm64: Implement PR_{GET,SET}_MEM_MODEL for always-TSO +Subject: [PATCH 13/32] arm64: Implement PR_{GET,SET}_MEM_MODEL for always-TSO CPUs Some ARM64 implementations are known to always use the TSO memory model. @@ -27,10 +27,10 @@ Reviewed-by: Neal Gompa create mode 100644 arch/arm64/kernel/cpufeature_impdef.c diff --git a/arch/arm64/Kconfig b/arch/arm64/Kconfig -index 0e2902f38e70..8d77fef0ae68 100644 +index f487c5e21e2f..8f97145095e0 100644 --- a/arch/arm64/Kconfig +++ b/arch/arm64/Kconfig -@@ -2263,6 +2263,15 @@ config ARM64_DEBUG_PRIORITY_MASKING +@@ -2264,6 +2264,15 @@ config ARM64_DEBUG_PRIORITY_MASKING If unsure, say N endif # ARM64_PSEUDO_NMI @@ -230,5 +230,5 @@ index eedb5acc21ed..bca63481e0cf 100644 HAS_VIRT_HOST_EXTN HAS_WFXT -- -2.52.0 +2.54.0 diff --git a/patches/0014-arm64-Introduce-scaffolding-to-add-ACTLR_EL1-to-thre.patch b/patches/0014-arm64-Introduce-scaffolding-to-add-ACTLR_EL1-to-thre.patch index a09c29aa..8dd35d12 100644 --- a/patches/0014-arm64-Introduce-scaffolding-to-add-ACTLR_EL1-to-thre.patch +++ b/patches/0014-arm64-Introduce-scaffolding-to-add-ACTLR_EL1-to-thre.patch @@ -1,7 +1,7 @@ -From 2cd2b566c238c1c120cc17a1c20bcfa17a8b69b8 Mon Sep 17 00:00:00 2001 +From adf176e37a3d9f6a6b75b7dd27fcaa72d27d1e40 Mon Sep 17 00:00:00 2001 From: Hector Martin Date: Thu, 11 Apr 2024 09:51:22 +0900 -Subject: [PATCH 14/26] arm64: Introduce scaffolding to add ACTLR_EL1 to thread +Subject: [PATCH 14/32] arm64: Introduce scaffolding to add ACTLR_EL1 to thread state Some CPUs expose IMPDEF features in ACTLR_EL1 that can be meaningfully @@ -24,10 +24,10 @@ Reviewed-by: Neal Gompa 5 files changed, 44 insertions(+) diff --git a/arch/arm64/Kconfig b/arch/arm64/Kconfig -index 8d77fef0ae68..cf75e6b64ffa 100644 +index 8f97145095e0..8d587e0b21ef 100644 --- a/arch/arm64/Kconfig +++ b/arch/arm64/Kconfig -@@ -429,6 +429,9 @@ config KASAN_SHADOW_OFFSET +@@ -430,6 +430,9 @@ config KASAN_SHADOW_OFFSET config UNWIND_TABLES bool @@ -137,5 +137,5 @@ index 8185979f0f11..4fcaaf9c7d2b 100644 if (boot_args[1] || boot_args[2] || boot_args[3]) { pr_err("WARNING: x1-x3 nonzero in violation of boot protocol:\n" -- -2.52.0 +2.54.0 diff --git a/patches/0015-arm64-Implement-Apple-IMPDEF-TSO-memory-model-contro.patch b/patches/0015-arm64-Implement-Apple-IMPDEF-TSO-memory-model-contro.patch index c0de0587..5b8bc6b4 100644 --- a/patches/0015-arm64-Implement-Apple-IMPDEF-TSO-memory-model-contro.patch +++ b/patches/0015-arm64-Implement-Apple-IMPDEF-TSO-memory-model-contro.patch @@ -1,7 +1,7 @@ -From 0ff74dd6e1a08b75f7c45d3b792dc7a47e18fe97 Mon Sep 17 00:00:00 2001 +From 30860087dc858a4fba76ecb6bc7de1025a6774b4 Mon Sep 17 00:00:00 2001 From: Hector Martin Date: Thu, 11 Apr 2024 09:51:23 +0900 -Subject: [PATCH 15/26] arm64: Implement Apple IMPDEF TSO memory model control +Subject: [PATCH 15/32] arm64: Implement Apple IMPDEF TSO memory model control Apple CPUs may implement the TSO memory model as an optional configurable mode. This allows x86 emulators to simplify their @@ -27,10 +27,10 @@ Reviewed-by: Neal Gompa create mode 100644 arch/arm64/include/asm/apple_cpufeature.h diff --git a/arch/arm64/Kconfig b/arch/arm64/Kconfig -index cf75e6b64ffa..4331bbad4e68 100644 +index 8d587e0b21ef..befa467fd555 100644 --- a/arch/arm64/Kconfig +++ b/arch/arm64/Kconfig -@@ -2268,6 +2268,8 @@ endif # ARM64_PSEUDO_NMI +@@ -2269,6 +2269,8 @@ endif # ARM64_PSEUDO_NMI config ARM64_MEMORY_MODEL_CONTROL bool "Runtime memory model control" @@ -208,5 +208,5 @@ index bca63481e0cf..8b809992a9ee 100644 HAS_VA52 HAS_VIRT_HOST_EXTN -- -2.52.0 +2.54.0 diff --git a/patches/0016-drm-virtio-Support-fence-passing-feature.patch b/patches/0016-drm-virtio-Support-fence-passing-feature.patch index 767a5c45..7c647af5 100644 --- a/patches/0016-drm-virtio-Support-fence-passing-feature.patch +++ b/patches/0016-drm-virtio-Support-fence-passing-feature.patch @@ -1,7 +1,7 @@ -From 58c83b2acea8f37909ae2e12928ad652fd8ce522 Mon Sep 17 00:00:00 2001 +From 7ed1f847f1751a2f5fec84776c80c983822ca453 Mon Sep 17 00:00:00 2001 From: Dmitry Osipenko Date: Sat, 7 Oct 2023 22:47:47 +0300 -Subject: [PATCH 16/26] drm/virtio: Support fence-passing feature +Subject: [PATCH 16/32] drm/virtio: Support fence-passing feature Support extended version of VIRTIO_GPU_CMD_SUBMIT_3D command that allows passing in-fence IDs to host for waiting, removing need to do expensive @@ -450,5 +450,5 @@ index bf2c9cabd207..ceb656264aa0 100644 #define VIRTIO_GPU_CAPSET_VIRGL 1 -- -2.52.0 +2.54.0 diff --git a/patches/0017-Enable-64-bit-processes-to-use-compat-input-syscalls.patch b/patches/0017-Enable-64-bit-processes-to-use-compat-input-syscalls.patch index 04bda563..4832fa79 100644 --- a/patches/0017-Enable-64-bit-processes-to-use-compat-input-syscalls.patch +++ b/patches/0017-Enable-64-bit-processes-to-use-compat-input-syscalls.patch @@ -1,7 +1,7 @@ -From 8932f5b0d9d9923a2ac2b09f8b17d3255d04ce09 Mon Sep 17 00:00:00 2001 +From 1aa58a85e45d6fb4e0736ae1a606d68373d3fabc Mon Sep 17 00:00:00 2001 From: Sergio Lopez Date: Tue, 8 Oct 2024 11:24:25 +0200 -Subject: [PATCH 17/26] Enable 64 bit processes to use compat input syscalls +Subject: [PATCH 17/32] Enable 64 bit processes to use compat input syscalls The compat variant of input syscalls is only enabled for 32 bit tasks, but in some cases, such as userspace emulation, it's useful to @@ -64,10 +64,10 @@ index 3b7bb12b023b..e78c0492ce0d 100644 } diff --git a/include/linux/sched.h b/include/linux/sched.h -index af143d3af85f..085d2ffe8f48 100644 +index 321e088f9ee7..ab0c01ce672a 100644 --- a/include/linux/sched.h +++ b/include/linux/sched.h -@@ -1599,6 +1599,11 @@ struct task_struct { +@@ -1603,6 +1603,11 @@ struct task_struct { #ifdef CONFIG_USER_EVENTS struct user_event_mm *user_event_mm; #endif @@ -120,5 +120,5 @@ index 3cb05c88a4b7..3a5c9553236a 100644 error = -EINVAL; break; -- -2.52.0 +2.54.0 diff --git a/patches/0018-dax-Allow-block-size-PAGE_SIZE.patch b/patches/0018-dax-Allow-block-size-PAGE_SIZE.patch index 72947a11..a3f0f96d 100644 --- a/patches/0018-dax-Allow-block-size-PAGE_SIZE.patch +++ b/patches/0018-dax-Allow-block-size-PAGE_SIZE.patch @@ -1,7 +1,7 @@ -From d56d9ed7805cfda7e9abf484cdc0de2771566c08 Mon Sep 17 00:00:00 2001 +From 24ed7b49b6b12d383db2cd4b649cf5c624afd3fa Mon Sep 17 00:00:00 2001 From: Asahi Lina Date: Sun, 20 Oct 2024 01:23:41 +0900 -Subject: [PATCH 18/26] dax: Allow block size > PAGE_SIZE +Subject: [PATCH 18/32] dax: Allow block size > PAGE_SIZE For virtio-dax, the file/FS blocksize is irrelevant. FUSE always uses large DAX blocks (2MiB), which will work with all host page sizes. Since @@ -35,5 +35,5 @@ index 756400f2a625..cb155ec940d5 100644 if (mapping_empty(mapping) || wbc->sync_mode != WB_SYNC_ALL) -- -2.52.0 +2.54.0 diff --git a/patches/0019-mm-Fix-__wp_page_copy_user-fallback-path-for-remote-.patch b/patches/0019-mm-Fix-__wp_page_copy_user-fallback-path-for-remote-.patch index 6746b382..346ef68e 100644 --- a/patches/0019-mm-Fix-__wp_page_copy_user-fallback-path-for-remote-.patch +++ b/patches/0019-mm-Fix-__wp_page_copy_user-fallback-path-for-remote-.patch @@ -1,7 +1,7 @@ -From 5b2548b89b041ae10a33cc5a19d87a2cb71647be Mon Sep 17 00:00:00 2001 +From da19784d49ca9e3f45fb0180036a45a25822f4f4 Mon Sep 17 00:00:00 2001 From: Asahi Lina Date: Mon, 21 Oct 2024 23:21:16 +0900 -Subject: [PATCH 19/26] mm: Fix __wp_page_copy_user fallback path for remote mm +Subject: [PATCH 19/32] mm: Fix __wp_page_copy_user fallback path for remote mm If the source page is a PFN mapping, we copy back from userspace. However, if this fault is a remote access, we cannot use @@ -58,7 +58,7 @@ Signed-off-by: Asahi Lina 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/mm/memory.c b/mm/memory.c -index 090e9c6f9992..9c09dd2d3cbe 100644 +index 49ee03c4392e..45170cc2cd56 100644 --- a/mm/memory.c +++ b/mm/memory.c @@ -3081,13 +3081,18 @@ static inline int __wp_page_copy_user(struct page *dst, struct page *src, @@ -82,5 +82,5 @@ index 090e9c6f9992..9c09dd2d3cbe 100644 goto warn; -- -2.52.0 +2.54.0 diff --git a/patches/0020-virtgpu-gem-partial-map.patch b/patches/0020-virtgpu-gem-partial-map.patch index de3e8619..34da08a2 100644 --- a/patches/0020-virtgpu-gem-partial-map.patch +++ b/patches/0020-virtgpu-gem-partial-map.patch @@ -1,7 +1,7 @@ -From f43b1aa436d0f7b4bf02f85a12fcebc74c052743 Mon Sep 17 00:00:00 2001 +From 8e920d63a7d31f4f1a339be60d4cc181ce270431 Mon Sep 17 00:00:00 2001 From: Sasha Finkelstein Date: Fri, 17 Jan 2025 12:34:23 +0100 -Subject: [PATCH 20/26] virtgpu: gem partial map +Subject: [PATCH 20/32] virtgpu: gem partial map Those are useful to implement coherent cross-vm mmap. @@ -30,5 +30,5 @@ index 25df81c02783..64e2c6dbdd67 100644 return ret; } -- -2.52.0 +2.54.0 diff --git a/patches/0021-virtgpu-mixed-page-size.patch b/patches/0021-virtgpu-mixed-page-size.patch index 8bfcc0cc..16ffafff 100644 --- a/patches/0021-virtgpu-mixed-page-size.patch +++ b/patches/0021-virtgpu-mixed-page-size.patch @@ -1,7 +1,7 @@ -From 0d62c564ec641c16079f6a2bfccf2ea983cad594 Mon Sep 17 00:00:00 2001 +From f7e3016d46bf6c4fa63e610c193372a965155e9c Mon Sep 17 00:00:00 2001 From: Sasha Finkelstein Date: Fri, 17 Jan 2025 12:34:28 +0100 -Subject: [PATCH 21/26] virtgpu: mixed page size +Subject: [PATCH 21/32] virtgpu: mixed page size This allows running different page sizes between host and guest on platforms that support mixed page sizes. @@ -40,5 +40,5 @@ index 64e2c6dbdd67..cbadcba2c773 100644 if (ret) -- -2.52.0 +2.54.0 diff --git a/patches/0022-fuse-mark-DAX-inode-releases-as-blocking.patch b/patches/0022-fuse-mark-DAX-inode-releases-as-blocking.patch index b5e93c33..a08af38c 100644 --- a/patches/0022-fuse-mark-DAX-inode-releases-as-blocking.patch +++ b/patches/0022-fuse-mark-DAX-inode-releases-as-blocking.patch @@ -1,7 +1,7 @@ -From 96fb35fd5e6840e1563bf9f56c488af396020c8a Mon Sep 17 00:00:00 2001 +From 26235146da7324da362c0eccbc80c859dd2f57c9 Mon Sep 17 00:00:00 2001 From: Sergio Lopez Date: Sun, 18 Jan 2026 23:37:30 +0100 -Subject: [PATCH 22/26] fuse: mark DAX inode releases as blocking +Subject: [PATCH 22/32] fuse: mark DAX inode releases as blocking Commit 26e5c67deb2e ("fuse: fix livelock in synchronous file put from fuseblk workers") made fputs on closing files always asynchronous. @@ -68,5 +68,5 @@ index 23afaadd5f3e..e59a08c71f12 100644 if (fuse_simple_background(ff->fm, args, GFP_KERNEL | __GFP_NOFAIL)) -- -2.52.0 +2.54.0 diff --git a/patches/0023-Revert-vsock-virtio-Fix-message-iterator-handling-on.patch b/patches/0023-Revert-vsock-virtio-Fix-message-iterator-handling-on.patch index 0188eabb..a62d2229 100644 --- a/patches/0023-Revert-vsock-virtio-Fix-message-iterator-handling-on.patch +++ b/patches/0023-Revert-vsock-virtio-Fix-message-iterator-handling-on.patch @@ -1,7 +1,7 @@ -From f1ce09fd1d1ee16731ae8809d019ec4caba9d896 Mon Sep 17 00:00:00 2001 +From 8128cde157db4b71f26e1176ec5239dc836b5a9f Mon Sep 17 00:00:00 2001 From: Sergio Lopez Date: Tue, 10 Mar 2026 13:33:02 +0100 -Subject: [PATCH 23/26] Revert "vsock/virtio: Fix message iterator handling on +Subject: [PATCH 23/32] Revert "vsock/virtio: Fix message iterator handling on transmit path" This reverts commit e6cee5d4a122ca9d6b7bb8fa09e498c60b9f208c. @@ -33,5 +33,5 @@ index b3ee9ce90b5d..f274cde784f7 100644 static void virtio_transport_init_hdr(struct sk_buff *skb, -- -2.52.0 +2.54.0 diff --git a/patches/0024-Revert-vsock-virtio-Allocate-nonlinear-SKBs-for-hand.patch b/patches/0024-Revert-vsock-virtio-Allocate-nonlinear-SKBs-for-hand.patch index 45ddb3b3..eb1c2f1b 100644 --- a/patches/0024-Revert-vsock-virtio-Allocate-nonlinear-SKBs-for-hand.patch +++ b/patches/0024-Revert-vsock-virtio-Allocate-nonlinear-SKBs-for-hand.patch @@ -1,7 +1,7 @@ -From 6e47c66e5e9c4278cb27e501d3ad2824092445fe Mon Sep 17 00:00:00 2001 +From 3a04da8c906e94b8f9e392885f7b6571c44d27b9 Mon Sep 17 00:00:00 2001 From: Sergio Lopez Date: Tue, 10 Mar 2026 13:33:11 +0100 -Subject: [PATCH 24/26] Revert "vsock/virtio: Allocate nonlinear SKBs for +Subject: [PATCH 24/32] Revert "vsock/virtio: Allocate nonlinear SKBs for handling large transmit buffers" This reverts commit 69c5bf306115e6047e0d902f8c6551fff74a71ff. @@ -33,5 +33,5 @@ index f274cde784f7..4733c1d234d5 100644 return NULL; -- -2.52.0 +2.54.0 diff --git a/patches/0025-Revert-vhost-vsock-Allocate-nonlinear-SKBs-for-handl.patch b/patches/0025-Revert-vhost-vsock-Allocate-nonlinear-SKBs-for-handl.patch index a8e94606..91c2fec3 100644 --- a/patches/0025-Revert-vhost-vsock-Allocate-nonlinear-SKBs-for-handl.patch +++ b/patches/0025-Revert-vhost-vsock-Allocate-nonlinear-SKBs-for-handl.patch @@ -1,7 +1,7 @@ -From a5d4bbafb75eba1205fb00b4ba8073f7461954de Mon Sep 17 00:00:00 2001 +From 8c59c976fb5a6c89af9474b347c90141f103ee3e Mon Sep 17 00:00:00 2001 From: Sergio Lopez Date: Tue, 10 Mar 2026 13:33:20 +0100 -Subject: [PATCH 25/26] Revert "vhost/vsock: Allocate nonlinear SKBs for +Subject: [PATCH 25/32] Revert "vhost/vsock: Allocate nonlinear SKBs for handling large receive buffers" This reverts commit 65e808a6023f883f298db734444a9c38e45af740. @@ -93,5 +93,5 @@ index e3d7afa29894..1ff7389ed244 100644 virtio_vsock_skb_queue_head(struct sk_buff_head *list, struct sk_buff *skb) { -- -2.52.0 +2.54.0 diff --git a/patches/0026-Revert-vsock-virtio-cap-TX-credit-to-local-buffer-si.patch b/patches/0026-Revert-vsock-virtio-cap-TX-credit-to-local-buffer-si.patch index cf7a0725..985fa6a9 100644 --- a/patches/0026-Revert-vsock-virtio-cap-TX-credit-to-local-buffer-si.patch +++ b/patches/0026-Revert-vsock-virtio-cap-TX-credit-to-local-buffer-si.patch @@ -1,7 +1,7 @@ -From 7eeeb4e671c6812258937a9662b29d4dfc45a260 Mon Sep 17 00:00:00 2001 +From 55f776caa30a3c78e799e407cc78c765dd0fce66 Mon Sep 17 00:00:00 2001 From: Sergio Lopez Date: Tue, 10 Mar 2026 16:00:26 +0100 -Subject: [PATCH 26/26] Revert "vsock/virtio: cap TX credit to local buffer +Subject: [PATCH 26/32] Revert "vsock/virtio: cap TX credit to local buffer size" This reverts commit c0e42fb0e054c2b2ec4ee80f48ccd256ae0227ce. @@ -49,5 +49,5 @@ index 4733c1d234d5..bed7fe5a7203 100644 bytes = 0; -- -2.52.0 +2.54.0 diff --git a/patches/0027-can-virtio-Add-virtio-CAN-driver.patch b/patches/0027-can-virtio-Add-virtio-CAN-driver.patch index ec517d7a..336807d6 100644 --- a/patches/0027-can-virtio-Add-virtio-CAN-driver.patch +++ b/patches/0027-can-virtio-Add-virtio-CAN-driver.patch @@ -1,5 +1,7 @@ +From 7915f0f9e54178cdff02144a32e08d686372922d Mon Sep 17 00:00:00 2001 From: Matias Ezequiel Vara Larsen -Subject: [PATCH v13] can: virtio: Add virtio CAN driver +Date: Fri, 8 May 2026 14:23:37 +0200 +Subject: [PATCH 27/32] can: virtio: Add virtio CAN driver Add virtio CAN driver based on Virtio 1.4 specification (see https://github.com/oasis-tcs/virtio-spec/tree/virtio-1.4). The driver @@ -24,11 +26,20 @@ Reviewed-by: Francesco Valla Tested-by: Francesco Valla Signed-off-by: Matias Ezequiel Vara Larsen --- + MAINTAINERS | 9 + + drivers/net/can/Kconfig | 12 + + drivers/net/can/Makefile | 1 + + drivers/net/can/virtio_can.c | 991 ++++++++++++++++++++++++++++++++ + include/uapi/linux/virtio_can.h | 78 +++ + 5 files changed, 1091 insertions(+) + create mode 100644 drivers/net/can/virtio_can.c + create mode 100644 include/uapi/linux/virtio_can.h + diff --git a/MAINTAINERS b/MAINTAINERS -index 80cd3498c293..f295a904c93e 100644 +index d765c62c80ea..9ecb818f7ddb 100644 --- a/MAINTAINERS +++ b/MAINTAINERS -@@ -27068,6 +27068,15 @@ F: drivers/scsi/virtio_scsi.c +@@ -24464,6 +24464,15 @@ F: drivers/scsi/virtio_scsi.c F: include/uapi/linux/virtio_blk.h F: include/uapi/linux/virtio_scsi.h @@ -45,10 +56,10 @@ index 80cd3498c293..f295a904c93e 100644 M: Amit Shah L: virtualization@lists.linux.dev diff --git a/drivers/net/can/Kconfig b/drivers/net/can/Kconfig -index d43d56694667..f33ae46d9766 100644 +index cf989bea9aa3..851749f76d7c 100644 --- a/drivers/net/can/Kconfig +++ b/drivers/net/can/Kconfig -@@ -209,6 +209,18 @@ config CAN_TI_HECC +@@ -208,6 +208,18 @@ config CAN_TI_HECC Driver for TI HECC (High End CAN Controller) module found on many TI devices. The device specifications are available from www.ti.com @@ -68,7 +79,7 @@ index d43d56694667..f33ae46d9766 100644 tristate "Xilinx CAN" depends on ARCH_ZYNQ || ARM64 || MICROBLAZE || COMPILE_TEST diff --git a/drivers/net/can/Makefile b/drivers/net/can/Makefile -index 56138d8ddfd2..2ddea733ed5d 100644 +index a71db2cfe990..ddfe0df9b10b 100644 --- a/drivers/net/can/Makefile +++ b/drivers/net/can/Makefile @@ -32,6 +32,7 @@ obj-$(CONFIG_CAN_PEAK_PCIEFD) += peak_canfd/ @@ -81,7 +92,7 @@ index 56138d8ddfd2..2ddea733ed5d 100644 subdir-ccflags-$(CONFIG_CAN_DEBUG_DEVICES) += -DDEBUG diff --git a/drivers/net/can/virtio_can.c b/drivers/net/can/virtio_can.c new file mode 100644 -index 000000000000..57641c3ed6d0 +index 000000000000..0344dd03bd82 --- /dev/null +++ b/drivers/net/can/virtio_can.c @@ -0,0 +1,991 @@ @@ -1161,379 +1172,5 @@ index 000000000000..08d7e3e78776 + +#endif /* #ifndef _LINUX_VIRTIO_VIRTIO_CAN_H */ -- -2.42.0 - - -From mboxrd@z Thu Jan 1 00:00:00 1970 -Received: from metis.whiteo.stw.pengutronix.de (metis.whiteo.stw.pengutronix.de [185.203.201.7]) - (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) - (No client certificate requested) - by smtp.subspace.kernel.org (Postfix) with ESMTPS id 3E3E62192FA - for ; Mon, 23 Mar 2026 10:36:25 +0000 (UTC) -Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=185.203.201.7 -ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; - t=1774262186; cv=none; b=NKD3/8eSQoLpKpzkdBwn9DsLarlmek8FfQEzQ7BGIA72gjW2wbf7m3TeKZyAedG5LiLnsJ21yj180PfYOu4wsI5cBZ9eBtB4cAElICI/zfX2IEXwrfuGd8UACNRilm2rlEEhjYnqfv57rk6ng8O5OGaZoRjouacfuV6UGNNDwoE= -ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; - s=arc-20240116; t=1774262186; c=relaxed/simple; - bh=84cWpFOEfJUrl7OHPV0gcP7TAT6ro+QeEH6UHJ61bvI=; - h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: - Content-Type:Content-Disposition:In-Reply-To; b=bHqdosjwwMRwNUrMfvEwKK3su4vbMYuJDYsb00gsRkaCroQ8m6uW7kohVYs5sADo1bbVGhcV2Znxb8wOZuW/bXmHaT3O1Ur0yAoK5o4dsRuSBQHn5+S8m5vpCjo+QmXQmykm9SWtqRR6BYftxB+AauBMpfXsJc+Q6XNAmhaqHK4= -ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=pengutronix.de; spf=pass smtp.mailfrom=pengutronix.de; arc=none smtp.client-ip=185.203.201.7 -Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=pengutronix.de -Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=pengutronix.de -Received: from drehscheibe.grey.stw.pengutronix.de ([2a0a:edc0:0:c01:1d::a2]) - by metis.whiteo.stw.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) - (Exim 4.92) - (envelope-from ) - id 1w4cdw-0000dP-Ab; Mon, 23 Mar 2026 11:36:20 +0100 -Received: from moin.white.stw.pengutronix.de ([2a0a:edc0:0:b01:1d::7b] helo=bjornoya.blackshift.org) - by drehscheibe.grey.stw.pengutronix.de with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 - (Exim 4.96) - (envelope-from ) - id 1w4cdv-001iAm-1I; - Mon, 23 Mar 2026 11:36:19 +0100 -Received: from pengutronix.de (p4ffb2dc6.dip0.t-ipconnect.de [79.251.45.198]) - (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) - key-exchange x25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) - (Client did not present a certificate) - (Authenticated sender: mkl-all@blackshift.org) - by smtp.blackshift.org (Postfix) with ESMTPSA id 114E250A7F9; - Mon, 23 Mar 2026 10:36:19 +0000 (UTC) -Date: Mon, 23 Mar 2026 11:36:18 +0100 -From: Marc Kleine-Budde -To: Matias Ezequiel Vara Larsen -Cc: Harald Mommer , - Vincent Mailhol , "Michael S. Tsirkin" , - Jason Wang , Xuan Zhuo , - Eugenio =?utf-8?B?UMOpcmV6?= , linux-can@vger.kernel.org, virtualization@lists.linux.dev, - Mikhail Golubev-Ciuchea , Stefano Garzarella , francesco@valla.it -Subject: Re: [PATCH v13] can: virtio: Add virtio CAN driver -Message-ID: <20260323-hilarious-active-eagle-a0ee74-mkl@pengutronix.de> -X-AI: stop_reason: "refusal" -References: -Precedence: bulk -X-Mailing-List: virtualization@lists.linux.dev -List-Id: -List-Subscribe: -List-Unsubscribe: -MIME-Version: 1.0 -Content-Type: multipart/signed; micalg=pgp-sha512; - protocol="application/pgp-signature"; boundary="zsnxvdx43cvgpphl" -Content-Disposition: inline -In-Reply-To: -X-SA-Exim-Connect-IP: 2a0a:edc0:0:c01:1d::a2 -X-SA-Exim-Mail-From: mkl@pengutronix.de -X-SA-Exim-Scanned: No (on metis.whiteo.stw.pengutronix.de); SAEximRunCond expanded to false -X-PTX-Original-Recipient: virtualization@lists.linux.dev - - ---zsnxvdx43cvgpphl -Content-Type: text/plain; protected-headers=v1; charset=utf-8 -Content-Disposition: inline -Content-Transfer-Encoding: quoted-printable -Subject: Re: [PATCH v13] can: virtio: Add virtio CAN driver -MIME-Version: 1.0 - -Hello, - -The nipa/ai-review bot found these problems: - -| https://netdev-ai.bots.linux.dev/ai-review.html?id=3Db046d75a-2de1-4063-b= -b96-8f64abc65e7d - -commit 0f3cb3b3bc94eaff9b9709b528e498fe6150f9c1 -Author: Matias Ezequiel Vara Larsen - -can: virtio: Add virtio CAN driver - -This commit adds a virtio CAN driver implementing a complete CAN bus -interface over Virtio transport, supporting both CAN Classic and CAN-FD -frames. - -> diff --git a/drivers/net/can/virtio_can.c b/drivers/net/can/virtio_can.c -> new file mode 100644 -> index 000000000000..57641c3ed6d0 -> --- /dev/null -> +++ b/drivers/net/can/virtio_can.c - -[ ... ] - -> +static int __maybe_unused virtio_can_restore(struct virtio_device *vdev) -> +{ -> + struct virtio_can_priv *priv =3D vdev->priv; -> + struct net_device *ndev =3D priv->dev; -> + size_t size; -> + int err; -> + -> + napi_enable(&priv->napi); -> + napi_enable(&priv->napi_tx); -> + -> + err =3D virtio_can_find_vqs(priv); -> + if (err !=3D 0) -> + return err; - -What happens to the enabled NAPI instances when this error path is taken? -virtio_can_restore() enables both NAPI instances at the start, but if -virtio_can_find_vqs() fails here, the function returns without calling -napi_disable(). - -The corresponding virtio_can_freeze() function disables both NAPIs before -returning, so the restore function leaves the NAPI subsystem in an -inconsistent state on failure. - -If the PM framework retries restore after this failure, the second -napi_enable() call on an already-enabled NAPI will hit the BUG_ON in -napi_enable_locked(): - -net/core/dev.c:napi_enable_locked() { - BUG_ON(!test_bit(NAPI_STATE_SCHED, &n->state)); - ... -} - -In contrast, virtio_can_probe() enables NAPI only after all setup -succeeds, avoiding this issue. - -> + -> + size =3D priv->rpkt_len * priv->vqs[VIRTIO_CAN_QUEUE_RX]->num_free; -> + priv->rpkt =3D devm_krealloc(&vdev->dev, priv->rpkt, size, GFP_KERNEL |= - __GFP_ZERO); -> + if (!priv->rpkt) { -> + virtio_can_del_vq(vdev); -> + return -ENOMEM; -> + } - -The same NAPI state issue occurs on this error path. - -> + virtio_can_populate_rx_vq(vdev); -> + -> + if (netif_running(ndev)) { -> + err =3D virtio_can_start(ndev); -> + if (err) { -> + virtio_can_del_vq(vdev); -> + return err; -> + } - -And again on this error path. - -Should all three error paths call napi_disable(&priv->napi_tx) and -napi_disable(&priv->napi) before returning the error code? - ---=20 -Pengutronix e.K. | Marc Kleine-Budde | -Embedded Linux | https://www.pengutronix.de | -Vertretung N=C3=BCrnberg | Phone: +49-5121-206917-129 | -Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-9 | - ---zsnxvdx43cvgpphl -Content-Type: application/pgp-signature; name="signature.asc" - ------BEGIN PGP SIGNATURE----- - -iHUEABYKAB0WIQSl+MghEFFAdY3pYJLMOmT6rpmt0gUCacEXoAAKCRDMOmT6rpmt -0oc0AP4r/E0p8/W4XH5xFsFvHnvCil/2ybFe0uqsmduXn4Gw4QD6A2wQTTGMyyJp -k6X5ros7i59H9faw/8/FWIR1ffBnmQY= -=E13T ------END PGP SIGNATURE----- - ---zsnxvdx43cvgpphl-- - -From mboxrd@z Thu Jan 1 00:00:00 1970 -Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) - (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) - (No client certificate requested) - by smtp.subspace.kernel.org (Postfix) with ESMTPS id 4AF1C3A1691 - for ; Tue, 24 Mar 2026 17:42:39 +0000 (UTC) -Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=170.10.133.124 -ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; - t=1774374160; cv=none; b=YfqQRPjL8u5HSY3eaGbezN0uWrQ9YbCGUaSBjjZKmfysUAB5Kd+LKrSyH5zboXzhW8dkhe37NR0PZlmuATKhw71djPWNEp3AFoV/qzJoBQlSgOeFTSrNcCWD7Gu1z9lv3BHOvO0sAQDuucr3PZ2o8ULN8zpJ0X1I3xVody15agY= -ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; - s=arc-20240116; t=1774374160; c=relaxed/simple; - bh=TJyvrr4HaLk8h/xrwfw3is3omZUyp+y5i6BcRF5lQPM=; - h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: - In-Reply-To:Content-Type:Content-Disposition; b=SfraANulM86s6VxAEmk5hW9mjrrQ92wPautcjOjUnuLngxVla3MQK8fgNHWLbJL0rihnQsnkZN09i8q94mvVebR0V/vMTaWLmhFvDEUnTXBFlhklxA2N4CSkxjkowJ7EqY9Gp0vjUtSu4TIq/GdUuIIGGfvGSx4zMwVQ2apf8Fs= -ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com; spf=pass smtp.mailfrom=redhat.com; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b=RWRz/86F; arc=none smtp.client-ip=170.10.133.124 -Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com -Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=redhat.com -Authentication-Results: smtp.subspace.kernel.org; - dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="RWRz/86F" -DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; - s=mimecast20190719; t=1774374158; - h=from:from:reply-to:subject:subject:date:date:message-id:message-id: - to:to:cc:cc:mime-version:mime-version:content-type:content-type: - content-transfer-encoding:content-transfer-encoding: - in-reply-to:in-reply-to:references:references; - bh=k8hqPRba6xj486YSVHnHmVBfkPNRQNNSk9RXrPw+XUY=; - b=RWRz/86FJzCuuuk8kc5cNhlbBehk+YudoeLnpResQDXGw7TvIIcz2TtuIBNKXuj0QWikBv - /5TMqoO7X796wfTZ4iMRRslc2uCpUKyBRh+RYJpTD/WFsSmyHrcSjpg2svTQFTgAAySacq - ZE4paDo51l5p77+5jkyhblXJ8YaJ2cU= -Received: from mail-wm1-f71.google.com (mail-wm1-f71.google.com - [209.85.128.71]) by relay.mimecast.com with ESMTP with STARTTLS - (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id - us-mta-592-wdgyUu2aNoCEyGQFmhCT5w-1; Tue, 24 Mar 2026 13:42:37 -0400 -X-MC-Unique: wdgyUu2aNoCEyGQFmhCT5w-1 -X-Mimecast-MFC-AGG-ID: wdgyUu2aNoCEyGQFmhCT5w_1774374156 -Received: by mail-wm1-f71.google.com with SMTP id 5b1f17b1804b1-486fc42c83aso17393835e9.0 - for ; Tue, 24 Mar 2026 10:42:36 -0700 (PDT) -X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; - d=1e100.net; s=20251104; t=1774374155; x=1774978955; - h=in-reply-to:content-transfer-encoding:content-disposition - :mime-version:references:message-id:subject:cc:to:from:date:x-gm-gg - :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; - bh=k8hqPRba6xj486YSVHnHmVBfkPNRQNNSk9RXrPw+XUY=; - b=gC0l31cTxMP+twmyu7Tdz1PA9nwOKVmVWft2i+Y3tjgbtLIoKSja/Bw1HiSmGAf5o2 - qc8q82lHyB+gghxnRuZVtG0b8kId6umvOANRWFY/fFxFzxbQdnq2OTV5i5T2KuScZJji - 6kNfThbEJzbg6dcdw9FFwXlR4WAl4t8/SAjP9O1+qZRDa10kHDL2jftLnb93Po6uthH4 - Iy8PLqesMHwf+bq9g/qB6Kix3TboIqUb+cmu1caGtmQjZgxKSpjoU0JGQIK897UeQUJP - NNQuxVE4K475VgwyJq7SYktHF3odDUiXjY4pH86/UuqmPItVp+4BTbHUCQVkKmaowvil - y19A== -X-Forwarded-Encrypted: i=1; AJvYcCUvlhc2cKLI8Smsp5KJ8rMd1z7Xlf53EfAaAnnMPtFJAKYkinnp3ZMNoY/izJo94KBuUXQz+MBi3AXonGsu/Q==@lists.linux.dev -X-Gm-Message-State: AOJu0YxgVoKQ9UO0FBBQ8/QIMGPcmrmm6qYEQp3GKjS6VI0cRbr68RCO - ffssrI6hEVuwxMzagIz3Kf8DvHzSHCqwLxVdpwRSczJuwbVJWJFDe5ny/LB1IfRNgYu8IVYYtxo - 3prj29InJtSEhwcoPjZaGAGimixPZtyEeW9p4ItHTXQJ1Pgnv0nKIpx0HVBxyirtZar8l -X-Gm-Gg: ATEYQzz0WBOHnvroXH7roRY1xz5nactVRtmPaDh9o5z597kuXddTzISCzuhVkpJBemo - wak2QptMkWfu2Br9JUcRcAoLqZBjx3up6gbCq/K6iFdwpPTuEnnVem/DWPTS1GklbGEMw8HIn8o - kotjAxbpnpWq2PinS+2fTnXwrwzlEGG3230BjDz0OskO6o9J9rsS7N4M/daTPaJMmbsu8YbUS2I - 4TK9yiL7GCjyV7mb6z5HCOfhWW/NGP2yZou7+0ywti1u5qmmXa9NnGsZo0abhAduoJSVu0BnrLb - wRK9Uz7SeWYImBnyf1lSu2rpu7S9G1156+9WkpDgqQP2JL/HsGyOrfy6QCm+VNQuZdig1fgvaTN - p2/yZU3Eau+xlzlU= -X-Received: by 2002:a05:600c:4705:b0:485:3dfc:57d with SMTP id 5b1f17b1804b1-4871608481emr9678885e9.30.1774374155069; - Tue, 24 Mar 2026 10:42:35 -0700 (PDT) -X-Received: by 2002:a05:600c:4705:b0:485:3dfc:57d with SMTP id 5b1f17b1804b1-4871608481emr9678495e9.30.1774374154616; - Tue, 24 Mar 2026 10:42:34 -0700 (PDT) -Received: from fedora ([2a01:e0a:257:8c60:80f1:cdf8:48d0:b0a1]) - by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-48716549160sm3084885e9.3.2026.03.24.10.42.33 - (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); - Tue, 24 Mar 2026 10:42:34 -0700 (PDT) -Date: Tue, 24 Mar 2026 18:42:31 +0100 -From: Matias Ezequiel Vara Larsen -To: Marc Kleine-Budde -Cc: Harald Mommer , - Vincent Mailhol , - "Michael S. Tsirkin" , - Jason Wang , - Xuan Zhuo , - Eugenio =?iso-8859-1?Q?P=E9rez?= , - linux-can@vger.kernel.org, virtualization@lists.linux.dev, - Mikhail Golubev-Ciuchea , - Stefano Garzarella , francesco@valla.it -Subject: Re: [PATCH v13] can: virtio: Add virtio CAN driver -Message-ID: -References: - <20260323-hilarious-active-eagle-a0ee74-mkl@pengutronix.de> -Precedence: bulk -X-Mailing-List: virtualization@lists.linux.dev -List-Id: -List-Subscribe: -List-Unsubscribe: -MIME-Version: 1.0 -In-Reply-To: <20260323-hilarious-active-eagle-a0ee74-mkl@pengutronix.de> -X-Mimecast-Spam-Score: 0 -X-Mimecast-MFC-PROC-ID: 3QBEBKYAdFs70UWfoikGGR02Mb06qepm1k3qfZ6C7Rs_1774374156 -X-Mimecast-Originator: redhat.com -Content-Type: text/plain; charset=iso-8859-1 -Content-Disposition: inline -Content-Transfer-Encoding: 8bit - -On Mon, Mar 23, 2026 at 11:36:18AM +0100, Marc Kleine-Budde wrote: -> Hello, -> - -Hello and thanks, I am struggling to come up with a solution for this -comment. - -> The nipa/ai-review bot found these problems: -> -> | https://netdev-ai.bots.linux.dev/ai-review.html?id=b046d75a-2de1-4063-bb96-8f64abc65e7d -> -> commit 0f3cb3b3bc94eaff9b9709b528e498fe6150f9c1 -> Author: Matias Ezequiel Vara Larsen -> -> can: virtio: Add virtio CAN driver -> -> This commit adds a virtio CAN driver implementing a complete CAN bus -> interface over Virtio transport, supporting both CAN Classic and CAN-FD -> frames. -> -> > diff --git a/drivers/net/can/virtio_can.c b/drivers/net/can/virtio_can.c -> > new file mode 100644 -> > index 000000000000..57641c3ed6d0 -> > --- /dev/null -> > +++ b/drivers/net/can/virtio_can.c -> -> [ ... ] -> -> > +static int __maybe_unused virtio_can_restore(struct virtio_device *vdev) -> > +{ -> > + struct virtio_can_priv *priv = vdev->priv; -> > + struct net_device *ndev = priv->dev; -> > + size_t size; -> > + int err; -> > + -> > + napi_enable(&priv->napi); -> > + napi_enable(&priv->napi_tx); -> > + -> > + err = virtio_can_find_vqs(priv); -> > + if (err != 0) -> > + return err; -> -> What happens to the enabled NAPI instances when this error path is taken? -> virtio_can_restore() enables both NAPI instances at the start, but if -> virtio_can_find_vqs() fails here, the function returns without calling -> napi_disable(). -> -I was expecting that, if virtio_can_restore() fails, then a successive -virtio_can_remove() will not hang in napi_disable() since the napis were -already enabled. - -> The corresponding virtio_can_freeze() function disables both NAPIs before -> returning, so the restore function leaves the NAPI subsystem in an -> inconsistent state on failure. -> -> If the PM framework retries restore after this failure, the second -> napi_enable() call on an already-enabled NAPI will hit the BUG_ON in -> napi_enable_locked(): -> - -Does the PM framework really retries if virtio_can_restore() fails? If not, that BUG_ON -is never reached. - -> net/core/dev.c:napi_enable_locked() { -> BUG_ON(!test_bit(NAPI_STATE_SCHED, &n->state)); -> ... -> } -> -> In contrast, virtio_can_probe() enables NAPI only after all setup -> succeeds, avoiding this issue. -> -> > + -> > + size = priv->rpkt_len * priv->vqs[VIRTIO_CAN_QUEUE_RX]->num_free; -> > + priv->rpkt = devm_krealloc(&vdev->dev, priv->rpkt, size, GFP_KERNEL | __GFP_ZERO); -> > + if (!priv->rpkt) { -> > + virtio_can_del_vq(vdev); -> > + return -ENOMEM; -> > + } -> -> The same NAPI state issue occurs on this error path. -> -> > + virtio_can_populate_rx_vq(vdev); -> > + -> > + if (netif_running(ndev)) { -> > + err = virtio_can_start(ndev); -> > + if (err) { -> > + virtio_can_del_vq(vdev); -> > + return err; -> > + } -> -> And again on this error path. -> -> Should all three error paths call napi_disable(&priv->napi_tx) and -> napi_disable(&priv->napi) before returning the error code? -> -> -- -> Pengutronix e.K. | Marc Kleine-Budde | -> Embedded Linux | https://www.pengutronix.de | -> Vertretung Nürnberg | Phone: +49-5121-206917-129 | -> Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-9 | - - +2.54.0 diff --git a/patches/0028-virtio_rtc-Add-module-and-driver-core.patch b/patches/0028-virtio_rtc-Add-module-and-driver-core.patch index 04f15616..4771447e 100644 --- a/patches/0028-virtio_rtc-Add-module-and-driver-core.patch +++ b/patches/0028-virtio_rtc-Add-module-and-driver-core.patch @@ -1,7 +1,7 @@ -From 0623c759276885c3ae88197ba6fb5c9c6ba8612f Mon Sep 17 00:00:00 2001 +From d24ea54a0709d75d0d68d43ac98c13616e804d05 Mon Sep 17 00:00:00 2001 From: Peter Hilber Date: Fri, 9 May 2025 18:07:22 +0200 -Subject: [PATCH] virtio_rtc: Add module and driver core +Subject: [PATCH 28/32] virtio_rtc: Add module and driver core Add the virtio_rtc module and driver core. The virtio_rtc module implements a driver compatible with the proposed Virtio RTC device specification. @@ -34,10 +34,10 @@ Signed-off-by: Michael S. Tsirkin create mode 100644 include/uapi/linux/virtio_rtc.h diff --git a/MAINTAINERS b/MAINTAINERS -index d48dd6726fe6bd..56c487bbea9c02 100644 +index 9ecb818f7ddb..ebf1a598394c 100644 --- a/MAINTAINERS +++ b/MAINTAINERS -@@ -25827,6 +25827,13 @@ S: Maintained +@@ -24620,6 +24620,13 @@ S: Maintained F: drivers/nvdimm/nd_virtio.c F: drivers/nvdimm/virtio_pmem.c @@ -52,7 +52,7 @@ index d48dd6726fe6bd..56c487bbea9c02 100644 M: Anton Yakovlev M: "Michael S. Tsirkin" diff --git a/drivers/virtio/Kconfig b/drivers/virtio/Kconfig -index 2eb747311bfd9c..83bcb06acb6c61 100644 +index 42a48ac763ee..fd6b826af19a 100644 --- a/drivers/virtio/Kconfig +++ b/drivers/virtio/Kconfig @@ -188,4 +188,17 @@ config VIRTIO_DEBUG @@ -74,7 +74,7 @@ index 2eb747311bfd9c..83bcb06acb6c61 100644 + endif # VIRTIO_MENU diff --git a/drivers/virtio/Makefile b/drivers/virtio/Makefile -index 58b2b0489fc9d7..c41c4c0f926489 100644 +index 58b2b0489fc9..c41c4c0f9264 100644 --- a/drivers/virtio/Makefile +++ b/drivers/virtio/Makefile @@ -14,3 +14,5 @@ obj-$(CONFIG_VIRTIO_VDPA) += virtio_vdpa.o @@ -85,7 +85,7 @@ index 58b2b0489fc9d7..c41c4c0f926489 100644 +virtio_rtc-y := virtio_rtc_driver.o diff --git a/drivers/virtio/virtio_rtc_driver.c b/drivers/virtio/virtio_rtc_driver.c new file mode 100644 -index 00000000000000..c87ee4e6342454 +index 000000000000..c87ee4e63424 --- /dev/null +++ b/drivers/virtio/virtio_rtc_driver.c @@ -0,0 +1,786 @@ @@ -877,7 +877,7 @@ index 00000000000000..c87ee4e6342454 +MODULE_LICENSE("GPL"); diff --git a/drivers/virtio/virtio_rtc_internal.h b/drivers/virtio/virtio_rtc_internal.h new file mode 100644 -index 00000000000000..9c249c15b68f92 +index 000000000000..9c249c15b68f --- /dev/null +++ b/drivers/virtio/virtio_rtc_internal.h @@ -0,0 +1,24 @@ @@ -907,7 +907,7 @@ index 00000000000000..9c249c15b68f92 +#endif /* _VIRTIO_RTC_INTERNAL_H_ */ diff --git a/include/uapi/linux/virtio_rtc.h b/include/uapi/linux/virtio_rtc.h new file mode 100644 -index 00000000000000..6b3af4e9bbfb06 +index 000000000000..6b3af4e9bbfb --- /dev/null +++ b/include/uapi/linux/virtio_rtc.h @@ -0,0 +1,151 @@ @@ -1062,3 +1062,6 @@ index 00000000000000..6b3af4e9bbfb06 +}; + +#endif /* _LINUX_VIRTIO_RTC_H */ +-- +2.54.0 + diff --git a/patches/0029-virtio_rtc-Add-PTP-clocks.patch b/patches/0029-virtio_rtc-Add-PTP-clocks.patch index ae5121b8..a545b585 100644 --- a/patches/0029-virtio_rtc-Add-PTP-clocks.patch +++ b/patches/0029-virtio_rtc-Add-PTP-clocks.patch @@ -1,7 +1,7 @@ -From 9a17125a18f9ae1e1233a8e2d919059445b9d6fd Mon Sep 17 00:00:00 2001 +From fb9be033bb51cff396159c297c344e69288dfee2 Mon Sep 17 00:00:00 2001 From: Peter Hilber Date: Fri, 9 May 2025 18:07:23 +0200 -Subject: [PATCH] virtio_rtc: Add PTP clocks +Subject: [PATCH 29/32] virtio_rtc: Add PTP clocks Expose the virtio_rtc clocks as PTP clocks to userspace, similar to ptp_kvm. virtio_rtc can expose multiple clocks, e.g. a UTC clock and a @@ -57,7 +57,7 @@ Signed-off-by: Michael S. Tsirkin create mode 100644 drivers/virtio/virtio_rtc_ptp.c diff --git a/drivers/virtio/Kconfig b/drivers/virtio/Kconfig -index 83bcb06acb6c61..a14a2b77e1424d 100644 +index fd6b826af19a..c98e43a1ee95 100644 --- a/drivers/virtio/Kconfig +++ b/drivers/virtio/Kconfig @@ -194,11 +194,33 @@ config VIRTIO_RTC @@ -96,7 +96,7 @@ index 83bcb06acb6c61..a14a2b77e1424d 100644 + endif # VIRTIO_MENU diff --git a/drivers/virtio/Makefile b/drivers/virtio/Makefile -index c41c4c0f926489..88d6fb8d47315e 100644 +index c41c4c0f9264..88d6fb8d4731 100644 --- a/drivers/virtio/Makefile +++ b/drivers/virtio/Makefile @@ -16,3 +16,4 @@ obj-$(CONFIG_VIRTIO_DMA_SHARED_BUFFER) += virtio_dma_buf.o @@ -105,7 +105,7 @@ index c41c4c0f926489..88d6fb8d47315e 100644 virtio_rtc-y := virtio_rtc_driver.o +virtio_rtc-$(CONFIG_VIRTIO_RTC_PTP) += virtio_rtc_ptp.o diff --git a/drivers/virtio/virtio_rtc_driver.c b/drivers/virtio/virtio_rtc_driver.c -index c87ee4e6342454..7499908ee34c39 100644 +index c87ee4e63424..7499908ee34c 100644 --- a/drivers/virtio/virtio_rtc_driver.c +++ b/drivers/virtio/virtio_rtc_driver.c @@ -38,11 +38,16 @@ struct viortc_vq { @@ -270,7 +270,7 @@ index c87ee4e6342454..7499908ee34c39 100644 virtio_reset_device(vdev); vdev->config->del_vqs(vdev); diff --git a/drivers/virtio/virtio_rtc_internal.h b/drivers/virtio/virtio_rtc_internal.h -index 9c249c15b68f92..2e589903d04f29 100644 +index 9c249c15b68f..2e589903d04f 100644 --- a/drivers/virtio/virtio_rtc_internal.h +++ b/drivers/virtio/virtio_rtc_internal.h @@ -9,6 +9,7 @@ @@ -333,7 +333,7 @@ index 9c249c15b68f92..2e589903d04f29 100644 #endif /* _VIRTIO_RTC_INTERNAL_H_ */ diff --git a/drivers/virtio/virtio_rtc_ptp.c b/drivers/virtio/virtio_rtc_ptp.c new file mode 100644 -index 00000000000000..f84599950cd4d4 +index 000000000000..f84599950cd4 --- /dev/null +++ b/drivers/virtio/virtio_rtc_ptp.c @@ -0,0 +1,347 @@ @@ -684,3 +684,6 @@ index 00000000000000..f84599950cd4d4 + devm_kfree(parent_dev, vio_ptp); + return ERR_PTR(ret); +} +-- +2.54.0 + diff --git a/patches/0030-virtio_rtc-Add-Arm-Generic-Timer-cross-timestamping.patch b/patches/0030-virtio_rtc-Add-Arm-Generic-Timer-cross-timestamping.patch index fbb46534..5047c387 100644 --- a/patches/0030-virtio_rtc-Add-Arm-Generic-Timer-cross-timestamping.patch +++ b/patches/0030-virtio_rtc-Add-Arm-Generic-Timer-cross-timestamping.patch @@ -1,7 +1,7 @@ -From e2ef16757bbe1d4566093179944e9ebe730b2701 Mon Sep 17 00:00:00 2001 +From 6efb22c8522df0587669065dc5ecc0aea9e19468 Mon Sep 17 00:00:00 2001 From: Peter Hilber Date: Fri, 9 May 2025 18:07:24 +0200 -Subject: [PATCH] virtio_rtc: Add Arm Generic Timer cross-timestamping +Subject: [PATCH 30/32] virtio_rtc: Add Arm Generic Timer cross-timestamping For platforms using the Arm Generic Timer, add precise cross-timestamping support to virtio_rtc. @@ -21,7 +21,7 @@ Signed-off-by: Michael S. Tsirkin create mode 100644 drivers/virtio/virtio_rtc_arm.c diff --git a/drivers/virtio/Kconfig b/drivers/virtio/Kconfig -index a14a2b77e1424d..3d8b366c06250d 100644 +index c98e43a1ee95..57beef80dcc5 100644 --- a/drivers/virtio/Kconfig +++ b/drivers/virtio/Kconfig @@ -221,6 +221,19 @@ config VIRTIO_RTC_PTP @@ -45,7 +45,7 @@ index a14a2b77e1424d..3d8b366c06250d 100644 endif # VIRTIO_MENU diff --git a/drivers/virtio/Makefile b/drivers/virtio/Makefile -index 88d6fb8d47315e..dbd77f124ba945 100644 +index 88d6fb8d4731..dbd77f124ba9 100644 --- a/drivers/virtio/Makefile +++ b/drivers/virtio/Makefile @@ -17,3 +17,4 @@ obj-$(CONFIG_VIRTIO_DEBUG) += virtio_debug.o @@ -55,7 +55,7 @@ index 88d6fb8d47315e..dbd77f124ba945 100644 +virtio_rtc-$(CONFIG_VIRTIO_RTC_ARM) += virtio_rtc_arm.o diff --git a/drivers/virtio/virtio_rtc_arm.c b/drivers/virtio/virtio_rtc_arm.c new file mode 100644 -index 00000000000000..211299d7287010 +index 000000000000..211299d72870 --- /dev/null +++ b/drivers/virtio/virtio_rtc_arm.c @@ -0,0 +1,23 @@ @@ -82,3 +82,6 @@ index 00000000000000..211299d7287010 + + return 0; +} +-- +2.54.0 + diff --git a/patches/0031-virtio_rtc-Add-RTC-class-driver.patch b/patches/0031-virtio_rtc-Add-RTC-class-driver.patch index dd0f8113..f5a9591c 100644 --- a/patches/0031-virtio_rtc-Add-RTC-class-driver.patch +++ b/patches/0031-virtio_rtc-Add-RTC-class-driver.patch @@ -1,7 +1,7 @@ -From 9d4f22fd563e0cd02e8448e84d057e7c0132a586 Mon Sep 17 00:00:00 2001 +From 2afb9a58200ff74af3ad3df97609016d7a0993de Mon Sep 17 00:00:00 2001 From: Peter Hilber Date: Fri, 9 May 2025 18:07:25 +0200 -Subject: [PATCH] virtio_rtc: Add RTC class driver +Subject: [PATCH 31/32] virtio_rtc: Add RTC class driver Expose the virtio-rtc UTC-like clock as an RTC clock to userspace - if it is present, and if it does not step on leap seconds. The RTC class enables @@ -55,7 +55,7 @@ Signed-off-by: Michael S. Tsirkin create mode 100644 drivers/virtio/virtio_rtc_class.c diff --git a/drivers/virtio/Kconfig b/drivers/virtio/Kconfig -index 3d8b366c06250d..6db5235a7693d6 100644 +index 57beef80dcc5..8279d6d5a1f1 100644 --- a/drivers/virtio/Kconfig +++ b/drivers/virtio/Kconfig @@ -195,7 +195,8 @@ config VIRTIO_RTC @@ -102,7 +102,7 @@ index 3d8b366c06250d..6db5235a7693d6 100644 endif # VIRTIO_MENU diff --git a/drivers/virtio/Makefile b/drivers/virtio/Makefile -index dbd77f124ba945..eefcfe90d6b8b0 100644 +index dbd77f124ba9..eefcfe90d6b8 100644 --- a/drivers/virtio/Makefile +++ b/drivers/virtio/Makefile @@ -18,3 +18,4 @@ obj-$(CONFIG_VIRTIO_RTC) += virtio_rtc.o @@ -112,7 +112,7 @@ index dbd77f124ba945..eefcfe90d6b8b0 100644 +virtio_rtc-$(CONFIG_VIRTIO_RTC_CLASS) += virtio_rtc_class.o diff --git a/drivers/virtio/virtio_rtc_class.c b/drivers/virtio/virtio_rtc_class.c new file mode 100644 -index 00000000000000..05d6d28255cf3d +index 000000000000..05d6d28255cf --- /dev/null +++ b/drivers/virtio/virtio_rtc_class.c @@ -0,0 +1,262 @@ @@ -379,7 +379,7 @@ index 00000000000000..05d6d28255cf3d + return viortc_class; +} diff --git a/drivers/virtio/virtio_rtc_driver.c b/drivers/virtio/virtio_rtc_driver.c -index 7499908ee34c39..a57d5e06e19d2d 100644 +index 7499908ee34c..a57d5e06e19d 100644 --- a/drivers/virtio/virtio_rtc_driver.c +++ b/drivers/virtio/virtio_rtc_driver.c @@ -18,9 +18,12 @@ @@ -1068,7 +1068,7 @@ index 7499908ee34c39..a57d5e06e19d2d 100644 .probe = viortc_probe, .remove = viortc_remove, diff --git a/drivers/virtio/virtio_rtc_internal.h b/drivers/virtio/virtio_rtc_internal.h -index 2e589903d04f29..296afee6719b32 100644 +index 2e589903d04f..296afee6719b 100644 --- a/drivers/virtio/virtio_rtc_internal.h +++ b/drivers/virtio/virtio_rtc_internal.h @@ -9,6 +9,8 @@ @@ -1143,7 +1143,7 @@ index 2e589903d04f29..296afee6719b32 100644 + #endif /* _VIRTIO_RTC_INTERNAL_H_ */ diff --git a/include/uapi/linux/virtio_rtc.h b/include/uapi/linux/virtio_rtc.h -index 6b3af4e9bbfb06..85ee8f0136613d 100644 +index 6b3af4e9bbfb..85ee8f013661 100644 --- a/include/uapi/linux/virtio_rtc.h +++ b/include/uapi/linux/virtio_rtc.h @@ -9,6 +9,9 @@ @@ -1283,3 +1283,6 @@ index 6b3af4e9bbfb06..85ee8f0136613d 100644 }; #endif /* _LINUX_VIRTIO_RTC_H */ +-- +2.54.0 + diff --git a/patches/0032-virtio_rtc-Fix-compatibility-for-kernel-6.12.patch b/patches/0032-virtio_rtc-Fix-compatibility-for-kernel-6.12.patch index 8b683d36..9f86e4df 100644 --- a/patches/0032-virtio_rtc-Fix-compatibility-for-kernel-6.12.patch +++ b/patches/0032-virtio_rtc-Fix-compatibility-for-kernel-6.12.patch @@ -1,6 +1,7 @@ +From 61f88b799c18ac2f5a3814e19388309e19c821ff Mon Sep 17 00:00:00 2001 From: Dorinda Bassey -Date: Tue, 29 Apr 2026 11:35:00 +0200 -Subject: [PATCH] virtio_rtc: Fix compatibility for kernel 6.12 +Date: Wed, 29 Apr 2026 11:35:00 +0200 +Subject: [PATCH 32/32] virtio_rtc: Fix compatibility for kernel 6.12 Backport virtio_rtc driver to kernel 6.12 by fixing API differences: @@ -16,26 +17,27 @@ Signed-off-by: Dorinda Bassey 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/virtio/virtio_rtc_driver.c b/drivers/virtio/virtio_rtc_driver.c -index bc303c39d568..e7a9c4f6b2e5 100644 +index a57d5e06e19d..bc303c32dab3 100644 --- a/drivers/virtio/virtio_rtc_driver.c +++ b/drivers/virtio/virtio_rtc_driver.c -@@ -575,7 +575,7 @@ int viortc_cross_cap(struct viortc_dev *viortc, u16 vio_clk_id, u8 hw_counter, +@@ -575,7 +575,7 @@ static int viortc_msg_xfer(struct viortc_vq *vq, struct viortc_msg *msg, */ - + /** timeout for clock readings, where timeouts are considered non-fatal */ -#define VIORTC_MSG_READ_TIMEOUT secs_to_jiffies(60) +#define VIORTC_MSG_READ_TIMEOUT msecs_to_jiffies(60 * 1000) - + /** * viortc_read() - VIRTIO_RTC_REQ_READ wrapper -@@ -961,7 +961,7 @@ static int viortc_class_try_init(struct viortc_dev *viortc, bool have_alarm) +@@ -961,7 +961,7 @@ static int viortc_init_rtc_class_clock(struct viortc_dev *viortc, viortc->viortc_class = viortc_class; - + if (have_alarm) - devm_device_init_wakeup(dev); + device_init_wakeup(dev, true); - + return viortc_class_register(viortc_class) ?: 1; } --- -2.43.0 +-- +2.54.0 +