public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [rpms/xen] f44: update to xen 4.21.3
@ 2026-11-28 19:47 Michael Young
  0 siblings, 0 replies; only message in thread
From: Michael Young @ 2026-11-28 19:47 UTC (permalink / raw)
  To: git-commits

            A new commit has been pushed.

            Repo   : rpms/xen
            Branch : f44
            Commit : d24a19a093236bf25ac5cb0c5a989e00ff7ec137
            Author : Michael Young <m.a.young@durham.ac.uk>
            Date   : 2026-11-28T19:46:28+00:00
            Stats  : +9/-1593 in 21 file(s)
            URL    : https://src.fedoraproject.org/rpms/xen/c/d24a19a093236bf25ac5cb0c5a989e00ff7ec137?branch=f44

            Log:
            update to xen 4.21.3

includes x86: Incorrect ordering of page-freeing and p2m flush
   [XSA-535, CVE-2026-119781, CVE-2026-119782, CVE-2026-119783]

---
diff --git a/.gitignore b/.gitignore
index a99a4eb..0fb39d7 100644
--- a/.gitignore
+++ b/.gitignore
@@ -7,4 +7,4 @@ pciutils-2.2.9.tar.bz2
 zlib-1.2.3.tar.gz
 polarssl-1.1.4-gpl.tgz
 /mini-os-4.21.0.tar.xz
-/xen-4.21.2.tar.xz
+/xen-4.21.3.tar.xz

diff --git a/sources b/sources
index 8fc67c3..fee8861 100644
--- a/sources
+++ b/sources
@@ -5,4 +5,4 @@ SHA512 (zlib-1.2.3.tar.gz) = 021b958fcd0d346c4ba761bcf0cc40f3522de6186cf5a0a6ea3
 SHA512 (polarssl-1.1.4-gpl.tgz) = 88da614e4d3f4409c4fd3bb3e44c7587ba051e3fed4e33d526069a67e8180212e1ea22da984656f50e290049f60ddca65383e5983c0f8884f648d71f698303ad
 SHA512 (pciutils-2.2.9.tar.bz2) = 2b3d98d027e46d8c08037366dde6f0781ca03c610ef2b380984639e4ef39899ed8d8b8e4cd9c9dc54df101279b95879bd66bfd4d04ad07fef41e847ea7ae32b5
 SHA512 (mini-os-4.21.0.tar.xz) = 7543774d15da84476d93d04154990923c82209cb3fa125574c0383652c5a310957200f54b63b34502161f9c3afce4907e0060d9036f3eaf3a7cb6b1b3119b546
-SHA512 (xen-4.21.2.tar.xz) = 78de26ab01f06024890e867c0b4a38d4a590ecffebc18f8dafa842baeb144b0f0463f2cf241eb3b081179b357ddf5ee389d883ca23a12a2be51ba3161fb8c0fd
+SHA512 (xen-4.21.3.tar.xz) = 368d56cb29bcce244098a6dabcb6cdb62d78d47b0db19b3c34fa5b66ea89b8af5b00720d7069ff8b6263d76804a466a20b2e52d39bdd4ca29cf51711deb9f186

diff --git a/xen.spec b/xen.spec
index 375a97c..f35b32c 100644
--- a/xen.spec
+++ b/xen.spec
@@ -50,8 +50,8 @@
 
 Summary: Xen is a virtual machine monitor
 Name:    xen
-Version: 4.21.2
-Release: 6%{?dist}
+Version: 4.21.3
+Release: 1%{?dist}
 # Automatically converted from old format: GPLv2+ and LGPLv2+ and BSD - review is highly recommended.
 License: GPL-2.0-or-later AND LicenseRef-Callaway-LGPLv2+ AND LicenseRef-Callaway-BSD
 URL:     http://xen.org/
@@ -78,24 +78,6 @@ Patch6: xen.gcc11.fixes.patch
 Patch7: xen.gcc12.fixes.patch
 Patch8: xen.efi.build.patch
 Patch9: xen.python3.12.patch
-Patch10: xsa509.patch
-Patch11: xsa510.patch
-Patch12: xsa511-4.21.patch
-Patch13: xsa512-1.patch
-Patch14: xsa512-2.patch
-Patch15: xsa515.patch
-Patch16: xsa516.patch
-Patch17: xsa517.patch
-Patch18: xsa518.patch
-Patch19: xsa519-1.patch
-Patch20: xsa519-2.patch
-Patch21: xsa520.patch
-Patch22: xsa523-1.patch
-Patch23: xsa523-2.patch
-Patch24: xsa524.patch
-Patch25: xsa525-1.patch
-Patch26: xsa525-2.patch
-Patch27: xsa525-3.patch
 
 
 # build using Fedora seabios and ipxe packages for roms
@@ -281,24 +263,6 @@ This package contains files used in testing the xen builds
 %patch 7 -p1
 %patch 8 -p1
 %patch 9 -p1
-%patch 10 -p1
-%patch 11 -p1
-%patch 12 -p1
-%patch 13 -p1
-%patch 14 -p1
-%patch 15 -p1
-%patch 16 -p1
-%patch 17 -p1
-%patch 18 -p1
-%patch 19 -p1
-%patch 20 -p1
-%patch 21 -p1
-%patch 22 -p1
-%patch 23 -p1
-%patch 24 -p1
-%patch 25 -p1
-%patch 26 -p1
-%patch 27 -p1
 
 # stubdom sources
 cp -v %{SOURCE10} %{SOURCE11} %{SOURCE12} %{SOURCE13} %{SOURCE14} %{SOURCE15} stubdom
