From 8dcdff3f7e77a877dfac1de9655d08dbe029bfbe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marek=20Marczykowski-G=C3=B3recki?= Date: Mon, 23 Feb 2026 19:12:44 +0100 Subject: [PATCH 1/3] Refresh patches for 7.0 --- ...quirk-for-Intel-I219LM-ethernet-adap.patch | 20 +++++++------- xen-pm-use-suspend.patch | 26 +++++++++---------- 2 files changed, 23 insertions(+), 23 deletions(-) diff --git a/0001-PCI-add-a-reset-quirk-for-Intel-I219LM-ethernet-adap.patch b/0001-PCI-add-a-reset-quirk-for-Intel-I219LM-ethernet-adap.patch index 79384f74..f6c50cbc 100644 --- a/0001-PCI-add-a-reset-quirk-for-Intel-I219LM-ethernet-adap.patch +++ b/0001-PCI-add-a-reset-quirk-for-Intel-I219LM-ethernet-adap.patch @@ -1,4 +1,4 @@ -From 4859917799b85e3eeb6582f784e13ea244245849 Mon Sep 17 00:00:00 2001 +From 3eae20a41127e9b24ff1f2c4c08fa2c1e5906982 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marek=20Marczykowski-G=C3=B3recki?= Date: Mon, 15 Jul 2024 16:55:56 +0200 @@ -23,23 +23,23 @@ Signed-off-by: Marek Marczykowski-Górecki 3 files changed, 72 insertions(+), 1 deletion(-) diff --git a/drivers/pci/pci.c b/drivers/pci/pci.c -index e9448d55113bd..4492049395fce 100644 +index 8479c2e1f74f..2465c9acf60b 100644 --- a/drivers/pci/pci.c +++ b/drivers/pci/pci.c -@@ -4559,7 +4559,7 @@ int pcie_reset_flr(struct pci_dev *dev, bool probe) +@@ -4385,7 +4385,7 @@ int pcie_reset_flr(struct pci_dev *dev, bool probe) } EXPORT_SYMBOL_GPL(pcie_reset_flr); -static int pci_af_flr(struct pci_dev *dev, bool probe) +int pci_af_flr(struct pci_dev *dev, bool probe) { + int ret; int pos; - u8 cap; diff --git a/drivers/pci/pci.h b/drivers/pci/pci.h -index 12215ee72afb6..8e83b7905cb37 100644 +index 13d998fbacce..cb7acc605fea 100644 --- a/drivers/pci/pci.h +++ b/drivers/pci/pci.h -@@ -850,6 +850,7 @@ void pcie_reset_lbms(struct pci_dev *port); +@@ -1128,6 +1128,7 @@ void pcie_reset_lbms(struct pci_dev *port); #else static inline void pcie_reset_lbms(struct pci_dev *port) {} #endif @@ -48,10 +48,10 @@ index 12215ee72afb6..8e83b7905cb37 100644 struct pci_dev_reset_methods { u16 vendor; diff --git a/drivers/pci/quirks.c b/drivers/pci/quirks.c -index d7f4ee634263c..a8ddc34902ab0 100644 +index 48946cca4be7..8960d3ae370a 100644 --- a/drivers/pci/quirks.c +++ b/drivers/pci/quirks.c -@@ -4205,6 +4205,74 @@ static int reset_hinic_vf_dev(struct pci_dev *pdev, bool probe) +@@ -4239,6 +4239,74 @@ static int reset_hinic_vf_dev(struct pci_dev *pdev, bool probe) return 0; } @@ -126,7 +126,7 @@ index d7f4ee634263c..a8ddc34902ab0 100644 static const struct pci_dev_reset_methods pci_dev_reset_methods[] = { { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82599_SFP_VF, reset_intel_82599_sfp_virtfn }, -@@ -4220,6 +4288,8 @@ static const struct pci_dev_reset_methods pci_dev_reset_methods[] = { +@@ -4254,6 +4322,8 @@ static const struct pci_dev_reset_methods pci_dev_reset_methods[] = { reset_chelsio_generic_dev }, { PCI_VENDOR_ID_HUAWEI, PCI_DEVICE_ID_HINIC_VF, reset_hinic_vf_dev }, @@ -136,5 +136,5 @@ index d7f4ee634263c..a8ddc34902ab0 100644 }; -- -2.49.0 +2.52.0 diff --git a/xen-pm-use-suspend.patch b/xen-pm-use-suspend.patch index cd185e41..c0b4929d 100644 --- a/xen-pm-use-suspend.patch +++ b/xen-pm-use-suspend.patch @@ -1,4 +1,4 @@ -From 895c01cc7e63404250fd9763c4fb91620ad63a4c Mon Sep 17 00:00:00 2001 +From 7e1526209cf972f51281558f1cb979d18e49cdd1 Mon Sep 17 00:00:00 2001 From: Simon Gaiser Date: Tue, 30 Apr 2024 14:27:33 +0200 Subject: [PATCH] Add experimental flag to use suspend instad of freeze for Xen @@ -26,10 +26,10 @@ and the new behavior adapted accordingly. 2 files changed, 15 insertions(+), 4 deletions(-) diff --git a/drivers/xen/manage.c b/drivers/xen/manage.c -index c16df629907e..1b723c68cc3c 100644 +index e20c40a62e64..dec7b7d544c9 100644 --- a/drivers/xen/manage.c +++ b/drivers/xen/manage.c -@@ -46,6 +46,9 @@ struct suspend_info { +@@ -47,6 +47,9 @@ struct suspend_info { static RAW_NOTIFIER_HEAD(xen_resume_notifier); @@ -39,7 +39,7 @@ index c16df629907e..1b723c68cc3c 100644 void xen_resume_notifier_register(struct notifier_block *nb) { raw_notifier_chain_register(&xen_resume_notifier, nb); -@@ -113,7 +116,10 @@ static void do_suspend(void) +@@ -114,7 +117,10 @@ static void do_suspend(void) goto out_thaw; } @@ -51,7 +51,7 @@ index c16df629907e..1b723c68cc3c 100644 if (err) { pr_err("%s: dpm_suspend_start %d\n", __func__, err); goto out_resume_end; -@@ -122,7 +128,7 @@ static void do_suspend(void) +@@ -123,7 +129,7 @@ static void do_suspend(void) printk(KERN_DEBUG "suspending xenstore...\n"); xs_suspend(); @@ -60,7 +60,7 @@ index c16df629907e..1b723c68cc3c 100644 if (err) { pr_err("dpm_suspend_end failed: %d\n", err); si.cancelled = 0; -@@ -143,7 +149,7 @@ static void do_suspend(void) +@@ -144,7 +150,7 @@ static void do_suspend(void) xen_arch_resume(); @@ -69,7 +69,7 @@ index c16df629907e..1b723c68cc3c 100644 if (err) { pr_err("failed to start xen_suspend: %d\n", err); -@@ -156,7 +162,7 @@ static void do_suspend(void) +@@ -158,7 +164,7 @@ static void do_suspend(void) xs_suspend_cancel(); out_resume_end: @@ -79,23 +79,23 @@ index c16df629907e..1b723c68cc3c 100644 out_thaw: thaw_processes(); diff --git a/drivers/xen/xenbus/xenbus_probe_frontend.c b/drivers/xen/xenbus/xenbus_probe_frontend.c -index fcb335bb7b18..5caa5b2369fb 100644 +index f04707d1f667..d9273b9f35a5 100644 --- a/drivers/xen/xenbus/xenbus_probe_frontend.c +++ b/drivers/xen/xenbus/xenbus_probe_frontend.c -@@ -98,8 +98,13 @@ static void xenbus_frontend_delayed_resume(struct work_struct *w) - xenbus_dev_resume(&xdev->dev); +@@ -98,8 +98,13 @@ static void xenbus_frontend_delayed_restore(struct work_struct *w) + xenbus_dev_restore(&xdev->dev); } +extern bool __read_mostly xen_use_suspend; + - static int xenbus_frontend_dev_resume(struct device *dev) + static int xenbus_frontend_dev_restore(struct device *dev) { + if (xen_use_suspend) -+ return xenbus_dev_cancel(dev); ++ return xenbus_dev_thaw(dev); + /* * If xenstored is running in this domain, we cannot access the backend * state at the moment, so we need to defer xenbus_dev_resume -- -2.43.0 +2.52.0 From f7553d4c26d98435abcad6b1ca5fc20cc8c0b8fb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marek=20Marczykowski-G=C3=B3recki?= Date: Wed, 18 Mar 2026 01:11:03 +0100 Subject: [PATCH 2/3] Drop patch included upstream --- ...n-xenbus-better-handle-backend-crash.patch | 126 ------------------ kernel.spec.in | 1 - 2 files changed, 127 deletions(-) delete mode 100644 0001-xen-xenbus-better-handle-backend-crash.patch diff --git a/0001-xen-xenbus-better-handle-backend-crash.patch b/0001-xen-xenbus-better-handle-backend-crash.patch deleted file mode 100644 index ebf473a1..00000000 --- a/0001-xen-xenbus-better-handle-backend-crash.patch +++ /dev/null @@ -1,126 +0,0 @@ -From c2b6a8e0c215ad574f49001994ab1ef661df57e1 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Marek=20Marczykowski-G=C3=B3recki?= - -Date: Thu, 9 Oct 2025 14:51:04 +0200 -Subject: [PATCH] xen/xenbus: better handle backend crash -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -When the backend domain crashes, coordinated device cleanup is not -possible (as it involves waiting for the backend state change). In that -case, toolstack forcefully removes frontend xenstore entries. -xenbus_dev_changed() handles this case, and triggers device cleanup. -It's possible that toolstack manages to connect new device in that -place, before xenbus_dev_changed() notices the old one is missing. If -that happens, new one won't be probed and will forever remain in -XenbusStateInitialising. - -Fix this by checking backend-id and if it changes, consider it -unplug+plug operation. It's important that cleanup on such unplug -doesn't modify xenstore entries (especially the "state" key) as it -belong to the new device to be probed - changing it would derail -establishing connection to the new backend (most likely, closing the -device before it was even connected). Handle this case by setting new -xenbus_device->vanished flag to true, and check it before changing state -entry. - -And even if xenbus_dev_changed() correctly detects the device was -forcefully removed, the cleanup handling is still racy. Since this whole -handling doesn't happend in a single xenstore transaction, it's possible -that toolstack might put a new device there already. Avoid re-creating -the state key (which in the case of loosing the race would actually -close newly attached device). - -The problem does not apply to frontend domain crash, as this case -involves coordinated cleanup. - -Problem originally reported at -https://lore.kernel.org/xen-devel/aOZvivyZ9YhVWDLN@mail-itl/T/#t, -including reproduction steps. - -Signed-off-by: Marek Marczykowski-Górecki ---- -I considered re-using one of existing fields instead of a new -xenbus_device->vanished, but I wasn't sure if that would work better. -Setting xenbus_device->nodename to NULL would prevent few other places -using it (including some log messages). Setting xenbus_device->otherend -might have less unintentional impact, but logically it doesn't feel -correct. ---- - drivers/xen/xenbus/xenbus_client.c | 2 ++ - drivers/xen/xenbus/xenbus_probe.c | 25 +++++++++++++++++++++++++ - include/xen/xenbus.h | 1 + - 3 files changed, 28 insertions(+) - -diff --git a/drivers/xen/xenbus/xenbus_client.c b/drivers/xen/xenbus/xenbus_client.c -index e73ec225d4a61..ce2f49d9aa4ad 100644 ---- a/drivers/xen/xenbus/xenbus_client.c -+++ b/drivers/xen/xenbus/xenbus_client.c -@@ -275,6 +275,8 @@ __xenbus_switch_state(struct xenbus_device *dev, - */ - int xenbus_switch_state(struct xenbus_device *dev, enum xenbus_state state) - { -+ if (dev->vanished) -+ return 0; - return __xenbus_switch_state(dev, state, 0); - } - -diff --git a/drivers/xen/xenbus/xenbus_probe.c b/drivers/xen/xenbus/xenbus_probe.c -index 86fe6e7790566..3c3e56b544976 100644 ---- a/drivers/xen/xenbus/xenbus_probe.c -+++ b/drivers/xen/xenbus/xenbus_probe.c -@@ -444,6 +444,9 @@ static void xenbus_cleanup_devices(const char *path, struct bus_type *bus) - info.dev = NULL; - bus_for_each_dev(bus, NULL, &info, cleanup_dev); - if (info.dev) { -+ dev_warn(&info.dev->dev, -+ "device forcefully removed from xenstore\n"); -+ info.dev->vanished = true; - device_unregister(&info.dev->dev); - put_device(&info.dev->dev); - } -@@ -659,6 +662,28 @@ void xenbus_dev_changed(const char *node, struct xen_bus_type *bus) - return; - - dev = xenbus_device_find(root, &bus->bus); -+ /* Backend domain crash results in not coordinated frontend removal, -+ * without going through XenbusStateClosing. Check if the device -+ * wasn't replaced to point at another backend in the meantime. -+ */ -+ if (dev && !strncmp(node, "device/", sizeof("device/")-1)) { -+ int backend_id; -+ int err = xenbus_gather(XBT_NIL, root, -+ "backend-id", "%i", &backend_id, -+ NULL); -+ if (!err && backend_id != dev->otherend_id) { -+ /* It isn't the same device, assume the old one -+ * vanished and new one needs to be probed. -+ */ -+ dev_warn(&dev->dev, -+ "backend-id mismatch (%d != %d), reconnecting\n", -+ backend_id, dev->otherend_id); -+ dev->vanished = true; -+ device_unregister(&dev->dev); -+ put_device(&dev->dev); -+ dev = NULL; -+ } -+ } - if (!dev) - xenbus_probe_node(bus, type, root); - else -diff --git a/include/xen/xenbus.h b/include/xen/xenbus.h -index 7dab04cf4a36c..43a5335f1d5a3 100644 ---- a/include/xen/xenbus.h -+++ b/include/xen/xenbus.h -@@ -87,6 +87,7 @@ struct xenbus_device { - struct completion down; - struct work_struct work; - struct semaphore reclaim_sem; -+ bool vanished; - - /* Event channel based statistics and settings. */ - atomic_t event_channels; --- -2.51.0 - diff --git a/kernel.spec.in b/kernel.spec.in index 2e8c7f4c..1be8d8a7 100644 --- a/kernel.spec.in +++ b/kernel.spec.in @@ -155,7 +155,6 @@ Patch26: 0001-sound-Disable-SG-buffer.patch Patch27: 0001-amdgpu-timeout.patch Patch30: 0004-pvops-respect-removable-xenstore-flag-for-block-devi.patch Patch31: 0001-PCI-add-a-reset-quirk-for-Intel-I219LM-ethernet-adap.patch -Patch33: 0001-xen-xenbus-better-handle-backend-crash.patch Patch34: 0001-rust-fixup.patch # S0ix support: From 4c718a8b2dcf87a650d8c311ef84e1871020c2d0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marek=20Marczykowski-G=C3=B3recki?= Date: Tue, 24 Jan 2023 03:33:19 +0100 Subject: [PATCH 3/3] version 7.0-rc6 Release candidate build for testing --- .qubesbuilder | 12 ++++++------ version | 2 +- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/.qubesbuilder b/.qubesbuilder index 2d2e6cb1..0be8d79e 100644 --- a/.qubesbuilder +++ b/.qubesbuilder @@ -9,13 +9,13 @@ source: - dummy-backlight - v4l2loopback files: - - url: https://cdn.kernel.org/pub/linux/kernel/v6.x/linux-@VERSION@.tar.xz - signature: https://cdn.kernel.org/pub/linux/kernel/v6.x/linux-@VERSION@.tar.sign - uncompress: true +# - url: https://cdn.kernel.org/pub/linux/kernel/v6.x/linux-@VERSION@.tar.xz +# signature: https://cdn.kernel.org/pub/linux/kernel/v6.x/linux-@VERSION@.tar.sign +# uncompress: true ## for -rc kernels, use this: -# - git-url: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git -# git-basename: linux-@VERSION@ -# tag: v@VERSION@ + - git-url: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git + git-basename: linux-@VERSION@ + tag: v@VERSION@ pubkeys: - kernel.org-2-key.asc - kernel.org-1-key.asc diff --git a/version b/version index 0a61a6d5..8978f4cf 100644 --- a/version +++ b/version @@ -1 +1 @@ -6.19.5 +7.0-rc6