@@ -854,6 +818,11 @@ fi
 %{_libexecdir}/xen/tests/*
 
 %changelog
+* Sat Nov 28 2026 Michael Young <m.a.young@durham.ac.uk> - 4.21.3-1
+- update to xen 4.21.3
+- includes x86: Incorrect ordering of page-freeing and p2m flush
+  [XSA-535, CVE-2026-119781, CVE-2026-119782, CVE-2026-119783]
+
 * Wed Nov 11 2026 Michael Young <m.a.young@durham.ac.uk> - 4.21.2-6
 - AMD IOMMU Out-of-Bounds Device Table Read [XSA-524, CVE-2024-21963]
   x86: Transient Scheduler Attacks (update)

diff --git a/xsa509.patch b/xsa509.patch
deleted file mode 100644
index 51cae81..0000000
--- a/xsa509.patch
+++ /dev/null
@@ -1,33 +0,0 @@
-From: Jan Beulich <jbeulich@suse.com>
-Subject: x86/pass-through: disallow pt_irq_create_bind() on dying domains
-
-DMs may invoke XEN_DOMCTL_bind_pt_irq for domains already under
-destruction. When XEN_DOMCTL_bind_pt_irq is invoked after
-pci_release_devices() (invoked from underneath domain_kill()) had already
-completed, it would allocate hvm_domain_irq(d)->dpci anew, without that
-ever being freed during subsequent domain cleanup.
-
-Leverage evtchn_destroy()'s kind-of-spin-barrier, allowing to simply check
-->is_dying with the domain's event lock held.
-
-This is XSA-509 / CVE-2026-62437.
-
-Fixes: 7a26b541a202 ("vtd: Dynamically allocate IRQ-tracking structures, only for those")
-Signed-off-by: Jan Beulich <jbeulich@suse.com>
-Reviewed-by: Roger Pau Monné <roger.pau@citrix.com>
-
---- a/xen/drivers/passthrough/x86/hvm.c
-+++ b/xen/drivers/passthrough/x86/hvm.c
-@@ -231,6 +231,12 @@ int pt_irq_create_bind(
-  restart:
-     write_lock(&d->event_lock);
- 
-+    if ( d->is_dying )
-+    {
-+        write_unlock(&d->event_lock);
-+        return -ESRCH;
-+    }
-+
-     hvm_irq_dpci = domain_get_irq_dpci(d);
-     if ( !hvm_irq_dpci && !is_hardware_domain(d) )
-     {

diff --git a/xsa510.patch b/xsa510.patch
deleted file mode 100644
index 0ad3b49..0000000
--- a/xsa510.patch
+++ /dev/null
@@ -1,39 +0,0 @@
-From 796537311797d600c0c716d0c015531fc41abb92 Mon Sep 17 00:00:00 2001
-From: Roger Pau Monne <roger@xenproject.org>
-Date: Fri, 7 Aug 2026 11:03:48 +0200
-Subject: [PATCH] x86/emul: cope with internal handlers returning X86EMUL_RETRY
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-hvm_io_intercept() can return X86EMUL_RETRY, and as such it needs to be
-handled in the switch in hvmemul_do_io() to avoid triggering the BUG() from
-the default case.
-
-Reset the vCPU state to no in-flight IOREQ and return X86EMUL_RETRY so that
-the access is retried.
-
-This is XSA-510 / CVE-2026-79602.
-
-Reported-by: Jiqian Chen <Jiqian.Chen@amd.com>
-Signed-off-by: Roger Pau Monné <roger@xenproject.org>
-Reviewed-by: Jan Beulich <jbeulich@suse.com>
----
- xen/arch/x86/hvm/emulate.c | 1 +
- 1 file changed, 1 insertion(+)
-
-diff --git a/xen/arch/x86/hvm/emulate.c b/xen/arch/x86/hvm/emulate.c
-index 2efb1d4f0823..c09ea002ec62 100644
---- a/xen/arch/x86/hvm/emulate.c
-+++ b/xen/arch/x86/hvm/emulate.c
-@@ -308,6 +308,7 @@ static int hvmemul_do_io(
-     switch ( rc )
-     {
-     case X86EMUL_OKAY:
-+    case X86EMUL_RETRY:
-         vio->req.state = STATE_IOREQ_NONE;
-         break;
-     case X86EMUL_UNHANDLEABLE:
--- 
-2.53.0
-

diff --git a/xsa511-4.21.patch b/xsa511-4.21.patch
deleted file mode 100644
index 10ea1f5..0000000
--- a/xsa511-4.21.patch
+++ /dev/null
@@ -1,201 +0,0 @@
-From 70e281422ad1ee5e8f9cb2dbaad418db08dc5bda Mon Sep 17 00:00:00 2001
-From: Roger Pau Monne <roger@xenproject.org>
-Date: Tue, 4 Aug 2026 12:23:19 +0200
-Subject: [PATCH] xen/page_alloc: ensure TLB flush is done ahead of page
- scrubbing
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-The current way in which idle TLB flush and TLB flushing when allocating a
-page are done allows for the scrubbing to be done ahead of the TLB flush.
-A PV domain can still have a TLB entry for the page after scrubbing, and
-hence it may be able to modify it.  Such unintended page accessing allows
-domains to possibly exchange information even when `xsm=silo scrub-domheap`
-are in effect.
-
-Remove the MEMF_no_tlbflush memory allocation flag, and reorder the
-flushing so it's always done ahead of the scrubbing in
-alloc_{,color_}heap_pages().  The sole user of MEMF_no_tlbflush is
-populate_physmap(), and given the constrains above it's no longer safe
-to defer the flush, hence the flag removal and the folding of the flush in
-the allocator function itself.
-
-This is XSA-511 / CVE-2026-79603.
-
-Fixes: 24f1a58d1954 ("mm: option to _always_ scrub freed domheap pages")
-Signed-off-by: Roger Pau Monné <roger@xenproject.org>
-Reviewed-by: Jan Beulich <jbeulich@suse.com>
----
- xen/common/memory.c     | 21 ---------------------
- xen/common/page_alloc.c | 34 +++++++++++++++++++---------------
- xen/include/xen/mm.h    |  2 --
- 3 files changed, 19 insertions(+), 38 deletions(-)
-
-diff --git a/xen/common/memory.c b/xen/common/memory.c
-index 76a1bf1b1159..6c1ea6aae273 100644
---- a/xen/common/memory.c
-+++ b/xen/common/memory.c
-@@ -165,8 +165,6 @@ static void populate_physmap(struct memop_args *a)
-     unsigned int i, j;
-     xen_pfn_t gpfn;
-     struct domain *d = a->domain, *curr_d = current->domain;
--    bool need_tlbflush = false;
--    uint32_t tlbflush_timestamp = 0;
- 
-     if ( !guest_handle_subrange_okay(a->extent_list, a->nr_done,
-                                      a->nr_extents-1) )
-@@ -178,15 +176,6 @@ static void populate_physmap(struct memop_args *a)
- 
-     if ( unlikely(!d->creation_finished) )
-     {
--        /*
--         * With MEMF_no_tlbflush set, alloc_heap_pages() will ignore
--         * TLB-flushes. After VM creation, this is a security issue (it can
--         * make pages accessible to guest B, when guest A may still have a
--         * cached mapping to them). So we do this only during domain creation,
--         * when the domain itself has not yet been unpaused for the first
--         * time.
--         */
--        a->memflags |= MEMF_no_tlbflush;
-         /*
-          * With MEMF_no_icache_flush, alloc_heap_pages() will skip
-          * performing icache flushes. We do it only before domain
-@@ -286,13 +275,6 @@ static void populate_physmap(struct memop_args *a)
-                     goto out;
-                 }
- 
--                if ( unlikely(a->memflags & MEMF_no_tlbflush) )
--                {
--                    for ( j = 0; j < (1U << a->extent_order); j++ )
--                        accumulate_tlbflush(&need_tlbflush, &page[j],
--                                            &tlbflush_timestamp);
--                }
--
-                 mfn = page_to_mfn(page);
-             }
- 
-@@ -307,9 +289,6 @@ static void populate_physmap(struct memop_args *a)
-     }
- 
- out:
--    if ( need_tlbflush )
--        filtered_flush_tlb_mask(tlbflush_timestamp);
--
-     if ( a->memflags & MEMF_no_icache_flush )
-         invalidate_icache();
- 
-diff --git a/xen/common/page_alloc.c b/xen/common/page_alloc.c
-index a7b3b04a4d01..c4a8f8bc767e 100644
---- a/xen/common/page_alloc.c
-+++ b/xen/common/page_alloc.c
-@@ -1096,15 +1096,17 @@ static struct page_info *alloc_heap_pages(
-         /* Preserve PGC_need_scrub so we can check it after lock is dropped. */
-         pg[i].count_info = PGC_state_inuse | (pg[i].count_info & PGC_need_scrub);
- 
--        if ( !(memflags & MEMF_no_tlbflush) )
--            accumulate_tlbflush(&need_tlbflush, &pg[i],
--                                &tlbflush_timestamp);
-+        accumulate_tlbflush(&need_tlbflush, &pg[i], &tlbflush_timestamp);
- 
-         init_free_page_fields(&pg[i]);
-     }
- 
-     spin_unlock(&heap_lock);
- 
-+    /* Flush ahead of scrubbing: ensure no PV domain has a stale TLB entry. */
-+    if ( need_tlbflush )
-+        filtered_flush_tlb_mask(tlbflush_timestamp);
-+
-     if ( first_dirty != INVALID_DIRTY_IDX ||
-          (scrub_debug && !(memflags & MEMF_no_scrub)) )
-     {
-@@ -1131,9 +1133,6 @@ static struct page_info *alloc_heap_pages(
-         }
-     }
- 
--    if ( need_tlbflush )
--        filtered_flush_tlb_mask(tlbflush_timestamp);
--
-     /*
-      * Ensure cache and RAM are consistent for platforms where the guest
-      * can control its own visibility of/through the cache.
-@@ -1387,6 +1386,13 @@ bool scrub_free_pages(void)
-                 {
-                     if ( test_bit(_PGC_need_scrub, &pg[i].count_info) )
-                     {
-+                        bool need_tlbflush = false;
-+                        uint32_t tlbflush_ts = 0;
-+
-+                        accumulate_tlbflush(&need_tlbflush, &pg[i], &tlbflush_ts);
-+                        if ( need_tlbflush )
-+                            filtered_flush_tlb_mask(tlbflush_ts);
-+
-                         scrub_one_page(&pg[i], true);
-                         /*
-                          * We can modify count_info without holding heap
-@@ -2054,7 +2060,7 @@ static struct page_info *alloc_color_heap_page(unsigned int memflags,
-     uint32_t tlbflush_timestamp = 0;
-     bool need_scrub;
- 
--    if ( memflags & ~(MEMF_no_refcount | MEMF_no_owner | MEMF_no_tlbflush |
-+    if ( memflags & ~(MEMF_no_refcount | MEMF_no_owner |
-                       MEMF_no_icache_flush | MEMF_no_scrub) )
-         return NULL;
- 
-@@ -2083,13 +2089,16 @@ static struct page_info *alloc_color_heap_page(unsigned int memflags,
-     free_colored_pages[color]--;
-     page_list_del(pg, color_heap(color));
- 
--    if ( !(memflags & MEMF_no_tlbflush) )
--        accumulate_tlbflush(&need_tlbflush, pg, &tlbflush_timestamp);
-+    accumulate_tlbflush(&need_tlbflush, pg, &tlbflush_timestamp);
- 
-     init_free_page_fields(pg);
- 
-     spin_unlock(&heap_lock);
- 
-+    /* Flush ahead of scrubbing: ensure no PV domain has a stale TLB entry. */
-+    if ( need_tlbflush )
-+        filtered_flush_tlb_mask(tlbflush_timestamp);
-+
-     if ( !(memflags & MEMF_no_scrub) )
-     {
-         if ( need_scrub )
-@@ -2098,9 +2107,6 @@ static struct page_info *alloc_color_heap_page(unsigned int memflags,
-             check_one_page(pg);
-     }
- 
--    if ( need_tlbflush )
--        filtered_flush_tlb_mask(tlbflush_timestamp);
--
-     flush_page_to_ram(mfn_x(page_to_mfn(pg)),
-                       !(memflags & MEMF_no_icache_flush));
- 
-@@ -3006,9 +3012,7 @@ static bool prepare_staticmem_pages(struct page_info *pg, unsigned long nr_mfns,
-             goto out_err;
-         }
- 
--        if ( !(memflags & MEMF_no_tlbflush) )
--            accumulate_tlbflush(&need_tlbflush, &pg[i],
--                                &tlbflush_timestamp);
-+        accumulate_tlbflush(&need_tlbflush, &pg[i], &tlbflush_timestamp);
- 
-         /*
-          * Preserve flag PGC_static and change page state
-diff --git a/xen/include/xen/mm.h b/xen/include/xen/mm.h
-index b968f47b87e0..58410a367a39 100644
---- a/xen/include/xen/mm.h
-+++ b/xen/include/xen/mm.h
-@@ -204,8 +204,6 @@ struct npfec {
- #define  MEMF_exact_node  (1U<<_MEMF_exact_node)
- #define _MEMF_no_owner    5
- #define  MEMF_no_owner    (1U<<_MEMF_no_owner)
--#define _MEMF_no_tlbflush 6
--#define  MEMF_no_tlbflush (1U<<_MEMF_no_tlbflush)
- #define _MEMF_no_icache_flush 7
- #define  MEMF_no_icache_flush (1U<<_MEMF_no_icache_flush)
- #define _MEMF_no_scrub    8
--- 
-2.53.0
-

diff --git a/xsa512-1.patch b/xsa512-1.patch
deleted file mode 100644
index 9d0256e..0000000
--- a/xsa512-1.patch
+++ /dev/null
@@ -1,80 +0,0 @@
-From 5332a2c46db4f96e5d5a57100c55076fe5610beb Mon Sep 17 00:00:00 2001
-From: Andrii Sultanov <andriy.sultanov@vates.tech>
-Date: Thu, 20 Aug 2026 16:00:02 +0100
-Subject: oxenstored: Factor out Process.do_reconnect()
-
-The logic flow here is complicated.  In preparation to fix a bug, factor out
-reconnecting a xenbus connection, and fold History.reconnect into it's single
-caller.
-
-No functional change.
-
-This is part of XSA-512 / CVE-2026-79604.
-
-Signed-off-by: Andrii Sultanov <andriy.sultanov@vates.tech>
-Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
-Reviewed-by: Andrii Sultanov <andriy.sultanov@vates.tech>
-
-diff --git a/tools/ocaml/xenstored/history.ml b/tools/ocaml/xenstored/history.ml
-index f03fb1832923..3474a62da230 100644
---- a/tools/ocaml/xenstored/history.ml
-+++ b/tools/ocaml/xenstored/history.ml
-@@ -39,10 +39,6 @@ let end_transaction txn con tid commit =
-   trim ~txn ();
-   success
- 
--let reconnect con =
--  trim ();
--  Connection.do_reconnect con
--
- let push (x: history_record) =
-   let dom = x.con.Connection.dom in
-   match dom with
-diff --git a/tools/ocaml/xenstored/process.ml b/tools/ocaml/xenstored/process.ml
-index 0c9c460a9915..bc68c54c9aba 100644
---- a/tools/ocaml/xenstored/process.ml
-+++ b/tools/ocaml/xenstored/process.ml
-@@ -350,6 +350,13 @@ let do_reset_watches con _t _domains cons _data =
-   Connections.del_watches cons con;
-   Connection.del_transactions con
- 
-+let do_reconnect cons con =
-+  let domstr = Connection.get_domstr con in
-+  info "%s requests a reconnect" domstr;
-+  History.trim ();
-+  Connection.do_reconnect con;
-+  info "%s reconnection complete" domstr
-+
- (* only in >= xen3.3                                                                                    *)
- let do_set_target con _t _domains cons data =
-   if not (Connection.is_dom0 con)
-@@ -735,9 +742,7 @@ let do_input store cons doms con =
-       if Connection.can_input con then Connection.do_input con
-       else None
-     with Xenbus.Xb.Reconnect ->
--      info "%s requests a reconnect" (Connection.get_domstr con);
--      History.reconnect con;
--      info "%s reconnection complete" (Connection.get_domstr con);
-+      do_reconnect cons con;
-       None
-        | Invalid_argument exp | Failure exp ->
-          error "caught exception %s" exp;
-@@ -760,7 +765,7 @@ let do_input store cons doms con =
-     write_access_log ~ty ~tid ~con:(Connection.get_domstr con) ~data;
-     Connection.incr_ops con
- 
--let do_output _store _cons _doms con =
-+let do_output _store cons _doms con =
-   Connection.source_flush_watchevents con;
-   if Connection.has_output con then (
-     if Connection.has_new_output con then (
-@@ -775,8 +780,6 @@ let do_output _store _cons _doms con =
-     try
-       ignore (Connection.do_output con)
-     with Xenbus.Xb.Reconnect ->
--      info "%s requests a reconnect" (Connection.get_domstr con);
--      History.reconnect con;
--      info "%s reconnection complete" (Connection.get_domstr con)
-+      do_reconnect cons con
-   )
- 

diff --git a/xsa512-2.patch b/xsa512-2.patch
deleted file mode 100644
index 42252e8..0000000
--- a/xsa512-2.patch
+++ /dev/null
@@ -1,78 +0,0 @@
-From 8dc4ca50e62f2587a0213b078fc908fdfb54828b Mon Sep 17 00:00:00 2001
-From: Andrii Sultanov <andriy.sultanov@vates.tech>
-Date: Thu, 20 Aug 2026 15:00:02 +0000
-Subject: oxenstored: Reset the watches trie on domain reconnect
-
-oxenstored maintains two datastructures about watches; one global trie, and
-one hashtable tracked per domain.  Both need keeping in sync, and right now
-the global trie is not emptied when a xenbus reconnect is requested.
-
-This is basically the same bug as XSA-330, commit 491a077ed4c5
-("tools/ocaml/xenstored: delete watch from trie too when resetting watches"),
-just tickled via another path.
-
-Arrange for both Process.do_reset_watches() and Process.do_reconnect() to
-share a common codepath for the resetting of watches and transactions.
-Notably, this means that the latter now calls Connections.del_watches() which
-clears the global trie too.
-
-Connections.del_watches() already calls Connection.del_watches() so remove the
-re-clearing of the state from Connection.do_reconnect().
-
-Move History.trim() into reset_watches_and_transactions() so it's on the
-common path, and place it after removing the transactions rather than before.
-
-This is part of XSA-512 / CVE-2026-79604.
-
-Reported-by: David Korczynski <David@Adalogics.com>
-Fixes: 674ad2be409d ("xenstore: extend the xenstore ring with a 'closing' signal")
-Signed-off-by: Andrii Sultanov <andriy.sultanov@vates.tech>
-Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
-Reviewed-by: Andrii Sultanov <andriy.sultanov@vates.tech>
-
-diff --git a/tools/ocaml/xenstored/connection.ml b/tools/ocaml/xenstored/connection.ml
-index d11011e16439..37eb2444b936 100644
---- a/tools/ocaml/xenstored/connection.ml
-+++ b/tools/ocaml/xenstored/connection.ml
-@@ -148,13 +148,11 @@ let mark_as_bad con =
- let initial_next_tid = 1
- 
- let do_reconnect con =
-+  (* transactions and watches handled by caller *)
-   Xenbus.Xb.reconnect con.xb;
-   (* dom is the same *)
--  Hashtbl.clear con.transactions;
-   con.next_tid <- initial_next_tid;
--  Hashtbl.clear con.watches;
-   (* anonid is the same *)
--  con.nb_watches <- 0;
-   con.stat_nb_ops <- 0;
-   (* perm is the same *)
-   ()
-diff --git a/tools/ocaml/xenstored/process.ml b/tools/ocaml/xenstored/process.ml
-index bc68c54c9aba..fc2558ac3d9b 100644
---- a/tools/ocaml/xenstored/process.ml
-+++ b/tools/ocaml/xenstored/process.ml
-@@ -345,15 +345,18 @@ let do_isintroduced con _t domains _cons data =
-   in
-   if domid = Define.domid_self || Domains.exist domains domid then "T\000" else "F\000"
- 
--(* only in xen >= 4.2 *)
--let do_reset_watches con _t _domains cons _data =
-+let reset_watches_and_transactions cons con =
-   Connections.del_watches cons con;
--  Connection.del_transactions con
-+  Connection.del_transactions con;
-+  History.trim ()
-+
-+let do_reset_watches con _t _domains cons _data =
-+  reset_watches_and_transactions cons con
- 
- let do_reconnect cons con =
-   let domstr = Connection.get_domstr con in
-   info "%s requests a reconnect" domstr;
--  History.trim ();
-+  reset_watches_and_transactions cons con;
-   Connection.do_reconnect con;
-   info "%s reconnection complete" domstr
- 

diff --git a/xsa515.patch b/xsa515.patch
deleted file mode 100644
index ca6e6f8..0000000
--- a/xsa515.patch
+++ /dev/null
@@ -1,36 +0,0 @@
-From: Andrew Cooper <andrew.cooper3@citrix.com>
-Subject: x86/amd: Fix inverted condition in zenbleed_use_chickenbit()
-
-The identified commit inverted the condition under which Xen chooses
-to set the Zenbleed chickenbit.
-
-Undo that, and leave a better comment explaining why.
-
-Found by AI review of the referenced commit.
-
-This is XSA-515 / CVE-2026-79608.
-
-Fixes: d0c75dc4c028 ("x86/amd: Fix race editing DE_CFG")
-Assisted-by: Sashiko + Opus 5.0
-Reported-by: George Dunlap <dunlapg@umich.edu>
-Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
-Reviewed-by: Jan Beulich <jbeulich@suse.com>
-
-diff --git a/xen/arch/x86/cpu/amd.c b/xen/arch/x86/cpu/amd.c
-index 70783c9a0af0..148886fe2ea1 100644
---- a/xen/arch/x86/cpu/amd.c
-+++ b/xen/arch/x86/cpu/amd.c
-@@ -887,7 +887,12 @@ static bool zenbleed_use_chickenbit(void)
-         return is_zen2_uarch();
-     }
- 
--    return (uint8_t)curr_rev >= fixed_rev;
-+    /*
-+     * Zenbleed can be mitigated by disabling Floating-Point
-+     * Mov-Elimination, but this is expensive.  Only do so when we
-+     * don't have a fix in microcode.
-+     */
-+    return (uint8_t)curr_rev < fixed_rev;
- }
- 
- void amd_init_de_cfg(const struct cpuinfo_x86 *c)

diff --git a/xsa516.patch b/xsa516.patch
deleted file mode 100644
index ee60d85..0000000
--- a/xsa516.patch
+++ /dev/null
@@ -1,250 +0,0 @@
-From: George Dunlap <gwd@xenproject.org>
-Subject: x86/pv: map each vCPU's root page table in its per-domain area
-
-For XPTI enabled VMs, restore_all_guest() copies most of the active L4
-pagetable into the per-CPU root_pgt.  The L4 is read via the
-directmap.
-
-Unfortunately, there was no accounting for the fact that PV guests
-have short directmaps.  For an L4 living beyond the 5T boundary (3.5T
-for CONFIG_BIGMEM), Xen will copy arbitrary data from guest-controlled
-virtual address space into the per-CPU root_pgt, instead of the
-intended L4.
-
-Xen has per-domain mappings for the LDT and GDT, with two pages
-reserved for Xen's use in the GDT but only one in use.  Reuse GDT page
-15 to map the effective L4.  The GDT limit keeps implicit accesses out
-of this page.
-
-We update this mapping in make_cr3(), the only place a non-empty value
-of v->arch.cr3 is written into a guest's vcpu struct, for two reasons.
-First is reference counting: this makes it easier to argue that the
-reference for v->arch.cr3 itself covers the reference for the mapping.
-
-Secondly, this guarantees that all updates, even updates made in
-shadow mode, result in an update to the mapping.  During live
-migration, it's possible for guest_get_eff_kern_l1e() to result in a
-modified value of v->arch.cr3 (sketch below); placing the mapping
-update at make_cr3() catches this, while other candidate locations
-like write_ptbase() and toggle_guest_mode() don't.
-
-Note that we introduce the idea of an "effective L4" here, to mean
-"guest L4 after any transformations": XPTI copies either the actual
-guest L4 if not shadowed, or the shadow L4 (transformed) if shadowed.
-
-Sketch: guest_get_eff_kern_l1e() has a pair of toggle_guest_pt() calls
-which happen if the guest is in user mode.  During live migration, a
-log-dirty clean will do a domain_pause and then call
-shadow_blow_tables(), unpinning the shadow of the guest user root
-pagetable.  After execution resumes, the first toggle_guest_pt() could
-then cause that page to become unshadowed.  The second
-toggle_guest_pt() would then re-shadow it, possibly with a different
-backing shadow page.
-
-This is XSA-516 / CVE-2026-79609.
-
-Fixes: 5784de3e2067 ("x86: Meltdown band-aid against malicious 64-bit PV guests")
-Assisted-by: Claude Code:claude-fable-5-1
-Signed-off-by: George Dunlap <gwd@xenproject.org>
-Reviewed-by: Jan Beulich <jbeulich@suse.com>
----
-
-Changes in v4:
-- Reworded the pv_unmap_eff_root_pt() comment and the lifetime note
-  below.  The window has exactly v->arch.cr3's validity: in shadow mode
-  both name the top-level shadow after shadow_teardown() has released
-  it, until vcpu_destroy_pagetables() clears them, and nothing uses
-  either by then.  The earlier wording claimed more.
-- Tweaked commit message wording re sketch to make it clear it's not a race
-- Reworked "last page of GDT" comment to be more technically accurate
-
-(A patch marked v3 was sent erroneously.)
-
-Changes in v2 (of security@ posting):
-- Merged is_pv_domain() condition in make_cr3()
-- Use KB(64) as requested during review
-- BUILD_BUG_ON() now expressed with LAST_RESERVED_GDT_BYTE as
-  requested during review
-- Switched to "PV_EFF_ROOT_PT" to specify that this is after potential
-  shadow transformations
-- Trimmed down the commit message, clarified make_cr3() rationale.
-
-Relative to v5:
-- The window is the spare GDT page after Xen's reserved range rather
-  than a new sub-area: no allocation (v2's array drew a 32x
-  over-allocation remark) and nothing to create or tear down per vCPU.
-- The refresh is in make_cr3(), which every root change passes through,
-  shadow mode included, instead of write_ptbase() plus the toggle.
-- The window is cleared in vcpu_destroy_pagetables() alongside
-  v->arch.cr3, so it has exactly v->arch.cr3's validity.
-- The entry.S computation keeps the v2 shape; the mapping stays
-  read-only, as suggested on v2.
-- Build-time checks pin the window to the reserved range.
-It applies on its own to current staging, using the per-vCPU GDT L1
-table Xen already keeps.
----
- xen/arch/x86/include/asm/config.h | 23 ++++++++++++++--
- xen/arch/x86/include/asm/desc.h   | 10 +++++++
- xen/arch/x86/mm.c                 | 45 +++++++++++++++++++++++++++++--
- xen/arch/x86/x86_64/asm-offsets.c |  1 +
- xen/arch/x86/x86_64/entry.S       |  7 ++++-
- 5 files changed, 81 insertions(+), 5 deletions(-)
-
-diff --git a/xen/arch/x86/include/asm/config.h b/xen/arch/x86/include/asm/config.h
-index 1b28349a42..0c004edc66 100644
---- a/xen/arch/x86/include/asm/config.h
-+++ b/xen/arch/x86/include/asm/config.h
-@@ -249,11 +249,30 @@ extern unsigned long xen_phys_start;
- #define GDT_LDT_VIRT_START       PERDOMAIN_VIRT_SLOT(0)
- #define GDT_LDT_VIRT_END         (GDT_LDT_VIRT_START + (GDT_LDT_MBYTES << 20))
- 
--/* The address of a particular VCPU's GDT or LDT. */
-+/*
-+ * The address of a particular VCPU's GDT or LDT; each is the architectural
-+ * maximum of 64k.
-+ */
-+#define GDT_VIRT_SIZE        KB(64)
- #define GDT_VIRT_START(v)    \
-     (PERDOMAIN_VIRT_START + ((v)->vcpu_id << GDT_LDT_VCPU_VA_SHIFT))
- #define LDT_VIRT_START(v)    \
--    (GDT_VIRT_START(v) + (64*1024))
-+    (GDT_VIRT_START(v) + GDT_VIRT_SIZE)
-+
-+/*
-+ * The vCPU's effective root page table, mapped read-only in the last
-+ * page of its GDT: the page after Xen's reserved range, beyond the
-+ * GDT limit Xen loads (LAST_RESERVED_GDT_BYTE), so no selector can
-+ * reach it.  "Effective" is the root page table the vCPU is meant to
-+ * run on after any transformation: the guest's own, or its shadow
-+ * under shadow paging.  XPTI does not transform it further but copies
-+ * from it: the exit path reads the guest-visible L4 slots from here.
-+ * Adding a reserved GDT page would mean moving the window out of the
-+ * GDT first; pv_map_eff_root_pt() checks the layout at build time.
-+ */
-+#define PV_EFF_ROOT_PT_PAGE    (FIRST_RESERVED_GDT_PAGE + 1)
-+#define PV_EFF_ROOT_PT_OFFSET  (PV_EFF_ROOT_PT_PAGE << PAGE_SHIFT)
-+#define PV_EFF_ROOT_PT(v)      (GDT_VIRT_START(v) + PV_EFF_ROOT_PT_OFFSET)
- 
- /* map_domain_page() map cache. The second per-domain-mapping sub-area. */
- #define MAPCACHE_VCPU_ENTRIES    (CONFIG_PAGING_LEVELS * CONFIG_PAGING_LEVELS)
-diff --git a/xen/arch/x86/include/asm/desc.h b/xen/arch/x86/include/asm/desc.h
-index dcbdac3ff7..7cbb9a7336 100644
---- a/xen/arch/x86/include/asm/desc.h
-+++ b/xen/arch/x86/include/asm/desc.h
-@@ -6,6 +6,16 @@
- /*
-  * Xen reserves a memory page of GDT entries.
-  * No guest GDT entries exist beyond the Xen reserved area.
-+ *
-+ * The page after the reserved area, the last of the GDT's 64k, is the
-+ * PV effective root-table window (PV_EFF_ROOT_PT_PAGE, config.h):
-+ * beyond the GDT limit Xen loads (LAST_RESERVED_GDT_BYTE), so no
-+ * selector reaches it.  Xen uses only a few of the reserved page's
-+ * 512 slots, so more Xen descriptors never need another page; if one
-+ * were needed regardless, the window would have to move out of the
-+ * GDT first (into a per-domain sub-area of its own), as this is the
-+ * GDT's last page.  pv_map_eff_root_pt() checks the layout at build
-+ * time.
-  */
- #define NR_RESERVED_GDT_PAGES   1
- #define NR_RESERVED_GDT_BYTES   (NR_RESERVED_GDT_PAGES * PAGE_SIZE)
-diff --git a/xen/arch/x86/mm.c b/xen/arch/x86/mm.c
-index b158742408..f4b87ed5ec 100644
---- a/xen/arch/x86/mm.c
-+++ b/xen/arch/x86/mm.c
-@@ -510,13 +510,52 @@ void share_xen_page_with_guest(struct page_info *page, struct domain *d,
-     nrspin_unlock(&d->page_alloc_lock);
- }
- 
-+/*
-+ * Map @mfn read-only at v's PV_EFF_ROOT_PT() window.  The window lives in
-+ * v's per-domain area, so v need not be current; the local flush is for
-+ * when it is, with its own page tables loaded.
-+ */
-+static void pv_map_eff_root_pt(const struct vcpu *v, mfn_t mfn)
-+{
-+    /*
-+     * The window must lie beyond the GDT limit Xen loads, so that no
-+     * selector reaches it, and within the GDT's 64k.
-+     */
-+    BUILD_BUG_ON(PV_EFF_ROOT_PT_OFFSET <= LAST_RESERVED_GDT_BYTE);
-+    BUILD_BUG_ON(PV_EFF_ROOT_PT_OFFSET + PAGE_SIZE > GDT_VIRT_SIZE);
-+
-+    l1e_write(pv_gdt_ptes(v) + PV_EFF_ROOT_PT_PAGE,
-+              l1e_from_mfn(mfn, __PAGE_HYPERVISOR_RO));
-+    flush_tlb_one_local(PV_EFF_ROOT_PT(v));
-+}
-+
-+/*
-+ * Clear the window.  Its lifetime is v->arch.cr3's: make_cr3() writes it
-+ * wherever v->arch.cr3 is set, and vcpu_destroy_pagetables() clears it where
-+ * v->arch.cr3 is zeroed.  In shadow mode both name a top-level shadow, which
-+ * shadow_teardown() releases before that point; nothing uses either once the
-+ * vCPU can no longer run.
-+ */
-+static void pv_unmap_eff_root_pt(const struct vcpu *v)
-+{
-+    l1e_write(pv_gdt_ptes(v) + PV_EFF_ROOT_PT_PAGE, l1e_empty());
-+    flush_tlb_one_local(PV_EFF_ROOT_PT(v));
-+}
-+
- void make_cr3(struct vcpu *v, mfn_t mfn)
- {
-     struct domain *d = v->domain;
- 
-     v->arch.cr3 = mfn_x(mfn) << PAGE_SHIFT;
--    if ( is_pv_domain(d) && d->arch.pv.pcid )
--        v->arch.cr3 |= get_pcid_bits(v, false);
-+
-+    if ( is_pv_domain(d) )
-+    {
-+        if ( d->arch.pv.pcid )
-+            v->arch.cr3 |= get_pcid_bits(v, false);
-+
-+        if ( d->arch.pv.xpti )
-+            pv_map_eff_root_pt(v, mfn);
-+    }
- }
- 
- void write_ptbase(struct vcpu *v)
-@@ -3224,6 +3263,8 @@ int vcpu_destroy_pagetables(struct vcpu *v)
-         return rc;
- 
-     v->arch.cr3 = 0;
-+    if ( is_pv_domain(v->domain) && v->domain->arch.pv.xpti )
-+        pv_unmap_eff_root_pt(v);
- 
-     /*
-      * Get the top-level guest page; either the guest_table itself, for
-diff --git a/xen/arch/x86/x86_64/asm-offsets.c b/xen/arch/x86/x86_64/asm-offsets.c
-index baf266ab80..0549fd5e8d 100644
---- a/xen/arch/x86/x86_64/asm-offsets.c
-+++ b/xen/arch/x86/x86_64/asm-offsets.c
-@@ -82,6 +82,7 @@ void __dummy__(void)
- 
- #undef OFFSET_EF
- 
-+    OFFSET(VCPU_id, struct vcpu, vcpu_id);
-     OFFSET(VCPU_processor, struct vcpu, processor);
-     OFFSET(VCPU_domain, struct vcpu, domain);
-     OFFSET(VCPU_vcpu_info, struct vcpu, vcpu_info_area.map);
-diff --git a/xen/arch/x86/x86_64/entry.S b/xen/arch/x86/x86_64/entry.S
-index 59953c9f52..ba175bde7c 100644
---- a/xen/arch/x86/x86_64/entry.S
-+++ b/xen/arch/x86/x86_64/entry.S
-@@ -200,9 +200,14 @@ FUNC_LOCAL(restore_all_guest)
-         movabs $PADDR_MASK & PAGE_MASK, %rsi
-         movabs $DIRECTMAP_VIRT_START, %rcx
-         and   %rsi, %rdi
--        and   %r9, %rsi
-         add   %rcx, %rdi
-+
-+        /* Effective root page table is mapped at PV_EFF_ROOT_PT(v) */
-+        mov   VCPU_id(%rbx), %esi
-+        shl   $GDT_LDT_VCPU_VA_SHIFT, %rsi
-+        movabs $GDT_LDT_VIRT_START + PV_EFF_ROOT_PT_OFFSET, %rcx
-         add   %rcx, %rsi
-+
-         mov   $ROOT_PAGETABLE_FIRST_XEN_SLOT, %ecx
-         mov   root_table_offset(SH_LINEAR_PT_VIRT_START)*8(%rsi), %r8
-         mov   %r8, root_table_offset(SH_LINEAR_PT_VIRT_START)*8(%rdi)

diff --git a/xsa517.patch b/xsa517.patch
deleted file mode 100644
index e4a0740..0000000
--- a/xsa517.patch
+++ /dev/null
@@ -1,45 +0,0 @@
-From: Jan Beulich <jbeulich@suse.com>
-Subject: gnttab: address fallout from XSA-501
-
-A v1 -> v2 change isn't the only scenario where "status" may go stale in
-map_grant_ref(). Across a v2 -> v1 -> v2 change the status pages would
-have been freed and re-populated, possibly changing the pages used for the
-array. Check the pointer against the expected version-dependent value.
-
-This is XSA-517 / CVE-2026-79610.
-
-Fixes: 96dfeb41774a ("gnttab: cope with version changes racing other operations")
-Assisted-by: Claude
-Reported-by: Teddy Astie <teddy.astie@vates.tech>
-Signed-off-by: Jan Beulich <jbeulich@suse.com>
-Reviewed-by: Teddy Astie <teddy.astie@vates.tech>
----
-v2: Add parentheses around the || expression.
-
---- a/xen/common/grant_table.c
-+++ b/xen/common/grant_table.c
-@@ -1350,13 +1350,19 @@ map_grant_ref(
- 
-     grant_read_lock(rgt);
- 
--    if ( unlikely(evaluate_nospec((rgt->gt_version == 1) !=
--                                  (status == &shah->flags))) )
-+    /*
-+     * After a v1 -> v2 change behind our backs "ref" may now be out of
-+     * bounds.  While after a v2 -> v1 -> v2 change "ref" would still be
-+     * suitably bounded, the underlying status page may have moved.
-+     */
-+    if ( evaluate_nospec(rgt->gt_version == 1
-+                         ? status != &shah->flags
-+                         : (ref >= nr_grant_entries(rgt) ||
-+                            status != &status_entry(rgt, ref))) )
-     {
-         /*
--         * After a v1 -> v2 change behind our backs "ref" may now be out of
--         * bounds.  Recalculate it, but only for reserved entries.  Others
--         * will have been cleared anyway by the version change.
-+         * Recalculate status, but only for reserved entries.  Others will
-+         * have been cleared anyway by the version change(s).
-          */
-         if ( ref < GNTTAB_NR_RESERVED_ENTRIES )
-             status = evaluate_nospec(rgt->gt_version == 1)

diff --git a/xsa518.patch b/xsa518.patch
deleted file mode 100644
index 7c9cf54..0000000
--- a/xsa518.patch
+++ /dev/null
@@ -1,76 +0,0 @@
-From: Andrew Cooper <andrew.cooper3@citrix.com>
-Subject: x86/vmx: Rework #DB intercept logic to fix VMEntry failure with BTF
-
-The consistency checks in effect when Blocked-by-STI/MovSS are active includes
-DEBUGCTL.BTF too.  Take this into account when editing PENDING_DBG.BS.
-
-This ends up narrowing the cases where PENDING_DBG is modified.  Rework the
-comment to be more precise.
-
-This is XSA-518 / CVE-2026-79611.
-
-Fixes: 1d3eb8259804 ("x86/vtx: Work around SingleStep + STI/MovSS VMEntry failures")
-Reported-by: Teddy Astie <teddy.astie@vates.tech>
-Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
-Reviewed-by: Jan Beulich <jbeulich@suse.com>
-Reviewed-by: Teddy Astie <teddy.astie@vates.tech>
----
- xen/arch/x86/hvm/vmx/vmx.c | 41 +++++++++++++++++---------------------
- 1 file changed, 18 insertions(+), 23 deletions(-)
-
-diff --git a/xen/arch/x86/hvm/vmx/vmx.c b/xen/arch/x86/hvm/vmx/vmx.c
-index 6237623a4c16..97dd37dd7ce4 100644
---- a/xen/arch/x86/hvm/vmx/vmx.c
-+++ b/xen/arch/x86/hvm/vmx/vmx.c
-@@ -4396,33 +4396,28 @@ void asmlinkage vmx_vmexit_handler(struct cpu_user_regs *regs)
-              * We intercept #DB unconditionally to work around CVE-2015-8104 /
-              * XSA-156 (guest-kernel induced host DoS).
-              *
--             * STI/MovSS shadows block/defer interrupts/exceptions (exact
--             * details are complicated and poorly documented).  Debug
--             * exceptions delayed for any reason are stored in the
--             * PENDING_DBG_EXCEPTIONS field.
-+             * Most sources of #DB accumuate status in PENDING_DBG, which are
-+             * then dispatched in priority order prior to fetching the next
-+             * instruction.  When the #DB intercept triggers, PENDING_DBG is 0
-+             * with the status bits having moved into EXIT_QUALIFICATION.
-              *
--             * The falling edge of PENDING_DBG causes #DB to be delivered,
--             * resulting in a VMExit, as #DB is intercepted.  The VMCS still
--             * reports blocked-by-STI/MovSS.
-+             * At any point if Blocked-by-STI/MovSS are active, extra VMEntry
-+             * consistency checks are applied, cross-checking EFLAGS.TF,
-+             * PENDING_DBG.BS and DEBUGCTL.BTF.  These consistency checks
-+             * apply to Activity-state-HLT too, but Xen doesn't support this.
-              *
--             * The VMEntry checks when EFLAGS.TF is set don't like a VMCS in
--             * this state.  Despite a #DB queued in VMENTRY_INTR_INFO, the
--             * state is rejected as DR6.BS isn't pending.  Fix this up.
-+             * The VMCS state at the point of #DB intercept does not satisfy
-+             * the consistency checks.  In the case that a SingleStep should
-+             * be pending, fill PENDING_DBG back in to satisfy the consitency
-+             * check.
-              */
--            if ( unlikely(regs->eflags & X86_EFLAGS_TF) )
-+            if ( unlikely(regs->eflags & X86_EFLAGS_TF) &&
-+                 (vmread(GUEST_INTERRUPTIBILITY_INFO) &
-+                  (VMX_INTR_SHADOW_STI | VMX_INTR_SHADOW_MOV_SS)) &&
-+                 !(vmread(GUEST_IA32_DEBUGCTL) & IA32_DEBUGCTLMSR_BTF) )
-             {
--                unsigned long int_info;
--
--                __vmread(GUEST_INTERRUPTIBILITY_INFO, &int_info);
--
--                if ( int_info & (VMX_INTR_SHADOW_STI | VMX_INTR_SHADOW_MOV_SS) )
--                {
--                    unsigned long pending_dbg;
--
--                    __vmread(GUEST_PENDING_DBG_EXCEPTIONS, &pending_dbg);
--                    __vmwrite(GUEST_PENDING_DBG_EXCEPTIONS,
--                              pending_dbg | DR_STEP);
--                }
-+                ASSERT(vmread(GUEST_PENDING_DBG_EXCEPTIONS) == 0);
-+                __vmwrite(GUEST_PENDING_DBG_EXCEPTIONS, X86_DR6_BS);
-             }
- 
-             if ( !v->domain->debugger_attached )

diff --git a/xsa519-1.patch b/xsa519-1.patch
deleted file mode 100644
index 5cdc504..0000000
--- a/xsa519-1.patch
+++ /dev/null
@@ -1,116 +0,0 @@
-From: Leonid Komarianskyi <leonid_komarianskyi@epam.com>
-Subject: xen/arm: Fix size underflow in invalidate_dcache_va_range()
-
-When the start address is not cacheline aligned, the bytes covered by
-the first, partial cacheline are subtracted from 'size'. Nothing checks
-that the region actually extends beyond that cacheline, so if it does
-not, the unsigned subtraction underflows and the loop that follows walks
-practically the entire address space.
-
-For example, with a 64-byte cacheline, p = 0x40000001 and size = 1:
-
-    p & cacheline_mask     -> 1, so the partial head is taken
-    size -= 64 - 1         -> 1 - 63 underflows to 0xffffffffffffffc2
-
-Instead of a single "dc civac" at 0x40000000, the loop then runs
-288230376151711743 times, issuing "dc ivac" from 0x40000040 upwards.
-Invalidating without cleaning discards dirty cachelines, so this
-corrupts whatever is mapped along the way until Xen takes a data abort.
-
-Moreover, _cache_flush() in common/grant_table.c, reachable from a guest
-via GNTTABOP_cache_flush, bounds 'offset' and 'length' against the page
-size but requires no alignment, so GNTTAB_CACHE_INVAL with offset = 1
-and length = 1 is enough to trigger this. Note that the page may belong
-to a different domain (the d != owner path), so the data being discarded
-is not necessarily the caller's own.
-
-The subtraction dates back to the fix for XSA-437, so this is a regression
-in that change.
-
-Fix this by detecting the underflow instead of letting it happen: if the
-region ends inside the first cacheline, there is nothing left to flush
-and the function bails out right after cleaning it. Partially covered
-cachelines are still cleaned as well as invalidated, so that data outside
-of the region is not discarded.
-
-Additionally, drop 'idx' and advance 'p' directly instead. It simplifies
-the logic while using fewer variables and less arithmetic.
-
-Note that the partial head is now cleaned using the unaligned start of the
-region instead of the start of its cacheline. This is permitted by the
-architecture; the Arm ARM (DDI 0487) states:
-
-  "When a DC instruction requires an address argument this takes the form
-  of a 64-bit register that holds the VA argument. No alignment
-  restrictions apply for this address."
-
-The same applies on Arm32.
-
-Also, switch the asm() in the loop to asm_inline, like the neighbouring
-ones: the wrapper expands to a single instruction with a trailing
-semicolon, which GCC counts as two statements, overestimating the size
-of the function when deciding whether to inline it.
-
-This is CVE-2026-102699, part of XSA-519.
-
-Fixes: 9a216e92de9f ("xen/arm: page: Handle cache flush of an element at the top of the address space")
-Signed-off-by: Leonid Komarianskyi <leonid_komarianskyi@epam.com>
-Reviewed-by: Jan Beulich <jbeulich@suse.com>
-Reviewed-by: Julien Grall <julien@xen.org>
-
-diff --git a/xen/arch/arm/include/asm/page.h b/xen/arch/arm/include/asm/page.h
-index 90100a96dfda..6da4745736a2 100644
---- a/xen/arch/arm/include/asm/page.h
-+++ b/xen/arch/arm/include/asm/page.h
-@@ -168,7 +168,7 @@ static inline size_t read_dcache_line_bytes(void)
- static inline int invalidate_dcache_va_range(const void *p, unsigned long size)
- {
-     size_t cacheline_mask = dcache_line_bytes - 1;
--    unsigned long idx = 0;
-+    unsigned long partial_head;
- 
-     if ( !size )
-         return 0;
-@@ -178,23 +178,35 @@ static inline int invalidate_dcache_va_range(const void *p, unsigned long size)
- 
-     dsb(sy);           /* So the CPU issues all writes to the range */
- 
--    if ( (uintptr_t)p & cacheline_mask )
-+    /*
-+     * A cacheline only partially covered by the region has to be cleaned as
-+     * well as invalidated, so that data living outside of the region is not
-+     * discarded.
-+     */
-+    partial_head = (uintptr_t)p & cacheline_mask;
-+    if ( partial_head )
-     {
--        size -= dcache_line_bytes - ((uintptr_t)p & cacheline_mask);
--        p = (void *)((uintptr_t)p & ~cacheline_mask);
-+        unsigned long rem = dcache_line_bytes - partial_head;
-+
-         asm_inline volatile (
-             __clean_and_invalidate_dcache_one(0) :: "r" (p) );
--        p += dcache_line_bytes;
-+        p += rem;
-+
-+        /* The region may end within this cacheline, leaving nothing to do. */
-+        if ( __builtin_usubl_overflow(size, rem, &size) )
-+            goto done;
-     }
- 
-     for ( ; size >= dcache_line_bytes;
--            idx += dcache_line_bytes, size -= dcache_line_bytes )
--        asm volatile (__invalidate_dcache_one(0) : : "r" (p + idx));
-+            p += dcache_line_bytes, size -= dcache_line_bytes )
-+        asm_inline volatile (__invalidate_dcache_one(0) : : "r" (p));
- 
-+    /* Partial tail must be cleaned as well. */
-     if ( size > 0 )
-         asm_inline volatile (
--            __clean_and_invalidate_dcache_one(0) :: "r" (p + idx) );
-+            __clean_and_invalidate_dcache_one(0) :: "r" (p) );
- 
-+ done:
-     dsb(sy);           /* So we know the flushes happen before continuing */
- 
-     return 0;

diff --git a/xsa519-2.patch b/xsa519-2.patch
deleted file mode 100644
index 5a24b70..0000000
--- a/xsa519-2.patch
+++ /dev/null
@@ -1,66 +0,0 @@
-From: Andrew Cooper <andrew.cooper3@citrix.com>
-Subject: xen/gnttab: Prevent GNTTABOP_cache_flush from corrupting RO grants
-
-Grants can be offered read-only by the owning domain.  While a domain mapping
-a RO grant may have a need to invalidate the cache, it must not modify the
-other-guests data while doing so.  Force-upgrade to a clean operation in this
-case.
-
-This is CVE-2026-102702, part of XSA-519.
-
-Fixes: 18e8d22fe750 ("introduce GNTTABOP_cache_flush")
-Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
-Reviewed-by: Stefano Stabellini <sstabellini@kernel.org>
-
-diff --git a/xen/common/grant_table.c b/xen/common/grant_table.c
-index 8892653ced70..03e919fd2424 100644
---- a/xen/common/grant_table.c
-+++ b/xen/common/grant_table.c
-@@ -983,6 +983,13 @@ static struct active_grant_entry *grant_map_exists(const struct domain *ld,
- 
-     return ERR_PTR(-EINVAL);
- }
-+
-+static bool grant_map_is_ro(struct active_grant_entry *act)
-+{
-+    ASSERT(spin_is_locked(&act->lock));
-+
-+    return (act->pin & (GNTPIN_hstw_mask | GNTPIN_devw_mask)) == 0;
-+}
- #endif /* CONFIG_HAS_GRANT_CACHE_FLUSH */
- 
- union maptrack_node {
-@@ -3597,7 +3604,7 @@ gnttab_swap_grant_ref(XEN_GUEST_HANDLE_PARAM(gnttab_swap_grant_ref_t) uop,
- }
- 
- #ifdef CONFIG_HAS_GRANT_CACHE_FLUSH
--static int _cache_flush(const gnttab_cache_flush_t *cflush, grant_ref_t *cur_ref)
-+static int _cache_flush(gnttab_cache_flush_t *cflush, grant_ref_t *cur_ref)
- {
-     struct domain *d, *owner;
-     struct page_info *page;
-@@ -3648,6 +3655,24 @@ static int _cache_flush(const gnttab_cache_flush_t *cflush, grant_ref_t *cur_ref
-             put_page(page);
-             return act ? PTR_ERR(act) : 1;
-         }
-+
-+        /*
-+         * If the grant mapping is read-only, it must be cleaned as well as
-+         * invalidated.  Invalidation without cleaning may modify memory the
-+         * granter is expecting not to change.
-+         *
-+         * It is highly unlikely but legal to have multiple grant mappings of
-+         * differing read-only-ness.  If a read-write grant mapping is found
-+         * first, then it's fine to invalidate without clean.
-+         *
-+         * If a read-only grant mapping is found first, a later read-write
-+         * mapping could be missed.  Assume that the read-only mapping is the
-+         * only mapping.  The cost is a clean of up to 4k, while the saving is
-+         * not requiring the search of grant maps to be exhaustive in order to
-+         * spot a corner-case expected not to exist in practice.
-+         */
-+        if ( grant_map_is_ro(act) )
-+            cflush->op |= GNTTAB_CACHE_CLEAN;
-     }
- 
-     v = map_domain_page(mfn);

diff --git a/xsa520.patch b/xsa520.patch
deleted file mode 100644
index c519e51..0000000
--- a/xsa520.patch
+++ /dev/null
@@ -1,23 +0,0 @@
-From: Jan Beulich <jbeulich@suse.com>
-Subject: gnttab: properly drop page ref on a GNTTAB_cache_flush error path
-
-Ordinary domains always have a grant table. System domains don't, but they
-also don't normally "own" pages - except for DOM_IO and DOM_COW on x86.
-
-This is XSA-520 / CVE-2026-102700.
-
-Reported-by: Andrew Cooper <andrew.cooper3@citrix.com>
-Reported-by: Yehyeong Lee <yhlee@isslab.korea.ac.kr>
-Signed-off-by: Jan Beulich <jbeulich@suse.com>
-
---- a/xen/common/grant_table.c
-+++ b/xen/common/grant_table.c
-@@ -3624,6 +3624,8 @@ static int _cache_flush(const gnttab_cac
-     owner = page_get_owner_and_reference(page);
-     if ( !owner || !owner->grant_table )
-     {
-+        if ( owner )
-+            put_page(page);
-         rcu_unlock_domain(d);
-         return -EPERM;
-     }

diff --git a/xsa523-1.patch b/xsa523-1.patch
deleted file mode 100644
index 94e19b0..0000000
--- a/xsa523-1.patch
+++ /dev/null
@@ -1,33 +0,0 @@
-From: Jan Beulich <jbeulich@suse.com>
-Subject: gnttab: complete checking in gnttab_copy_buf_valid()
-
-The ->have_grant field needs checking not only ahead of comparing GREFs,
-but also ahead of comparing MFNs. Else a (likely invalid) GREF from an
-earlier batch element can be mistaken for a (possibly valid) MFN.
-
-This is CVE-2026-102703, part of XSA-523.
-
-Fixes: d28f42f2703e ("grant-table: defer releasing pages acquired in a grant copy")
-Assisted-by: Claude
-Reported-by: Stephan Lipp <Stephan@Adalogics.com>
-Reported-by: CodeAnt AI Security Research <securityresearch@codeant.ai>
-Signed-off-by: Jan Beulich <jbeulich@suse.com>
-Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
-
-diff --git a/xen/common/grant_table.c b/xen/common/grant_table.c
-index b15805f3f94d..3dc5ff88da85 100644
---- a/xen/common/grant_table.c
-+++ b/xen/common/grant_table.c
-@@ -3083,10 +3083,10 @@ static bool gnttab_copy_buf_valid(
-     const struct gnttab_copy_ptr *p, const struct gnttab_copy_buf *b,
-     bool has_gref)
- {
--    if ( !b->virt )
-+    if ( !b->virt || b->have_grant != has_gref )
-         return 0;
-     if ( has_gref )
--        return b->have_grant && p->u.ref == b->ptr.u.ref;
-+        return p->u.ref == b->ptr.u.ref;
-     return p->u.gmfn == b->ptr.u.gmfn;
- }
- 

diff --git a/xsa523-2.patch b/xsa523-2.patch
deleted file mode 100644
index 4cb58fd..0000000
--- a/xsa523-2.patch
+++ /dev/null
@@ -1,61 +0,0 @@
-From: Jan Beulich <jbeulich@suse.com>
-Subject: gnttab: move "only local domain may copy by frame" check
-
-gnttab_copy_one() calls gnttab_copy_lock_domain{s,}() only conditionally.
-The non-GREF check towards the requestor being DOMID_SELF, however, needs
-doing on every batch element. Move the check into gnttab_copy_claim_buf()
-to achieve that.
-
-This is CVE-2026-102704, part of XSA-523.
-
-Fixes: d28f42f2703e ("grant-table: defer releasing pages acquired in a grant copy")
-Assisted-by: Claude
-Reported-by: Stephan Lipp <Stephan@Adalogics.com>
-Reported-by: CodeAnt AI Security Research <securityresearch@codeant.ai>
-Signed-off-by: Jan Beulich <jbeulich@suse.com>
-Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
-
-diff --git a/xen/common/grant_table.c b/xen/common/grant_table.c
-index 3dc5ff88da85..5e79c012b695 100644
---- a/xen/common/grant_table.c
-+++ b/xen/common/grant_table.c
-@@ -2936,13 +2936,8 @@ struct gnttab_copy_buf {
-     bool have_type;
- };
- 
--static int gnttab_copy_lock_domain(domid_t domid, bool is_gref,
--                                   struct gnttab_copy_buf *buf)
-+static int gnttab_copy_lock_domain(domid_t domid, struct gnttab_copy_buf *buf)
- {
--    /* Only DOMID_SELF may reference via frame. */
--    if ( domid != DOMID_SELF && !is_gref )
--        return GNTST_permission_denied;
--
-     buf->domain = rcu_lock_domain_by_any_id(domid);
- 
-     if ( !buf->domain )
-@@ -2974,12 +2969,10 @@ static int gnttab_copy_lock_domains(const struct gnttab_copy *op,
- {
-     int rc;
- 
--    rc = gnttab_copy_lock_domain(op->source.domid,
--                                 op->flags & GNTCOPY_source_gref, src);
-+    rc = gnttab_copy_lock_domain(op->source.domid, src);
-     if ( rc < 0 )
-         goto error;
--    rc = gnttab_copy_lock_domain(op->dest.domid,
--                                 op->flags & GNTCOPY_dest_gref, dest);
-+    rc = gnttab_copy_lock_domain(op->dest.domid, dest);
-     if ( rc < 0 )
-         goto error;
- 
-@@ -3042,6 +3035,9 @@ static int gnttab_copy_claim_buf(const struct gnttab_copy *op,
-         buf->ptr.u.ref = ptr->u.ref;
-         buf->have_grant = 1;
-     }
-+    /* Only DOMID_SELF may reference via frame. */
-+    else if ( ptr->domid != DOMID_SELF )
-+        return GNTST_permission_denied;
-     else
-     {
-         rc = get_paged_frame(ptr->u.gmfn, &buf->mfn, &buf->page,

diff --git a/xsa524.patch b/xsa524.patch
deleted file mode 100644
index 7eba708..0000000
--- a/xsa524.patch
+++ /dev/null
@@ -1,120 +0,0 @@
-From: Jan Beulich <jbeulich@suse.com>
-Subject: AMD/IOMMU: allocate (at least) one spare device table entry
-
-Certain IOMMUs have an off-by-one in the upper bounds check of device
-table accesses. Therefore an extra entry is needed, to avoid the IOMMU
-accessing random unrelated memory.
-
-Since the size is reported to the IOMMU in 4k granularity, an extra page
-may need allocating. To keep things simple (as before: full order-N
-allocations), arrange to allocate the next higher order of pages if/as
-necessary. At the same time avoid using / reporting the extra entries.
-
-As struct table_struct's alloc_size field is now only ever written, drop
-the field right away (if for nothing else than to avoid possible Misra
-concerns).
-
-This is CVE-2024-21963 / XSA-524.
-
-Signed-off-by: Jan Beulich <jbeulich@suse.com>
-Acked-by: Andrew Cooper <andrew.cooper3@citrix.com>
-
-diff --git a/xen/drivers/passthrough/amd/iommu-defs.h b/xen/drivers/passthrough/amd/iommu-defs.h
-index 30b094f18768..72c757918531 100644
---- a/xen/drivers/passthrough/amd/iommu-defs.h
-+++ b/xen/drivers/passthrough/amd/iommu-defs.h
-@@ -104,7 +104,7 @@ struct amd_iommu_dte {
-     /* 0 - 63 */
-     bool v:1;
-     bool tv:1;
--    unsigned int :5;
-+    unsigned int rsvd:5;
-     unsigned int had:2;
- #define IOMMU_MAX_PT_LEVELS 6
-     unsigned int paging_mode:3;
-diff --git a/xen/drivers/passthrough/amd/iommu.h b/xen/drivers/passthrough/amd/iommu.h
-index 52f748310be4..042c6eed59b2 100644
---- a/xen/drivers/passthrough/amd/iommu.h
-+++ b/xen/drivers/passthrough/amd/iommu.h
-@@ -54,7 +54,6 @@ typedef struct cmd_entry
- struct table_struct {
-     void *buffer;
-     unsigned long entries;
--    unsigned long alloc_size;
- };
- 
- struct ring_buffer {
-diff --git a/xen/drivers/passthrough/amd/iommu_init.c b/xen/drivers/passthrough/amd/iommu_init.c
-index e0c8925c33f7..9376ca612099 100644
---- a/xen/drivers/passthrough/amd/iommu_init.c
-+++ b/xen/drivers/passthrough/amd/iommu_init.c
-@@ -80,7 +80,9 @@ static void register_iommu_dev_table_in_mmio_space(struct amd_iommu *iommu)
- 
-     entry = 0;
-     iommu_set_addr_lo_to_reg(&entry, addr_lo >> PAGE_SHIFT);
--    set_field_in_reg_u32((iommu->dev_table.alloc_size / PAGE_SIZE) - 1,
-+    set_field_in_reg_u32(ROUNDUP(iommu->dev_table.entries *
-+                                 IOMMU_DEV_TABLE_ENTRY_SIZE,
-+                                 PAGE_SIZE) - 1,
-                          entry, IOMMU_DEV_TABLE_SIZE_MASK,
-                          IOMMU_DEV_TABLE_SIZE_SHIFT, &entry);
-     writel(entry, iommu->mmio_base + IOMMU_DEV_TABLE_BASE_LOW_OFFSET);
-@@ -948,8 +950,21 @@ static void disable_iommu(struct amd_iommu *iommu)
- 
- static unsigned int __init dt_alloc_size(void)
- {
--    return PAGE_SIZE << get_order_from_bytes(ivrs_bdf_entries *
--                                             IOMMU_DEV_TABLE_ENTRY_SIZE);
-+    unsigned int nr = ROUNDUP(ivrs_bdf_entries,
-+                              PAGE_SIZE / IOMMU_DEV_TABLE_ENTRY_SIZE);
-+
-+    /*
-+     * AMD SN-3060 / CVE-2024-21963
-+     *
-+     * Some IOMMUs read beyond the programmed Device Table limit.  When the
-+     * total size of the Device Table is less than 2M (covering all 2^16 BDFs
-+     * in a single PCI Segment), we must allocate one extra entry to avoid the
-+     * IOMMU reading unrelated memory and treating it as a valid entry.
-+     */
-+    if ( nr < (1U << 16) )
-+        ++nr;
-+
-+    return PAGE_SIZE << get_order_from_bytes(nr * IOMMU_DEV_TABLE_ENTRY_SIZE);
- }
- 
- static void __init deallocate_buffer(void *buf, unsigned long sz)
-@@ -1089,9 +1104,8 @@ static int __init amd_iommu_init_one(struct amd_iommu *iommu, bool intr)
-     if ( !IVRS_MAPPINGS_DEVTAB(ivrs_mappings) )
-         goto error_out;
- 
--    iommu->dev_table.alloc_size = dt_alloc_size();
--    iommu->dev_table.entries = iommu->dev_table.alloc_size /
--                               IOMMU_DEV_TABLE_ENTRY_SIZE;
-+    /* There may be trailing "scratch" entries, which should not be used. */
-+    iommu->dev_table.entries = ivrs_bdf_entries;
-     iommu->dev_table.buffer = IVRS_MAPPINGS_DEVTAB(ivrs_mappings);
- 
-     enable_iommu(iommu);
-@@ -1255,11 +1269,21 @@ static int __init cf_check amd_iommu_setup_device_table(
-          * IOMMU_DEV_TABLE_INT_CONTROL_ABORTED all being zero, and us also
-          * wanting at least TV, GV, I, and EX set to false.
-          */
--        for ( bdf = 0, size /= sizeof(*dt); bdf < size; ++bdf )
-+        for ( bdf = 0; bdf < ivrs_bdf_entries; ++bdf )
-             dt[bdf] = (struct amd_iommu_dte){
-                           .v = true,
-                           .iv = iommu_intremap,
-                       };
-+
-+        /*
-+         * Prefill extra DTEs such that their use will raise an
-+         * ILLEGAL_DEV_TABLE_ENTRY event.
-+         */
-+        for ( size /= sizeof(*dt); bdf < size; ++bdf )
-+            dt[bdf] = (struct amd_iommu_dte){
-+                          .v = true,
-+                          .rsvd = 3, /* As per AMD recommendation. */
-+                      };
-     }
- 
-     /* Add device table entries */

diff --git a/xsa525-1.patch b/xsa525-1.patch
deleted file mode 100644
index 24df989..0000000
--- a/xsa525-1.patch
+++ /dev/null
@@ -1,53 +0,0 @@
-From: Andrew Cooper <andrew.cooper3@citrix.com>
-Subject: x86/spec-ctrl: Rename tsa_calculations()
-
-... and adjust some comments in preparation to cope with the second TSA
-variant.
-
-No functional change.
-
-This is part of XSA-525.
-
-Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
-Acked-by: Roger Pau Monné <roger@xenproject.org>
-
-diff --git a/xen/arch/x86/spec_ctrl.c b/xen/arch/x86/spec_ctrl.c
-index bc8538a56f0e..8f77fe4cdb92 100644
---- a/xen/arch/x86/spec_ctrl.c
-+++ b/xen/arch/x86/spec_ctrl.c
-@@ -1450,11 +1450,11 @@ static void __init rfds_calculations(void)
- }
- 
- /*
-- * Transient Scheduler Attacks
-+ * Transient Scheduler Attacks (Store Queue and L1)
-  *
-  * https://www.amd.com/content/dam/amd/en/documents/resources/bulletin/technical-guidance-for-mitigating-transient-scheduler-attacks.pdf
-  */
--static void __init tsa_calculations(void)
-+static void __init tsa_sq_l1_calculations(void)
- {
-     unsigned int curr_rev, min_rev;
- 
-@@ -2247,9 +2247,9 @@ void __init init_speculation_mitigations(void)
-      * - March 2023, for RFDS.  Enumerate RFDS_CLEAR to mean that VERW now
-      *   scrubs non-architectural entries from certain register files.
-      *
--     * - July 2025, for TSA.  Introduces VERW side effects to mitigate
--     *   TSA_{SQ/L1}.  Xen must synthesise the VERW_CLEAR feature based on
--     *   microcode version.
-+     * - July 2025, for TSA-L1/SQ.  Introduces VERW side effects on Zen3/4.
-+     *   Xen must synthesise the VERW_CLEAR feature based on microcode
-+     *   version.
-      *
-      *   Note, these microcode updates were produced before the remediation of
-      *   the microcode signature issues, and are included in the firwmare
-@@ -2257,7 +2257,7 @@ void __init init_speculation_mitigations(void)
-      */
-     mds_calculations();
-     rfds_calculations();
--    tsa_calculations();
-+    tsa_sq_l1_calculations();
- 
-     /*
-      * Parts which enumerate FB_CLEAR are those with now-updated microcode

diff --git a/xsa525-2.patch b/xsa525-2.patch
deleted file mode 100644
index 8398008..0000000
--- a/xsa525-2.patch
+++ /dev/null
@@ -1,136 +0,0 @@
-From: Andrew Cooper <andrew.cooper3@citrix.com>
-Subject: x86/spec-ctrl: Extend TSA-SQ/L1 mitigations to Zen5 CPUs
-
-AMD previously said that Zen5 was not affected by TSA.  This statement has
-been retracted, along with the recommendation to synthesise the TSA_SQ/L1_NO
-bits on Zen5 CPUs.
-
-Simply removing the synthesis of TSA_SQ/L1_NO creates a migration/resume
-problem; VMs which had booted between July 2025 and Nov 2026 on Zen5 would no
-longer be eligible to run on the same system as before.
-
-Tolerate VMs which have seen TSA_SQ/L1_NO, despite knowing this to be an
-unsafe configuration.  The VM is in no worse a position than before.
-
-This is CVE-2024-36350 and CVE-2024-36357, part of XSA-525.
-
-Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
-Acked-by: Roger Pau Monné <roger@xenproject.org>
-
-diff --git a/xen/arch/x86/cpu-policy.c b/xen/arch/x86/cpu-policy.c
-index 48a3185eed8d..e797585528d0 100644
---- a/xen/arch/x86/cpu-policy.c
-+++ b/xen/arch/x86/cpu-policy.c
-@@ -499,6 +499,23 @@ static void __init guest_common_max_feature_adjustments(uint32_t *fs)
-          * has been around since the 286.
-          */
-         __set_bit(X86_FEATURE_VERW_CLEAR, fs);
-+
-+        /*
-+         * Between July 2025 and Nov 2026, AMD had said that Zen5 was not
-+         * vulnerable to TSA and to synthesise the TSA_SQ/L1_NO bits, but this
-+         * statement has been retracted.
-+         *
-+         * VM's booted during that period on Zen5 CPUs will have seen the
-+         * bits.  Tolerate such VMs; they'll be in no worse a position than
-+         * prior to Nov 2026.
-+         *
-+         * Zen6 enumerates TSA_SQ/L1_NO, so there's no change from this logic.
-+         */
-+        if ( boot_cpu_data.family == 0x1a )
-+        {
-+            __set_bit(X86_FEATURE_TSA_SQ_NO, fs);
-+            __set_bit(X86_FEATURE_TSA_L1_NO, fs);
-+        }
-         break;
-     }
- 
-@@ -592,6 +609,20 @@ static void __init guest_common_default_feature_adjustments(uint32_t *fs)
-          */
-         if ( !cpu_has_verw_clear )
-             __clear_bit(X86_FEATURE_VERW_CLEAR, fs);
-+
-+        /*
-+         * Between July 2025 and Nov 2026, AMD had said that Zen5 was not
-+         * vulnerable to TSA and to synthesise the TSA_SQ/L1_NO bits, but this
-+         * statement has been retracted.
-+         *
-+         * The max policy has these set for migration compatibility, but a VM
-+         * should not see them by default if the hardware is affected.
-+         */
-+        if ( !cpu_has_tsa_sq_no )
-+            __clear_bit(X86_FEATURE_TSA_SQ_NO, fs);
-+
-+        if ( !cpu_has_tsa_l1_no )
-+            __clear_bit(X86_FEATURE_TSA_L1_NO, fs);
-         break;
-     }
- 
-diff --git a/xen/arch/x86/spec_ctrl.c b/xen/arch/x86/spec_ctrl.c
-index 8f77fe4cdb92..3132752090da 100644
---- a/xen/arch/x86/spec_ctrl.c
-+++ b/xen/arch/x86/spec_ctrl.c
-@@ -1467,18 +1467,22 @@ static void __init tsa_sq_l1_calculations(void)
-         return;
- 
-     /*
--     * According to the whitepaper, some Fam1A CPUs (Models 0x00...0x4f,
--     * 0x60...0x7f) are not vulnerable but don't enumerate TSA_{SQ,L1}_NO.  If
--     * we see either enumerated, assume both are correct ...
-+     * Zen6 and later are stated not to be vulnerable to the 3 known TSA
-+     * variants, and enumerate all TSA_*_NO bits.
-+     *
-+     * Zen5 is vulnerable to all 3.  It gets VERW_CLEAR with new enough
-+     * microcode, which is enumerated in CPUID.
-+     *
-+     * No synthesis should be performed.
-      */
--    if ( cpu_has_tsa_sq_no || cpu_has_tsa_l1_no )
-+    if ( boot_cpu_data.family > 0x19 )
-         return;
- 
-     /*
--     * ... otherwise, synthesise them.  CPUs other than Fam19 (Zen3/4) are
--     * stated to be not vulnerable.
-+     * Zen2 and older are stated not to be vulnerable, and need to synthesise
-+     * TSA_SQ/L1_NO.
-      */
--    if ( boot_cpu_data.family != 0x19 )
-+    if ( boot_cpu_data.family < 0x19 )
-     {
-         setup_force_cpu_cap(X86_FEATURE_TSA_SQ_NO);
-         setup_force_cpu_cap(X86_FEATURE_TSA_L1_NO);
-@@ -1486,7 +1490,7 @@ static void __init tsa_sq_l1_calculations(void)
-     }
- 
-     /*
--     * Fam19 CPUs get VERW_CLEAR with new enough microcode, but must
-+     * Zen3 and Zen4 get VERW_CLEAR with new enough microcode, but must
-      * synthesise the CPUID bit.
-      */
-     curr_rev = this_cpu(cpu_sig).rev;
-@@ -2254,6 +2258,9 @@ void __init init_speculation_mitigations(void)
-      *   Note, these microcode updates were produced before the remediation of
-      *   the microcode signature issues, and are included in the firwmare
-      *   updates fixing the entrysign vulnerability from ~December 2024.
-+     *
-+     * - September 2026, for TSA-L1/SQ/Fill.  Introduces VERW side effects on
-+     *   Zen5, and enumerates VERW_CLEAR.
-      */
-     mds_calculations();
-     rfds_calculations();
-diff --git a/xen/include/public/arch-x86/cpufeatureset.h b/xen/include/public/arch-x86/cpufeatureset.h
-index 72c1bde7e6fe..d750b490098e 100644
---- a/xen/include/public/arch-x86/cpufeatureset.h
-+++ b/xen/include/public/arch-x86/cpufeatureset.h
-@@ -402,8 +402,8 @@ XEN_CPUFEATURE(PB_OPT_CTRL,        16*32+32) /*   MSR_PB_OPT_CTRL.IBPB_ALT */
- XEN_CPUFEATURE(ITS_NO,             16*32+62) /*!A No Indirect Target Selection */
- 
- /* AMD-defined CPU features, CPUID level 0x80000021.ecx, word 18 */
--XEN_CPUFEATURE(TSA_SQ_NO,          18*32+ 1) /*A  No Store Queue Transitive Scheduler Attacks */
--XEN_CPUFEATURE(TSA_L1_NO,          18*32+ 2) /*A  No L1D Transitive Scheduler Attacks */
-+XEN_CPUFEATURE(TSA_SQ_NO,          18*32+ 1) /*!A No Store Queue Transitive Scheduler Attacks */
-+XEN_CPUFEATURE(TSA_L1_NO,          18*32+ 2) /*!A No L1D Transitive Scheduler Attacks */
- 
- #endif /* XEN_CPUFEATURE */
- 

diff --git a/xsa525-3.patch b/xsa525-3.patch
deleted file mode 100644
index e7f0c27..0000000
--- a/xsa525-3.patch
+++ /dev/null
@@ -1,107 +0,0 @@
-From: Andrew Cooper <andrew.cooper3@citrix.com>
-Subject: x86/spec-ctrl: Mitigate the new TSA-Fill variant
-
-A new variant of TSA has been found, affecting only Zen5 CPUs.
-
-Updated microcode has been issued.  Unlike the original TSA, this microcode
-does enumerate VERW_CLEAR, so Xen does not need a table of microcode
-revisions.  The handling of VERW_CLEAR for guests is the same as before.
-
-A new CPUID bit, TSA_FILL_NO, indicates that the system is unaffected.  It is
-expected to be set on all Zen6 and later systems.  Zen4 and older are believed
-to be unaffected, and need to synthesise the bit for guests.
-
-This is CVE-2026-0004, part of XSA-525.
-
-Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
-Reviewed-by: Roger Pau Monné <roger@xenproject.org>
-
-diff --git a/xen/arch/x86/include/asm/cpufeature.h b/xen/arch/x86/include/asm/cpufeature.h
-index 4933ad234f78..23a2614634d8 100644
---- a/xen/arch/x86/include/asm/cpufeature.h
-+++ b/xen/arch/x86/include/asm/cpufeature.h
-@@ -245,6 +245,7 @@ static inline bool boot_cpu_has(unsigned int feat)
- /* CPUID level 0x80000021.ecx */
- #define cpu_has_tsa_sq_no       boot_cpu_has(X86_FEATURE_TSA_SQ_NO)
- #define cpu_has_tsa_l1_no       boot_cpu_has(X86_FEATURE_TSA_L1_NO)
-+#define cpu_has_tsa_fill_no     boot_cpu_has(X86_FEATURE_TSA_FILL_NO)
- 
- /* Synthesized. */
- #define cpu_has_arch_perfmon    boot_cpu_has(X86_FEATURE_ARCH_PERFMON)
-diff --git a/xen/arch/x86/spec_ctrl.c b/xen/arch/x86/spec_ctrl.c
-index 3132752090da..fb015cac5e8f 100644
---- a/xen/arch/x86/spec_ctrl.c
-+++ b/xen/arch/x86/spec_ctrl.c
-@@ -510,7 +510,7 @@ static void __init print_details(enum ind_thunk thunk)
-      * Hardware read-only information, stating immunity to certain issues, or
-      * suggestions of which mitigation to use.
-      */
--    printk("  Hardware hints:%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s\n",
-+    printk("  Hardware hints:%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s\n",
-            (caps & ARCH_CAPS_RDCL_NO)                        ? " RDCL_NO"        : "",
-            (caps & ARCH_CAPS_EIBRS)                          ? " EIBRS"          : "",
-            (caps & ARCH_CAPS_RSBA)                           ? " RSBA"           : "",
-@@ -537,7 +537,8 @@ static void __init print_details(enum ind_thunk thunk)
-            (e21a & cpufeat_mask(X86_FEATURE_SRSO_NO))        ? " SRSO_NO"        : "",
-            (e21a & cpufeat_mask(X86_FEATURE_SRSO_US_NO))     ? " SRSO_US_NO"     : "",
-            (e21c & cpufeat_mask(X86_FEATURE_TSA_SQ_NO))      ? " TSA_SQ_NO"      : "",
--           (e21c & cpufeat_mask(X86_FEATURE_TSA_L1_NO))      ? " TSA_L1_NO"      : "");
-+           (e21c & cpufeat_mask(X86_FEATURE_TSA_L1_NO))      ? " TSA_L1_NO"      : "",
-+           (e21c & cpufeat_mask(X86_FEATURE_TSA_FILL_NO))    ? " TSA_FILL_NO"    : "");
- 
-     /* Hardware features which need driving to mitigate issues. */
-     printk("  Hardware features:%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s\n",
-@@ -1524,6 +1525,33 @@ static void __init tsa_sq_l1_calculations(void)
-         setup_force_cpu_cap(X86_FEATURE_VERW_CLEAR);
- }
- 
-+/*
-+ * Transient Scheduler Attacks (L1-Fill)
-+ *
-+ * https://www.amd.com/content/dam/amd/en/documents/resources/bulletin/technical-guidance-for-mitigating-transient-scheduler-attacks.pdf
-+ */
-+static void __init tsa_fill_calculations(void)
-+{
-+    /* TSA is only known to affect AMD processors at this time. */
-+    if ( boot_cpu_data.vendor != X86_VENDOR_AMD )
-+        return;
-+
-+    /* If we're virtualised, don't attempt to synthesise anything. */
-+    if ( cpu_has_hypervisor )
-+        return;
-+
-+    /*
-+     * Zen6 and later CPUs are expected to enumerate TSA_FILL_NO.
-+     *
-+     * Zen5 CPUs are vulnerable and get VERW_CLEAR in microcode.
-+     *
-+     * Zen4 and earlier are not believed to be affected, but do not enumerate
-+     * TSA_FILL_NO.  Synthesise it.
-+     */
-+    if ( boot_cpu_data.family < 0x1a )
-+        setup_force_cpu_cap(X86_FEATURE_TSA_FILL_NO);
-+}
-+
- static bool __init cpu_has_gds(void)
- {
-     /*
-@@ -2265,6 +2293,7 @@ void __init init_speculation_mitigations(void)
-     mds_calculations();
-     rfds_calculations();
-     tsa_sq_l1_calculations();
-+    tsa_fill_calculations();
- 
-     /*
-      * Parts which enumerate FB_CLEAR are those with now-updated microcode
-diff --git a/xen/include/public/arch-x86/cpufeatureset.h b/xen/include/public/arch-x86/cpufeatureset.h
-index d750b490098e..fb65548381ab 100644
---- a/xen/include/public/arch-x86/cpufeatureset.h
-+++ b/xen/include/public/arch-x86/cpufeatureset.h
-@@ -404,6 +404,7 @@ XEN_CPUFEATURE(ITS_NO,             16*32+62) /*!A No Indirect Target Selection *
- /* AMD-defined CPU features, CPUID level 0x80000021.ecx, word 18 */
- XEN_CPUFEATURE(TSA_SQ_NO,          18*32+ 1) /*!A No Store Queue Transitive Scheduler Attacks */
- XEN_CPUFEATURE(TSA_L1_NO,          18*32+ 2) /*!A No L1D Transitive Scheduler Attacks */
-+XEN_CPUFEATURE(TSA_FILL_NO,        18*32+ 7) /*A  No L1D-Fill Transitive Scheduler Attacks */
- 
- #endif /* XEN_CPUFEATURE */
- 

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2026-11-28 19:47 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-11-28 19:47 [rpms/xen] f44: update to xen 4.21.3 Michael Young

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox